PageSourceSearch

https://kilimanjaro-restaurants.com/_next/static/chunks/pages/menu/[restaurant]-0a1fd4dd1f1afd02fc49.js

js kilimanjaro-restaurants.com collected 2026-09-24 10:17:30 UTC 77,055 bytes, 2 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[48,19],{D71S:function(e,t,r){"use strict";r.r(t);var o,n=r("nKUr"),a=r("MX0m"),i=r.n(a),s=r("q1tI"),c=new Uint8Array(16);function l(){if(!o&&!(o="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(c)}var d=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(e){return"string"===typeof e&&d.test(e)},p=[],b=0;b<256;++b)p.push((b+256).toString(16).substr(1));var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase();if(!u(r))throw TypeError("Stringified UUID is invalid");return r};var m=function(e,t,r){var o=(e=e||{}).random||(e.rng||l)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return f(o)};t.default=({handlePlaceSelect:e})=>{const{0:t,1:r}=Object(s.useState)(""),{0:o,1:a}=Object(s.useState)([]),{0:c,1:l}=Object(s.useState)(m()),d=Object(s.useRef)(null),u="AIzaSyBcSwVVjJfgvXsW111B6zwdnHO5bdyd9xQ",p=t=>{(async t=>{try{var o;const n=await fetch(`https://places.googleapis.com/v1/places/${t}?sessionToken=${c}`,{method:"GET",headers:{"X-Goog-Api-Key":u,"X-Goog-FieldMask":"id,displayName,formattedAddress,location"}}),i=await n.json();e(i),r(i.formattedAddress||(null===(o=i.displayName)||void 0===o?void 0:o.text)||""),a([]),l(m())}catch(n){console.error("Error fetching place details:",n)}})(t.placePrediction.placeId)};return Object(n.jsxs)("div",{style:{width:"100%",position:"relative"},className:"jsx-2686515956",children:[Object(n.jsx)(i.a,{id:"2686515956",children:[".custom-placeholder.jsx-2686515956::-webkit-input-placeholder{font-size:16px;padding-left:10px;}",".custom-placeholder.jsx-2686515956::-moz-placeholder{font-size:16px;padding-left:10px;}",".custom-placeholder.jsx-2686515956:-ms-input-placeholder{font-size:16px;padding-left:10px;}",".custom-placeholder.jsx-2686515956::placeholder{font-size:16px;padding-left:10px;}",".form-control:focus{outline:none !important;box-shadow:none !important;border-color:#ced4da !important;}"]}),Object(n.jsx)("input",{type:"text",style:{width:"100%",height:"40px",outline:"none",boxShadow:"none",fontSize:"18px",borderRadius:"25px",border:" 1px solid #d9d9d",background:"#FFFFF"},placeholder:"Your address",value:t,onChange:e=>{const t=e.target.value;r(t),d.current&&clearTimeout(d.current),t.length>=3?d.current=setTimeout((()=>{(async e=>{if(e)try{const t=await fetch("https://places.googleapis.com/v1/places:autocomplete",{method:"POST",headers:{"Content-Type":"application/json","X-Goog-Api-Key":u,"X-Goog-FieldMask":"suggestions.placePrediction.placeId,suggestions.placePrediction.structuredFormat.mainText.text,suggestions.placePrediction.structuredFormat.secondaryText.text"},body:JSON.stringify({input:e,sessionToken:c,regionCode:"NG",locationRestriction:{rectangle:{low:{latitude:4,longitude:2.7},high:{latitude:13.8,longitude:14.6}}}})}),r=await t.json();a(r.suggestions||[])}catch(t){console.error("Error fetching predictions:",t)}})(t)}),500):a([])},className:"jsx-2686515956 form-control custom-placeholder "}),o.length>0&&Object(n.jsx)("div",{style:{backgroundColor:"white",border:"1px solid #ccc",borderRadius:"4px",marginTop:"5px",maxHeight:"200px",overflowY:"auto",position:"absolute",width:"100%",zIndex:1e3},className:"jsx-2686515956",children:o.map((e=>{var t;return Object(n.jsxs)("div",{onClick:()=>p(e),style:{padding:"10px",cursor:"pointer",borderBottom:"1px solid #eee"},className:"jsx-2686515956",children:[e.placePrediction.structuredFormat.mainText.text,",",null===(t=e.placePrediction.structuredFormat.secondaryText)||void 0===t?void 0:t.text]},e.placePrediction.placeId)}))})]})}},EDYA:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/menu/[restaurant]",function(){return r("W//n")}])},UUyv:function(e,t,r){(()=>{var t={296:(e,t,r)=>{var o=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),u=Object.prototype.toString,p=Math.max,b=Math.min,f=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||i.test(e)?s(e.slice(2),r?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,r){var o,n,a,i,s,c,l=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function j(t){var r=o,a=n;return o=n=void 0,l=t,i=e.apply(a,r)}function v(e){var r=e-c;return void 0===c||r>=t||r<0||u&&e-l>=a}function O(){var e=f();if(v(e))return g(e);s=setTimeout(O,function(e){var r=t-(e-c);return u?b(r,a-(e-l)):r}(e))}function g(e){return s=void 0,h&&o?j(e):(o=n=void 0,i)}function x(){var e=f(),r=v(e);if(o=arguments,n=this,c=e,r){if(void 0===s)return function(e){return l=e,s=setTimeout(O,t),d?j(e):i}(c);if(u)return s=setTimeout(O,t),j(c)}return void 0===s&&(s=setTimeout(O,t)),i}return t=y(t)||0,m(r)&&(d=!!r.leading,a=(u="maxWait"in r)?p(y(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),x.cancel=function(){void 0!==s&&clearTimeout(s),l=0,o=c=n=s=void 0},x.flush=function(){return void 0===s?i:g(f())},x}},96:(e,t,r)=>{var o="Expected a function",n=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,d="object"==typeof self&&self&&self.Object===Object&&self,u=l||d||Function("return this")(),p=Object.prototype.toString,b=Math.max,f=Math.min,m=function(){return u.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var r=i.test(e);return r||s.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}e.exports=function(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new TypeError(o);return y(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),function(e,t,r){var n,a,i,s,c,l,d=0,u=!1,p=!1,j=!0;if("function"!=typeof e)throw new TypeError(o);function v(t){var r=n,o=a;return n=a=void 0,d=t,s=e.apply(o,r)}function O(e){var r=e-l;return void 0===l||r>=t||r<0||p&&e-d>=i}function g(){var e=m();if(O(e))return x(e);c=setTimeout(g,function(e){var r=t-(e-l);return p?f(r,i-(e-d)):r}(e))}function x(e){return c=void 0,j&&n?v(e):(n=a=void 0,s)}function w(){var e=m(),r=O(e);if(n=arguments,a=this,l=e,r){if(void 0===c)return function(e){return d=e,c=setTimeout(g,t),u?v(e):s}(l);if(p)return c=setTimeout(g,t),v(l)}return void 0===c&&(c=setTimeout(g,t)),s}return t=h(t)||0,y(r)&&(u=!!r.leading,i=(p="maxWait"in r)?b(h(r.maxWait)||0,t):i,j="trailing"in r?!!r.trailing:j),w.cancel=function(){void 0!==c&&clearTimeout(c),d=0,n=l=a=c=void 0},w.flush=function(){return void 0===c?s:x(m())},w}(e,t,{leading:n,maxWait:t,trailing:a})}},703:(e,t,r)=>{"use strict";var o=r(414);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,a,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
1:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:n};return r.PropTypes=r,r}},697:(e,t,r)=>{e.exports=r(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";n.r(a),n.d(a,{LazyLoadComponent:()=>J,LazyLoadImage:()=>te,trackWindowScroll:()=>L});const e=r("q1tI");var t=n.n(e),o=n(697);function i(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,u(o.key),o)}}function u(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){e.forEach((function(e){e.isIntersecting&&e.target.onVisible()}))},m={},y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(y,e);var r,o,n,a,u=(n=y,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(n);if(a){var r=b(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=u.call(this,e)).supportsObserver=!e.scrollPosition&&e.useIntersectionObserver&&i(),t.supportsObserver){var r=e.threshold;t.observer=function(e){return m[e]=m[e]||new IntersectionObserver(f,{rootMargin:e+"px"}),m[e]}(r)}return t}return r=y,(o=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollPosition,t=this.placeholder.getBoundingClientRect(),r=this.placeholder.style,o=
1parseInt(r.getPropertyValue("margin-left"),10)||0,n=parseInt(r.getPropertyValue("margin-top"),10)||0;return{bottom:e.y+t.bottom+n,left:e.x+t.left+o,right:e.x+t.right+o,top:e.y+t.top+n}}},{key:"isPlaceholderInViewport",value:function(){if("undefined"==typeof window||!this.placeholder)return!1;var e=this.props,t=e.scrollPosition,r=e.threshold,o=this.getPlaceholderBoundingBox(t),n=t.y+window.innerHeight,a=t.x,i=t.x+window.innerWidth,s=t.y;return Boolean(s-r<=o.bottom&&n+r>=o.top&&a-r<=o.right&&i+r>=o.left)}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var e=this,r=this.props,o=r.className,n=r.height,a=r.placeholder,i=r.style,s=r.width;if(a&&"function"!=typeof a.type)return t().cloneElement(a,{ref:function(t){return e.placeholder=t}});var d=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({display:"inline-block"},i);return void 0!==s&&(d.width=s),void 0!==n&&(d.height=n),t().createElement("span",{className:o,ref:function(t){return e.placeholder=t},style:d},a)}}])&&d(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),y}(t().Component);y.propTypes={onVisible:o.PropTypes.func.isRequired,className:o.PropTypes.string,height:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),placeholder:o.PropTypes.element,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,scrollPosition:o.PropTypes.shape({x:o.PropTypes.number.isRequired,y:o.PropTypes.number.isRequired}),width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string])},y.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const h=y;var j=n(296),v=n.n(j),O=n(96),g=n.n(O),x=function(e){var t=getComputedStyle(e,null);return t.getPropertyValue("overflow")+t.getPropertyValue("overflow-y")+t.getPropertyValue("overflow-x")};const w=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t instanceof HTMLElement;){if(/(scroll|auto)/.test(x(t)))return t;t=t.parentNode}return window};function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var N=["delayMethod","delayTime"];function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(){return"undefined"==typeof window?0:window.scrollX||window.pageXOffset},C=function(){return"undefined"==typeof window?0:window.scrollY||window.pageYOffset};const L=function(e){var r=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(l,r);var o,n,a,s,c=(a=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(a);if(s){var r=E(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return I(this,e)});function l(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
1(this,l),(r=c.call(this,e)).useIntersectionObserver=e.useIntersectionObserver&&i(),r.useIntersectionObserver)return I(r);var o=r.onChangeScroll.bind(T(r));return"debounce"===e.delayMethod?r.delayedScroll=v()(o,e.delayTime):"throttle"===e.delayMethod&&(r.delayedScroll=g()(o,e.delayTime)),r.state={scrollPosition:{x:k(),y:C()}},r.baseComponentRef=t().createRef(),r}return o=l,(n=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){"undefined"==typeof window||this.useIntersectionObserver||w(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement=w(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:k(),y:C()}})}},{key:"render",value:function(){var r=this.props,o=(r.delayMethod,r.delayTime,function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(r,N)),n=this.useIntersectionObserver?null:this.state.scrollPosition;return t().createElement(e,P({forwardRef:this.baseComponentRef,scrollPosition:n},o))}}])&&function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(n=function(e,t){if("object"!==S(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===S(n)?n:String(n)),o)}var n}(o.prototype,n),Object.defineProperty(o,"prototype",{writable:!1}),l}(t().Component);return r.propTypes={delayMethod:o.PropTypes.oneOf(["debounce","throttle"]),delayTime:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool},r.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},r};function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){return($=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}(s,e);var r,o,n,a,i=(n=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=D(n);if(a){var r=D(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return r=s,(o=[{key:"render",value:function(){return t().createElement(h,this.props)}}])&&function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(n=function(e,t){if("object"!==R(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==R(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===R(n)?n:String(n)),o)}var n}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),s}(t().Component);const B=L(M);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
1function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(c,e);var r,o,n,a,s=(n=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(n);if(a){var r=F(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return V(e)}(this,e)});function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=s.call(this,e);var r=e.afterLoad,o=e.beforeLoad,n=e.scrollPosition,a=e.visibleByDefault;return t.state={visible:a},a&&(o(),r()),t.onVisible=t.onVisible.bind(V(t)),t.isScrollTracked=Boolean(n&&Number.isFinite(n.x)&&n.x>=0&&Number.isFinite(n.y)&&n.y>=0),t}return r=c,(o=[{key:"componentDidUpdate",value:function(e,t){t.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var e=this.props,r=e.className,o=e.delayMethod,n=e.delayTime,a=e.height,s=e.placeholder,c=e.scrollPosition,l=e.style,d=e.threshold,u=e.useIntersectionObserver,p=e.width;return this.isScrollTracked||u&&i()?t().createElement(h,{className:r,height:a,onVisible:this.onVisible,placeholder:s,scrollPosition:c,style:l,threshold:d,useIntersectionObserver:u,width:p}):t().createElement(B,{className:r,delayMethod:o,delayTime:n,height:a,onVisible:this.onVisible,placeholder:s,style:l,threshold:d,width:p})}}])&&function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(n=function(e,t){if("object"!==q(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==q(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===q(n)?n:String(n)),o)}var n}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),c}(t().Component);z.propTypes={afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool},z.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const J=z;function W(e){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var U=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){Y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Y(e,t,r){return(t=Q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G(){return(G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function Q(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==W(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===W(t)?t:String(t)}
1function K(e,t){return(K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(s,e);var r,o,n,a,i=(n=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Z(n);if(a){var r=Z(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=i.call(this,e)).state={loaded:!1},t}return r=s,(o=[{key:"onImageLoad",value:function(){var e=this;return this.state.loaded?null:function(t){e.props.onLoad(t),e.props.afterLoad(),e.setState({loaded:!0})}}},{key:"getImg",value:function(){var e=this.props,r=(e.afterLoad,e.beforeLoad,e.delayMethod,e.delayTime,e.effect,e.placeholder,e.placeholderSrc,e.scrollPosition,e.threshold,e.useIntersectionObserver,e.visibleByDefault,e.wrapperClassName,e.wrapperProps,function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,U));return t().createElement("img",G({},r,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var e=this.props,r=e.beforeLoad,o=e.className,n=e.delayMethod,a=e.delayTime,i=e.height,s=e.placeholder,c=e.scrollPosition,l=e.style,d=e.threshold,u=e.useIntersectionObserver,p=e.visibleByDefault,b=e.width;return t().createElement(J,{beforeLoad:r,className:o,delayMethod:n,delayTime:a,height:i,placeholder:s,scrollPosition:c,style:l,threshold:d,useIntersectionObserver:u,visibleByDefault:p,width:b},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(e){var r=this.props,o=r.effect,n=r.height,a=r.placeholderSrc,i=r.width,s=r.wrapperClassName,c=r.wrapperProps,l=this.state.loaded,d=l?" lazy-load-image-loaded":"",u=l||!a?{}:{backgroundImage:"url(".concat(a,")"),backgroundSize:"100% 100%"};return t().createElement("span",G({className:s+" lazy-load-image-background "+o+d,style:X(X({},u),{},{color:"transparent",display:"inline-block",height:n,width:i})},c),e)}},{key:"render",value:function(){var e=this.props,t=e.effect,r=e.placeholderSrc,o=e.visibleByDefault,n=e.wrapperClassName,a=e.wrapperProps,i=this.getLazyLoadImage();return(t||r)&&!o||n||a?this.getWrappedLazyLoadImage(i):i}}])&&function(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),s}(t().Component);ee.propTypes={onLoad:o.PropTypes.func,afterLoad:o.PropTypes.func,beforeLoad:o.PropTypes.func,delayMethod:o.PropTypes.string,delayTime:o.PropTypes.number,effect:o.PropTypes.string,placeholderSrc:o.PropTypes.string,threshold:o.PropTypes.number,useIntersectionObserver:o.PropTypes.bool,visibleByDefault:o.PropTypes.bool,wrapperClassName:o.PropTypes.string,wrapperProps:o.PropTypes.object},ee.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const te=ee})(),e.exports=a})()},"W//n":function(e,t,r){"use strict";r.r(t);var o=r("nKUr"),n=r("cpVT"),a=r("g4pe"),i=r.n(a),s=r("q1tI"),c=r("Cs6D"),l=r("20a2"),d=r.n(l),u=r("/MKj"),p=r("p46w"),b=r.n(p),f=r("of9s"),m=r("0b+E"),y=r("UUyv"),h=r("D71S"),j=r("5Yp1"),v=r("h01r"),O=(r("YLeI"),r("DJ7r")),g=r("4svx"),x=r("Lo8k"),w=r("be20"),S=r("X3rl"),N=r("gdGy");r("Mj6V");function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?P(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function I({prodId:e,quantity:t,inCart:r,onDelete:n,onQuantityChange:a,onCartQuantityChange:i}){return Object(o.jsx)("section",{children:Object(o.jsxs)("div",{className:"d-flex align-items-center qty-wrapper",children:[Object(o.jsx)("button",{type:"button",onClick:()=>{if(r)return t<=1?void n():void i(e,t-1);t<=1||a({target:{value:t-1}},e)},className:"qty-btn",title:r&&t<=1?"Remove from cart":"Decrease quantity",children:r&&t<=1?Object(o.jsx)("i",{className:"fa fa-trash",style:{color:"#DC042A",fontSize:"12px"}}):Object(o.jsx)("span",{className:"qty",children:"\u2212"})}),Object(o.jsx)("span",{style:{minWidth:"20px",textAlign:"center",fontWeight:"600",fontSize:"14px"},children:t}),Object(o.jsx)("button",{type:"button",onClick:()=>{r?i(e,t+1):a({target:{value:t+1}},e)},className:"qty-btn",title:"Increase quantity",children:Object(o.jsx)("span",{className:"qty",children:"+"})})]})})}const T=({productCategories:e,couponData:t,time:r,restaurantId:n})=>{var a,p,P,T,E;const k=Object(l.useRouter)();let C=Object(u.c)((e=>e.auth.token));const L=Object(u.c)((e=>e.auth.loggedIn)),R=k.query,{0:D,1:M}=Object(s.useState)(R.restaurant||"");let B;const q=Object(u.b)(),A=(Object(u.c)((e=>e.shop.selectedRestaurant)),Object(u.c)((e=>e.shop.allRestaurants))),V=Object(u.c)((e=>e.shop.cart)),{0:F,1:z}=Object(s.useState)([]),J=Object(u.c)((e=>e.shop.totalPrice)),W=Object(u.c)((e=>e.loader.loading)),U=Object(u.c)((e=>e.liveEvent.productUpdated)),H=Object(u.c)((e=>e.liveEvent.couponUpdated)),X=(Object(u.c)((e=>e.liveEvent.storeCloseEvent)),Object(u.c)((e=>e.shop.setNewRestaurant))),Y=Object(u.c)((e=>e.shop.selCityName)),G=Object(u.c)((e=>e.shop.selResName)),{0:Q,1:K}=Object(s.useState)([]),{0:Z,1:ee}=Object(s.useState)(e),{0:te,1:re}=Object(s.useState)({active:!1}),{0:oe,1:ne}=Object(s.useState)({active:!1}),{0:ae,1:ie}=Object(s.useState)(V),{0:se,1:ce}=Object(s.useState)(!1),{0:le,1:de}=Object(s.useState)(!1),{0:ue,1:pe}=Object(s.useState)(0),{0:be,1:fe}=Object(s.useState)(R.restaurant),{0:me,1:ye}=Object(s.useState)(null),{0:he,1:je}=Object(s.useState)([]),{0:ve,1:Oe}=Object(s.useState)([]),{0:ge,1:xe}=Object(s.useState)(""),{0:we,1:Se}=Object(s.useState)(!1),{0:Ne,1:Pe}=Object(s.useState)({}),{0:_e,1:Ie}=Object(s.useState)(""),{0:Te,1:Ee}=Object(s.useState)(null),{0:ke,1:Ce}=Object(s.useState)(n),{0:Le,1:Re}=Object(s.useState)(t),{0:$e,1:De}=Object(s.useState)(""),{0:Me,1:Be}=Object(s.useState)([]),{0:qe,1:Ae}=Object(s.useState)(!1),{0:Ve,1:Fe}=Object(s.useState)([]),{0:ze,1:Je}=Object(s.useState)(""),{0:We,1:Ue}=Object(s.useState)(""),{0:He,1:Xe}=Object(s.useState)(null),{0:Ye,1:Ge}=Object(s.useState)(""),{0:Qe,1:Ke}=Object(s.useState)(""),{0:Ze,1:et}=Object(s.useState)(null),{0:tt,1:rt}=Object(s.useState)(null),{0:ot,1:nt}=Object(s.useState)(""),{0:at,1:it}=Object(s.useState)(!1),{0:st,1:ct}=Object(s.useState)(null),{0:lt,1:dt}=Object(s.useState)(""),{0:ut,1:pt}=Object(s.useState)(null),{0:bt,1:ft}=Object(s.useState)(!1),{0:mt,1:yt}=Object(s.useState)({}),{0:ht,1:jt}=Object(s.useState)([]),{0:vt,1:Ot}=Object(s.useState)(!1),{0:gt,1:xt}=Object(s.useState)(null),{0:wt,1:St}=Object(s.useState)(null),{0:Nt,1:Pt}=Object(s.useState)(!1),{0:_t,1:It}=Object(s.useState)(!1),{0:Tt,1:Et}=Object(s.useState)(null),{0:kt,1:Ct}=Object(s.useState)(null),{0:Lt,1:Rt}=Object(s.useState)(!1),{0:$t,1:Dt}=Object(s.useState)(""),{0:Mt,1:Bt}=Object(s.useState)(""),{0:qt,1:At}=Object(s.useState)(""),{0:Vt,1:Ft}=Object(s.useState)(""),{0:zt,1:Jt}=Object(s.useState)(null),{0:Wt,1:Ut}=Object(s.useState)(null),Ht=`https://kilimanjaro-restaurants.com/menu/${k.query.restaurant||""}`,Xt=Object(N.a)("Menu Page"),Yt=(Array.isArray(Q)&&(null===Q||void 0===Q||Q.map((e=>({value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.city})))),(e,t)=>{const r=[...V],o=r.findIndex((t=>t.product.id===e));if(-1===o)return;const n=r[o],a=n.salePrice||n.price;r[o]=_(_({},n),{},{quantity:t,totalPrice:t*a}),Oe((r=>{const o=r.findIndex((t=>t.productId===e));if(-1!==o){const n=[...r];return n[o]={productId:e,quantity:t},n}return r})),ie(r),q(Object(v.r)(r)),q(Object(v.B)())});Object(s.useEffect)((()=>{const e=()=>{window.scrollY>100?Pt(!0):Pt(!1)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}),[]);const Gt=(e,t)=>{const r=[...V],o=r[e].salePrice||r[e].price;"increment"===t?r[e].quantity+=1:"decrement"===t&&r[e].quantity>1&&(r[e].quantity-=1),r[e].totalPrice=r[e].quantity*o,ie(r),q(Object(v.r)(r)),q(Object(v.B)())},Qt=V.reduce(((e,t)=>e+t.totalPrice),0);Object(s.useEffect)((()=>{Kt(Q)}),[Q]);const Kt=e=>{Array.isArray(e)&&e.map((e=>{var t;null===e||void 0===e||null===(t=e.restaurants)||void 0===t||t.map((t=>{if(t.slug===R.restaurant){const r={value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.city};fe(t),ye(r),q(Object(v.y)(r)),q(Object(v.s)(e.restaurants)),q(Object(v.t)(t)),q(Object(v.z)(t)),b.a.set("setRestaurants",JSON.stringify(e.restaurants)),b.a.set("cityFocused",JSON.stringify(r))}}))}))};Object(s.useEffect)((()=>{const e=localStorage.getItem("setAllCities")?JSON.parse(localStorage.getItem("setAllCities")):[];0===(null===e||void 0===e?void 0:e.length)&&(async()=>{try{const{data:{data:e}}
1=await O.b.get("cities");K(e)}catch(e){}})()}),[k]),Object(s.useEffect)((()=>{const e=null===A||void 0===A?void 0:A.filter((e=>e.slug===R.restaurant))[0];fe(e)}),[]),Object(s.useEffect)((()=>{(async()=>{if(!D)return;let e=await O.b.get(`V1/restaurants/${D}/products`);if(200===e.status){B=e.data.data[0].restaurant_id;const t=e.data.restaurant.active,r=e.data.restaurant.deleted,o=e.data.restaurant.delivery_active,n=e.data.restaurant.pickup_active;pt(B),xt(t),St(r),Ct(o),Et(n),Ue(e.data.restaurant.name);const a=e=>{const[t,r]=e.split(":"),o=parseInt(t,10);return`${o%12||12}:${r}${o>=12?"PM":"AM"}`},i=(e,t)=>{const r=new Date,o=60*r.getHours()+r.getMinutes(),[n,a]=e.split(":").map(Number),[i,s]=t.split(":").map(Number),c=60*n+a,l=60*i+s;return l<c?o<c&&o>=l:o<c||o>=l},s=e.data.restaurant.opening_time,c=e.data.restaurant.closing_time,l=e.data.restaurant.delivery_opening_time,d=e.data.restaurant.delivery_closing_time,u=a(s),p=a(c),b=a(l),f=a(d);Dt(u),Bt(p),At(b),Ft(f);const m=localStorage.getItem("Deliverytype"),y=JSON.parse(m),h=i(l,d),j=i(s,c);Jt(h),Ut(j);let v=!1;v="delivery"===y&&l&&d?i(l,d):i(s,c);const g=sessionStorage.getItem("navigationSource");if("internal"===g)return void sessionStorage.removeItem("navigationSource");const x=()=>{"undefined"!==typeof window.$&&"undefined"!==typeof window.$.fn.modal?window.$("#orderTypeModal").modal("show"):setTimeout(x,100)};v||null!==g||x(),v&&setTimeout((()=>{var e;"undefined"!==typeof window.$&&"undefined"!==typeof window.$.fn.modal?window.$("#storeIsClosed").modal("show"):null===(e=document.getElementById("closed-store-modal"))||void 0===e||e.click()}),3e3);const{data:{data:w}}=await O.b.get(`product-categories?restaurant_id=${B}`),S=w.filter((e=>e.category_products.length>0)).map((e=>(e.category_products=e.category_products.map((e=>{var t;return"variable"===e.product_type?(e.product_variations=null===(t=e.product_variations)||void 0===t?void 0:t.map((e=>{const t=JSON.parse(e.variations),r=Array.isArray(t)?t:[t];return e.decodedVariations=r.map(((t,r)=>_(_({},t),{},{status:e.variations_statuses[r]}))).filter((e=>e.status)),e})),e):e})),e)));ee(S)}})()}),[D,$t]);Object(s.useEffect)((()=>{m.a.pageview(window.location.pathname+window.location.search)}),[]),Object(s.useEffect)((()=>{const e=[];null===Z||void 0===Z||Z.forEach((t=>{var r;null===(r=t.category_products)||void 0===r||r.forEach((t=>e.push(t)))})),Fe(e)}),[]),Object(s.useEffect)((()=>{var e;Z&&xe(null===(e=Z[0])||void 0===e?void 0:e.category)}),[Z]),Object(s.useEffect)((()=>{const e=G;ye(Y),fe(_(_({},e),{},{name:null===e||void 0===e?void 0:e.label,active:1}))}),[]),Object(s.useEffect)((()=>{U&&(async()=>{try{q(Object(g.b)()),pe(1);const{data:{data:e}}=await O.b.get(`product-categories?restaurant_id=${ke}`),t=e.filter((e=>e.category_products.length>0)).map((e=>(e.category_products=e.category_products.map((e=>{var t;return"variable"===e.product_type?(e.product_variations=null===(t=e.product_variations)||void 0===t?void 0:t.map((e=>{const t=JSON.parse(e.variations);return e.decodedVariations=t.map(((t,r)=>_(_({},t),{},{status:e.variations_statuses[r]}))).filter((e=>e.status)),e})),e):e})),e)));ee(t),q(Object(g.b)()),pe(0)}catch(e){q(Object(g.b)()),pe(0)}})()}),[U]),Object(s.useEffect)((()=>{H&&(async()=>{try{q(Object(g.b)()),pe(1);const{data:{data:e}}=await O.b.get(`product-coupons?restaurant_id=${ke}`);Re(e),q(Object(g.b)()),pe(0)}catch(e){q(Object(g.b)()),pe(0)}})()}),[H]),Object(s.useEffect)((()=>{(async()=>{try{const{data:{data:e}}=await O.b.get("settings/get-min-order-amount");Ee(+e.min_order_amount)}catch(e){}})()}),[]),Object(s.useEffect)((()=>{const e=Object(w.a)(r);Object(S.a)(r);e?b.a.set("closed",!1):b.a.set("closed",!0);const t=b.a.get("closed");Ie(t)}),[r,Ie]),Object(s.useEffect)((()=>{const e=localStorage.getItem("setAllCities")?JSON.parse(localStorage.getItem("setAllCities")):[];K(e),b.a.remove("variable")}),[]),Object(s.useEffect)((()=>{if(!we){let e=document.querySelectorAll(".category-header");window.addEventListener("scroll",(()=>{var t;null===(t=Array.from(e))||void 0===t||t.forEach((e=>{const t=e.getBoundingClientRect().top;t<=189.54&&t>100&&xe(e.id)}))}))}const e=t=>{"undefined"!==typeof window.jQuery?t(window.jQuery):setTimeout((()=>e(t)),100)};e((e=>{for(var t=e(".category-single"),r=0,o=t.length;r<o;r++)t[r].addEventListener("click",(function(){e(this).find("a")[0].addEventListener("click",(function(e){e.preventDefault()})),e(this).find(".subcats").slideToggle()}))}))}),[]),Object(s.useEffect)((()=>
1{if((null===Z||void 0===Z?void 0:Z.length)>0){let e=[];null===Z||void 0===Z||Z.forEach((t=>{const r=t.category_products;null===r||void 0===r||r.forEach((t=>{e.push(t)}))})),Oe(e.map((e=>({productId:e.id,quantity:1}))))}}),[Z]),Object(s.useEffect)((()=>{const e=b.a.get("selectedRestaurant"),t=e?JSON.parse(e):null;e||q(Object(v.t)(t)),!(null!==A&&void 0!==A&&A.length)>0&&q(Object(v.s)(X))}),[]),Object(s.useEffect)((()=>{"undefined"!==typeof $&&(window.$=$,$(window).ready((function(){$("html, body").css({"overflow-x":"unset"}),document.body.scrollTop=0,document.documentElement.scrollTop=0})))}),[]),Object(s.useEffect)((()=>{$(window).width()>768&&$(window).scroll((function(e){const t=$("#category-top"),r=$(".button-float"),o="sticky"===t.css("position");$(this).scrollTop()>140&&!o&&(t.css({position:"sticky",top:"0"}),r.css({display:"block"})),$(this).scrollTop()<140&&o&&(t.css({position:"static",top:"0"}),r.css({display:"none"}))})),$(window).scroll((function(e){const t=$(".button-float");$(this).scrollTop()>140&&t.css({display:"block"}),$(this).scrollTop()<140&&t.css({display:"none"})}))}),[]);let Zt=["cart"];te.active&&Zt.push("active-cart");const{0:er,1:tr}=Object(s.useState)(""),rr=(e,t)=>{const r=+e.target.value;Oe((e=>{const o=e.findIndex((e=>e.productId===t));if(-1!==o){const n=[...e];return n[o]={productId:t,quantity:r},n}return[...e,{productId:t,quantity:r}]}))},or=e=>{Xt("Added to cart",`Product Name: ${e.product}`),pe(e.id),q(Object(g.b)());const t=[...V],r=ve.find((t=>t.productId===e.id)).quantity,o=t.findIndex((t=>t.product.id===e.id)),n=e.product_type;if(o>=0){const a=t[o];if("variable"===n){const o=he.find((t=>t.productId===e.id&&t.product_variation==Ne.product_variation)),n=t.findIndex((t=>t.product.id===e.id&&t.product_variation===o.product_variation));if(-1!==n)t[n]=_(_({product:e},o),{},{quantity:+t[n].quantity+parseInt(r),salePrice:o.salePrice||o.price,totalPrice:+t[n].totalPrice+(o.salePrice||o.price)*parseInt(r)});else{o.salePrice=o.salePrice||null;const e=_(_({},o),{},{quantity:r,totalPrice:r*(o.salePrice||o.price)});t.push(e)}}else{const n=e.sale_price?+r*parseInt(e.sale_price):+r*parseInt(e.price);t[o]={product:e,quantity:+a.quantity+parseInt(r),price:parseInt(e.price),salePrice:a.salePrice?+a.salePrice+parseInt(e.sale_price):null,totalPrice:+a.totalPrice+n}}}else if("variable"===n){const o=he.find((t=>t.productId===e.id));o.salePrice=o.salePrice||null;const n=_(_({},o),{},{quantity:r,totalPrice:r*(o.salePrice||o.price)});t.push(n)}else t.push({product:e,quantity:parseInt(r),price:parseInt(e.price),salePrice:parseInt(e.sale_price),totalPrice:e.sale_price?r*parseInt(e.sale_price):r*parseInt(e.price)});ie(t),q(Object(v.r)(t)),q(Object(v.B)()),setTimeout((()=>{q(Object(g.b)())}),1500),setTimeout((()=>{pe(0)}),1500),setTimeout((()=>{f.NotificationManager.success("Added to cart successfully","",3e3)}),1500)},nr=(e,t)=>{const r=[...V];r.splice(e,1),ie(r),q(Object(v.r)(r)),q(Object(v.B)())};let ar=Object(o.jsx)("p",{children:"Your cart is currently empty"});const ir=V.map((e=>({product_cost:e.price,quantity:e.quantity,product_id:e.productId?e.productId:e.product.id,subTotal:e.totalPrice,variation:e.product_variation?e.product_variation:null})));Object(s.useEffect)((()=>{(async()=>{if(L&&ir.length>0){const t=localStorage.getItem("cart_abandonement_data"),r=JSON.parse(t||"{}"),o={restaurant_id:r.restaurant_id,order_type:r.order_type,delivery_address:r.delivery_address,latitude:r.latitude,longitude:r.longitude,delivery_tracer:r.delivery_tracer,cart_items:ir};try{await O.b.post("V1/cart",o,{headers:{Authorization:`Bearer ${C}`}})}catch(e){console.log(e)}}})()}),[V]);const sr=e=>{const t=e.target.value;Xe(t),Rt(!0),localStorage.setItem("Deliverytype",JSON.stringify(t))},cr=Object(s.useCallback)((e=>{{if(null===e||void 0===e||!e.active)return void document.getElementById("inactive-modal").click();b.a.remove("totalPrice"),b.a.remove("setCart"),b.a.remove("orderItem"),localStorage.removeItem("checkoutToLogin"),q(Object(v.t)(e)),b.a.set("selectedRestaurant",JSON.stringify(e));const t={label:e.label,value:e.id};q(Object(v.z)(t)),fe(e),M(e.slug),window.history.replaceState(null,"",`/menu/${e.slug}`),$("#closeModal").click()}})),lr=async(e,t,r)=>{try{const o=(await O.b.get(`V1/restaurants/v2/near-me?latitude=${e}&longitude=${t}&count=10&page=1&type=${r}`)).data;if(o.data.statusCode>=200&&o.data.statusCode<300){const e=o.data.data.other_restaurants,t=o.data.data.restaurant.restaurant;jt(e);const n=o.data.data.delivery_tracer;Ge(n),yt(t);const a={restaurant_id:t.id,order_type:r,delivery_address:t.address,latitude:t.latitude,longitude:t.longitude,delivery_tracer:o.data.data.delivery_tracer};localStorage.setItem("cart_abandonement_data",JSON.stringify(a));const i={restaurant_id:t.id,order_type:r,delivery_address:t.address,latitude:t.latitude,longitude:t.longitude,delivery_tracer:o.data.data.delivery_tracer};localStorage.setItem("default_address_data",JSON.stringify(i)),localStorage.setItem("delivery_tracer",n),localStorage.setItem("cached closest_restaurant",JSON.stringify(t)),localStorage.setItem("cached other_restaurant",JSON.stringify(e)),localStorage.setItem("delivery price",o.data.data.restaurant.restaurant.delivery_price)}else 500!==o.data.statusCode&&500!==o.data.status||(localStorage.removeItem("cached closest_restaurant"),localStorage.removeItem("cached other_restaurant"),localStorage.removeItem("delivery price"),localStorage.removeItem("delivery_tracer"),Ot(!0))}catch(o){localStorage.removeItem("cached closest_restaurant"),localStorage.removeItem("cached other_restaurant"),localStorage.removeItem("delivery price"),localStorage.removeItem("delivery_tracer"),Ot(!0),console.error("Error fetching nearby restaurants:",o)}},dr=async(e,t,r)=>{if(!e||!t)return ft(!1),void dt("out of range");const o={restaurant_id:ut,latitude:null===e||void 0===e?void 0:e.toString(),longitude:null===t||void 0===t?void 0:t.toString()};ft(!0);try{const i=await O.b.post("V1/calculate-delivery-charge",o);if(200===i.status){var n,a;"within range"===(null===(n=i.data)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.status)?(dt("within range"),Je(r)):(dt("out of range"),Je(r),await lr(e,t,He))}else dt("out of range"),Je(r),await lr(e,t,He)}catch(i){console.log(i),dt("out of range"),Je(r),await lr(e,t,He)}finally{ft(!1)}};V.length>0&&(ar=Object(o.jsx)(o.Fragment,{children:(null!==V&&void 0!==V?V:[]).map(((e,t)=>{var r;let n="";return n=e.product_variation?Object(o.jsxs)("p",{children:[e.product.product," (",e.product_variation,")"]}):Object(o.jsx)("p",{children:e.product.product}
1),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)("div",{className:"product-list",children:Object(o.jsxs)("div",{className:"row text-md-left text-center",children:[Object(o.jsx)("div",{className:"col-md-3",children:Object(o.jsx)("img",{className:"img-fluid",src:e.product.image_url,alt:""})}),Object(o.jsxs)("div",{className:"col-md-6",children:[Object(o.jsx)("div",{className:"align-items-center justify-content-around flex-wrap",children:n}),Object(o.jsx)("p",{className:"bold",children:"\u20a6"+(null===e||void 0===e||null===(r=e.totalPrice)||void 0===r?void 0:r.toLocaleString())}),Object(o.jsx)("input",{onChange:e=>ur(e,t),type:"number",value:e.quantity,defaultValue:e.quantity,min:"1"})]}),Object(o.jsx)("div",{className:"col-md-2",children:Object(o.jsx)("button",{onClick:()=>nr(t,e.product.id),children:"X"})})]})},`Prod-cart${(null===e||void 0===e?void 0:e.product.id)||t}`)})}))}));const ur=(e,t)=>{const r=[...V],o=r[t].salePrice||r[t].price;r[t].quantity=+e.target.value,r[t].totalPrice=+e.target.value*o,ie(r),q(Object(v.r)(r)),q(Object(v.B)())};Object(s.useEffect)((()=>{const e=JSON.parse(localStorage.getItem("selectedPlace")),t=JSON.parse(localStorage.getItem("selectedRestaurantName"));Je(e),Ue(t)}),[]),Object(s.useEffect)((()=>{const e=setTimeout((()=>{const e=localStorage.getItem("Deliverytype"),t=JSON.parse(e);Ke(t),0===gt&&0===wt&&document.getElementById("unavailable-modal").click(),!1===kt&&"delivery"===t&&document.getElementById("unavailable-modal").click(),!1===Tt&&"pickup"===t&&document.getElementById("unavailable-modal").click()}),1e3);return()=>clearTimeout(e)}),[gt,wt,kt,Tt,Qe]);return Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)(j.a,{children:[Object(o.jsxs)(i.a,{children:[Object(o.jsx)("link",{rel:"canonical",href:Ht}),Object(o.jsx)("title",{children:"Kilimanjaro restaurant"}),Object(o.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"}),Object(o.jsx)("script",{src:"https://code.jquery.com/jquery-3.4.1.min.js",integrity:"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=",crossOrigin:"anonymous"}),Object(o.jsx)("meta",{name:"description",content:"Our Menu: Swallows and Soups: Eba, Semovita, Okro; Pastries: Burger Chicken, Burger Beef, Meat Pie, Chicken Pie; Main Dish: Fried Rice, Coconut Rice, Native Rice; Sides: Salad, Moi-Moi, Plaintains.Our menu offers a wide variety of Nigerian dishes, with categories including Swallows, Soups, Pastries, Rice, Beef, and Chicken. Discover the delicious options available and tantalize your taste buds. "}),Object(o.jsx)("meta",{name:"keyword",content:"MEALS FOOD RESTAURANT NIGERIA"}),Object(o.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Restaurant",name:R.restaurant,address:{"@type":"PostalAddress",streetAddress:"23 Nzimiro street, Old GRA. Port Harcourt",addressLocality:"Port Harcourt",addressRegion:"Rivers",addressCountry:"Nigeria"},telephone:"0700 5454 3663",servesCuisine:"Nigerian",openingHours:"Mondays - Sundays 03:00a.m - 8:00pm"})}})]}),Object(o.jsxs)("h1",{className:"visually-hidden",children:["Kilimanjaro Restaurant",R.restaurant]}),W&&1===ue&&Object(o.jsx)("section",{className:"topLoader",children:Object(o.jsx)("div",{className:"topLoader-container",children:W&&1===ue&&Object(o.jsx)(x.a,{})})}),Object(o.jsx)("section",{id:"category-top",className:`select-restaurant ${!(null!==Z&&void 0!==Z&&Z.length)>0?"active-select-restaurant":null}`,children:Object(o.jsx)("div",{className:"container ",children:Object(o.jsx)("div",{className:"row ",children:Object(o.jsxs)("div",{className:"col",children:[Object(o.jsxs)("div",{className:"d-flex  align-items-center flex-wrap",children:[ze&&Object(o.jsx)("div",{className:"py-md-2",children:Object(o.jsx)("p",{className:"mb-2 mb-md-2 mb-lg-0 location-text font-weight-light ",children:ze})}),Object(o.jsx)("div",{className:"py-md-2",children:Object(o.jsx)("p",{className:"mb-2 mb-md-2 mb-lg-0 location-text font-weight-light ",children:We})}),Object(o.jsx)("form",{className:"select-state mr-0 py-md-2",children:Object(o.jsxs)("div",{className:"search-container",children:[Object(o.jsx)("input",{value:$e,onChange:async e=>{const{value:t}=e.target;De(t);try{if(t.length>2){const e=Ve.filter((e=>e.product.toLowerCase().includes(t.toLowerCase())));t.length>2?(Ae(!0),Be(e)):(Ae(!1),Be([]))}else Ae(!1),Be([])}catch(r){Ae(!1),Be([])}},type:"text",placeholder:"Search for a meal"}),Object(o.jsx)("ul",{className:qe?"results active":"results",children:Me.map((e=>Object(o.jsx)("li",{onClick:()=>(e=>{const t=document.getElementById(e.product);if(!t)return void console.warn(`Element with ID '${e.product}' not found.`);const r=t.offsetTop;window.scroll({top:r,left:0,behavior:"smooth"}),Ae(!1)})(e),className:"result",children:e.product},`SEARCH-RESULT${e.id}`)))})]})}),Object(o.jsx)("div",{className:"py-md-2",children:Nt&&Object(o.jsxs)("a",{className:"ml-md-5 mt-md-0 mt-3 position-relative",onClick:()=>{It((e=>!e))},children:[Object(o.jsx)("img",{src:"/images/icon/shopping-cart-icon-red.svg",alt:"cart-logo",width:40,height:35,style:{cursor:"pointer"}}),Object(o.jsx)("span",{className:"cart-badge-red",children:V.length})]})}),_t&&Object(o.jsx)("section",{children:Object(o.jsxs)("div",{className:"cart-dropdown p-3  bg-white border rounded shadow-sm",children:[Object(o.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-2 border-bottom",children:[Object(o.jsx)("h6",{className:"m-2 text-center flex-grow-1",children:"Cart"}),Object(o.jsx)("span",{className:"close text-muted mb-2",style:{cursor:"pointer",fontSize:"2.5rem"},onClick:()=>It(!1),children:"\xd7"})]}),Object(o.jsxs)("div",{className:"cart-items-wrapper ",children:[!V.length>0||J<Te&&Object(o.jsxs)("p",{className:"mb-2",children:["A minimum order of \u20a6",Te.toLocaleStr
1ing()," is required before checking out. Current cart's total is: \u20a6",null===J?"0":J.toLocaleString()]}),V.length>0?Object(o.jsxs)(o.Fragment,{children:[V.map(((e,t)=>{var r,n,a;return Object(o.jsxs)("div",{className:"cart-items mb-3 w-100",children:[Object(o.jsxs)("div",{className:"d-flex justify-content-between",children:[Object(o.jsxs)("div",{className:"d-flex",children:[Object(o.jsx)("img",{src:null===(r=e.product)||void 0===r?void 0:r.image_url,alt:e.product.product,className:"mr-3",width:30,height:30}),Object(o.jsx)("p",{className:"",children:null===e||void 0===e||null===(n=e.product)||void 0===n?void 0:n.product})]}),Object(o.jsx)("p",{className:"",children:"\u20a6"+(null===e||void 0===e||null===(a=e.totalPrice)||void 0===a?void 0:a.toLocaleString())})]}),Object(o.jsxs)("div",{className:"d-flex justify-content-between mt-2",children:[Object(o.jsxs)("div",{children:[Object(o.jsx)("span",{className:"increment mr-3",onClick:()=>Gt(t,"decrement"),children:"\u2013"}),Object(o.jsx)("span",{className:"font-weight-bold mr-3",children:e.quantity}),Object(o.jsx)("span",{className:"increment",onClick:()=>Gt(t,"increment"),children:"\uff0b"})]}),Object(o.jsxs)("a",{children:[" ",Object(o.jsx)("i",{className:"fa fa-tras
1h",style:{color:"#DC042A",fontSize:"20px"},onClick:()=>nr(t,e.product.id)})]})]})]},`Prod-cart${(null===e||void 0===e?void 0:e.product.id)||t}`)})),Object(o.jsxs)("div",{className:"d-flex justify-content-between mb-3",children:[Object(o.jsx)("p",{className:"font-weight-bold",children:"Subtotal"}),Object(o.jsxs)("p",{className:"h4 font-weight-bold mr-0",children:[" ","\u20a6"+(new Intl.NumberFormat).format(Qt)]})]}),Object(o.jsxs)("div",{className:"d-flex flex-md-row flex-column justify-content-between",children:[Object(o.jsx)("button",{className:"btn w-100 mb-2 mb-md-0 mr-md-2",onClick:()=>{It(!1),d.a.push("/cart")},children:Object(o.jsx)("span",{className:"text",style:{whiteSpace:"nowrap"},children:"View or Edit"})}),Object(o.jsx)("button",{className:"btn w-100 w-md-auto",onClick:()=>{It(!1),d.a.push("/checkout")},disabled:J<Te,children:Object(o.jsx)("span",{className:"text",style:{whiteSpace:"nowrap"},children:"Proceed to Checkout"})})]})]}):Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("p",{className:"empty-text font-weight-normal mb-3 mt-4 text-center",children:"Your cart is empty"}),Object(o.jsx)("button",{className:"btn w-100 w-md-auto",onClick:()=>{It(!1),d.a.push("/")},children:Object(o.jsx)("span",{className:"text",style:{whiteSpace:"nowrap"},children:"Continue shopping"})})]})]})]})}),W&&0===ue?Object(o.jsx)("form",{className:"select-state w-100 mt-1",children:Object(o.jsx)("div",{className:"inline-loading-css-menu-page",children:Object(o.jsx)(x.a,{})})}):null]}),Object(o.jsx)("ul",{className:"product-cat",children:null===Z||void 0===Z?void 0:Z.map((e=>Object(o.jsx)("a",{onClick:()=>{(e=>{Se(!0),setTimeout((()=>xe(e)),500);const t=document.getElementById(e);if(!t)return console.warn(`Element with ID '${e}' not found.`),void Se(!1);const r=t.offsetTop;window.scroll({top:r,left:0,behavior:"smooth"}),setTimeout((()=>Se(!1)),500)})(null===e||void 0===e?void 0:e.category)},children:Object(o.jsx)("li",{className:ge===(null===e||void 0===e?void 0:e.category)?"product-cat-list active":"product-cat-list",children:null===e||void 0===e?void 0:e.category})},`Prod-Category${null===e||void 0===e?void 0:e.id}`)))})]})})})}),Object(o.jsxs)("section",{className:"products",children:[Object(o.jsx)("div",{className:"container",children:Object(o.jsx)("div",{className:"row",children:!(null!==Z&&void 0!==Z&&Z.length)>0?Object(o.jsx)("div",{className:"col-md-8",children:Object(o.jsx)("p",{children:"Sorry, there are no menu available for this restaurant."})}):Object(o.jsx)("div",{className:"col-md-8",children:null===Z||void 0===Z?void 0:Z.map(((e,t)=>(null===e||void 0===e?void 0:e.category_products.every((e=>!e.status)))?null:Object(o.jsx)(o.Fragment,{children:Object(o.jsxs)("div",{children:[Object(o.jsx)("h4",{id:null===e||void 0===e?void 0:e.category,className:"category-header "+(0===t?"first":""),children:null===e||void 0===e?void 0:e.category}),null===e||void 0===e?void 0:e.category_products.slice().sort(((e,t)=>e.status===t.status?0:e.status?-1:1)).map((e=>{var t,r;let n=[],a=null,i=null;var s;"variable"===e.product_type&&e.product_variations.length>0&&(n=e.product_variations[0].decodedVariations,a=e.product_variations[0].variable_name,n=null===(s=n)||void 0===s?void 0:s.map((e=>(i=e.sale_price||e.price,_(_({},e),{},{value:i,label:e.name+" \u2014 \u20a6"+(new Intl.NumberFormat).format(i)})))));const l=oe.active&&Ne.productId===e.id?"btn":"btn disabled";let d=e.sale_price?Object(o.jsx)("h6",{className:"amount",children:Object(o.jsx)("s",{children:`\u20a6${(new Intl.NumberFormat).format(e.price)}`})}):Object(o.jsx)("h6",{className:"amount",children:`\u20a6${(new Intl.NumberFormat).format(e.price)}`}),u=null===e.sale_price?null:Object(o.jsx)("h6",{className:"amount sale",children:"\u20a6"+(new Intl.NumberFormat).format(e.sale_price)});const p=null!==(t=null===(r=ve.find((t=>t.productId===e.id)))||void 0===r?void 0:r.quantity)&&void 0!==t?t:1,b=V.some((t=>t.product.id===e.id)),f=V.findIndex((t=>t.product.id===e.id)),m=Object(o.jsx)(I,{prodId:e.id,quantity:p,inCart:b,onDelete:()=>nr(f,e.id),onQuantityChange:rr,onCartQuantityChange:Yt}),h=b?Object(o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"5px",color:"#E1686D",fontWeight:"600",fontSize:"14px"},children:[Object(o.jsx)("span",{style:{fontSize:"20px"},children:"\u2713"})," Added to Cart"]}):null;let j=Object(o.jsxs)(o.Fragment,{children:[!b&&Object(o.jsx)("button",{onClick:()=>or(e),disabled:!e.status||ue===e.id,className:"btn",children:Object(o.jsx)("span",{className:"text",children:e.status?ue===e.id?"Adding...":"Add to Cart":"Out of Stock"})}),b&&h]});return"variable"===e.product_type&&(d=null,u=null,j=Object(o.jsxs)(o.Fragment,{children:[!b&&Object(o.jsx)("button",{onClick:()=>or(e),className:l,disabled:!e.status||ue===e.id,children:Object(o.jsx)("span",{className:"text",children:e.status?ue===e.id?"Adding...":"Add to Cart":"Out of Stock"})}),b&&h]})),Object(o.jsx)(o.Fragment,{children:Object(o.jsx)("div",{id:e.product,className:"single-product",style:{opacity:!e.status&&"0.7"},children:Object(o.jsxs)("div",{className:"row",children:[Object(o.jsx)("div",{className:"col-md-4 text-center text-sm-left mb-5 mb-sm-0",children:Object(o.jsx)("a",{style:{pointerEvents:!e.status&&"none"},href:`/product/${e.slug}`,children:Object(o.jsx)(y.LazyLoadImage,{className:"img-fluid ",src:e.image_url,alt:e.product,width:"150px",
1wrapperClassName:"placeholder-class",placeholderSrc:"/images/favicon/apple-touch-icon.png"})})}),Object(o.jsxs)("div",{className:"col-md-8 pl-sm-0",children:[Object(o.jsxs)("div",{className:"d-flex align-items-center justify-content-between flex-wrap mb-3",children:[Object(o.jsx)("a",{className:"product-name text-dark",style:{textDecoration:"none",pointerEvents:!e.status&&"none"},href:`/product/${e.slug}`,children:e.product}),Object(o.jsx)("div",{className:"d-flex align-items-center",style:{gap:"8px"},children:Object(o.jsx)("p",{children:m})})]}),Object(o.jsx)("p",{className:"product-description",children:e.short_description}),"variable"===e.product_type&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("form",{className:"select-state mt-4",children:Object(o.jsx)(c.a,{onChange:t=>((e,t)=>{ne({active:!0});const r={productId:t.id,product:t,quantity:null,price:parseInt(e.value),salePrice:parseInt(e.sale_price),totalPrice:null,product_variation:e.name};Pe(r),je((e=>[...e.filter((e=>e.productId!==t.id)),r]))})(t,e),className:"select-tool w-100 variation",options:n,placeholder:`Choose a ${a}`,instanceId:`productVariations-${e.id}`})}),Object(o.jsxs)("div",{className:"d-flex align-items-center justify-content-between flex-wrap mt-4",children:[W&&ue===e.id?Object(o.jsx)(x.a,{}):j,Object(o.jsxs)("div",{children:[d,u]})]})]}),"simple"===e.product_type&&Object(o.jsxs)("div",{className:"d-flex align-items-center justify-content-between flex-wrap mt-4",children:[W&&ue===e.id?Object(o.jsx)(x.a,{}):j,Object(o.jsxs)("div",{children:[d,u]})]})]})]})},`Product-Id${e.id}`)})}))]},`Res-Category${(null===e||void 0===e?void 0:e.id)||t}`)})))})})}),Object(o.jsx)("div",{}),Object(o.jsx)("button",{type:"button",className:"btn btn-primary ","data-toggle":"modal","data-target":"#orderTypeModal",id:"order-type-modal",style:{display:"none"},children:"Launch demo modal"}),Object(o.jsx)("div",{className:"modal fade "+(se?"show":""),id:"orderTypeModal",tabIndex:"-1",role:"dialog","aria-labelledby":"orderTypeModalLabel","data-backdrop":"static","aria-hidden":!se,"data-keyboard":"false",style:{display:se?"block":"none"},children:Object(o.jsx)("div",{className:"modal-dialog modal-dialog-centered",role:"document",children:Object(o.jsxs)("div",{className:"modal-content p-4",children:[Object(o.jsx)("span",{"data-dismiss":"modal","aria-label":"Close",id:"closeOrderTypeModal",style:{marginLeft:"auto",fontSize:"15px",color:"white",display:"none"},className:"px-4",children:Object(o.jsx)("a",{children:Object(o.jsx)("img",{src:"/images/x.svg"})})}),Object(o.jsxs)("div",{className:"modal-body",children:[Object(o.jsx)("p",{className:" text-center",children:"How would you like to complete your order?"}),Object(o.jsxs)("div",{className:"row mt-3",children:[Object(o.jsx)("div",{className:"col-md-6 mb-3 ",children:Object(o.jsxs)("label",{className:"payment d-flex align-items-center px-3 py-2 payment-method-checkbox",children:[Object(o.jsxs)("div",{className:"d-flex align-items-center gap-2 flex-grow-1",children:[Object(o.jsx)("img",{src:"/images/pick-up.svg",alt:"Pickup icon",width:20,height:20}),Object(o.jsx)("p",{className:"ml-1",children:"Pick-up"})]}),Object(o.jsx)("div",{className:"d-flex align-items-center justify-content-end payment-check-box",children:Object(o.jsx)("input",{type:"radio",value:"pickup",name:"orderTypeInput",className:"form-check-input check radio",onChange:sr})})]})}),Object(o.jsx)("div",{className:"col-md-6 mb-3 ",children:Object(o.jsxs)("label",{className:"payment d-flex align-items-center px-3 py-2 payment-method-checkbox",children:[Object(o.jsxs)("div",{className:"d-flex align-items-center gap-2 flex-grow-1",children:[Object(o.jsx)("img",{src:"/images/truck.svg",alt:"delivery",width:20,height:20}),Object(o.jsx)("p",{className:"ml-1",children:"Delivery"})]}),Object(o.jsx)("div",{className:"d-flex align-items-center justify-content-end payment-check-box",children:Object(o.jsx)("input",{type:"radio",value:"delivery",name:"orderTypeInput",className:"form-check-input check radio",onChange:sr})})]})})]}),Lt&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("button",{style:{display:"block",margin:"0 auto",marginBottom:"20px",width:"50%"},onClick:()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((async e=>{try{var t;const{latitude:r,longitude:o}=e.coords,n=r.toString(),a=o.toString();et(n),rt(a),it(!0);
1const i=await fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${r},${o}&key=AIzaSyBcSwVVjJfgvXsW111B6zwdnHO5bdyd9xQ`);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const s=(null===(t=(await i.json()).results[0])||void 0===t?void 0:t.formatted_address)||"Unknown Location";ct(s);const c=/^\d+/,l=s.match(c),d=l?l[0].trim():null;d&&nt(d);const u={address:s,lat:n,long:a,house_number:d};localStorage.setItem("addressData",JSON.stringify(u)),localStorage.setItem("selectedPlace",JSON.stringify(s)),dr(r,o,s)}catch(r){console.error("Error processing location:",r),dt("out of range"),ft(!1)}}),(e=>{console.error("Error getting location:",e),dt("out of range"),ft(!1)})):(console.error("Geolocation is not supported by this browser."),dt("out of range"),ft(!1))},className:"btn select-tool ",children:Object(o.jsx)("span",{className:"text",children:"Use My Location"})}),Object(o.jsx)("p",{className:"text-center",children:"Enter your address below"}),Object(o.jsx)("div",{children:Object(o.jsx)(h.default,{handlePlaceSelect:e=>{const t=e.location.latitude,r=e.location.longitude;et(t),rt(r);const o=e.formattedAddress;ct(o),it(!0);const n=o.match(/^\d+/),a=n?n[0].trim():null;a&&nt(a),localStorage.setItem("selectedPlace",JSON.stringify(o));const i={address:o,lat:t,long:r,house_number:a};localStorage.setItem("addressData",JSON.stringify(i)),dr(t,r,o)}})}),bt?Object(o.jsx)("p",{className:"text-center mt-2",children:"Calculating distance..."}):Object(o.jsxs)("div",{children:["out of range"===lt&&"delivery"===He&&Object(o.jsx)("p",{className:"text-center text-danger font-weight-bold mt-1",children:"Location is out of range for delivery, please select another location or you can switch to pick-up!"}),"out of range"===lt&&"pickup"===He&&Object(o.jsx)("p",{className:"text-center text-danger font-weight-bold mt-1",children:"The selected address does not match this restaurant!"}),"within range"===lt&&"delivery"===He&&Object(o.jsx)("p",{className:"text-center text-success font-weight-bold mt-1",children:"Location is within range for delivery, please proceed with your order."}),"within range"===lt&&"pickup"===He&&Object(o.jsx)("p",{className:"text-center text-success font-weight-bold mt-1",children:"Location set! Please go ahead with your order."})]})]}),Object(o.jsx)("section",{children:"out of range"===lt&&Object(o.jsxs)(o.Fragment,{children:[Object.keys(mt).length>0&&Object(o.jsxs)(o.Fragment,{children:[" ",Object(o.jsx)("p",{className:"my-2 pt-4",children:"Hang on! We found a restaurant that matches your selected address"}),Object(o.jsx)("div",{className:" py-5 px-5 mb-5 col-md-12 suggested-restaurant",onClick:()=>{cr(mt)},children:Object(o.jsxs)("div",{className:"d-flex border pr-3 pt-3 suggested-restaurant-inner",children:[Object(o.jsx)("div",{children:Object(o.jsxs)("div",{className:"d-flex gap-2",children:[" ",Object(o.jsx)("img",{className:"pr-2 img-fluid",src:"/images/pick-up.svg",alt:"pickup icon",width:50,height:50}),Object(o.jsxs)("div",{className:"mt-2",children:[Object(o.jsx)("h6",{className:"text-left",children:null===mt||void 0===mt?void 0:mt.name}),Object(o.jsx)("p",{className:"pb-3 m-0 text-left",children:null===mt||void 0===mt?void 0:mt.address})]},null===mt||void 0===mt?void 0:mt.slug)]})}),Object(o.jsx)("div",{className:"duration",children:Object(o.jsx)("div",{className:"duration-inner",children:Object(o.jsxs)("p",{className:"duration-text font-weight-bold",children:[mt.duration," ",Object(o.jsx)("br",{})," Away"]})})},null===mt||void 0===mt?void 0:mt.slug)]})})]}),ht.length>0&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("h6",{className:" text-center pt-md-6 pt-lg-6 mb-3",children:"Other restaurants close to you"}),Object(o.jsx)("div",{className:" py-5 px-5 mb-5 col-md-12 suggested-restaurant",onClick:()=>{var e;cr(null===(e=ht[0])||void 0===e?void 0:e.restaurant)},children:Object(o.jsxs)("div",{className:"d-flex border pr-3 pt-3 suggested-restaurant-inner",children:[Object(o.jsx)("div",{children:Object(o.jsxs)("div",{className:"d-flex gap-2",children:[" ",Object(o.jsx)("img",{className:"pr-2 img-fluid",src:"/images/pick-up.svg",alt:"pick up icon",width:50,height:50}),Object(o.jsxs)("div",{className:"mt-2",children:[Object(o.jsx)("h6",{className:"text-left",children:null===(p=ht[0])||void 0===p?void 0:p.restaurant.name}),Object(o.jsx)("p",{className:"pb-3 m-0 text-left",children:null===(P=ht[0])||void 0===P?void 0:P.restaurant.address})]},null===(a=ht[0])||void 0===a?void 0:a.restaurant.slug)]})}),Object(o.jsx)("div",{className:"duration",children:Object(o.jsx)("div",{className:"duration-inner",children:Object(o.jsxs)("p",{className:"duration-text font-weight-bold",children:[null===(E=ht[0])||void 0===E?void 0:E.duration," ",Object(o.jsx)("br",{})," Away"]})})},null===(T=ht[0])||void 0===T?void 0:T.restaurant.slug)]})})]})]})}),Object(o.jsx)("a",{className:"text-center d-block text-danger mt-3","data-dismiss":"modal","aria-label":"Close",id:"closeModal",children:"Close"})]})]})})})]}),Object(o.jsx)("div",{onClick:()=>{"undefined"!==typeof $&&(window.$=$,$(window).ready((function(){document.body.scrollTop=0,document.documentElement.scrollTop=0})))},className:"button-float",children:Object(o.jsx)("i",{className:"fa fa-chevron-up float-arrow"})}),Object(o.jsx)("button",{type:"button",className:"btn btn-primary ","data-toggle":"modal","data-target":"#exampleModal",id:"category-status",style:{display:"none"},children:"Launch demo modal"}),Object(o.jsx)("button",{type:"button",className:"btn btn-primary ","data-toggle":"modal","data-target":"#exampleModal",id:"inactive-modal",style:{display:"none"},children:"Launch demo modal"}),Object(o.jsx)("div",{className:"modal fade",id:"exampleModal",tabindex:"-1",role:"dialog","aria-labelledby":"exampleModalLabel","aria-hidden":"true",children:Object(o.jsx)("div",{className:"modal-dialog modal-dialog-centered",role:"document",children:Object(o.jsxs)("div",{className:"modal-content p-4",children:[Object(o.jsx)("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",style:{marginLeft:"auto"},children:Object(o.jsx)("span",{"aria-hidden":"true",className:"ms-auto",style:{fontSize:"24px"},children:"\xd7"})}),Object(o.jsx)("div",{className:"modal-body",children:Object(o.jsx)("p",{className:" text-center",style:{fontSize:"24px",fontWeight:"bold"},children:er})})]})})}),Object(o.jsxs)("section",{children:[Object(o.jsx)("button",{type:"button",className:"btn btn-primary ","data-toggle":"modal","data-target":"#unavailableModal",id:"unavailable-modal",style:{display:"none"},children:"Launch unavailable modal"}),Object(o.jsx)("button",{type:"button",className:"btn btn-primary ","data-toggle":"modal","data-target":"#storeIsClosed",id:"closed-store-modal",style:{display:"none"},children:"Launch closed store modal"}),Object(o.jsx)("div",{className:"modal fade",id:"storeIsClosed",role:"dialog",tabindex:"-1","aria-labelledby":"storeIsClosedModalLabel","aria-hidden":"true",children:Object(o.jsx)("div",{className:"modal-dialog closed-dialog",children:Object(o.jsxs)("div",{className:"modal-content",children:[Object(o.jsx)("div",{className:"modal-header",children:Object(o.jsx)("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",children:Object(o.jsx)("span",{"aria-hidden":"true",style:{fontSize:"2.5rem",fontWeight:"700"},children:"\xd7"})})}),Object(o.jsxs)("div",{className:"modal-body pb-5",children:[Object(o.jsx)("h4",{className:"modal-title text-center ",children:"Store closed"}),Object(o.jsxs)("div",{className:"restaurants closed-res",children:[Object(o.jsx)("p",{className:"text-center mt-1",children:!1===Tt&&!0===kt&&"pickup"===Qe?"We are currently closed for pickup, you can switch to delivery.":!1===kt&&"delivery"===Qe?"We are currently closed for delivery, you can switch to pickup":"delivery"===Qe&&!0===Tt?`We're currently closed for delivery, you can place your orders between ${qt} and ${Vt} tomorrow. ${"delivery"!==Qe||Wt?"":"Or you can switch to pickup"} `:"pickup"===Qe&&!0===kt?`We're currently closed for pickup, you can place your orders between ${$t} and ${Mt} tomorrow. ${"pickup"!==Qe||zt?"":"Or you can switch to delivery."}`:"The selected restaurant is closed, please choose another restaurant."}),"delivery"===Qe&&!Wt&&!0===Tt&&Object(o.jsx)("button",{onClick:()=>{localStorage.setItem("Deliverytype",JSON.stringify("pickup"))},className:"btn btn-order mx-auto mt-3 ","data-dismiss":"modal","aria-label":"Close",children:Object(o.jsx)("span",{className:"text",children:"Switch to pickup"})}),"pickup"===Qe&&!zt&&!0===kt&&Object(o.jsx)("button",{onClick:()=>{localStorage.setItem("Deliverytype",JSON.stringify("delivery"))},className:"btn btn-order mx-auto mt-3 ","data-dismiss":"modal","aria-label":"Close",children:Object(o.jsx)("span",{className:"text",children:"Switch to delivery"})}),"pickup"===Qe&&Wt&&!zt&&!0===Tt&&!0===kt&&Object(o.jsx)("div",{className:"d-flex justify-content-center",children:Object(o.jsx)("button",{className:"btn select-tool mt-4  mb-4","data-dismiss":"modal","aria-label":"Close",children:Object(o.jsx)("span",{className:"text",children:"Order for later"})})}),"delivery"===Qe&&zt&&!Wt&&!0===kt&&!0===Tt&&Object(o.jsx)("div",{className:"d-flex justify-content-center",children:Object(o.jsx)("button",{className:"btn select-tool mt-4  mb-4","data-dismiss":"modal","aria-label":"Close",children:Object(o.jsx)("span",{className:"text",children:"Order for later"})})})]})]})]})})})]})]})})};T.getInitialProps=async({req:e,res:t})=>{var r;let o=null;{const e=b.a.get("selectedRestaurant");o=e?JSON.parse(e):null}let n=null===(r=o)||void 0===r?void 0:r.id;try{const{data:{data:e}}=await O.b.get(`product-categories?restaurant_id=${n||2}`),{data:{data:t}}=await O.b.get(`product-coupons?restaurant_id=${n||2}`),{data:{data:r}}=await O.b.get("settings/get-order-times");return{productCategories:e.filter((e=>e.category_products.length>0)).map((e=>(e.category_products=e.category_products.map((e=>{var t;return"variable"===e.product_type?(e.product_variations=null===(t=e.product_variations)||void 0===t?void 0:t.map((e=>{const t=JSON.parse(e.variations);return e.decodedVariations=t.map(((t,r)=>_(_({},t),{},{status:e.variations_statuses[r]}
1))).filter((e=>e.status)),e})),e):e})),e))),couponData:t,time:r,restaurantId:n}}catch(a){return{productCategories:null}}},t.default=T},YLeI:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"f",(function(){return c}));const o="PRODUCT_UPDATED",n="COUPON_UPDATED",a="STORE_CLOSE_EVENT",i=e=>({type:o,data:e}),s=e=>({type:n,data:e}),c=e=>({type:a,data:e})},gdGy:function(e,t,r){"use strict";var o=r("0b+E");t.a=(e="Event Category")=>(t="action",r="label")=>o.a.event({category:e,action:t,label:r})}},[["EDYA",0,1,2,3,4,5,11]]]);
2//# sourceMappingURL=[restaurant]-0a1fd4dd1f1afd02fc49.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.