(window.webpackJsonp = window.webpackJsonp || []).push([
    [10],
    {
        132: function (e, t, n) {
            "use strict";
            function i(e) {
                try {
                    return p.insertRule(e, p.cssRules.length);
                } catch (e) {
                    console.warn("react-reveal - animation failed");
                }
            }
            function a() {
                u ||
                    ((t.globalHide = u = !0), window.removeEventListener("scroll", a, !0), i("." + s + " { opacity: 0; }"), window.removeEventListener("orientationchange", a, !0), window.document.removeEventListener("visibilitychange", a));
            }
            Object.defineProperty(t, "__esModule", { value: !0 }),
                (t.insertRule = i),
                (t.cascade = function (e, t, n, i, a) {
                    var s = Math.log(i),
                        o = (Math.log(a) - s) / (n - t);
                    return Math.exp(s + o * (e - t));
                }),
                (t.animation = function (e) {
                    if (!p) return "";
                    var t = "@keyframes " + (f + m) + "{" + e + "}",
                        n = h[e];
                    return n ? "" + f + n : (p.insertRule(t, p.cssRules.length), (h[e] = m), "" + f + m++);
                }),
                (t.hideAll = a),
                (t.default = function (e) {
                    var n = e.ssrFadeout;
                    t.fadeOutEnabled = n;
                });
            var s = (t.namespace = "react-reveal"),
                o = ((t.defaults = { duration: 1e3, delay: 0, count: 1 }), (t.ssr = !0)),
                r = (t.observerMode = !1),
                l = (t.raf = function (e) {
                    return window.setTimeout(e, 66);
                }),
                c = (t.disableSsr = function () {
                    return (t.ssr = o = !1);
                }),
                u =
                    ((t.fadeOutEnabled = !1),
                    (t.ssrFadeout = function () {
                        var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
                        return (t.fadeOutEnabled = e);
                    }),
                    (t.globalHide = !1)),
                d = ((t.ie10 = !1), (t.collapseend = void 0)),
                m = 1,
                h = {},
                p = !1,
                f = s + "-" + Math.floor(1e15 * Math.random()) + "-";
            if ("undefined" != typeof window && "nodejs" !== window.name && window.document && "undefined" != typeof navigator) {
                (t.observerMode = r =
                    "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype && /\{\s*\[native code\]\s*\}/.test("" + IntersectionObserver)),
                    (t.raf = l = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || l),
                    (t.ssr = o = window.document.querySelectorAll("div[data-reactroot]").length > 0),
                    -1 !== navigator.appVersion.indexOf("MSIE 10") && (t.ie10 = !0),
                    o &&
                        "performance" in window &&
                        "timing" in window.performance &&
                        "domContentLoadedEventEnd" in window.performance.timing &&
                        window.performance.timing.domLoading &&
                        Date.now() - window.performance.timing.domLoading < 300 &&
                        (t.ssr = o = !1),
                    o && window.setTimeout(c, 1500),
                    r || ((t.collapseend = d = document.createEvent("Event")), d.initEvent("collapseend", !0, !0));
                var v = document.createElement("style");
                document.head.appendChild(v),
                    v.sheet &&
                        v.sheet.cssRules &&
                        v.sheet.insertRule &&
                        ((p = v.sheet), window.addEventListener("scroll", a, !0), window.addEventListener("orientationchange", a, !0), window.document.addEventListener("visibilitychange", a));
            }
        },
        133: function (e, t, n) {
            "use strict";
            n.d(t, "b", function () {
                return r;
            }),
                n.d(t, "d", function () {
                    return l;
                }),
                n.d(t, "a", function () {
                    return c;
                }),
                n.d(t, "c", function () {
                    return u;
                });
            var i = n(39),
                a = n(17),
                s = n(15),
                o = n.n(s),
                r = function (e, t) {
                    return function (n) {
                        return o.a
                            .post(a.j, { token: e, store_id: t })
                            .then(function (e) {
                                var t = e.data;
                                return n({ type: i.a, payload: t });
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                l = function (e, t, n) {
                    return function (i) {
                        return o.a
                            .post(a.B, { token: e, item_id: t, store_id: n })
                            .then(function (e) {
                                return e.data;
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                c = function (e, t) {
                    return function (n) {
                        return o.a
                            .post(a.i, { token: e, store_id: t })
                            .then(function (e) {
                                var t = e.data;
                                return n({ type: i.b, payload: t });
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                u = function (e, t, n) {
                    return function (i) {
                        return o.a
                            .post(a.A, { token: e, category_id: t, store_id: n })
                            .then(function (e) {
                                return e.data;
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                };
        },
        137: function (e, t, n) {
            "use strict";
            function i(e) {
                return e && e.__esModule ? e : { default: e };
            }
            Object.defineProperty(t, "__esModule", { value: !0 });
            var a =
                Object.assign ||
                function (e) {
                    for (var t = 1; t < arguments.length; t++) {
                        var n = arguments[t];
                        for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
                    }
                    return e;
                };
            t.default = function (e, t, n, i) {
                return (
                    "in" in e && (e.when = e.in),
                    s.default.Children.count(i) < 2
                        ? s.default.createElement(o.default, a({}, e, { inEffect: t, outEffect: n, children: i }))
                        : ((i = s.default.Children.map(i, function (i) {
                              return s.default.createElement(o.default, a({}, e, { inEffect: t, outEffect: n, children: i }));
                          })),
                          "Fragment" in s.default ? s.default.createElement(s.default.Fragment, null, i) : s.default.createElement("span", null, i))
                );
            };
            var s = i(n(0)),
                o = i(n(142));
            e.exports = t.default;
        },
        139: function (e, t, n) {
            "use strict";
            var i = n(22),
                a = n(23),
                s = n(25),
                o = n(24),
                r = n(26),
                l = n(0),
                c = n.n(l),
                u = n(3),
                d = n(237),
                m = n(45),
                h = n(34),
                p = n(133),
                f = (function (e) {
                    function t() {
                        var e, n;
                        Object(i.a)(this, t);
                        for (var a = arguments.length, r = new Array(a), l = 0; l < a; l++) r[l] = arguments[l];
                        return (
                            ((n = Object(s.a)(this, (e = Object(o.a)(t)).call.apply(e, [this].concat(r)))).state = { singleItemSwitchState: !1 }),
                            (n.__toggleSingleItemSwitch = function (e, t) {
                                n.setState({ singleItemSwitchState: !n.state.singleItemSwitchState }),
                                    n.props.toggleItemStatus(n.props.user.data.auth_token, t, localStorage.getItem("selected_store_id")).then(function (t) {
                                        t &&
                                            t.success &&
                                            (1 === t.status
                                                ? (n.props.enqueueSnackbar(e + localStorage.getItem("itemsPage_toggleTrue"), { variant: "success" }), n.setState({ singleItemSwitchState: !0 }))
                                                : (n.props.enqueueSnackbar(e + localStorage.getItem("itemsPage_toggleFalse"), { variant: "warning" }), n.setState({ singleItemSwitchState: !1 })));
                                    });
                            }),
                            n
                        );
                    }
                    return (
                        Object(r.a)(t, e),
                        Object(a.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    1 === this.props.item.is_active && this.setState({ singleItemSwitchState: !0 });
                                },
                            },
                            {
                                key: "componentWillReceiveProps",
                                value: function (e) {
                                    1 === e.item.is_active ? this.setState({ singleItemSwitchState: !0 }) : this.setState({ singleItemSwitchState: !1 });
                                },
                            },
                            {
                                key: "shouldComponentUpdate",
                                value: function (e, t) {
                                    return this.props.item !== e.item || this.state.singleItemSwitchState !== t.singleItemSwitchState;
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.props.item;
                                    return c.a.createElement(
                                        c.a.Fragment,
                                        null,
                                        c.a.createElement(
                                            "div",
                                            { className: "d-flex justify-content-between align-items-center menuSingleItem" },
                                            c.a.createElement(
                                                "div",
                                                {
                                                    className: "d-flex justify-content-start align-items-center",
                                                    onClick: function () {
                                                        return e.props.openItemEditDrawer(t.id);
                                                    },
                                                },
                                                null !== t.image && c.a.createElement("img", { src: u.a + t.image, alt: t.name, className: "menuItemImage" }),
                                                c.a.createElement(
                                                    "div",
                                                    null,
                                                    c.a.createElement("span", { className: "menuItemName" }, t.name),
                                                    " ",
                                                    c.a.createElement("br", null),
                                                    " ",
                                                    c.a.createElement("span", { className: "menuItemPrice" }, localStorage.getItem("currencyFormat"), t.price)
                                                )
                                            ),
                                            c.a.createElement(
                                                "div",
                                                null,
                                                c.a.createElement(d.a, {
                                                    checked: this.state.singleItemSwitchState,
                                                    onChange: function () {
                                                        return e.__toggleSingleItemSwitch(t.name, t.id);
                                                    },
                                                })
                                            )
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(l.Component);
            t.a = Object(h.b)(
                function (e) {
                    return { user: e.user.user, menu: e.menu.menu };
                },
                { toggleItemStatus: p.d }
            )(Object(m.b)(f));
        },
        140: function (e, t, n) {
            "use strict";
            var i = n(65),
                a = n(22),
                s = n(23),
                o = n(25),
                r = n(24),
                l = n(26),
                c = n(0),
                u = n.n(c),
                d = n(223),
                m = n(15),
                h = n.n(m),
                p = n(34),
                f = n(17),
                v = n(3),
                g = n(45),
                y = (function (e) {
                    function t() {
                        var e, n;
                        Object(a.a)(this, t);
                        for (var s = arguments.length, l = new Array(s), c = 0; c < s; c++) l[c] = arguments[c];
                        return (
                            ((n = Object(o.a)(this, (e = Object(r.a)(t)).call.apply(e, [this].concat(l)))).state = { loading: !1, itemEditDrawer: !1, data: [], name: "", price: "", old_price: "", showUpdateButton: !1, itemUpdated: !1 }),
                            (n.handleInputChange = function (e) {
                                n.setState(Object(i.a)({}, e.target.name, e.target.value), function () {
                                    n.validateUpdateItem();
                                });
                            }),
                            (n.toggleItemEditDrawer = function () {
                                n.setState({ itemEditDrawer: !1 }), n.props.closeItemEditDrawer(n.state.itemUpdated);
                            }),
                            (n.fetchItemDetails = function (e) {
                                n.setState({ loading: !0 }),
                                    h.a.post(f.d, { item_id: e, token: n.props.user.data.auth_token, store_id: localStorage.getItem("selected_store_id") }).then(function (e) {
                                        e.data &&
                                            (n.setState({ data: e.data, name: e.data.name, price: e.data.price, old_price: e.data.old_price, loading: !1 }, function () {
                                                n.validateUpdateItem();
                                            }),
                                            n.setState({ itemEditDrawer: !0 }));
                                    });
                            }),
                            (n.handleItemUpdate = function (e) {
                                e.preventDefault(),
                                    n.validateUpdateItem() &&
                                        (n.setState({ loading: !0 }),
                                        h.a.post(f.D, { item_id: n.state.data.id, name: n.state.name, price: n.state.price, old_price: n.state.old_price, token: n.props.user.data.auth_token, store_id: localStorage.getItem("selected_store_id") }).then(function (e) {
                                            e.data &&
                                                (n.setState({ itemUpdated: !0 }),
                                                n.fetchItemDetails(n.state.data.id),
                                                setTimeout(function () {
                                                    n.props.enqueueSnackbar(n.state.name + " updated.", { variant: "success" });
                                                }, 250));
                                        }));
                            }),
                            (n.validateUpdateItem = function () {
                                return n.state.name.length > 0 && n.state.name.length <= 190 && /^[0-9]+\.?[0-9]*$/.test(n.state.price) ? (n.setState({ showUpdateButton: !0 }), !0) : (n.setState({ showUpdateButton: !1 }), !1);
                            }),
                            (n.changeImage = function () {
                                "FoodomaaAndroidWebViewUA" === navigator.userAgent && "undefined" !== window.Android && window.Android.changeItemImage(n.state.data.id);
                            }),
                            (n.inputFocus = function () {
                                n.refs.itemEditBlock.style.height = "80vh";
                            }),
                            (n.handleClickOutside = function (e) {
                                n.refs.itemEditBlock && (n.refs.itemEditBlock.style.height = "auto");
                            }),
                            n
                        );
                    }
                    return (
                        Object(l.a)(t, e),
                        Object(s.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    document.addEventListener("mousedown", this.handleClickOutside);
                                },
                            },
                            {
                                key: "componentWillReceiveProps",
                                value: function (e) {
                                    e.itemEditDrawer !== this.state.itemEditDrawer && this.setState({ itemEditDrawer: e.itemEditDrawer }), !0 === e.itemEditDrawer && (this.setState({ itemUpdated: !1 }), this.fetchItemDetails(e.item_id));
                                },
                            },
                            {
                                key: "componentWillUnmount",
                                value: function () {
                                    document.removeEventListener("mousedown", this.handleClickOutside);
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.state.data;
                                    return u.a.createElement(
                                        u.a.Fragment,
                                        null,
                                        u.a.createElement(
                                            d.a,
                                            {
                                                anchor: "bottom",
                                                open: this.state.itemEditDrawer,
                                                onClose: function () {
                                                    return e.toggleItemEditDrawer();
                                                },
                                            },
                                            this.state.loading
                                                ? u.a.createElement("div", { className: "bg-store-light" }, u.a.createElement("div", { className: "itemEditContainer pt-100" }, u.a.createElement("div", { className: "spin-load" })))
                                                : u.a.createElement(
                                                      "div",
                                                      { className: "bg-store-light itemEditContainer" },
                                                      u.a.createElement("div", { className: "d-flex justify-content-between align-items-center" }, u.a.createElement("h3", { className: "mx-15 px-20 mt-20" }, "Edit Item")),
                                                      u.a.createElement("hr", { className: "mt-0" }),
                                                      u.a.createElement(
                                                          "form",
                                                          { onSubmit: this.handleItemUpdate, className: "mx-15 p-2", ref: "itemEditBlock" },
                                                          null !== t.image
                                                              ? u.a.createElement(
                                                                    "div",
                                                                    { className: "col-md-12 mb-20" },
                                                                    u.a.createElement(
                                                                        "div",
                                                                        { className: "d-flex justify-content-start  align-items-center" },
                                                                        u.a.createElement("img", { src: v.a + t.image, alt: t.name, className: "itemEditImage mr-10" }),
                                                                        u.a.createElement("button", { type: "button", onClick: this.changeImage, className: "btn btn-md btn-default change-image" }, "Change Image")
                                                                    )
                                                                )
                                                              : u.a.createElement(
                                                                    "div",
                                                                    { className: "col-md-12" },
                                                                    u.a.createElement("button", { type: "button", onClick: this.changeImage, className: "btn btn-md btn-default add-image" }, "Add Image")
                                                                ),
                                                          u.a.createElement(
                                                              "div",
                                                              { className: "form-group mb-20" },
                                                              u.a.createElement(
                                                                  "div",
                                                                  { className: "col-md-12 pb-15" },
                                                                  u.a.createElement("p", { className: "itemEditInputLabel mb-2" }, t.name),
                                                                  u.a.createElement("p", { className: "itemEditInputLabel" }, "Mark Price "),
                                                                  u.a.createElement("input", {
                                                                      type: "text",
                                                                      name: "old_price",
                                                                      defaultValue: t.old_price,
                                                                      onChange: this.handleInputChange,
                                                                      className: "itemEditTextInput",
                                                                      ref: "nameInput",
                                                                      onFocus: this.inputFocus,
                                                                      onBlur: this.handleClickOutside,
                                                                  })
                                                              ),
                                                              u.a.createElement(
                                                                  "div",
                                                                  { className: "col-md-12 pb-15" },
                                                                  u.a.createElement("p", { className: "itemEditInputLabel" }, "Price "),
                                                                  u.a.createElement("input", {
                                                                      type: "text",
                                                                      name: "price",
                                                                      defaultValue: t.price,
                                                                      onChange: this.handleInputChange,
                                                                      className: "itemEditTextInput",
                                                                      ref: "priceInput",
                                                                      onFocus: this.inputFocus,
                                                                      onBlur: this.handleClickOutside,
                                                                  })
                                                              )
                                                          ),
                                                          u.a.createElement(
                                                              "div",
                                                              { className: "mx-15 mb-20 d-flex justify-content-center" },
                                                              u.a.createElement("button", { type: "button", className: "btn btn-md btnItemUpdateCancel mr-15", onClick: this.toggleItemEditDrawer }, "Cancel"),
                                                              this.state.showUpdateButton
                                                                  ? u.a.createElement("button", { type: "submit", className: "btn btn-md btnItemUpdate" }, "Update")
                                                                  : u.a.createElement("button", { type: "button", className: "btn btn-md btnItemUpdateCancel" }, "Update")
                                                          )
                                                      )
                                                  )
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(c.Component);
            t.a = Object(p.b)(function (e) {
                return { user: e.user.user };
            }, {})(Object(g.b)(y));
        },
        142: function (e, t, n) {
            "use strict";
            Object.defineProperty(t, "__esModule", { value: !0 });
            var i,
                a =
                    "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;
                          },
                s = (function () {
                    return function (e, t) {
                        if (Array.isArray(e)) return e;
                        if (Symbol.iterator in Object(e))
                            return (function (e, t) {
                                var n = [],
                                    i = !0,
                                    a = !1,
                                    s = void 0;
                                try {
                                    for (var o, r = e[Symbol.iterator](); !(i = (o = r.next()).done) && (n.push(o.value), !t || n.length !== t); i = !0);
                                } catch (e) {
                                    (a = !0), (s = e);
                                } finally {
                                    try {
                                        !i && r.return && r.return();
                                    } finally {
                                        if (a) throw s;
                                    }
                                }
                                return n;
                            })(e, t);
                        throw new TypeError("Invalid attempt to destructure non-iterable instance");
                    };
                })(),
                o =
                    Object.assign ||
                    function (e) {
                        for (var t = 1; t < arguments.length; t++) {
                            var n = arguments[t];
                            for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
                        }
                        return e;
                    },
                r = (function () {
                    function e(e, t) {
                        for (var n = 0; n < t.length; n++) {
                            var i = t[n];
                            (i.enumerable = i.enumerable || !1), (i.configurable = !0), "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
                        }
                    }
                    return function (t, n, i) {
                        return n && e(t.prototype, n), i && e(t, i), t;
                    };
                })(),
                l = n(0),
                c = (i = l) && i.__esModule ? i : { default: i },
                u = n(2),
                d = n(132),
                m = (0, u.shape)({ make: u.func, duration: u.number.isRequired, delay: u.number.isRequired, forever: u.bool, count: u.number.isRequired, style: u.object.isRequired, reverse: u.bool }),
                h = {
                    collapse: u.bool,
                    collapseEl: u.element,
                    cascade: u.bool,
                    wait: u.number,
                    force: u.bool,
                    disabled: u.bool,
                    appear: u.bool,
                    enter: u.bool,
                    exit: u.bool,
                    fraction: u.number,
                    refProp: u.string,
                    innerRef: u.func,
                    onReveal: u.func,
                    unmountOnExit: u.bool,
                    mountOnEnter: u.bool,
                    inEffect: m.isRequired,
                    outEffect: (0, u.oneOfType)([m, (0, u.oneOf)([!1])]).isRequired,
                    ssrReveal: u.bool,
                    collapseOnly: u.bool,
                    ssrFadeout: u.bool,
                },
                p = { transitionGroup: u.object },
                f = (function (e) {
                    function t(e, n) {
                        !(function (e, t) {
                            if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
                        })(this, t);
                        var i = (function (e, t) {
                            if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                            return !t || ("object" != typeof t && "function" != typeof t) ? e : t;
                        })(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n));
                        return (
                            (i.isOn = void 0 === e.when || !!e.when),
                            (i.state = { collapse: e.collapse ? t.getInitialCollapseStyle(e) : void 0, style: { opacity: (i.isOn && !e.ssrReveal) || !e.outEffect ? void 0 : 0 } }),
                            (i.savedChild = !1),
                            (i.isShown = !1),
                            d.observerMode ? (i.handleObserve = i.handleObserve.bind(i)) : ((i.revealHandler = i.makeHandler(i.reveal)), (i.resizeHandler = i.makeHandler(i.resize))),
                            (i.saveRef = i.saveRef.bind(i)),
                            i
                        );
                    }
                    return (
                        (function (e, t) {
                            if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
                            (e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } })), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : (e.__proto__ = t));
                        })(t, c.default.Component),
                        r(
                            t,
                            [
                                {
                                    key: "saveRef",
                                    value: function (e) {
                                        this.childRef && this.childRef(e), this.props.innerRef && this.props.innerRef(e), this.el !== e && ((this.el = e && "offsetHeight" in e ? e : void 0), this.observe(this.props, !0));
                                    },
                                },
                                {
                                    key: "invisible",
                                    value: function () {
                                        this &&
                                            this.el &&
                                            ((this.savedChild = !1),
                                            this.isShown ||
                                                (this.setState({ hasExited: !0, collapse: this.props.collapse ? o({}, this.state.collapse, { visibility: "hidden" }) : null, style: { opacity: 0 } }),
                                                !d.observerMode && this.props.collapse && window.document.dispatchEvent(d.collapseend)));
                                    },
                                },
                                {
                                    key: "animationEnd",
                                    value: function (e, t, n) {
                                        var i = this,
                                            a = n.forever,
                                            s = n.count,
                                            o = n.delay,
                                            r = n.duration;
                                        if (!a) {
                                            this.animationEndTimeout = window.setTimeout(function () {
                                                i && i.el && ((i.animationEndTimeout = void 0), e.call(i));
                                            }, o + (r + (t ? r : 0) * s));
                                        }
                                    },
                                },
                                {
                                    key: "getDimensionValue",
                                    value: function () {
                                        return (
                                            this.el.offsetHeight + parseInt(window.getComputedStyle(this.el, null).getPropertyValue("margin-top"), 10) + parseInt(window.getComputedStyle(this.el, null).getPropertyValue("margin-bottom"), 10)
                                        );
                                    },
                                },
                                {
                                    key: "collapse",
                                    value: function (e, t, n) {
                                        var i = n.duration + (t.cascade ? n.duration : 0),
                                            a = this.isOn ? this.getDimensionValue() : 0,
                                            s = void 0,
                                            o = void 0;
                                        if (t.collapseOnly) (s = n.duration / 3), (o = n.delay);
                                        else {
                                            var r = i >> 2,
                                                l = r >> 1;
                                            (s = r), (o = n.delay + (this.isOn ? 0 : i - r - l)), (e.style.animationDuration = i - r + (this.isOn ? l : -l) + "ms"), (e.style.animationDelay = n.delay + (this.isOn ? r - l : 0) + "ms");
                                        }
                                        return (e.collapse = { height: a, transition: "height " + s + "ms ease " + o + "ms", overflow: t.collapseOnly ? "hidden" : void 0 }), e;
                                    },
                                },
                                {
                                    key: "animate",
                                    value: function (e) {
                                        if (this && this.el && (this.unlisten(), this.isShown !== this.isOn)) {
                                            this.isShown = this.isOn;
                                            var t = !this.isOn && e.outEffect,
                                                n = e[t ? "outEffect" : "inEffect"],
                                                i = ("style" in n && n.style.animationName) || void 0,
                                                a = void 0;
                                            e.collapseOnly
                                                ? (a = { hasAppeared: !0, hasExited: !1, style: { opacity: 1 } })
                                                : ((e.outEffect || this.isOn) && n.make && (i = n.make),
                                                  (a = {
                                                      hasAppeared: !0,
                                                      hasExited: !1,
                                                      collapse: void 0,
                                                      style: o({}, n.style, { animationDuration: n.duration + "ms", animationDelay: n.delay + "ms", animationIterationCount: n.forever ? "infinite" : n.count, opacity: 1, animationName: i }),
                                                      className: n.className,
                                                  })),
                                                this.setState(e.collapse ? this.collapse(a, e, n) : a),
                                                t ? ((this.savedChild = c.default.cloneElement(this.getChild())), this.animationEnd(this.invisible, e.cascade, n)) : (this.savedChild = !1),
                                                this.onReveal(e);
                                        }
                                    },
                                },
                                {
                                    key: "onReveal",
                                    value: function (e) {
                                        e.onReveal &&
                                            this.isOn &&
                                            (this.onRevealTimeout && (this.onRevealTimeout = window.clearTimeout(this.onRevealTimeout)), e.wait ? (this.onRevealTimeout = window.setTimeout(e.onReveal, e.wait)) : e.onReveal());
                                    },
                                },
                                {
                                    key: "componentWillUnmount",
                                    value: function () {
                                        this.unlisten(), d.ssr && (0, d.disableSsr)();
                                    },
                                },
                                {
                                    key: "handleObserve",
                                    value: function (e, t) {
                                        s(e, 1)[0].intersectionRatio > 0 && (t.disconnect(), (this.observer = null), this.reveal(this.props, !0));
                                    },
                                },
                                {
                                    key: "observe",
                                    value: function (e) {
                                        var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
                                        if (this.el && d.observerMode) {
                                            if (this.observer) {
                                                if (!t) return;
                                                this.observer.disconnect();
                                            } else if (t) return;
                                            (this.observer = new IntersectionObserver(this.handleObserve, { threshold: e.fraction })), this.observer.observe(this.el);
                                        }
                                    },
                                },
                                {
                                    key: "reveal",
                                    value: function (e) {
                                        var t = this,
                                            n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
                                        d.globalHide || (0, d.hideAll)(),
                                            this &&
                                                this.el &&
                                                (e || (e = this.props),
                                                d.ssr && (0, d.disableSsr)(),
                                                this.isOn && this.isShown && void 0 !== e.spy
                                                    ? ((this.isShown = !1),
                                                      this.setState({ style: {} }),
                                                      window.setTimeout(function () {
                                                          return t.reveal(e);
                                                      }, 200))
                                                    : n || this.inViewport(e) || e.force
                                                    ? this.animate(e)
                                                    : d.observerMode
                                                    ? this.observe(e)
                                                    : this.listen());
                                    },
                                },
                                {
                                    key: "componentDidMount",
                                    value: function () {
                                        var e = this;
                                        if (this.el && !this.props.disabled) {
                                            this.props.collapseOnly ||
                                                ("make" in this.props.inEffect && this.props.inEffect.make(!1, this.props),
                                                void 0 !== this.props.when && this.props.outEffect && "make" in this.props.outEffect && this.props.outEffect.make(!0, this.props));
                                            var n = this.context.transitionGroup,
                                                i = n && !n.isMounting ? !("enter" in this.props && !1 === this.props.enter) : this.props.appear;
                                            return this.isOn &&
                                                (((void 0 !== this.props.when || void 0 !== this.props.spy) && !i) ||
                                                    (d.ssr && !d.fadeOutEnabled && !this.props.ssrFadeout && this.props.outEffect && !this.props.ssrReveal && t.getTop(this.el) < window.pageYOffset + window.innerHeight))
                                                ? ((this.isShown = !0),
                                                  this.setState({ hasAppeared: !0, collapse: this.props.collapse ? { height: this.getDimensionValue() } : this.state.collapse, style: { opacity: 1 } }),
                                                  void this.onReveal(this.props))
                                                : d.ssr && (d.fadeOutEnabled || this.props.ssrFadeout) && this.props.outEffect && t.getTop(this.el) < window.pageYOffset + window.innerHeight
                                                ? (this.setState({ style: { opacity: 0, transition: "opacity 1000ms 1000ms" } }),
                                                  void window.setTimeout(function () {
                                                      return e.reveal(e.props, !0);
                                                  }, 2e3))
                                                : void (this.isOn && (this.props.force ? this.animate(this.props) : this.reveal(this.props)));
                                        }
                                    },
                                },
                                {
                                    key: "cascade",
                                    value: function (e) {
                                        var t = this,
                                            n = void 0;
                                        n =
                                            "string" == typeof e
                                                ? e.split("").map(function (e, t) {
                                                      return c.default.createElement("span", { key: t, style: { display: "inline-block", whiteSpace: "pre" } }, e);
                                                  })
                                                : c.default.Children.toArray(e);
                                        var i = this.props[this.isOn || !this.props.outEffect ? "inEffect" : "outEffect"],
                                            s = i.duration,
                                            r = i.reverse,
                                            l = n.length,
                                            u = 2 * s;
                                        this.props.collapse && ((u = parseInt(this.state.style.animationDuration, 10)), (s = u / 2));
                                        var m = r ? l : 0;
                                        return n.map(function (e) {
                                            return "object" === (void 0 === e ? "undefined" : a(e)) && e
                                                ? c.default.cloneElement(e, { style: o({}, e.props.style, t.state.style, { animationDuration: Math.round((0, d.cascade)(r ? m-- : m++, 0, l, s, u)) + "ms" }) })
                                                : e;
                                        });
                                    },
                                },
                                {
                                    key: "componentWillReceiveProps",
                                    value: function (e) {
                                        void 0 !== e.when && (this.isOn = !!e.when),
                                            e.fraction !== this.props.fraction && this.observe(e, !0),
                                            !this.isOn && e.onExited && "exit" in e && !1 === e.exit
                                                ? e.onExited()
                                                : e.disabled ||
                                                  (e.collapse && !this.props.collapse && (this.setState({ style: {}, collapse: t.getInitialCollapseStyle(e) }), (this.isShown = !1)),
                                                  (e.when === this.props.when && e.spy === this.props.spy) || this.reveal(e),
                                                  this.onRevealTimeout && !this.isOn && (this.onRevealTimeout = window.clearTimeout(this.onRevealTimeout)));
                                    },
                                },
                                {
                                    key: "getChild",
                                    value: function () {
                                        if (this.savedChild && !this.props.disabled) return this.savedChild;
                                        if ("object" === a(this.props.children)) {
                                            var e = c.default.Children.only(this.props.children);
                                            return ("type" in e && "string" == typeof e.type) || "ref" !== this.props.refProp ? e : c.default.createElement("div", null, e);
                                        }
                                        return c.default.createElement("div", null, this.props.children);
                                    },
                                },
                                {
                                    key: "render",
                                    value: function () {
                                        var e;
                                        e = this.state.hasAppeared ? !this.props.unmountOnExit || !this.state.hasExited || this.isOn : !this.props.mountOnEnter || this.isOn;
                                        var t = this.getChild();
                                        "function" == typeof t.ref && (this.childRef = t.ref);
                                        var n = !1,
                                            i = t.props,
                                            a = i.style,
                                            s = i.className,
                                            r = i.children,
                                            l = this.props.disabled ? s : (this.props.outEffect ? d.namespace : "") + (this.state.className ? " " + this.state.className : "") + (s ? " " + s : "") || void 0,
                                            u = void 0;
                                        "function" == typeof this.state.style.animationName && (this.state.style.animationName = this.state.style.animationName(!this.isOn, this.props)),
                                            this.props.cascade && !this.props.disabled && r && this.state.style.animationName
                                                ? ((n = this.cascade(r)), (u = o({}, a, { opacity: 1 })))
                                                : (u = this.props.disabled ? a : o({}, a, this.state.style));
                                        var m = o(
                                                {},
                                                this.props.props,
                                                (function (e, t, n) {
                                                    return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e;
                                                })({ className: l, style: u }, this.props.refProp, this.saveRef)
                                            ),
                                            h = c.default.cloneElement(t, m, e ? n || r : void 0);
                                        return void 0 !== this.props.collapse
                                            ? this.props.collapseEl
                                                ? c.default.cloneElement(this.props.collapseEl, { style: o({}, this.props.collapseEl.style, this.props.disabled ? void 0 : this.state.collapse), children: h })
                                                : c.default.createElement("div", { style: this.props.disabled ? void 0 : this.state.collapse, children: h })
                                            : h;
                                    },
                                },
                                {
                                    key: "makeHandler",
                                    value: function (e) {
                                        var t = this,
                                            n = function () {
                                                e.call(t, t.props), (t.ticking = !1);
                                            };
                                        return function () {
                                            t.ticking || ((0, d.raf)(n), (t.ticking = !0));
                                        };
                                    },
                                },
                                {
                                    key: "inViewport",
                                    value: function (e) {
                                        if (!this.el || window.document.hidden) return !1;
                                        var n = this.el.offsetHeight,
                                            i = window.pageYOffset - t.getTop(this.el),
                                            a = Math.min(n, window.innerHeight) * (d.globalHide ? e.fraction : 0);
                                        return i > a - window.innerHeight && i < n - a;
                                    },
                                },
                                {
                                    key: "resize",
                                    value: function (e) {
                                        this &&
                                            this.el &&
                                            this.isOn &&
                                            this.inViewport(e) &&
                                            (this.unlisten(), (this.isShown = this.isOn), this.setState({ hasExited: !this.isOn, hasAppeared: !0, collapse: void 0, style: { opacity: this.isOn || !e.outEffect ? 1 : 0 } }), this.onReveal(e));
                                    },
                                },
                                {
                                    key: "listen",
                                    value: function () {
                                        d.observerMode ||
                                            this.isListener ||
                                            ((this.isListener = !0),
                                            window.addEventListener("scroll", this.revealHandler, { passive: !0 }),
                                            window.addEventListener("orientationchange", this.revealHandler, { passive: !0 }),
                                            window.document.addEventListener("visibilitychange", this.revealHandler, { passive: !0 }),
                                            window.document.addEventListener("collapseend", this.revealHandler, { passive: !0 }),
                                            window.addEventListener("resize", this.resizeHandler, { passive: !0 }));
                                    },
                                },
                                {
                                    key: "unlisten",
                                    value: function () {
                                        !d.observerMode &&
                                            this.isListener &&
                                            (window.removeEventListener("scroll", this.revealHandler, { passive: !0 }),
                                            window.removeEventListener("orientationchange", this.revealHandler, { passive: !0 }),
                                            window.document.removeEventListener("visibilitychange", this.revealHandler, { passive: !0 }),
                                            window.document.removeEventListener("collapseend", this.revealHandler, { passive: !0 }),
                                            window.removeEventListener("resize", this.resizeHandler, { passive: !0 }),
                                            (this.isListener = !1)),
                                            this.onRevealTimeout && (this.onRevealTimeout = window.clearTimeout(this.onRevealTimeout)),
                                            this.animationEndTimeout && (this.animationEndTimeout = window.clearTimeout(this.animationEndTimeout));
                                    },
                                },
                            ],
                            [
                                {
                                    key: "getInitialCollapseStyle",
                                    value: function (e) {
                                        return { height: 0, visibility: e.when ? void 0 : "hidden" };
                                    },
                                },
                                {
                                    key: "getTop",
                                    value: function (e) {
                                        for (; void 0 === e.offsetTop; ) e = e.parentNode;
                                        for (var t = e.offsetTop; e.offsetParent; t += e.offsetTop) e = e.offsetParent;
                                        return t;
                                    },
                                },
                            ]
                        ),
                        t
                    );
                })();
            (f.propTypes = h), (f.defaultProps = { fraction: 0.2, refProp: "ref" }), (f.contextTypes = p), (f.displayName = "RevealBase"), (t.default = f), (e.exports = t.default);
        },
        161: function (e, t, n) {
            "use strict";
            n.d(t, "a", function () {
                return i;
            });
            var i = function (e, t) {
                var n;
                return function () {
                    var i = arguments,
                        a = this;
                    clearTimeout(n),
                        (n = setTimeout(function () {
                            return e.apply(a, i);
                        }, t));
                };
            };
        },
        162: function (e, t, n) {
            "use strict";
            function i() {
                return m || (m = (0, c.animation)(d));
            }
            function a() {
                var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : c.defaults,
                    t = e.children,
                    n = (e.out, e.timeout),
                    a = e.duration,
                    s = void 0 === a ? c.defaults.duration : a,
                    o = e.delay,
                    r = void 0 === o ? c.defaults.delay : o,
                    u = e.count,
                    d = void 0 === u ? c.defaults.count : u,
                    m = e.forever,
                    h = (function (e, t) {
                        var n = {};
                        for (var i in e) t.indexOf(i) >= 0 || (Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]));
                        return n;
                    })(e, ["children", "out", "timeout", "duration", "delay", "count", "forever"]),
                    p = { make: i, duration: void 0 === n ? s : n, delay: r, forever: m, count: d, style: { animationFillMode: "both" } };
                return (0, l.default)(h, p, !1, t, !0);
            }
            Object.defineProperty(t, "__esModule", { value: !0 });
            var s,
                o = n(2),
                r = n(137),
                l = (s = r) && s.__esModule ? s : { default: s },
                c = n(132),
                u = { duration: o.number, timeout: o.number, delay: o.number, count: o.number, forever: o.bool },
                d =
                    "\n  0% {\n    transform: translateX(0);\n  }\n\n  6.5% {\n    transform: translateX(-6px) rotateY(-9deg);\n  }\n\n  18.5% {\n    transform: translateX(5px) rotateY(7deg);\n  }\n\n  31.5% {\n    transform: translateX(-3px) rotateY(-5deg);\n  }\n\n  43.5% {\n    transform: translateX(2px) rotateY(3deg);\n  }\n\n  50% {\n    transform: translateX(0);\n}\n",
                m = !1;
            (a.propTypes = u), (t.default = a), (e.exports = t.default);
        },
        225: function (e, t, n) {
            "use strict";
            n.r(t);
            var i = n(22),
                a = n(23),
                s = n(25),
                o = n(24),
                r = n(26),
                l = n(0),
                c = n.n(l),
                u = n(161),
                d = n(6),
                m = n(15),
                h = n.n(m),
                p = n(17),
                f = n(34),
                v = n(139),
                g = n(140),
                y = n(162),
                w = n.n(y),
                b = (function (e) {
                    function t() {
                        var e, n;
                        Object(i.a)(this, t);
                        for (var a = arguments.length, r = new Array(a), l = 0; l < a; l++) r[l] = arguments[l];
                        return (
                            ((n = Object(s.a)(this, (e = Object(o.a)(t)).call.apply(e, [this].concat(r)))).state = { query: "", data: [], nothingFound: !1, itemEditDrawer: !1, item_edit_id: null, searchedFor: "" }),
                            (n.handleInputChange = function (e) {
                                n.setState({ query: e.target.value }, function () {
                                    n.state.query.length >= 3 && n.handleRestaurantSearch(n.state.query);
                                });
                            }),
                            (n.handleRestaurantSearch = Object(u.a)(function (e) {
                                e.length >= 3
                                    ? (n.setState({ queryLengthError: !1, loading: !0, nothingFound: !1, searchedFor: e }),
                                      h.a.post(p.x, { q: e, token: n.props.user.data.auth_token, store_id: localStorage.getItem("selected_store_id") }).then(function (e) {
                                          e.data && n.setState({ data: e.data, loading: !1 }), n.state.query.length < 3 && n.setState({ data: [] });
                                      }))
                                    : n.setState({ queryLengthError: !0 });
                            }, 400)),
                            (n.openItemEditDrawer = function (e) {
                                n.setState({ itemEditDrawer: !0, item_edit_id: e });
                            }),
                            (n.closeItemEditDrawer = function (e) {
                                n.setState({ itemEditDrawer: !1, item_edit_id: null }), e && n.handleRestaurantSearch(n.state.query);
                            }),
                            n
                        );
                    }
                    return (
                        Object(r.a)(t, e),
                        Object(a.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    this.refs.itemSearchInput.focus();
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.state,
                                        n = t.loading,
                                        i = t.data,
                                        a = t.query;
                                    return (
                                        console.log("length err: " + this.state.queryLengthError),
                                        c.a.createElement(
                                            c.a.Fragment,
                                            null,
                                            n && c.a.createElement(d.a, null),
                                            c.a.createElement("div", { className: "pageTitle bg-primary-gradient" }, localStorage.getItem("itemSearchPage_title")),
                                            c.a.createElement(
                                                "div",
                                                { className: "pageContents" },
                                                c.a.createElement(
                                                    "div",
                                                    { className: "mx-15" },
                                                    c.a.createElement("input", {
                                                        type: "text",
                                                        placeholder: localStorage.getItem("itemsPage_searchItem2"),
                                                        onChange: this.handleInputChange,
                                                        value: a,
                                                        className: "itemSearchInput",
                                                        ref: "itemSearchInput",
                                                    }),
                                                    a.length > 0 && a.length < 3 && c.a.createElement(w.a, null, c.a.createElement("p", { className: "text-muted mx-2 mt-2 mb-2" }, localStorage.getItem("generalText_searchHelpMessage")))
                                                ),
                                                c.a.createElement(
                                                    "div",
                                                    { className: "itemSearchResultContainer mt-20" },
                                                    i.length > 0 &&
                                                        c.a.createElement(
                                                            c.a.Fragment,
                                                            null,
                                                            c.a.createElement(
                                                                "div",
                                                                { className: "mx-15 menuCategoryWrapper p-3" },
                                                                c.a.createElement("div", { className: "menuCategoryName mb-3" }, "Results for: ", this.state.searchedFor),
                                                                i.map(function (t) {
                                                                    return c.a.createElement(c.a.Fragment, { key: t.id }, c.a.createElement(v.a, { item: t, openItemEditDrawer: e.openItemEditDrawer }));
                                                                })
                                                            )
                                                        )
                                                )
                                            ),
                                            c.a.createElement(g.a, { itemEditDrawer: this.state.itemEditDrawer, item_id: this.state.item_edit_id, closeItemEditDrawer: this.closeItemEditDrawer })
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(l.Component);
            t.default = Object(f.b)(function (e) {
                return { user: e.user.user };
            }, {})(b);
        },
    },
]);
