(this.webpackJsonpwoowfood=this.webpackJsonpwoowfood||[]).push([[0],{101:function(e,t,n){},149:function(e,t,n){},150:function(e,t,n){},193:function(e,t,n){},214:function(e,t,n){},215:function(e,t,n){},227:function(e,t,n){},228:function(e,t,n){},231:function(e,t,n){},232:function(e,t,n){},285:function(e,t,n){},290:function(e,t,n){},291:function(e,t,n){},293:function(e,t,n){},296:function(e,t,n){},297:function(e,t,n){},302:function(e,t,n){},303:function(e,t,n){},304:function(e,t,n){},306:function(e,t,n){},324:function(e,t,n){},325:function(e,t,n){},329:function(e,t,n){},330:function(e,t,n){},331:function(e,t,n){},332:function(e,t,n){},333:function(e,t,n){},341:function(e,t,n){},343:function(e,t,n){},344:function(e,t,n){},346:function(e,t,n){},354:function(e,t,n){},355:function(e,t,n){},356:function(e,t,n){},357:function(e,t,n){},358:function(e,t,n){},359:function(e,t,n){},360:function(e,t,n){},361:function(e,t,n){},362:function(e,t,n){},363:function(e,t,n){},364:function(e,t,n){},365:function(e,t,n){},366:function(e,t,n){},367:function(e,t,n){},368:function(e,t,n){"use strict";n.r(t);var c,a,r,i,o,s,l,d,u,j,b,m,p,O,h,v,f,x=n(1),g=n.n(x),_=n(55),y=n.n(_),w=(n(285),n(3)),N=n(21),C=function(){var e,t=Object(N.i)();return"folder"!==window.townsTypeRoute?{choosenTown:null}:{choosenTown:null===(e=window.towns)||void 0===e?void 0:e.find((function(e){return t.town===e.slug}))}},k=function(){var e=Object(N.h)(),t=C().choosenTown,n="/";t&&(n+=t.slug);return{navigateTo:function(c,a){if("/"===c)e(n,a);else{var r="";t&&(r+="/"+t.slug),e(r+=c,a)}},rootTownPathname:n}},I=n(5),P=n(31),S=n(0),E=function(e){var t,n=Object(N.i)(),c="folder"===window.townsTypeRoute?null===(t=window.towns)||void 0===t?void 0:t.find((function(e){return n.town===e.slug})):null,a="/";c&&(a+=c.slug);var r="";return"/"===e.to?r=a:(c&&(r+="/"+c.slug),r+=e.to),Object(S.jsx)(P.b,Object(I.a)(Object(I.a)({},e),{},{to:r}))},F=function(e){return{type:"SET_STATUS",payload:e}},T=function(e){return{type:"SET_TOWN_MODAL",payload:e}},A=function(e){return{type:"SAVE_LOGIN",payload:e}},M=function(e){return{type:"LOGIN",payload:e}},D=function(e){return{type:"SET_OPEN_AUTH_MODAL",payload:e}},G=n(457),R=n(424),B=n(425),L=n(475),U=n(426),z=n(124),H=n(427),W=n(49),V=n.n(W),Z=function(e,t){var n=(e=Math.abs(e)%100)%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:1===n?t[0]:t[2]},Q=function(){return window.innerWidth<900},q=function(){return"localhost"===window.location.hostname||"192.168.2.48"===window.location.hostname?"dev.foodninja.pro":window.location.hostname},Y=function(){return void 0!==window.currentPlatform?window.currentPlatform:"site"},K=function(){return void 0!==window.mobileType?window.mobileType:"android"},J=function e(t){if("object"!=typeof t)return t;if(!t)return t;var n=t instanceof Array?[]:{};for(var c in t)t.hasOwnProperty(c)&&(n[c]=e(t[c]));return n},X=function(e){var t=e.promocode,n=e.promocodeProduct,c=e.items,a=e.cartTotal,r=(e.config,e.typeDelivery),i=(e.isInitial,e.categories),o=e.preorderDate,s=e.preorderTime;if(Object.keys(t).length){var l,d,u,j=[],b=Object.values(c),m=o||new Date;if(t.endDateFormat&&t.startDateFormat){var p=Object(G.a)(t.endDateFormat,"dd.MM.yyyy",new Date),O=Object(G.a)(t.endDateFormat,"dd.MM.yyyy HH:mm",new Date);(Object(R.a)(m,p)||Object(B.a)(m,O))&&(d="error",u=o?"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.":"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u0441\u0442\u0435\u043a\u043b\u043e.",j.push({code:"expired",message:o?"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.":"\u0412\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0430 \u0438\u0441\u0442\u0435\u043a\u043b\u043e"}))}if("birthday"===t.type&&t.birthdayDayLimitBefore&&t.birthdayDayLimitAfter){var h=new Date,v=new Date(m);v.setDate(h.getDate()-t.birthdayDayLimitBefore);var f=new Date(m);f.setDate(h.getDate()+t.birthdayDayLimitAfter),(m>f.getTime()||m<v.getTime())&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e ".concat(t.birthdayDayLimitBefore," \u0434\u0435\u043d\u044c \u0434\u043e \u0438 ").concat(t.birthdayDayLimitAfter," \u0434\u0435\u043d\u044c \u043f\u043e\u0441\u043b\u0435 \u0434\u043d\u044f \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f."),j.push({code:"birthday",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e ".concat(t.birthdayDayLimitBefore," \u0434\u0435\u043d\u044c \u0434\u043e \u0438 ").concat(t.birthdayDayLimitAfter," \u0434\u0435\u043d\u044c \u043f\u043e\u0441\u043b\u0435 \u0434\u043d\u044f \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f.")}))}if(t.startTime&&t.endTime){var x=s||new Date,g=parseInt(t.startTime.slice(0,2))>parseInt(t.endTime.slice(0,2)),_=Object(L.a)(x,{hours:parseInt(t.startTime.slice(0,2)),minutes:parseInt(t.startTime.slice(3)),seconds:0,milliseconds:0}),y=Object(L.a)(x,{hours:g?23:parseInt(t.endTime.slice(0,2)),minutes:g?59:parseInt(t.endTime.slice(3)),seconds:0,milliseconds:0}),w=Object(L.a)(x,{hours:parseInt(t.endTime.slice(0,2)),minutes:parseInt(t.endTime.slice(3)),seconds:0,milliseconds:0});(function(){try{return Object(U.a)(x,{start:_,end:y})}catch(e){return console.log("".concat(e.message,", Something wrong in promocode time interval")),!1}})()||g&&function(){try{return Object(U.a)(x,{start:Object(z.a)(x),end:w})}catch(e){return console.log("".concat(e.message,", Something wrong in promocode after midnight interval")),!1}}()||(d="error",u=s?"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.":"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.",j.push({code:"time",message:s?"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f":"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 ".concat(t.startTime," \u0434\u043e ").concat(t.endTime)}))}if(t.days&&7===t.days.length)if(o){var N=0===Object(H.a)(o)?6:Object(H.a)(o)-1;1===t.days[N]||(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438",j.push({code:"days",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438"}))}else{var C=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;1===t.days[C]||(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0435\u0433\u043e\u0434\u043d\u044f",j.push({code:"days",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0435\u0433\u043e\u0434\u043d\u044f"}))}if(r&&("delivery"===t.typeDelivery&&"delivery"!==r&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443.",j.push({code:"delivery",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443."})),"self"===t.typeDelivery&&"self"!==r&&"inRestoraunt"!==r&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437\u0435.",j.push({code:"selfDelivery",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437\u0435."}))),null===(l=t.categories)||void 0===l?void 0:l.length)if("yes"===t.categories_hardmode)if(t.excludeCategories){var k=!1;if(b.forEach((function(e){e.items[0].categories.filter((function(e){return t.categories.includes(e)})).length&&(k=!0)})),k){if(i){var I,P=null===(I=t.categories)||void 0===I?void 0:I.map((function(e){var t=null===i||void 0===i?void 0:i.find((function(t){return t.term_id===e}));if(t)return"\xab".concat(t.name,"\xbb")})).filter((function(e){return e}));j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ".concat(null===P||void 0===P?void 0:P.join(", "))})}else j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."});d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."}}else{var S=!1;if(b.forEach((function(e){e.items[0].categories.filter((function(e){return t.categories.includes(e)})).length||(S=!0)})),S){if(i){var E,F=null===(E=t.categories)||void 0===E?void 0:E.map((function(e){var t=null===i||void 0===i?void 0:i.find((function(t){return t.term_id===e}));if(t)return"\xab".concat(t.name,"\xbb")})).filter((function(e){return e}));j.push({code:"onlyCategories",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ".concat(null===F||void 0===F?void 0:F.join(", "))})}else j.push({code:"onlyCategories",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."});d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."}}else if(t.excludeCategories){if(!b.find((function(e){var n;return null===(n=e.items[0].categories)||void 0===n?void 0:n.some((function(e){return!t.categories.includes(e)}))}))){if(i){var T,A=null===(T=t.categories)||void 0===T?void 0:T.map((function(e){var t=null===i||void 0===i?void 0:i.find((function(t){return t.term_id===e}));if(t)return"\xab".concat(t.name,"\xbb")})).filter((function(e){return e}));j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435 \u0435\u0441\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043a\u0440\u043e\u043c\u0435: ".concat(null===A||void 0===A?void 0:A.join(", "))})}else j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."});d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."}}else if(!b.find((function(e){var n;return null===(n=e.items[0].categories)||void 0===n?void 0:n.some((function(e){return t.categories.includes(e)}))}))){if(i){var M,D=null===(M=t.categories)||void 0===M?void 0:M.map((function(e){var t=null===i||void 0===i?void 0:i.find((function(t){return t.term_id===e}));if(t)return"\xab".concat(t.name,"\xbb")})).filter((function(e){return e}));j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ".concat(null===D||void 0===D?void 0:D.join(", "))})}else j.push({code:"excludeCategory",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."});d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438."}if(t.excludeSaleProduct&&"yes"===t.categories_hardmode){var W=!1;b.forEach((function(e){e.items[0].options._sale_price&&parseInt(e.items[0].options._regular_price)>parseInt(e.items[0].options._sale_price)&&(W=!0)}));var V=b.find((function(e){var t;if(e.items[0].options._sale_price||(null===(t=e.items[0].variant)||void 0===t?void 0:t._sale_price))return!0}));(W||V)&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435.",j.push({code:"hasSale",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435."}))}else if(t.excludeSaleProduct&&"yes"!==t.categories_hardmode){b.length&&b.every((function(e){var t;return e.items[0].options._sale_price||(null===(t=e.items[0].variant)||void 0===t?void 0:t._sale_price)}))&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435.",j.push({code:"onlySale",message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435."}))}var Z=parseInt(t.coupon_min_price),Q=""===t.coupon_selfdelivery_min_price?Z:parseInt(t.coupon_selfdelivery_min_price),q="fixed_product"===t.type&&(null===n||void 0===n?void 0:n.id)?a-parseInt(t.promocodeProducts.options._price):a,Y="both"===t.typeDelivery||"delivery"===t.typeDelivery,K="both"===t.typeDelivery||"self"===t.typeDelivery;if(Z>q&&Q>q)if(d="error",Z===Q)u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 "+Z+" \u20bd","fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: "+Z+" \u20bd"}):j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c: "+Z+" \u20bd"});else{var J="";"fixed_product"===t.type?J+="\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ":J+="\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ",Y&&K?(J+="".concat(Z," \u20bd \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438 ").concat(Q," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 \n                    ".concat(Z," \u20bd. \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438 \u043e\u0442 ").concat(Q," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437")):Y?(J+="".concat(Z," \u20bd"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 \n                    ".concat(Z," \u20bd. \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443")):K&&(J+="".concat(Q," \u20bd"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 ".concat(Q," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437")),j.push({code:"minPrice",message:J})}else Y&&"delivery"===r&&Z>q?(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 \n                    ".concat(Z," \u20bd."),"fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430  \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(Z," \u20bd")}):j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(Z," \u20bd")})):K&&("self"===r||"inRestoraunt"===r)&&Q>q&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442 \n                    ".concat(Q," \u20bd."),"fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430  \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(Q," \u20bd")}):j.push({code:"minPrice",message:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(Q," \u20bd")}));var X=parseInt(t.coupon_max_price),$=parseInt(t.coupon_selfdelivery_max_price);if(q>X&&q>$)if(d="error",X===$)u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e "+X+" \u20bd","fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443 "+X+" \u20bd"}):j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c "+X+" \u20bd"});else{var ee="";"fixed_product"===t.type?ee+="\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ":ee+="\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ",Y&&K?(ee+="".concat(X," \u20bd \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438 ").concat($," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e \n                    ".concat(X," \u20bd. \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438 \u043e\u0442 ").concat($," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437")):Y?(ee+="".concat(X," \u20bd"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e \n                    ".concat(X," \u20bd. \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443")):K&&(ee+="".concat($," \u20bd"),u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e ".concat($," \u20bd \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437")),j.push({code:"minPrice",message:ee})}else Y&&"delivery"===r&&q>X?(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e \n                    ".concat(X," \u20bd."),"fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(X," \u20bd")}):j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat(X," \u20bd")})):K&&("self"===r||"inRestoraunt"===r)&&q>$&&(d="error",u="\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d, \u0442.\u043a. \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0434\u043e \n                    ".concat($," \u20bd."),"fixed_product"===t.type?j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u0431\u0435\u0437 \u0443\u0447\u0451\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat($," \u20bd")}):j.push({code:"minPrice",message:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437 \u043f\u043e \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0443: ".concat($," \u20bd")}));return{alert:u,status:d,errors:j}}return!1},$=function(e){var t="";if(!e.useTimeLimit)return{disabled:false,message:t};if(t="\u0422\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c",e.timeLimitStart&&e.timeLimitEnd&&(t+=" c ".concat(e.timeLimitStart," \u0434\u043e ").concat(e.timeLimitEnd)),e.days&&e.days.length){var n=["\u041f\u041d","\u0412\u0422","\u0421\u0420","\u0427\u0422","\u041f\u0422","\u0421\u0411","\u0412\u0421"],c=e.days.map((function(e,t){return 1===e?n[t]:null})).filter((function(e){return e})).join(", ");t+=" \u0432 ".concat(c)}if(e.timeLimitStart&&e.timeLimitEnd&&!te(e.timeLimitStart,e.timeLimitEnd))return{disabled:!0,message:t};if(e.days&&e.days.length){var a=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;if(0==e.days[a])return{disabled:!0,message:t}}return{disabled:false,message:t}},ee=function(){var e=Object(N.g)().pathname;return Object(x.useEffect)((function(){"/search"===e&&document.documentElement.scrollTo({top:0,left:0,behavior:"instant"})}),[e]),null},te=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;if(!e||!t)return!0;var c=parseInt(e.slice(0,2))>parseInt(t.slice(0,2)),a=Object(L.a)(new Date,{hours:e.slice(0,2),minutes:e.slice(3,5),seconds:0,milliseconds:0}),r=Object(L.a)(new Date,{hours:c?23:t.slice(0,2),minutes:c?59:t.slice(3,5),seconds:0,milliseconds:0}),i=Object(L.a)(new Date,{hours:t.slice(0,2),minutes:t.slice(3,5),seconds:0,milliseconds:0}),o=!1,s=!1;try{Object(U.a)(n,{start:a,end:r})&&(o=!0)}catch(l){o=!0,console.log("".concat(l.message,", Something wrong in time interval"))}try{c&&Object(U.a)(n,{start:Object(z.a)(new Date),end:i})&&(s=!0)}catch(l){console.log("".concat(l.message,", Something wrong in time interval"))}return!(!o&&!s)},ne=function(e,t){var n,c,a;if(e.categories.length&&!e.excludeCategories&&!(null===(c=t.categories)||void 0===c?void 0:c.some((function(t){return e.categories.includes(t)}))))return!1;if(e.categories.length&&"yes"===e.excludeCategories&&(null===(a=t.categories)||void 0===a?void 0:a.some((function(t){return e.categories.includes(t)}))))return!1;return"yes"===e.excludeSaleProduct||!(t.options._sale_price&&parseInt(t.options._regular_price)>parseInt(t.options._sale_price)||(null===(n=t.variant)||void 0===n?void 0:n._sale_price))},ce=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},ae=function(e){return"noauth"!==e.CONFIG_auth_type||!(!e.CONFIG_vk_auth_appId||"active"!==e.CONFIG_vk_auth_status)},re=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date,a=Object(L.a)(new Date,{year:e.slice(6,10),month:parseInt(e.slice(3,5))-1,date:e.slice(0,2),hours:e.slice(11,13),minutes:e.slice(14),seconds:0,milliseconds:0}),r=Object(L.a)(new Date,{year:t.slice(6,10),month:parseInt(t.slice(3,5))-1,date:t.slice(0,2),hours:t.slice(11,13),minutes:t.slice(14),seconds:0,milliseconds:0});try{return Object(U.a)(c,{start:a,end:r})}catch(i){return console.log("".concat(i.message,", Something wrong in _checkDateInterval")),n}},ie=function(e){return"on"!==e.CONFIG_disable_promocodes||!(!e.CONFIG_disable_promocodes_start_date||!e.CONFIG_disable_promocodes_end_date)&&!re(e.CONFIG_disable_promocodes_start_date,e.CONFIG_disable_promocodes_end_date,!0)},oe=n(497),se=n(490),le=n(498),de=n(478),ue=n(471),je=n(496),be=n(465),me=(n(290),n(486)),pe=n(489),Oe=n(433),he=n(117),ve=n.n(he),fe=n(93),xe=n.n(fe),ge=n(23),_e=n.n(ge),ye=n.p+"static/media/app-store-bage-white.900e5d7c.svg",we=n.p+"static/media/google-play-bage-white.e5f91365.svg",Ne=n(7),Ce=["title","titleId"];function ke(){return(ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Ie(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Pe(e,t){var n=e.title,g=e.titleId,_=Ie(e,Ce);return x.createElement("svg",ke({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",ref:t,"aria-labelledby":g},_),n?x.createElement("title",{id:g},n):null,c||(c=x.createElement("g",null,x.createElement("g",null,x.createElement("path",{d:"M347.216,301.211l-71.387-53.54V138.609c0-10.966-8.864-19.83-19.83-19.83c-10.966,0-19.83,8.864-19.83,19.83v118.978 c0,6.246,2.935,12.136,7.932,15.864l79.318,59.489c3.569,2.677,7.734,3.966,11.878,3.966c6.048,0,11.997-2.717,15.884-7.952 C357.766,320.208,355.981,307.775,347.216,301.211z"})))),a||(a=x.createElement("g",null,x.createElement("g",null,x.createElement("path",{d:"M256,0C114.833,0,0,114.833,0,256s114.833,256,256,256s256-114.833,256-256S397.167,0,256,0z M256,472.341 c-119.275,0-216.341-97.066-216.341-216.341S136.725,39.659,256,39.659c119.295,0,216.341,97.066,216.341,216.341 S375.275,472.341,256,472.341z"})))),r||(r=x.createElement("g",null)),i||(i=x.createElement("g",null)),o||(o=x.createElement("g",null)),s||(s=x.createElement("g",null)),l||(l=x.createElement("g",null)),d||(d=x.createElement("g",null)),u||(u=x.createElement("g",null)),j||(j=x.createElement("g",null)),b||(b=x.createElement("g",null)),m||(m=x.createElement("g",null)),p||(p=x.createElement("g",null)),O||(O=x.createElement("g",null)),h||(h=x.createElement("g",null)),v||(v=x.createElement("g",null)),f||(f=x.createElement("g",null)))}var Se,Ee=x.forwardRef(Pe),Fe=(n.p,n(477)),Te=function(){return Object(S.jsxs)("div",{className:"info-wrapper",children:[Object(S.jsx)("div",{className:"title",children:Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:120,height:20}})}),Object(S.jsx)("div",{className:"info",children:Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:150,height:24,transform:"scale(1, 0.80)"}})})]})},Ae=function(){var e=Object(w.e)((function(e){return e.config.data.CONFIG_format_start_work})),t=Object(w.e)((function(e){return e.config.data.CONFIG_format_end_work})),n=Object(w.e)((function(e){return ce(e.config.data)}));return Object(S.jsxs)("div",{className:"header-work",children:[Object(S.jsx)(Ee,{className:"icn"}),n?Object(S.jsx)(Te,{}):Object(S.jsx)("div",{className:"info-wrapper",children:e&&t?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{className:"title",children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c"}),Object(S.jsx)("div",{className:"info",children:"\u0441 ".concat(e," \u0434\u043e ").concat(t)})]}):Object(S.jsx)("div",{className:"info",children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c"})})]})},Me=function(){var e=Object(w.e)((function(e){return e.config.data.CONFIG_id_metrika})),t=Object(w.e)((function(e){return e.config.data.CONFIG_id_vk_price_list}));return{metricViewCategory:function(){var n,c,a,r,i,o,s,l;null===(n=(c=window).ym)||void 0===n||n.call(c,e,"reachGoal","view_category"),null===(a=(r=window).gtag)||void 0===a||a.call(r,"event","view_item"),null===(i=window.VK)||void 0===i||null===(o=i.Retargeting)||void 0===o||o.ProductEvent(t,"view_category"),null===(s=(l=window).fbq)||void 0===s||s.call(l,"track","ViewContent")},mectricOpenCart:function(){var t,n,c,a;null===(t=(n=window).ym)||void 0===t||t.call(n,e,"reachGoal","view_cart"),null===(c=(a=window).fbq)||void 0===c||c.call(a,"track","ViewContent")},metricViewProduct:function(n){var c,a,r,i,o,s,l,d;null===(c=(a=window).ym)||void 0===c||c.call(a,e,"reachGoal","view_product"),(window.dataLayer||[]).push({ecommerce:{currencyCode:"RUB",detail:{products:[{id:n.id,name:n.title,price:n.options._price,quantity:1}]}}}),null===(r=(i=window).gtag)||void 0===r||r.call(i,"event","view_item"),null===(o=window.VK)||void 0===o||null===(s=o.Retargeting)||void 0===s||s.ProductEvent(t,"view_product"),null===(l=(d=window).fbq)||void 0===l||l.call(d,"track","ViewContent")},metricAddProductToCart:function(n){var c,a,r,i,o,s,l,d,u,j,b,m;null===(c=(a=window).ym)||void 0===c||c.call(a,e,"reachGoal","add_to_cart"),(window.dataLayer||[]).push({ecommerce:{currencyCode:"RUB",add:{products:[{id:"variations"===n.type&&(null===(r=n.variant)||void 0===r?void 0:r.variant_id)?null===(i=n.variant)||void 0===i?void 0:i.variant_id:n.id,name:n.title,price:"variations"===n.type&&(null===(o=n.variant)||void 0===o?void 0:o.price)?null===(s=n.variant)||void 0===s?void 0:s.price:n.options._price,quantity:1}]}}}),null===(l=(d=window).gtag)||void 0===l||l.call(d,"event","add_to_cart"),null===(u=window.VK)||void 0===u||null===(j=u.Retargeting)||void 0===j||j.ProductEvent(t,"add_to_cart"),null===(b=(m=window).fbq)||void 0===b||b.call(m,"track","AddToCart")},metricMakeOrder:function(n,c,a){var r,i,o,s,l,d;null===(r=(i=window).ym)||void 0===r||r.call(i,e,"reachGoal","make_order");var u=window.dataLayer||[],j=[];Object.values(n).forEach((function(e){"variations"===e.items[0].type?e.items.forEach((function(e){var t,n;j.push({id:null===(t=e.variant)||void 0===t?void 0:t.variant_id,name:e.title,price:null===(n=e.variant)||void 0===n?void 0:n.price,quantity:1})})):j.push({id:e.items[0].id,name:e.items[0].title,price:e.items[0].options._price,quantity:e.items.length})}));var b={ecommerce:{currencyCode:"RUB",purchase:{actionField:{id:a},products:j}}};(null===c||void 0===c?void 0:c.code)&&(b.ecommerce.purchase.actionField.coupon=c.code),u.push(b),null===(o=window.VK)||void 0===o||null===(s=o.Retargeting)||void 0===s||s.ProductEvent(t,"purchase"),null===(l=(d=window).fbq)||void 0===l||l.call(d,"track","ViewContent")},metricVisitCheckout:function(){var n,c,a,r,i,o;null===(n=(c=window).ym)||void 0===n||n.call(c,e,"reachGoal","checkout"),null===(a=window.VK)||void 0===a||null===(r=a.Retargeting)||void 0===r||r.ProductEvent(t,"initiate_checkout"),null===(i=(o=window).fbq)||void 0===i||i.call(o,"track","ViewContent")},mectricClickPhone:function(){var t,n;null===(t=(n=window).ym)||void 0===t||t.call(n,e,"reachGoal","click_phone")},mectricClickIos:function(){var t,n;null===(t=(n=window).ym)||void 0===t||t.call(n,e,"reachGoal","click_ios")},mectricClickAndroid:function(){var t,n;null===(t=(n=window).ym)||void 0===t||t.call(n,e,"reachGoal","click_android")}}},De=function(e){var t=e.handleOpenTownModal,n=e.hadleClickAccount,c=e.openAuthModalBtnClick,a=Object(w.d)(),r=Me(),i=r.mectricClickIos,o=r.mectricClickAndroid,s=r.mectricClickPhone,l=Object(N.g)().pathname,d=Object(w.e)((function(e){return e.config.data})),u=Object(w.e)((function(e){return e.config.status})),j=Object(w.e)((function(e){return ce(e.config.data)})),b=Object(w.e)((function(e){return e.header})).mobileMenuOpen,m=Object(w.e)((function(e){return e.user.user})),p=Object(w.e)((function(e){return e.pages.topMenu})),O="subDomain"===window.townsTypeRoute||"folder"===window.townsTypeRoute,h=d.CONFIG_type_mobile_menu,v=d.CONFIG_town,f=d.CONFIG_format_phone,x=K(),g=function(){a(b?{type:"CLOSE_MOBILE_MENU"}:{type:"OPEN_MOBILE_MENU"})},_=p.find((function(e){return e.url===l}));return Object(S.jsxs)("div",{className:"header-mobile-menu",children:[Object(S.jsx)(xe.a,{onClick:g}),Object(S.jsx)(me.a,{anchor:"left",open:b,onClose:g,className:Object(Ne.a)("mobile-menu","one"===h&&"white"),children:Object(S.jsxs)("div",{className:"mobile-menu-wrapper",children:[Object(S.jsxs)("div",{className:"mobile-menu--header",children:[Object(S.jsx)(pe.a,{color:"inherit",onClick:g,className:"minicart--close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("div",{className:"header-logo-wrapper",children:Object(S.jsx)("img",{src:"one"===h?d.CONFIG_company_logo_main:d.CONFIG_company_logo_footer,className:"header-logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"})})]}),Object(S.jsx)(Oe.a,{sx:{bgcolor:"one"===h?"rgba(0, 0, 0, 0.12)":"#333",my:"10px"}}),O?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"mobile-menu--choose-town",children:[Object(S.jsx)(ve.a,{}),j?Object(S.jsx)(Te,{}):Object(S.jsxs)("div",{onClick:t,children:[Object(S.jsx)("b",{className:"choosenTown",children:v}),Object(S.jsx)("br",{}),Object(S.jsx)("small",{children:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c"})]})]}),Object(S.jsx)(Oe.a,{sx:{bgcolor:"one"===h?"rgba(0, 0, 0, 0.12)":"#333",my:"10px"}})]}):"",(null===p||void 0===p?void 0:p.length)?Object(S.jsx)("ul",{children:p.map((function(e,t){return Object(S.jsx)("li",{children:"_blank"===e.target?Object(S.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title,children:e.title}):Object(S.jsx)(P.b,{onClick:function(){b&&a({type:"CLOSE_MOBILE_MENU"})},className:Object(Ne.a)(e.id===(null===_||void 0===_?void 0:_.id)&&"active"),to:e.url,children:e.title})},e.id)}))}):null,ae(d)&&Object(S.jsx)("div",{className:"mobile-menu--user-account-button",children:m.token?Object(S.jsx)(de.a,{className:"btn--action",onClick:function(){n(),g()},variant:"contained",sx:{width:1},children:"\u041b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"}):Object(S.jsx)(de.a,{onClick:c,className:"btn--action",variant:"contained",sx:{width:1},disabled:!u,children:"\u0412\u043e\u0439\u0442\u0438"})}),Object(S.jsx)(Oe.a,{sx:{bgcolor:"one"===h?"rgba(0, 0, 0, 0.12)":"#333",my:"10px"}}),f?Object(S.jsxs)("div",{className:"mobile-menu--contacts",children:[Object(S.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"icn",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 512.006 512.006",xmlSpace:"preserve",children:Object(S.jsx)("g",{children:Object(S.jsx)("g",{children:Object(S.jsxs)("g",{children:[Object(S.jsx)("path",{d:"M502.05,407.127l-56.761-37.844L394.83,335.65c-9.738-6.479-22.825-4.355-30.014,4.873l-31.223,40.139     c-6.707,8.71-18.772,11.213-28.39,5.888c-21.186-11.785-46.239-22.881-101.517-78.23c-55.278-55.349-66.445-80.331-78.23-101.517     c-5.325-9.618-2.822-21.683,5.888-28.389l40.139-31.223c9.227-7.188,11.352-20.275,4.873-30.014l-32.6-48.905L104.879,9.956     C98.262,0.03,85.016-2.95,74.786,3.185L29.95,30.083C17.833,37.222,8.926,48.75,5.074,62.277     C-7.187,106.98-9.659,205.593,148.381,363.633s256.644,155.56,301.347,143.298c13.527-3.851,25.055-12.758,32.194-24.876     l26.898-44.835C514.956,426.989,511.976,413.744,502.05,407.127z"}),Object(S.jsx)("path",{d:"M291.309,79.447c82.842,0.092,149.977,67.226,150.069,150.069c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.102-92.589-75.135-167.622-167.724-167.724c-4.875,0-8.828,3.952-8.828,8.828     C282.481,75.494,286.433,79.447,291.309,79.447z"}),Object(S.jsx)("path",{d:"M291.309,132.412c53.603,0.063,97.04,43.501,97.103,97.103c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.073-63.349-51.409-114.686-114.759-114.759c-4.875,0-8.828,3.952-8.828,8.828     C282.481,128.46,286.433,132.412,291.309,132.412z"}),Object(S.jsx)("path",{d:"M291.309,185.378c24.365,0.029,44.109,19.773,44.138,44.138c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.039-34.111-27.682-61.754-61.793-61.793c-4.875,0-8.828,3.952-8.828,8.828     C282.481,181.426,286.433,185.378,291.309,185.378z"})]})})})}),Object(S.jsx)("div",{children:Object(S.jsx)("a",{className:"info",href:"tel:".concat(f.replace(/[^0-9+]+/g,"")),onClick:s,target:"_parent",children:f})})]}):null,Object(S.jsx)(Ae,{}),"site"===Y()&&"ios"===x&&d.CONFIG_APPSTORE?Object(S.jsx)("div",{className:"mobile-menu--mobile-app",children:Object(S.jsx)("a",{href:d.CONFIG_APPSTORE,target:"_blank",rel:"noreferrer",onClick:i,children:Object(S.jsx)("img",{src:ye,alt:"iOS APP"})})}):null,"site"===Y()&&"android"===x&&d.CONFIG_GPLAY?Object(S.jsx)("div",{className:"mobile-menu--mobile-app",children:Object(S.jsx)("a",{href:d.CONFIG_GPLAY,target:"_blank",rel:"noreferrer",onClick:o,children:Object(S.jsx)("img",{src:we,alt:"Android APP"})})}):null]})})]})},Ge=function(e){var t=e.hide,n=Object(w.d)(),c=Object(N.g)().pathname,a=Object(w.e)((function(e){return e.pages.topMenu})),r=Object(w.e)((function(e){return e.header})).mobileMenuOpen,i=Object(w.e)((function(e){return e.pages.topMenu}));if(!(null===a||void 0===a?void 0:a.length)||t)return null;var o=i.find((function(e){return e.url===c}));return Object(S.jsx)("div",{className:"top-menu",style:{paddingTop:window.newHeaderDesign?"16px":0,marginBottom:window.newHeaderDesign?"16px":0},children:Object(S.jsx)(se.a,{children:Object(S.jsx)("ul",{children:i.map((function(e,t){return Object(S.jsx)("li",{children:"_blank"===e.target?Object(S.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title,children:e.title}):Object(S.jsx)(P.b,{onClick:function(){r&&n({type:"CLOSE_MOBILE_MENU"})},className:Object(Ne.a)(e.id===(null===o||void 0===o?void 0:o.id)&&"active"),to:e.url,children:e.title})},e.id)}))})})})},Re=["title","titleId"];function Be(){return(Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Le(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ue(e,t){var n=e.title,c=e.titleId,a=Le(e,Re);return x.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 512.006 512.006",xmlSpace:"preserve",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,Se||(Se=x.createElement("g",null,x.createElement("g",null,x.createElement("g",null,x.createElement("path",{d:"M502.05,407.127l-56.761-37.844L394.83,335.65c-9.738-6.479-22.825-4.355-30.014,4.873l-31.223,40.139     c-6.707,8.71-18.772,11.213-28.39,5.888c-21.186-11.785-46.239-22.881-101.517-78.23c-55.278-55.349-66.445-80.331-78.23-101.517     c-5.325-9.618-2.822-21.683,5.888-28.389l40.139-31.223c9.227-7.188,11.352-20.275,4.873-30.014l-32.6-48.905L104.879,9.956     C98.262,0.03,85.016-2.95,74.786,3.185L29.95,30.083C17.833,37.222,8.926,48.75,5.074,62.277     C-7.187,106.98-9.659,205.593,148.381,363.633s256.644,155.56,301.347,143.298c13.527-3.851,25.055-12.758,32.194-24.876     l26.898-44.835C514.956,426.989,511.976,413.744,502.05,407.127z"}),x.createElement("path",{d:"M291.309,79.447c82.842,0.092,149.977,67.226,150.069,150.069c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.102-92.589-75.135-167.622-167.724-167.724c-4.875,0-8.828,3.952-8.828,8.828     C282.481,75.494,286.433,79.447,291.309,79.447z"}),x.createElement("path",{d:"M291.309,132.412c53.603,0.063,97.04,43.501,97.103,97.103c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.073-63.349-51.409-114.686-114.759-114.759c-4.875,0-8.828,3.952-8.828,8.828     C282.481,128.46,286.433,132.412,291.309,132.412z"}),x.createElement("path",{d:"M291.309,185.378c24.365,0.029,44.109,19.773,44.138,44.138c0,4.875,3.952,8.828,8.828,8.828     c4.875,0,8.828-3.952,8.828-8.828c-0.039-34.111-27.682-61.754-61.793-61.793c-4.875,0-8.828,3.952-8.828,8.828     C282.481,181.426,286.433,185.378,291.309,185.378z"}))))))}var ze=x.forwardRef(Ue),He=(n.p,n(432)),We=n(479),Ve=n(6),Ze=n(491),Qe=n(492),qe=n(165);n(291);function Ye(e){var t=e.onChooseTown,n=void 0===t?function(){}:t,c=Object(N.h)(),a=Object(x.useState)(""),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=Object(x.useState)(null),l=Object(Ve.a)(s,2),d=l[0],u=l[1],j=Object(x.useState)(!1),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=new qe.a(window.towns,{keys:["name"],minMatchCharLength:1,threshold:.2}),h=Object(x.useCallback)((function(e){if(o(e.target.value),e.target.value){var t=O.search(e.target.value).map((function(e){return e.item}));u(v(t))}else u(f)}),[]);Object(x.useEffect)((function(){u(f)}),[window.towns]);var v=Object(x.useCallback)((function(e){var t=e.reduce((function(e,t){if(t.name){var n=t.name.charAt(0).toUpperCase();return e[n]=[].concat(e[n]||[],t),e}return e}),{});return Object.keys(t).map((function(e){return{letter:e,towns:t[e]}})).sort((function(e,t){return e.letter<t.letter?-1:e.letter>t.letter?1:0}))}),[]),f=Object(x.useMemo)((function(){var e;if(null===(e=window.towns)||void 0===e?void 0:e.length)return v(window.towns)}),[window.towns]),g=d&&d.map((function(e,t){return Object(S.jsxs)("div",{className:"town-group",children:[Object(S.jsx)("span",{className:"town-letter",children:e.letter}),e.towns.map((function(e,t){return Object(S.jsx)("div",{className:"town-link",onClick:function(){return function(e){if("folder"===window.townsTypeRoute)c("/".concat(e.slug));else{var t=e.url;"vk"===Y()?t+="?rest-api=vk_start":"tg"===Y()?t+="?rest-api=tg_start":t+="?platform=".concat(Y()),window.location.href=t,p(!0)}n()}(e)},children:e.name},t)}))]},t)}));return Object(S.jsxs)("div",{className:"modal-alert--inner",children:[Object(S.jsx)("div",{className:Object(Ne.a)("choose-town--backdrop",m&&"visible"),children:Object(S.jsx)(Ze.a,{size:40,sx:{color:window.CONFIG_main_color}})}),Object(S.jsx)(Qe.a,{size:"small",label:"\u041f\u043e\u0438\u0441\u043a \u0433\u043e\u0440\u043e\u0434\u0430",value:i,onChange:h,sx:{mb:2,"& fieldset":{borderRadius:"20px"}},fullWidth:!0}),g]})}var Ke=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})),Je=function(){var e=Object(w.d)(),t=Object(w.e)((function(e){return e.config.openTownModal})),n=Object(w.e)((function(e){return e.config.data.CONFIG_close_modal_by_cross})),c=Object(x.useCallback)((function(){e(T(!1))}),[]),a={open:t,maxWidth:"md"};return Q()&&(a.TransitionComponent=Ke,a.fullScreen=!0,a.scroll="body"),Object(S.jsx)("div",{className:"choose-town--block",children:window.towns?Object(S.jsxs)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md"},a),{},{sx:{"& .MuiPaper-root":{borderRadius:Q()?"0px":"20px"}},onClose:function(e,t){"escapeKeyDown"===t&&c(),"backdropClick"===t&&"active"!==n&&c()},children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:c,"aria-label":"close",className:"modal-close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("div",{className:"modal-alert--wrapper choose-town",children:Object(S.jsx)(Ye,{onChooseTown:function(){c()}})})]})):""})},Xe=function(){return Object(S.jsxs)("div",{className:"header-phone",children:[Object(S.jsx)(ve.a,{className:"main-color",sx:{fontSize:40,height:"auto",mr:"0.5rem"}}),Object(S.jsxs)("div",{className:"header-phone--content",children:[Object(S.jsx)("div",{className:"title",children:Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:120,height:20}})}),Object(S.jsx)("b",{className:"choosenTown town",children:Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:170,height:24,transform:"scale(1, 0.80)"}})})]})]})},$e=function(e){var t=e.handleOpenTownModal,n=Me().mectricClickPhone,c=Object(w.e)((function(e){return e.config.data})),a=Object(w.e)((function(e){return ce(e.config.data)})),r=c.CONFIG_format_phone,i=c.CONFIG_town,o="subDomain"===window.townsTypeRoute||"folder"===window.townsTypeRoute;return a?Object(S.jsx)(Xe,{}):r?Object(S.jsxs)("div",{className:"header-phone",children:[Object(S.jsx)(ze,{className:"icn"}),Object(S.jsxs)("div",{className:"header-phone--content",children:[o?Object(S.jsxs)("div",{className:"title",children:["\u0412\u0430\u0448 \u0433\u043e\u0440\u043e\u0434"," ",Object(S.jsx)("b",{className:"choosenTown",style:{cursor:"pointer"},onClick:t,title:i,children:i})]}):Object(S.jsxs)("div",{className:"title",children:["\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0435\u0434\u044b ",Object(S.jsx)("b",{className:"choosenTown",children:i})]}),Object(S.jsx)("a",{className:"info",href:"tel:".concat(r.replace(/[^0-9+]+/g,"")),onClick:n,target:"_parent",children:r})]}),Object(S.jsx)(Je,{})]}):Object(S.jsxs)("div",{className:"header-phone",children:[Object(S.jsx)(ve.a,{className:"main-color",sx:{fontSize:40,height:"auto",mr:"0.5rem"}}),Object(S.jsxs)("div",{className:"header-phone--content",children:[Object(S.jsx)("div",{className:"title",children:o?"\u0412\u0430\u0448 \u0433\u043e\u0440\u043e\u0434":"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0435\u0434\u044b"}),Object(S.jsx)("b",{className:Object(Ne.a)("choosenTown","town",o&&"link"),onClick:o?t:null,children:i})]}),Object(S.jsx)(Je,{})]})},et=(n(293),function(e){var t,n,c=e.hadleClickAccount,a=e.openAuthModalBtnClick,r=e.handleOpenTownModal,i=Object(w.d)(),o=Object(N.g)().pathname,s=Object(w.e)((function(e){return e.config.data})),l=Object(w.e)((function(e){return ce(e.config.data)})),d=Object(w.e)((function(e){return e.config.status})),u=Object(w.e)((function(e){return e.user.user})),j=Object(w.e)((function(e){return e.config.data.CONFIG_format_start_work})),b=Object(w.e)((function(e){return e.config.data.CONFIG_format_end_work})),m="subDomain"===window.townsTypeRoute||"folder"===window.townsTypeRoute,p=["/cart","/checkout","/order-complete"],O="/"+(null===(t=o.split("/"))||void 0===t||null===(n=t.filter((function(e){return e})).slice(-1))||void 0===n?void 0:n[0]);return Object(S.jsxs)("div",{className:"fullwidth-header--wrapper",children:[Object(S.jsx)(se.a,{children:Object(S.jsxs)("div",{className:Object(Ne.a)("fullwidth-header","vk"===Y()&&"vk"),children:[Object(S.jsx)(De,{handleOpenTownModal:r,hadleClickAccount:c,openAuthModalBtnClick:a}),Object(S.jsx)("div",{className:"fullwidth-header--menu-btn",onClick:function(){i({type:"OPEN_MOBILE_MENU"})},children:Object(S.jsx)(xe.a,{style:{color:"var(--text-color)"}})}),Object(S.jsx)(E,{to:"/",className:"fullwidth-header--logo-container",children:Object(S.jsx)("img",{src:"active"!==window.CONFIG_design_dark_theme?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,className:"fullwidth-header--logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"})}),Object(S.jsx)("div",{className:"fullwidth-header--town-info",children:l?Object(S.jsx)(Te,{}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("b",{className:"fullwidth-header--town",style:{cursor:m?"pointer":"default"},onClick:m?r:null,children:s.CONFIG_town}),Object(S.jsx)("span",{style:{fontSize:"14px",color:"#666"},className:"fullwidth-header--time",children:j&&b?"\u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b: ".concat(j,"-").concat(b):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c"})]})}),p.includes(O)?Object(S.jsx)(ue.a,{activeStep:p.indexOf(O),alternativeLabel:!0,className:"header-stepper",sx:{"&.MuiStepper-root":{alignItems:"center"},marginLeft:"auto"},children:["\u041a\u043e\u0440\u0437\u0438\u043d\u0430","\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430","\u0417\u0430\u043a\u0430\u0437 \u043f\u0440\u0438\u043d\u044f\u0442"].map((function(e){return Object(S.jsx)(je.a,{children:Object(S.jsx)(be.a,{className:"step-label",children:e})},e)}))}):Object(S.jsxs)("div",{className:"fullwidth-header--right-col",children:[ae(s)?Object(S.jsx)("div",{className:"header-login",children:u.token?Object(S.jsx)(de.a,{className:"btn--action",onClick:c,variant:"contained",sx:{whiteSpace:"nowrap"},children:"\u041b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"}):Object(S.jsx)(de.a,{onClick:a,className:"btn--action",variant:"contained",disabled:!d,children:"\u0412\u043e\u0439\u0442\u0438"})}):null,Object(S.jsx)(zn,{})]})]})}),Object(S.jsx)(Je,{})]})}),tt=n(239),nt=n.n(tt),ct=function(){var e=k().navigateTo,t=Object(w.e)((function(e){return e.user.user}));return Object(S.jsxs)("div",{onClick:function(){e("/bonuses")},className:"header--icon-btn",children:[Object(S.jsx)(nt.a,{className:"icon-btn--icon"}),Object(S.jsx)("span",{className:"header--bonuses-title",children:"\u0411\u043e\u043d\u0443\u0441\u044b"}),t.token?Object(S.jsx)("span",{className:"header--bonuses-amount",children:t.bonuses?parseInt(t.bonuses).toLocaleString("ru-RU"):0}):null]})},at=n(240),rt=n.n(at);var it=function(){var e,t,n,c=Object(w.d)(),a=Object(N.g)().pathname,r=k().navigateTo,i="/"+(null===(e=a.split("/"))||void 0===e||null===(t=e.filter((function(e){return e})).slice(-1))||void 0===t?void 0:t[0]),o=Object(w.e)((function(e){return e.config.status})),s=Object(w.e)((function(e){return e.config.data})),l=Object(w.e)((function(e){return e.user.user})),d=Object(w.e)((function(e){return e.header.mobileMenuOpen})),u=s.CONFIG_type_header;Object(x.useEffect)((function(){return c({type:"CLOSE_MOBILE_MENU"})}),[c]);var j=Object(x.useCallback)((function(){d&&c({type:"CLOSE_MOBILE_MENU"}),r("/account")}),[c,d]),b=function(){c(D(!0))},m=function(){c(T(!0))},p=["/cart","/checkout","/order-complete"];return window.fullWidthSite?Object(S.jsx)(et,{hadleClickAccount:j,openAuthModalBtnClick:b,handleOpenTownModal:m}):Object(S.jsxs)("div",{children:[!!window.newHeaderDesign&&Object(S.jsx)(Ge,{hide:p.includes(i)}),Object(S.jsx)(oe.a,{position:"static",className:"header-bar",children:Object(S.jsx)(se.a,{children:Object(S.jsx)(le.a,{className:Object(Ne.a)("header-wrapper","one"===u&&"one-type","two"===u&&"two-type"),children:p.includes(i)?Object(S.jsxs)("div",{className:"stepper-header",children:[Object(S.jsx)(De,{handleOpenTownModal:m,hadleClickAccount:j,openAuthModalBtnClick:b}),Object(S.jsx)("div",{className:Object(Ne.a)("header-logo-wrapper","vk"===Y()&&"vk"),children:Object(S.jsx)(E,{to:"/",className:"header-logo-link",children:Object(S.jsx)("img",{src:"active"!==window.CONFIG_design_dark_theme?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,className:"header-logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"})})}),Object(S.jsx)(ue.a,{activeStep:p.indexOf(i),alternativeLabel:!0,className:"header-stepper",children:["\u041a\u043e\u0440\u0437\u0438\u043d\u0430","\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430","\u0417\u0430\u043a\u0430\u0437 \u043f\u0440\u0438\u043d\u044f\u0442"].map((function(e){return Object(S.jsx)(je.a,{children:Object(S.jsx)(be.a,{className:"step-label",children:e})},e)}))})]}):Object(S.jsxs)("div",{className:Object(Ne.a)("standart-header","vk"===Y()&&"vk"),children:[Object(S.jsx)(De,{handleOpenTownModal:m,hadleClickAccount:j,openAuthModalBtnClick:b}),Object(S.jsx)("div",{className:Object(Ne.a)("header-logo-wrapper","vk"===Y()&&"vk"),children:Object(S.jsx)(E,{to:"/",className:"header-logo-link",children:Object(S.jsx)("img",{src:"active"!==window.CONFIG_design_dark_theme?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,className:"header-logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"})})}),Object(S.jsx)($e,{handleOpenTownModal:m}),Object(S.jsx)(Ae,{}),Object(S.jsxs)("div",{className:"header--right-col",children:[window.newHeaderDesign&&"active"===(null===(n=s.bonusProgramm)||void 0===n?void 0:n.status)&&Object(S.jsx)(ct,{}),ae(s)?Object(S.jsx)("div",{className:"header-login",children:l.token?window.newHeaderDesign?Object(S.jsxs)("div",{onClick:j,className:"header--icon-btn",children:[Object(S.jsx)(rt.a,{className:"icon-btn--icon"}),Object(S.jsx)("span",{className:"header--bonuses-title",children:"\u041c\u043e\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"})]}):Object(S.jsx)(de.a,{onClick:j,className:window.newHeaderDesign?"btn--outline-dark":"btn--action",variant:"contained",sx:{whiteSpace:"nowrap"},children:"\u041b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"}):Object(S.jsx)(de.a,{onClick:b,className:window.newHeaderDesign?"btn--outline-dark":"btn--action",variant:"contained",disabled:!o,children:"\u0412\u043e\u0439\u0442\u0438"})}):null]})]})})})}),!window.newHeaderDesign&&Object(S.jsx)(Ge,{hide:p.includes(i)})]})},ot=n(480),st=function(){var e,t,n=Me().mectricClickPhone,c=Object(w.e)((function(e){return e.config.data})),a=c.CONFIG_type_footer,r=c.CONFIG_town,i=c.CONFIG_format_start_work,o=c.CONFIG_format_end_work,s=ce(c),l=c.CONFIG_home_phones?c.CONFIG_home_phones.split(";"):[],d=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{className:"footer--town",children:r?Object(S.jsx)("span",{children:r}):null}),Object(S.jsxs)("div",{className:"footer--adress-list",children:[Object(S.jsx)("div",{className:"footer--adress-list-title",children:"\u0422\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0434\u0430\u0436:"}),Object(S.jsxs)("div",{className:"footer--adress",children:[s?Object(S.jsx)(Fe.a,{width:"100%"}):Object(S.jsx)("div",{children:c.CONFIG_address}),s?Object(S.jsxs)("div",{children:[Object(S.jsx)(Fe.a,{width:"60%"}),Object(S.jsx)(Fe.a,{width:"60%"})]}):Object(S.jsx)("div",{children:l&&l.map((function(e,t){return e.replace(/\D+/g,"")&&Object(S.jsx)("div",{children:Object(S.jsx)("a",{href:"tel:".concat(e.replace(/[^0-9+]+/g,"")),onClick:n,target:"_parent",children:e})},t)}))}),i&&o?Object(S.jsxs)("div",{children:["\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ",i," \u0434\u043e ",o]}):Object(S.jsx)("div",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"}),(null===(e=c.CONFIG_filials)||void 0===e?void 0:e.length)?Object(S.jsx)(Oe.a,{sx:{my:"6px",borderColor:"one"===a?"rgba(0, 0, 0, 0.12)":"#3c3b3b",width:"200px"}}):null]}),null===(t=c.CONFIG_filials)||void 0===t?void 0:t.map((function(e,t,r){var i;return Object(S.jsxs)("div",{className:"footer--adress",children:[Object(S.jsx)("div",{children:e.address}),Object(S.jsx)("div",{children:null===(i=e.phones)||void 0===i?void 0:i.map((function(e,c){return Object(S.jsx)("div",{children:Object(S.jsx)("a",{href:"tel:".concat(e.replace(/[^0-9+]+/g,"")),onClick:n,target:"_parent",children:e})},t)}))}),e.workingTime?e.workingTime[d][0]&&e.workingTime[d][1]?Object(S.jsxs)("div",{children:["\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"," ",e.workingTime[d][0]," \u0434\u043e"," ",e.workingTime[d][1]]}):Object(S.jsx)("div",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"}):c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsxs)("div",{children:["\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ",c.CONFIG_format_start_work," ","\u0434\u043e ",c.CONFIG_format_end_work]}):Object(S.jsx)("div",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"}),t===r.length-1?null:Object(S.jsx)(Oe.a,{sx:{my:"6px",borderColor:"one"===a?"rgba(0, 0, 0, 0.12)":"#3c3b3b",width:"200px"}})]},t)}))]})]})},lt=function(){var e=Object(w.e)((function(e){var t=e.pages,n=e.config;return{topMenu:t.topMenu,bottomMenu:t.bottomMenu,configStatus:n.status}})),t=e.bottomMenu,n=e.topMenu,c=e.configStatus,a=function(e){window.scrollTo(0,0)};return c||(null===n||void 0===n?void 0:n.length)||(null===t||void 0===t?void 0:t.length)?t?Object(S.jsx)("ul",{children:t.map((function(e,t){return Object(S.jsx)("li",{children:"_blank"===e.target?Object(S.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title,children:e.title}):Object(S.jsx)(P.b,{onClick:function(){return a()},to:e.url,children:e.title})},e.id)}))}):Object(S.jsx)("ul",{children:n.map((function(e,t){return Object(S.jsx)("li",{children:"_blank"===e.target?Object(S.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title,children:e.title}):Object(S.jsx)(P.b,{onClick:function(){return a()},to:e.url,children:e.title})},e.id)}))}):Object(S.jsxs)("ul",{children:[Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:150})}),Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:150})}),Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:150})}),Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:150})})]})},dt=n(30),ut=n(87),jt=function(){return Object(S.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"icn",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 9",width:16,height:9,children:Object(S.jsx)("path",{d:"M15.5005 8.12762C15.4819 8.08745 15.4645 8.05412 15.4483 8.02742C15.1813 7.54638 14.6708 6.95592 13.9174 6.2559L13.9015 6.23987L13.8935 6.23201L13.8855 6.22395H13.8774C13.5354 5.89798 13.3189 5.67881 13.2282 5.56659C13.0623 5.35284 13.0251 5.13647 13.1158 4.91724C13.1799 4.75161 13.4205 4.4018 13.8372 3.86736C14.0564 3.58412 14.23 3.35711 14.3582 3.18608C15.2827 1.957 15.6835 1.1716 15.5605 0.829579L15.5128 0.749652C15.4807 0.701533 15.3978 0.657513 15.2644 0.617367C15.1307 0.577305 14.9597 0.57068 14.7513 0.597378L12.4429 0.613324C12.4055 0.600073 12.3521 0.601309 12.2826 0.617367C12.2131 0.633425 12.1783 0.641483 12.1783 0.641483L12.1381 0.661556L12.1062 0.685671C12.0795 0.701617 12.0501 0.729663 12.018 0.769753C11.9861 0.809702 11.9594 0.856586 11.9381 0.910011C11.6868 1.55658 11.401 2.15773 11.0803 2.71343C10.8826 3.04479 10.701 3.33196 10.5352 3.57511C10.3696 3.81817 10.2306 3.99726 10.1185 4.11205C10.0062 4.22696 9.90488 4.31901 9.81386 4.38855C9.72299 4.45812 9.65361 4.48751 9.60558 4.47676C9.55743 4.46601 9.51209 4.45534 9.46917 4.44467C9.39441 4.39655 9.33427 4.33111 9.28893 4.24829C9.2434 4.16548 9.21274 4.06124 9.19671 3.93566C9.18076 3.81 9.17133 3.70192 9.16864 3.61104C9.16614 3.52028 9.16729 3.3919 9.17271 3.22626C9.17827 3.06054 9.18077 2.94841 9.18077 2.88962C9.18077 2.68654 9.18472 2.46613 9.19267 2.22834C9.20075 1.99055 9.20729 1.80215 9.21277 1.66335C9.21821 1.52441 9.22074 1.37742 9.22074 1.22245C9.22074 1.06748 9.21131 0.945945 9.19267 0.857737C9.17425 0.76964 9.14598 0.684127 9.10873 0.601224C9.07125 0.518406 9.01639 0.454341 8.94441 0.408861C8.87229 0.363437 8.78262 0.32739 8.67591 0.300608C8.39267 0.236515 8.032 0.201843 7.59374 0.196453C6.59989 0.185785 5.96129 0.249962 5.67808 0.3889C5.56587 0.447603 5.46432 0.527811 5.37353 0.62927C5.27732 0.746872 5.2639 0.81105 5.33336 0.821606C5.65402 0.86964 5.88103 0.984547 6.01463 1.16621L6.06278 1.26248C6.10023 1.33194 6.13762 1.4549 6.17505 1.6312C6.21241 1.80751 6.23653 2.00254 6.24714 2.21618C6.27381 2.60633 6.27381 2.9403 6.24714 3.21812C6.22039 3.49605 6.19512 3.71242 6.171 3.86739C6.14689 4.02235 6.11084 4.14793 6.06278 4.24408C6.01463 4.34026 5.9826 4.39905 5.96654 4.42039C5.95051 4.44172 5.93715 4.45517 5.92653 4.46045C5.85708 4.48706 5.78484 4.50062 5.71008 4.50062C5.63521 4.50062 5.54442 4.46317 5.43757 4.38833C5.33075 4.31348 5.21988 4.21067 5.10498 4.07974C4.99007 3.94877 4.86048 3.76576 4.71615 3.53067C4.57193 3.29557 4.4223 3.01773 4.26733 2.69712L4.13912 2.46461C4.05897 2.31503 3.94948 2.09723 3.81054 1.81141C3.67152 1.52548 3.54864 1.24889 3.44181 0.981712C3.39911 0.8695 3.33496 0.784071 3.24948 0.725284L3.20936 0.701168C3.18269 0.679832 3.13988 0.657176 3.08115 0.633032C3.02233 0.608917 2.96096 0.591623 2.89678 0.580983L0.700581 0.596929C0.476157 0.596929 0.323884 0.647771 0.243704 0.749315L0.211616 0.797349C0.195585 0.824104 0.1875 0.866833 0.1875 0.925648C0.1875 0.984435 0.20353 1.05659 0.235619 1.14201C0.556224 1.89552 0.904876 2.62222 1.28157 3.32222C1.65827 4.02221 1.98561 4.58608 2.26341 5.01331C2.54126 5.44085 2.82447 5.84436 3.11304 6.22364C3.40161 6.60306 3.59263 6.84621 3.68609 6.95303C3.77966 7.06005 3.85315 7.14006 3.90658 7.19348L4.107 7.38582C4.23524 7.51409 4.42356 7.66771 4.67205 7.84668C4.92059 8.02577 5.19574 8.20207 5.49765 8.37588C5.79961 8.5494 6.1509 8.69101 6.55172 8.80053C6.95247 8.91016 7.34253 8.95415 7.72195 8.93292H8.64374C8.83068 8.91678 8.97231 8.858 9.06858 8.75654L9.10047 8.71636C9.12192 8.68447 9.14199 8.63492 9.16052 8.56824C9.17928 8.50145 9.1886 8.42787 9.1886 8.34783C9.18312 8.1181 9.20061 7.91106 9.24059 7.72672C9.28054 7.54245 9.32608 7.40351 9.377 7.30994C9.4279 7.21645 9.48534 7.13756 9.54926 7.07361C9.61333 7.00952 9.65898 6.97069 9.68576 6.95733C9.71237 6.94388 9.73363 6.93475 9.74966 6.92928C9.8779 6.88655 10.0288 6.92793 10.2027 7.05362C10.3764 7.17919 10.5393 7.33425 10.6917 7.51853C10.844 7.70297 11.0269 7.90991 11.2406 8.13964C11.4545 8.36945 11.6415 8.54028 11.8017 8.65266L11.9619 8.74884C12.069 8.81302 12.2079 8.87181 12.3789 8.92523C12.5496 8.97863 12.6992 8.99199 12.8277 8.96529L14.8795 8.93329C15.0825 8.93329 15.2404 8.89968 15.3524 8.83301C15.4646 8.76622 15.5313 8.69264 15.5528 8.6126C15.5743 8.53248 15.5754 8.44157 15.5569 8.33994C15.5379 8.23857 15.5192 8.16768 15.5005 8.12762Z","data-v-64277d66":"",fill:"currentColor"})})},bt=function(){var e=Me(),t=e.mectricClickAndroid,n=e.mectricClickIos,c=Object(w.e)((function(e){return{config:e.config.data}})).config;return ce(c)?Object(S.jsxs)("div",{className:"contacts--social-links",children:[Object(S.jsx)(Fe.a,{variant:"circular",width:32,height:32}),Object(S.jsx)(Fe.a,{variant:"circular",width:32,height:32}),Object(S.jsx)(Fe.a,{variant:"circular",width:32,height:32})]}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"contacts--social-links",children:[c.CONFIG_vk&&Object(S.jsx)("a",{href:c.CONFIG_vk,target:"_blank",rel:"noreferrer",children:Object(S.jsx)("div",{className:"footer--icon",children:Object(S.jsx)(jt,{})})}),c.CONFIG_fb&&Object(S.jsx)("a",{href:c.CONFIG_fb,target:"_blank",rel:"noreferrer",children:Object(S.jsx)("div",{className:"footer--icon",children:Object(S.jsx)(dt.a,{icon:ut.a})})}),c.CONFIG_instagram&&Object(S.jsx)("a",{href:c.CONFIG_instagram,target:"_blank",rel:"noreferrer",children:Object(S.jsx)("div",{className:"footer--icon",children:Object(S.jsx)(dt.a,{icon:ut.b})})}),c.CONFIG_ok&&Object(S.jsx)("a",{href:c.CONFIG_ok,target:"_blank",rel:"noreferrer",children:Object(S.jsx)("div",{className:"footer--icon",children:Object(S.jsx)(dt.a,{icon:ut.c})})}),c.CONFIG_tg&&Object(S.jsx)("a",{href:c.CONFIG_tg,target:"_blank",rel:"noreferrer",children:Object(S.jsx)(dt.a,{icon:ut.e,className:"footer--icon-telegram"})})]}),c.CONFIG_APPSTORE&&Object(S.jsx)("div",{className:"contacts--appstore mobile-apps",children:Object(S.jsx)("a",{href:c.CONFIG_APPSTORE,target:"_blank",rel:"noreferrer",onClick:n,children:Object(S.jsx)("img",{src:ye,alt:"iOS APP"})})}),c.CONFIG_GPLAY&&Object(S.jsx)("div",{className:"contacts--googleplay mobile-apps",children:Object(S.jsx)("a",{href:c.CONFIG_GPLAY,target:"_blank",rel:"noreferrer",onClick:t,children:Object(S.jsx)("img",{src:we,alt:"Android APP"})})})]})},mt=(n(296),n.p+"static/media/iphone_x.242bf7ac.png"),pt=(n(297),function(){var e=Me(),t=e.mectricClickAndroid,n=e.mectricClickIos,c=Object(w.e)((function(e){return e.config.data}));return c.CONFIG_APPSTORE||c.CONFIG_GPLAY?Object(S.jsx)("div",{className:"mobile-apps-widget",children:Object(S.jsx)(se.a,{children:Object(S.jsxs)("div",{className:"mobile-apps-widget--inner-wrapper",children:[Object(S.jsxs)("div",{className:"mobile-apps-widget--logo-container",children:[Object(S.jsx)("div",{className:"mobile-apps-widget--circle",children:Object(S.jsx)("div",{className:"mobile-apps-widget--inner-circle"})}),Object(S.jsx)("img",{src:mt,className:"mobile-apps-widget--logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"}),Object(S.jsx)("img",{src:c.CONFIG_company_logo_main,className:"mobile-apps-widget--img",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"})]}),Object(S.jsx)("div",{className:"mobile-apps-widget--description",children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0439 \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0435\u0434\u0443 \u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0435\u0449\u0451 \u0431\u044b\u0441\u0442\u0440\u0435\u0435!"}),Object(S.jsxs)("div",{className:"mobile-apps-widget--links-container",children:[c.CONFIG_APPSTORE&&Object(S.jsx)("div",{className:"mobile-apps-widget--link",children:Object(S.jsx)("a",{href:c.CONFIG_APPSTORE,target:"_blank",rel:"noreferrer",onClick:n,children:Object(S.jsx)("img",{src:ye,alt:"iOS APP"})})}),c.CONFIG_GPLAY&&Object(S.jsx)("div",{className:"mobile-apps-widget--link",children:Object(S.jsx)("a",{href:c.CONFIG_GPLAY,target:"_blank",rel:"noreferrer",onClick:t,children:Object(S.jsx)("img",{src:we,alt:"Android APP"})})})]})]})})}):null});function Ot(){var e=k().rootTownPathname,t=Object(N.g)().pathname,n=Me().mectricClickPhone,c=Object(w.e)((function(e){return e.config.data})),a=c.CONFIG_type_footer,r=t===e||t===e+"/";return"site"!==Y()?Object(S.jsx)("div",{className:"footer-space"}):Object(S.jsxs)("div",{className:Object(Ne.a)("footer","one"===a&&"white"),children:["disabled"===c.CONFIG_app_download_vidget||t.includes("checkout")||t.includes("order-complete")?null:Object(S.jsx)(pt,{}),Object(S.jsxs)(se.a,{className:"footer--container",children:[r?Object(S.jsxs)(S.Fragment,{children:[(null===c||void 0===c?void 0:c.CONFIG_footer_text)?Object(S.jsxs)("div",{className:"about",children:["one"===a?Object(S.jsx)(Oe.a,{sx:{mt:"0",mb:"48px",borderColor:"one"===a?"rgba(0, 0, 0, 0.12)":"#3c3b3b"}}):null,c.CONFIG_site_h1_title?Object(S.jsx)("h1",{className:"about-title",children:c.CONFIG_site_h1_title}):null,Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:c.CONFIG_footer_text}})]}):null,"one"===a?null:Object(S.jsx)("hr",{className:"about-divider"})]}):null,"one"===a?Object(S.jsx)(Oe.a,{sx:{mb:"3rem",borderColor:"one"===a?"rgba(0, 0, 0, 0.12)":"#3c3b3b"}}):null,Object(S.jsxs)(ot.a,{container:!0,spacing:5,children:[Object(S.jsxs)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},children:[Object(S.jsx)("img",{src:"one"===a?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,className:"footer--logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"}),Object(S.jsx)(st,{})]}),Object(S.jsx)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},children:Object(S.jsx)(lt,{})}),Object(S.jsxs)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},className:"right-col",children:[c.CONFIG_format_phone?Object(S.jsx)("h4",{children:Object(S.jsx)("a",{href:"tel:".concat(c.CONFIG_format_phone),onClick:n,target:"_parent",children:c.CONFIG_format_phone})}):null,Object(S.jsx)(bt,{})]})]}),Object(S.jsx)("div",{className:"footer-copyright",children:Object(S.jsx)(ot.a,{container:!0,spacing:5,children:!c.CONFIG_active_no_whitelabel&&Object(S.jsx)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},className:"right-col",children:Object(S.jsxs)("div",{className:"creators",children:["\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435"," ",Object(S.jsx)("a",{href:"https://foodninja.pro",target:"_blank",rel:"noreferrer",children:"FoodNinja"})]})})})})]})]})}var ht=function(e){return{type:"ADD_PRODUCT_TO_CART",payload:e}},vt=function(e){return{type:"ADD_BONUS_PRODUCT_TO_CART",payload:e}},ft=function(e){return{type:"DECREASE_PRODUCT_IN_CART",payload:e}},xt=function(e){return{type:"REMOVE_PRODUCT_FROM_CART",payload:e}},gt=function(e){return{type:"ADD_PROMOCODE",payload:e}},_t=function(e){return{type:"SET_CONDITIONAL_PROMOCODE",payload:e}},yt=function(e){return{type:"CHANGE_PROMOCODE_PRODUCT_PRICE",payload:e}},wt=function(e){return{type:"SET_MODAL_PRODUCT",payload:e}},Nt=function(e){return{type:"SET_OPEN_MODAL",payload:e}},Ct=n(242),kt=n.n(Ct),It=n.p+"static/media/photo-soon.f29a293a.svg",Pt=n.p+"static/media/lazy-load.05387b56.svg";function St(){return Object(S.jsx)("div",{className:"placeholder",children:Object(S.jsx)("img",{src:Pt,alt:"LazyImgPlaceholder"})})}var Et,Ft=function(e){var t=e.product,n=(e.disabled,Object(x.useState)(!1)),c=Object(Ve.a)(n,2),a=c[0],r=c[1];return Object(x.useEffect)((function(){var e=new Image;return e.src=t.img?t.img:It,e.onload=function(){r(!0)},function(){e.src=""}}),[]),Object(S.jsx)(S.Fragment,{children:a?Object(S.jsx)("img",{alt:t.title,src:t.img?t.img:It,className:Object(Ne.a)(!t.img&&"soon")}):Object(S.jsx)(St,{})})},Tt=n(241),At=n.n(Tt),Mt=(n(101),["title","titleId"]);function Dt(){return(Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Gt(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Rt(e,t){var n=e.title,c=e.titleId,a=Gt(e,Mt);return x.createElement("svg",Dt({viewBox:"0 0 75 10",preserveAspectRatio:"none",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"discount",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,Et||(Et=x.createElement("path",{opacity:.55,d:"M1 9c7.346-1.833 34.434-7.5 73-8",stroke:"var(--main-color)",strokeWidth:2})))}var Bt=x.forwardRef(Rt);n.p;function Lt(e){var t,n,c=e.product,a=e.disabled,r=Object(w.d)(),i=Me(),o=i.metricViewProduct,s=i.metricAddProductToCart,l=Object(w.e)((function(e){return e.config.data.CONFIG_type_products})),d=Object(w.e)((function(e){return e.cart.items[c.id]})),u=Object(w.e)((function(e){return e.config.data.CONFIG_new_category})),j=Object(w.e)((function(e){return e.config.data.CONFIG_hit_category})),b=Object(w.e)((function(e){return"yes"===e.config.data.CONFIG_product_image_fullwidth})),m=Object(w.e)((function(e){return e.config.data.CONFIG_product_background_color})),p=Object(w.e)((function(e){return"disable"===e.config.data.CONFIG_product_sticker_sale})),O=Object(w.e)((function(e){return"yes"===e.config.data.CONFIG_product_image_fixed_height})),h=Object(w.e)((function(e){return e.config.data.CONFIG_product_buy_button_text})),v=function(){var e=new URL(window.location.href);e.searchParams.has("product_id")||(e.searchParams.append("product_id",c.id),window.history.pushState({},"",e.href)),o(c),r(wt(Object(I.a)({},c))),r(Nt(!0))},f=function(){s(c),r(ht(c))},x=null===(t=c.product_addons)||void 0===t?void 0:t.find((function(e){return"yes"===e.required}));return Object(S.jsx)(ot.a,{xs:12,sm:"one"===l?6:12,desctop:4,mg:window.fullWidthSite?4:3,lg:3,xl:window.fullWidthSite?2.4:3,xxl:window.fullWidthSite?2:3,item:!0,className:Object(Ne.a)("product-grid-item","one"===l?"one-layout":"default-layout"),children:Object(S.jsxs)("div",{className:"product product-item",children:[Object(S.jsxs)("div",{className:"product--labels-wrapper",children:[!p&&parseInt(c.options._regular_price)>parseInt(c.options._price)&&"simple"===c.type&&Math.round(100*(1-parseInt(c.options._price)/parseInt(c.options._regular_price)))>0?Object(S.jsxs)("div",{className:"product--label discount",children:["-",Math.round(100*(1-parseInt(c.options._price)/parseInt(c.options._regular_price))),"%"]}):null,(null===(n=c.options)||void 0===n?void 0:n._count_peoples)?Object(S.jsxs)("div",{className:"product--label peoples",children:[Object(S.jsx)(kt.a,{}),c.options._count_peoples]}):null,c.categories.includes(parseInt(j))&&Object(S.jsx)("div",{className:"product--label hit",children:"\u0425\u0418\u0422"}),c.categories.includes(parseInt(u))&&Object(S.jsx)("div",{className:"product--label new",children:"NEW"})]}),Object(S.jsx)("div",{className:Object(Ne.a)("product--image","viewProduct",b&&"fullwidth",b&&O&&"fixedRatio"),"data-product-id":c.id,style:{backgroundColor:m,filter:a?"grayscale(1)":""},onClick:v,children:Object(S.jsx)(At.a,{height:210,placeholder:Object(S.jsx)(St,{}),once:!0,offset:500,children:Object(S.jsx)(Ft,{product:c,disabled:a})})}),Object(S.jsxs)("div",{className:"product--inner-wrapper",children:[Object(S.jsx)("div",{className:"product--title viewProduct",onClick:v,"data-product-id":c.id,dangerouslySetInnerHTML:{__html:"<h4>".concat(c.full_title||c.title,"</h4>")}}),Object(S.jsxs)("div",{className:"product--description viewProduct",onClick:v,"data-product-id":c.id,children:[Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:c.content}}),Object(S.jsx)("div",{className:"short-fade"})]}),Object(S.jsx)("div",{className:"action viewProduct","data-product-id":c.id,children:Object(S.jsx)("span",{onClick:v,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})}),Object(S.jsxs)("div",{className:"product--buying",children:[Object(S.jsxs)("div",{className:"product--price-wrapper",children:[Object(S.jsx)("div",{className:"product--price",children:"variations"===c.type||x?Object(S.jsxs)("span",{className:"product--standart-price",children:["\u043e\u0442 ",c.options._price," \u20bd"]}):parseInt(c.options._regular_price)>parseInt(c.options._price)?Object(S.jsxs)("span",{className:"product--sales",children:[Object(S.jsxs)("span",{className:"product--old-price",children:[c.options._regular_price," \u20bd",Object(S.jsx)(Bt,{className:"old-price-line"})]}),Object(S.jsxs)("span",{className:"product--sale-price main-color",children:[c.options._price," \u20bd"]})]}):Object(S.jsxs)("span",{className:"product--standart-price",children:[c.options._price," \u20bd"]})}),Object(S.jsxs)("div",{className:"product--info",children:[c.options.weight?Object(S.jsxs)("div",{className:"weight",children:[c.options.weight," \u0433\u0440."]}):"",c.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[c.options.count_rolls," \u0448\u0442."]}):""]})]}),"variations"===c.type||x?Object(S.jsx)(de.a,{variant:"button",className:"btn--action viewProduct",onClick:v,disabled:a,"data-product-id":c.id,children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c"}):d?Object(S.jsxs)("div",{className:"product--quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(){r(ft(c))},disabled:a,children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:d.items.length,"data-product-id":c.id}),Object(S.jsx)(de.a,{className:"btn--default product-add btn-buy",onClick:f,disabled:a,"data-product-id":c.id,children:"+"})]}):Object(S.jsx)(de.a,{variant:"button",className:"btn--action btn-buy",onClick:f,disabled:a,"data-product-id":c.id,children:h||"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"})]})]})]})})}var Ut=function(e){return{type:"UPDATE_ALERTS",payload:e}},zt=function(e){return!Object.keys(e.cart.items).length&&!e.cart.promocodeProducts.id},Ht=n(466),Wt=function(e){var t=e.oldPrice,n=e.price,c=e.isBonusProduct;return Object(S.jsxs)("span",{children:[Object(S.jsxs)("span",{className:"old-price",children:[t," \u20bd",Object(S.jsx)(Bt,{className:"old-price-line"})]}),"\xa0",Object(S.jsx)("span",{className:"main-color",children:c?"\u041f\u043e\u0434\u0430\u0440\u043e\u043a":"".concat(Math.ceil(n)," \u20bd")})]})};n(149);function Vt(e){var t,n,c,a=e.productCart,r=e.productCount,i=e.productTotalPrice,o=Object(w.d)(),s=function(e){o(vt(e))},l={};a.attributes&&Object.values(a.attributes).forEach((function(e,t){l[t]=e.name}));var d=parseInt(i);return a.modificatorsAmount&&(d+=a.modificatorsAmount),Object(S.jsxs)("div",{className:"minicart--product","data-product-id":a.id,children:[Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:a.img?a.img:It,alt:a.title})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsx)("div",{className:"minicart--product-name",children:a.title}),Object(S.jsxs)("div",{className:"minicart--product-description",children:["variations"===a.type&&(null===(t=a.variant)||void 0===t?void 0:t.attributes)?Object(S.jsx)("div",{className:"minicart--product-attributes",children:Object.values(a.variant.attributes).map((function(e,t){return Object(S.jsxs)("div",{className:"minicart--product-attribute",children:[l[t],": ",e]},t)}))}):null,(null===(n=a.choosenModificators)||void 0===n?void 0:n.length)?Object(S.jsxs)("div",{className:"minicart--product-attributes",children:["+"," ",a.choosenModificators.map((function(e,t,n){return t!==n.length-1?Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442.,"," "]},e.id):Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442."]},e.id)}))]}):null,"variations"===a.type&&(null===(c=a.variant)||void 0===c?void 0:c.weight)?a.variant.weight&&Object(S.jsxs)("div",{className:"weight",children:[a.variant.weight," \u0433\u0440."]}):Object(S.jsxs)("div",{children:[a.options.weight?Object(S.jsxs)("div",{className:"weight",children:[a.options.weight," \u0433\u0440."]}):"",a.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[a.options.count_rolls," \u0448\u0442."]}):""]})]}),Object(S.jsx)("div",{className:"minicart--product-remove",onClick:function(){return s({})},"data-product-id":a.id,children:Object(S.jsx)(_e.a,{})})]})]}),Object(S.jsxs)("div",{className:"minicart--product-result",children:[Object(S.jsx)(Wt,{oldPrice:d,isBonusProduct:!0}),Object(S.jsxs)("div",{className:"minicart--product-quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(){return s({})},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:r,"data-product-id":a.id}),Object(S.jsx)(de.a,{className:"btn--default product-add",disabled:!0,children:"+"})]})]})]})}function Zt(){var e=Object(w.e)((function(e){var t=e.config,n=e.cart;return{delimiter:t.data.CONFIG_count_rolls_for_free_addons,sauceImg:t.data.CONFIG_free_sauce_image,vasabiImg:t.data.CONFIG_free_vasabi_image,imbirImg:t.data.CONFIG_free_imbir_image,totalRolls:n.totalRolls}})),t=e.delimiter,n=e.totalRolls,c=e.sauceImg,a=e.vasabiImg,r=e.imbirImg,i=0;return t&&(i=parseInt(n/t),n%t&&i++),Object(S.jsx)("div",{children:i?Object(S.jsxs)("div",{children:[Object(S.jsx)("h4",{className:"minicart--free-addons-title",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043a\u0438"}),Object(S.jsx)("div",{className:"minicart--product free-addon",children:Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:c,alt:"\u0421\u043e\u0435\u0432\u044b\u0439 \u0441\u043e\u0443\u0441"})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsxs)("div",{className:"minicart--product-name",children:["\u0421\u043e\u0435\u0432\u044b\u0439 \u0441\u043e\u0443\u0441 x"," ",Object(S.jsxs)("span",{className:"count-free-addons",children:[i," \u0448\u0442."]})]}),Object(S.jsx)("span",{className:"main-color",children:"FREE"})]})]})}),Object(S.jsx)("div",{className:"minicart--product free-addon",children:Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:a,alt:"\u0412\u0430\u0441\u0430\u0431\u0438"})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsxs)("div",{className:"minicart--product-name",children:["\u0412\u0430\u0441\u0430\u0431\u0438 x"," ",Object(S.jsxs)("span",{className:"count-free-addons",children:[i," \u0448\u0442."]})]}),Object(S.jsx)("span",{className:"main-color",children:"FREE"})]})]})}),Object(S.jsx)("div",{className:"minicart--product free-addon",children:Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:r,alt:"\u0418\u043c\u0431\u0438\u0440\u044c"})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsxs)("div",{className:"minicart--product-name",children:["\u0418\u043c\u0431\u0438\u0440\u044c x"," ",Object(S.jsxs)("span",{className:"count-free-addons",children:[i," \u0448\u0442."]})]}),Object(S.jsx)("span",{className:"main-color",children:"FREE"})]})]})})]}):""})}var Qt=function(e){if(!e.products.categories||!e.products.recommend_items)return null;var t=e.products.categories.filter((function(e){return $(e).disabled}));return e.products.recommend_items.filter((function(n){return!e.cart.items[n.id]&&!n.categories.some((function(e){return t.includes(e)}))}))},qt=function(e){if(!e.products.categories||!e.products.top_sales_products)return null;var t=e.products.categories.filter((function(e){return $(e).disabled}));return e.products.top_sales_products.filter((function(e){return!e.categories.some((function(e){return t.includes(e)}))}))},Yt=n(44),Kt=n(35);n(302);function Jt(e){var t=e.product,n=e.onProductClick,c=void 0===n?function(){}:n;return Object(S.jsxs)("div",{className:Object(Ne.a)("simple"===t.type&&"btn-buy","recommend-product"),"data-product-id":t.id,onClick:function(){c(t)},children:[Object(S.jsx)("div",{className:"product-image",children:Object(S.jsx)("img",{src:t.img?t.img:It,alt:t.title})}),Object(S.jsxs)("div",{className:"right-block",children:[Object(S.jsx)("div",{className:"product-name",children:t.title}),Object(S.jsxs)("div",{className:"product--price",children:["variations"===t.type&&"\u043e\u0442 ",t.options._price.toLocaleString("ru-RU")," \u20bd"]})]})]})}n(150);function Xt(e){var t=e.product,n=Object(w.d)(),c=Me().metricAddProductToCart,a=Object(w.e)((function(e){return{cartProducts:e.cart.items}})).cartProducts,r=function(){c(t),n(ht(t))};return Object(S.jsxs)("div",{className:"addon-product--mini",children:[Object(S.jsxs)("div",{className:"addon-product--mini-inner",children:[Object(S.jsx)("div",{className:"addon-product--image",children:Object(S.jsx)("img",{className:"lazyload-image",src:t.img?t.img:It,alt:t.title})}),Object(S.jsx)("h2",{className:"addon-product--title-mini",children:t.title})]}),Object(S.jsx)("div",{className:"addon-product--mini-btn--wrapper",children:a[t.id]?Object(S.jsxs)("div",{className:"minicart--product-quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(){n(ft(t))},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:a[t.id].items.length}),Object(S.jsx)(de.a,{className:"btn--default product-add",onClick:r,children:"+"})]}):Object(S.jsx)(de.a,{className:"btn--outline btn-buy addon-product--mini-inner--btn",onClick:r,children:Object(S.jsxs)("div",{className:"",children:[t.options._price.toLocaleString("ru-RU")," ","\u20bd"]})})})]})}var $t=n(431),en=n(437);function tn(e){var t=e.minicartInner,n=Object(N.g)().pathname,c=Object(w.d)(),a=Me(),r=a.metricViewProduct,i=a.metricAddProductToCart,o=g.a.useState(!1),s=Object(Ve.a)(o,2),l=s[0],d=s[1],u=g.a.useState(!0),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=Object(w.e)(Qt),O=Object(w.e)((function(e){return e.products.addon_items})),h=Object(w.e)((function(e){return"active"===e.config.data.CONFIG_basket_hide_category_addons}));if(!p)return null;var v=function(){"/cart"===n&&(document.body.style.overflow="hidden"),d(!1)},f=function(e){if("variations"===e.type){var t=new URL(window.location.href);t.searchParams.has("product_id")||(t.searchParams.append("product_id",e.id),window.history.pushState({},"",t.href)),r(e),c(wt(Object(I.a)({},e))),c(Nt(!0))}else i(e),c(ht(e))};return Object(S.jsxs)("div",{children:[Object(S.jsxs)("div",{className:"minicart-recommends",children:[Object(S.jsx)("h4",{className:"minicart--recommends-title",children:"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043a \u0437\u0430\u043a\u0430\u0437\u0443"}),Object(S.jsxs)(Yt.a,{slidesPerView:"auto",spaceBetween:16,freeMode:!0,navigation:!0,modules:[Kt.c,Kt.d],children:[O.length&&!h?Object(S.jsx)(Yt.b,{className:"reccomend-slide reccomend-addons-slide reccomend-slide--mini",children:Object(S.jsxs)("div",{className:"reccomend-slide--addons-wrapper recommend-product",onClick:function(){"/cart"===n&&(document.body.style.overflow="initial"),d(!0),m(!1)},children:[Object(S.jsx)("img",{className:"lazyload-image",src:"data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABkAAD/4QMxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzE0MiA3OS4xNjA5MjQsIDIwMTcvMDcvMTMtMDE6MDY6MzkgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkFBNjU3NjJGMDQyQTExRURBN0U4RDYyOUFBNjc2MzRFIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkFBNjU3NjJFMDQyQTExRURBN0U4RDYyOUFBNjc2MzRFIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MkI3Q0YyNUMzMjQwMTFFQjkxRERDQkRGNzlGRDRBRkMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MkI3Q0YyNUQzMjQwMTFFQjkxRERDQkRGNzlGRDRBRkMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAgICAgICAgICAgIDAwMDAwMDAwMDAQEBAQEBAQIBAQICAgECAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwP/wAARCABGAEYDAREAAhEBAxEB/8QAlwAAAQQDAAMAAAAAAAAAAAAAAAcICQoEBQYBAwsBAQEBAQAAAAAAAAAAAAAAAAACAQMQAAAGAQIEBAUCBQUAAAAAAAECAwQFBgcAESESEwgxFBUJQSIjFhdhM/BRoSQKcYHRQiURAAEDAgMFBgUEAwAAAAAAAAEAEQIhMUFREvBxgZGhYdEiMgMTscFCYoJSktIj4aIz/9oADAMBAAIRAxEAPwC/xoiNERoiNERoiNERoiNERoiNERoiNESN5u7hcJdt1RVvWc8m1PGdZL1gbO7JJFReyy6HSFZlXYNsVzO2aSTKuUwtY5s6cco83Jtx1E/UhBtRqbC5O4CpbFrKZSjG9+vJVv8Aue/yKll5N1Vuz3GLU8ckdVufKWYGjk6z0olBPzFax/ESTQWSZFNzouZN8qZQggCrBMdw1P8AbP7I8DL5xDfk/Ys8cvtHM9w6pp9R95vv9eyBHz/J9XfNzKAcYdfGNBSjuUR36XUYwTSW6Xw381z7f9t9Z7U2b3Jvuh/FZokza5f69ymx7Mvd0qWYn7Oh9w8dX8XXSQVQbwNxiVXbfHU+5VHk8hJhLPHzumyJjiXpKOHLhiuImAyzc4Jpq7rl6bn1W0Zijbx87XJEQK7qMaz8uff382ZTR66q0aIjREh2ee5bAvbDUjXfPeVKjjGvmBbyR7DIf+tOKtuj5hpWa0xTeWS1P0CrkMdvGtHS5CDzCQCgI6iXqQgwkamwucMBWjh8sVhkBe6rJd33+RlZJoJOn9lVB+1WRhVbFzLlKPYydiUABR2eVPHZVH1fiRKomfprzC0n1kFA52DdQvCf7Z/ZHgZYb4jEfU4sQVPjl9o69w68FXEydlbKucre9v2YcgW3JFwkdiuZ+3zT2afFQIP0WTQXap0o6Nal+VFq3Kk2RIAFTIUoAGqh6cIeUVNzcneTU8VsYxjb/PNaCMKVFQhjbcB4b/z4f86tUlqq88i2MQBOAbbfEPHh/uIaInLVieQcgmUDl8ADiP8ATRFNf2P+5pccFEjMc5gUlsgYhIDZjFP+uLy348bE5EkgiVXJ+edrLZEOUY1ZQqjZMCi1UIVPyy3LTL06+nWDeX+OVKNa1Y1eGMaxtl3d1t1XsbBm7Eo4pHOAX+tjicIX18bwD4PRwj+sDTpj8vmwlfUhBl5Dpef9Q/tOj5n6Wq9yOj3Pp3F9zXfBmd6M63UNOrDbC79l1CV78HuJd43YbQ8cm7cMcMY2o5HJKRVl7kZSHRt7eh2pNYhoimxUC6KtX4WxSkagq6QeTbd61epAqm1QFZssonMjM+oIPpgRfEnEdlBk5BLNpJWF9TWHxOXLnhYqildu43Jubrq/vuZMhW7I92ljEB9ZbrOyE/LKJJiPQaJOpFdYWse0KblQbI8iCBNipkKUAAKhCMPKL3zOFSaneVQiI223nFdtAyjd2mmYDgIiAfHf+N9WtXcpcglAS7aIveAiHgOiLKQeKNzAYpxDYQ+O3hoiUatXtSPXSA6wgBTB4iIb/wCg8Q0ROOgcqNVEyFMqXfhtubw8AAdEUzeEpe6J+0t3o2eYK+Sx45yFh8KSZ0BiNXE0hkvHbO6vIwqhQMozN1IxA6pN0TOEFCAPUTVAOMQfemR5Gj+6r8W08GUB/cl+lhzq/RlaLydjHH+aMf2zFeValC3vHl6hnMBa6nYGoO4qYjHXKYySpNyKoOW66ZFmzhE6blo5STWRUTWTIcvSURMaZW265HBUQJBjZfOs94L2d7v7d14NkPGystfO1S6Sa41WzL/3dlxm9WcIkTpmRRbpJlFEizxNGNmikI2f8xElQRdCVNVETA8VQMc9+RpxuMQAEgK1Ge2PxuMhDzWbc5jVU0ljmMTcAKYRH+vHx1S1OLgbag6SJucB3AOO+4/D9dEXaElUTl3AQ8NEWMvJFAB2EN9h346It3Rqfe8n2dnUseVebt9je8x0IqDZKvHBUEzFBZ67MQvRYRzUDAKzlcybdAnzKHKXcdY9QKmRsBUncBU8EerYnC5O4XKsb+3H7N0dd8gNJLuql30pEQ8D9zusc0mWXYRC7kkiyas4SzXNoBH8im6KuqK6UMZsQpUgFGRUAwlDZQLeItLIMTxkKDENHVQvqiQyGJapY5CvM2HB94Ktg/hrFP4t/CP49qf4j+3vtT8eejM/tb0Dl29P9L6fQ5ep9XqfveY+tz9X59R7cNOhvDsXzd6vd63U6Ytpw264vnVKXq1SQ7O+PankurFqd4gIuzVSeQma7PQk1HtpOMkoueilmjxi+YvE1mjto7SJyKJKFMRQo8ogO+qjIxNLG4NiMjtQ1DEArQW222qKqgP7svs3XLs7sEtmDA8TNXDtxlnbh47i2xHs1P4iOocyotpFYfMPpihhvs1k1RO5YcG8gYxug9fZMCA1j/l23icpdh+mWPlLSbVkmiNQ8nw7D2HA42LFnhIrs2u1UKmY4iACG3HxD9dYiXisKy1hesYiFYP5iWkl0mkfFxbRw/kX7tYQKi2ZMmiazl04VPwKQhTGMPgGsMoxDyIAWEgBzQKZHtU9qHKmXXsfMZaB/UYA5klvtOGO3Wtbogn3FGZljJPYeqEMnsIplLIPyG3TWbtjbHCtEvreAyI8X7T5d82IoRCQKrSfq8I68sPyqP0kKzz2z9h2NMJV1CErVWiYRikRN/Ito5uIGdqtEwAZOwyz1VxISq6BePmHzhYUCiIEMRPYobqEQRAaQb4k7zcjFqRB8sQjgUjQHmd5+VhgApFMER1eIrZZOvKNnjI5mkW3kI4SqxipGJljuE2r1MOi/wCVwtsZVITJbl2KYfHUrE4rREaItTNxZZmMcsOudqoqTmbukylOdq5THmQXKQ/yqAmoAblHgYu4fHRE3B40Z2IsxRbnGpJTTJAXD6OKJypvY85hQb2yruREqx2JjiAHEhusyWHpqcBKY2iRiXiWK0EguLqDHuC9rHFspeJCaLg3E1lQknQrITZapBw0kuU4hsMqvDtIxy/eJgAAZVc6qh9uJh1Oj0jeA/EygOUJRj0U6YG8RwJiOUSB0S4dt3t1Y6x8crmOo1UrqrkQIqzqNbiolZyVQpUzNH8sxZISss3VL8oorrKpjvty8R1UdMDq9OIjIWNTIbpSMpDgQtDRLwABzqTwJJI4FPof2rHWJ5BDHlVgX+RMngikVrirGyLR5MsAMUxEF7pOnH7fx9GAcgcx5FUHO37bc47axEpFewFkHJqiEx3DTzNhXQVSdx+CsduXrGkNRIIHQ+97AoZKfyLIJCACYroyMeBhMBWvLsOiJ4kZFxsKxbRkQxaRsezSIg1ZMkE2zZuimUCppJIpFKQhCFDYAAOAaIs/REaIjRFwl7orO6sWokeOIOxwyxn1Zs7ApBkIOQEgpmMUigCk9jnif03bRXdFyiIlMHgIETXp93l2MdenWPt9k70sgblQsOOLhXGkDIeIFXPDWtRrJwyiobGOn1XKaZhECGEoBoi8tsa54ygQrCwPUO37HypBI+gqZMJTeU7A3U/dZyl6bt2zGrNDk+Q6cQkVdQg8XIDoicljTEePcRQhIGg1qPgmnOZZ0uikCkjJO1P330pIq872RfOTcVFllDqKDxMYR46IlJ0RGiI0RGiI0RGiI0RGiI0RGiI0RGiL/9k=",alt:"\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"}),Object(S.jsx)("div",{className:"reccomend-slide--addons-title",children:"\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"})]})}):null,p.map((function(e){return Object(S.jsx)(Yt.b,{className:"reccomend-slide reccomend-slide--mini",children:Object(S.jsx)(Jt,{product:e,onProductClick:f})},e.id)}))]})]}),O.length&&l&&t.current?Object(S.jsx)($t.a,{container:t.current,children:Object(S.jsx)("div",{className:"minicart--addons-backdrop ".concat(l&&"active"," ").concat(b&&"no-animate"),children:Object(S.jsx)(en.a,{onClickAway:v,children:Object(S.jsxs)("div",{className:"minicart--addon-products-modal ".concat(l&&"active"," ").concat(b&&"no-animate"),children:[Object(S.jsx)(pe.a,{color:"inherit",onClick:v,className:"minicart--addon-products__minicart-close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("div",{className:"minicart--addon-products__minicart-title",children:"\u0421\u043e\u0443\u0441\u044b \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"}),Object(S.jsx)("div",{className:"popup-addons-wrapper",children:O.map((function(e){return Object(S.jsx)("div",{children:Object(S.jsx)(Xt,{product:e,miniCartAddonOpen:l},e.id)},e.id)}))})]})})})}):null]})}var nn=n(481),cn=n(4),an=n(14),rn={items:{},bonusProduct:{},totalRolls:0,freeAddons:{},promocode:{},promocodeProducts:{},conditionalPromocode:null,discount:0,subTotalPrice:0,countItems:0,totalPrice:0},on=function(e){return e.reduce((function(e,t){return e+parseInt(t.options._price)}),0)},sn=function(e){return e.reduce((function(e,t){return e+t.totalPrice}),0)},ln=function(e){return Math.ceil(e.reduce((function(e,t){return t.options._promocode_price||0===t.options._promocode_price?e+parseInt(t.options._promocode_price):e+parseInt(t.options._price)}),0))},dn=function(e,t){return e.reduce((function(e,t){return isNaN(parseInt(t.options.count_rolls))||t.options._promocode_price||0==t.options._promocode_price?e:e+parseInt(t.options.count_rolls)}),0)},un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_PROMOCODE":switch(t.payload.type){case"percent":var n=function(){var n,c=(100-t.payload.amount)/100;if(t.payload.excludeCategories&&t.payload.categories.length)for(var a in n=Object(I.a)({},e.items))n[a].items.forEach((function(e,n,a){var r,i;(null===(r=t.payload.categories)||void 0===r?void 0:r.some((function(t){var n;return null===(n=e.categories)||void 0===n?void 0:n.includes(t)})))||(e.options._sale_price||(null===(i=e.variant)||void 0===i?void 0:i._sale_price))&&t.payload.excludeSaleProduct?a[n]=e:a[n]=Object(I.a)(Object(I.a)({},e),{},{options:Object(I.a)(Object(I.a)({},e.options),{},{_promocode_price:e.options._price*c})})})),n[a].totalPrice=ln(n[a].items);else if(!t.payload.excludeCategories&&t.payload.categories.length)for(var r in n=Object(I.a)({},e.items))n[r].items.forEach((function(e,n,a){var r,i;!(null===(r=t.payload.categories)||void 0===r?void 0:r.some((function(t){var n;return null===(n=e.categories)||void 0===n?void 0:n.includes(t)})))||(e.options._sale_price||(null===(i=e.variant)||void 0===i?void 0:i._sale_price))&&t.payload.excludeSaleProduct?a[n]=e:a[n]=Object(I.a)(Object(I.a)({},e),{},{options:Object(I.a)(Object(I.a)({},e.options),{},{_promocode_price:e.options._price*c})})})),n[r].totalPrice=ln(n[r].items);else for(var i in n=Object(I.a)({},e.items))n[i].items.forEach((function(e,n,a){var r;(e.options._sale_price||(null===(r=e.variant)||void 0===r?void 0:r._sale_price))&&t.payload.excludeSaleProduct?a[n]=e:a[n]=Object(I.a)(Object(I.a)({},e),{},{options:Object(I.a)(Object(I.a)({},e.options),{},{_promocode_price:e.options._price*c})})})),n[i].totalPrice=ln(n[i].items);var o=[].concat.apply([],Object.values(n).map((function(e){return e.items}))),s=[].concat.apply([],Object.values(n)),l=sn(s),d=on(o),u=d-l;return{v:Object(I.a)(Object(I.a)({},e),{},{items:n,discount:u,promocode:t.payload,totalPrice:l,subTotalPrice:d})}}();if("object"===typeof n)return n.v;case"fixed_cart":var c=t.payload.amount,a=[].concat.apply([],Object.values(e.items).map((function(e){return e.items}))),r=on(a);return Object(I.a)(Object(I.a)({},e),{},{discount:c,promocode:t.payload,subTotalPrice:r,totalPrice:r-c});case"fixed_product":var i=t.payload.promocodeProducts.options._price-t.payload.productPrice;t.payload.promocodeProducts.options._promocode_price=t.payload.productPrice;var o=e.subTotalPrice+parseFloat(t.payload.promocodeProducts.options._price),s=e.totalPrice+parseFloat(t.payload.productPrice);return Object(I.a)(Object(I.a)({},e),{},{discount:i,promocode:t.payload,promocodeProducts:t.payload.promocodeProducts,totalPrice:s,subTotalPrice:o})}case"REMOVE_PROMOCODE":var l=Object(I.a)({},e.items);for(var d in l)l[d].items.forEach((function(e,t,n){delete n[t].options._promocode_price})),l[d].totalPrice=ln(l[d].items);var u=[].concat.apply([],Object.values(l).map((function(e){return e.items}))),j=on(u),b=dn(u);return Object(I.a)(Object(I.a)({},e),{},{items:l,totalRolls:b,discount:0,promocode:{},promocodeProducts:{},totalPrice:j,subTotalPrice:j});case"COMPLETELY_REMOVE_PROMOCODE":var m=Object(I.a)({},e.items);for(var p in m)m[p].items.forEach((function(e,t,n){delete n[t].options._promocode_price})),m[p].totalPrice=ln(m[p].items);var O=[].concat.apply([],Object.values(m).map((function(e){return e.items}))),h=on(O),v=dn(O);return Object(I.a)(Object(I.a)({},e),{},{items:m,totalRolls:v,discount:0,promocode:{},promocodeProducts:{},conditionalPromocode:null,totalPrice:h,subTotalPrice:h});case"ADD_BONUS_PRODUCT_TO_CART":return Object(I.a)(Object(I.a)({},e),{},{bonusProduct:t.payload});case"ADD_PRODUCT_TO_CART":var f,x,g,_,y=J(t.payload);if("percent"===e.promocode.type){var w,N,C,k,P,S,E,F,T,A;if(y.modificatorsAmount&&(y.options._price+=y.modificatorsAmount),(null===(w=e.promocode)||void 0===w||null===(N=w.categories)||void 0===N?void 0:N.length)&&(null===(C=e.promocode)||void 0===C?void 0:C.excludeCategories))(null===(E=e.promocode)||void 0===E||null===(F=E.categories)||void 0===F?void 0:F.some((function(e){return t.payload.categories.includes(e)})))||(t.payload.options._sale_price||(null===(T=t.payload.variant)||void 0===T?void 0:T._sale_price))&&e.promocode.excludeSaleProduct||(y.options=Object(I.a)(Object(I.a)({},y.options),{},{_promocode_price:y.options._price*(100-e.promocode.amount)/100}));else if((null===(k=e.promocode)||void 0===k||null===(P=k.categories)||void 0===P?void 0:P.length)&&!(null===(S=e.promocode)||void 0===S?void 0:S.excludeCategories)){var M,D,G;!(null===(M=e.promocode)||void 0===M||null===(D=M.categories)||void 0===D?void 0:D.some((function(e){return t.payload.categories.includes(e)})))||(t.payload.options._sale_price||(null===(G=t.payload.variant)||void 0===G?void 0:G._sale_price))&&e.promocode.excludeSaleProduct||(y.options=Object(I.a)(Object(I.a)({},y.options),{},{_promocode_price:y.options._price*(100-e.promocode.amount)/100}))}else if(Object.keys(e.promocode).length){var R;(t.payload.options._sale_price||(null===(R=t.payload.variant)||void 0===R?void 0:R._sale_price))&&e.promocode.excludeSaleProduct||(y.options=Object(I.a)(Object(I.a)({},y.options),{},{_promocode_price:y.options._price*(100-e.promocode.amount)/100}))}A=e.items[t.payload.id]?[].concat(Object(an.a)(e.items[t.payload.id].items),[y]):[y];var B,L=Object(I.a)(Object(I.a)({},e.items),{},Object(cn.a)({},t.payload.id,{items:A,totalPrice:ln(A)})),U=[].concat.apply([],Object.values(L).map((function(e){return e.items}))),z=[].concat.apply([],Object.values(L)),H=sn(z),W=on(U);"fixed_cart"===e.promocode.type?H-=B=parseInt(e.promocode.amount):B=W-H;var V=dn(U);return Object(I.a)(Object(I.a)({},e),{},{items:L,discount:B,totalRolls:V,countItems:U.length,totalPrice:H,subTotalPrice:W})}if(y.modificatorsAmount&&(y.options._promocode_price&&(y.options._promocode_price+=y.modificatorsAmount),y.options._price+=y.modificatorsAmount),t.payload.variant)if(e.items[t.payload.id])(_=Object(an.a)(e.items[t.payload.id].items)).push(y),g=_;else g=[y];else delete y.options._promocode_price,g=e.items[t.payload.id]?[].concat(Object(an.a)(e.items[t.payload.id].items),[y]):[y];var Z=Object(I.a)({},e.items);Z[t.payload.id]={items:g,totalPrice:ln(g)};var Q=[].concat.apply([],Object.values(Z).map((function(e){return e.items}))),q=[].concat.apply([],Object.values(Z)),Y=sn(q);(null===(f=e.promocodeProducts)||void 0===f?void 0:f.id)&&(Y+=parseFloat(e.promocode.productPrice));var K,X=on(Q);(null===(x=e.promocodeProducts)||void 0===x?void 0:x.id)&&(X+=parseFloat(e.promocodeProducts.options._price)),"fixed_cart"===e.promocode.type?Y-=K=parseInt(e.promocode.amount):K="fixed_product"===e.promocode.type?e.promocode.promocodeProducts.options._price-e.promocode.productPrice:X-Y;var $=dn(Q);return Object(I.a)(Object(I.a)({},e),{},{items:Z,discount:K,totalRolls:$,countItems:Q.length,totalPrice:Y,subTotalPrice:X});case"DECREASE_PRODUCT_IN_CART":var ee,te,ne,ce=Object(an.a)(e.items[t.payload.id].items),ae=Object(an.a)(e.items[t.payload.id].items);if(null===(ee=t.payload.choosenModificators)||void 0===ee?void 0:ee.length)ae.length>1&&ae.pop();else{var re=function(){for(var e=ae.length-1;e>=0;e--){var t;if(!(null===(t=ae[e].choosenModificators)||void 0===t?void 0:t.length))return e}return-1},ie=re();ae.splice(ie,1)}var oe=Object(I.a)(Object(I.a)({},e.items),{},Object(cn.a)({},t.payload.id,{items:ae,totalPrice:ln(ae)}));1===ce.length&&delete oe[t.payload.id];var se,le=[].concat.apply([],Object.values(oe).map((function(e){return e.items}))),de=[].concat.apply([],Object.values(oe)),ue=sn(de),je=on(le);(null===(te=e.promocodeProducts)||void 0===te?void 0:te.id)&&(ue+=parseFloat(e.promocode.productPrice)),(null===(ne=e.promocodeProducts)||void 0===ne?void 0:ne.id)&&(je+=parseFloat(e.promocodeProducts.options._price)),"fixed_cart"===e.promocode.type?ue-=se=parseInt(e.promocode.amount):se=je-ue;var be=dn(le);return Object(I.a)(Object(I.a)({},e),{},{items:oe,totalRolls:be,countItems:le.length,discount:se,totalPrice:ue,subTotalPrice:je});case"REMOVE_PRODUCT_FROM_CART":var me,pe,Oe=Object(I.a)({},e.items);if(t.payload.disabled)delete Oe[t.payload.id];else if(t.payload.variant){var he=function(e){for(var n=e.length-1;n>=0;n--)if(e[n].variant.variant_id===t.payload.variant.variant_id)return n;return-1},ve=he(Object.values(Oe[t.payload.id].items));t.payload.productIndex||0==t.payload.productIndex?Oe[t.payload.id].items.splice(t.payload.productIndex,1):Oe[t.payload.id].items.splice(ve,1),Oe[t.payload.id].totalPrice=ln(Oe[t.payload.id].items),Oe[t.payload.id].items.length||delete Oe[t.payload.id]}else if(null===(me=t.payload.choosenModificators)||void 0===me?void 0:me.length)Oe[t.payload.id].items.splice(t.payload.productIndex,1),Oe[t.payload.id].totalPrice=ln(Oe[t.payload.id].items),Oe[t.payload.id].items.length||delete Oe[t.payload.id];else if(null===(pe=Oe[t.payload.id])||void 0===pe?void 0:pe.items.find((function(e){var t;return null===(t=e.choosenModificators)||void 0===t?void 0:t.length}))){var fe=Oe[t.payload.id].items.filter((function(e){var t;return null===(t=e.choosenModificators)||void 0===t?void 0:t.length}));Oe[t.payload.id].items=fe,Oe[t.payload.id].totalPrice=ln(Oe[t.payload.id].items)}else delete Oe[t.payload.id];var xe,ge=[].concat.apply([],Object.values(Oe).map((function(e){return e.items}))),_e=[].concat.apply([],Object.values(Oe)),ye=sn(_e),we=on(ge);"fixed_cart"===e.promocode.type?ye-=xe=parseInt(e.promocode.amount):xe=we-ye;var Ne=dn(ge);return Object(I.a)(Object(I.a)({},e),{},{items:Oe,totalRolls:Ne,countItems:ge.length,discount:xe,totalPrice:ye,subTotalPrice:we});case"CLEAR_CART":return rn;case"SET_CONDITIONAL_PROMOCODE":return Object(I.a)(Object(I.a)({},e),{},{conditionalPromocode:t.payload});case"CLEAR_CONDITIONAL_PROMOCODE":return Object(I.a)(Object(I.a)({},e),{},{conditionalPromocode:null});case"CHANGE_PROMOCODE_PRODUCT_PRICE":if("fixed_product"===!e.promocode.type||!e.promocodeProducts.id)return e;var Ce="self"!==t.payload&&"inRestoraunt"!==t.payload||!e.promocode.productSelfDeliveryPrice?parseFloat(e.promocode.productPrice):parseFloat(e.promocode.productSelfDeliveryPrice),ke=Object(I.a)({},e.promocodeProducts);ke.options._promocode_price=Ce;var Ie=e.promocodeProducts.options._price-Ce,Pe=[].concat.apply([],Object.values(e.items).map((function(e){return e.items}))),Se=[].concat.apply([],Object.values(e.items)),Ee=sn(Se)+Ce,Fe=on(Pe)+parseFloat(e.promocodeProducts.options._price);return Object(I.a)(Object(I.a)({},e),{},{promocodeProducts:ke,totalPrice:Ee,subTotalPrice:Fe,discount:Ie});case"CLEAN_STORE":return Object(I.a)({},rn);default:return e}},jn=function(){var e=Object(w.d)(),t=Object(w.e)((function(e){var t=e.products,n=e.cart;return{bonuses_items:t.bonuses_items,cartProducts:n.items,promocode:n.promocode,conditionalPromocode:n.conditionalPromocode,productCategories:t.categories,cartBonusProduct:n.bonusProduct}}),w.c),n=t.bonuses_items,c=t.promocode,a=t.conditionalPromocode,r=t.cartProducts,i=t.productCategories,o=t.cartBonusProduct,s=Object(w.e)((function(e){return e.config.data}),w.c),l=s.CONFIG_free_products_program_status,d=s.CONFIG_promocode_with_bonus_program,u=s.CONFIG_bonuses_not_allowed_categories,j=s.CONFIG_bonuses_not_allowed_categories_hardmode,b=s.CONFIG_bonuses_use_limit_time,m=s.CONFIG_bonuses_start_active,p=s.CONFIG_bonuses_end_active,O=s.CONFIG_bonuses_days,h="on"===l,v=[].concat.apply([],Object.values(r).map((function(e){return e.items}))),f=v.filter((function(e){var t;if((null===u||void 0===u?void 0:u.length)&&(null===(t=e.categories)||void 0===t?void 0:t.some((function(e){return u.includes(e)}))))return!1;return!0})),g="yes"===j&&!!v.find((function(e){var t;if((null===u||void 0===u?void 0:u.length)&&(null===(t=e.categories)||void 0===t?void 0:t.some((function(e){return u.includes(e)}))))return!0;return!1})),_=null===u||void 0===u?void 0:u.map((function(e){var t=i.find((function(t){return t.term_id===e}));return t?"\xab".concat(t.name,"\xbb"):""})).filter((function(e){return e})),y=on(f),N=!1;b&&O&&O.length&&(0==O[0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1]&&(N=!0));var C=b&&!te(m,p),k="on"!==l||!n||!n.length||N||C,I="on"!==d&&(!!Object.keys(c).length||!!a);return Object(x.useEffect)((function(){o.id&&g&&e(vt({}))}),[g]),Object(x.useEffect)((function(){o.id&&o.limit>y&&e(vt({}))}),[y]),Object(x.useEffect)((function(){o.id&&I&&e(vt({}))}),[c,I]),Object(x.useEffect)((function(){o.id&&k&&e(vt({}))}),[k]),Object(x.useEffect)((function(){if(o.id&&n){var t=n.find((function(e){return e.id===o.id}));t?(t.limit>y||t.title!==o.title)&&(e(vt({})),e(Ut({open:!0,message:"\u0411\u043e\u043d\u0443\u0441\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \xab".concat(o.title,"\xbb \u0443\u0434\u0430\u043b\u0435\u043d \u0438\u0437 \u043a\u043e\u0440\u0437\u0438\u043d\u044b, \u0442.\u043a. \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0430\u043a\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c.")}))):(e(vt({})),e(Ut({open:!0,message:"\u0411\u043e\u043d\u0443\u0441\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \xab".concat(o.title,"\xbb \u0443\u0434\u0430\u043b\u0435\u043d \u0438\u0437 \u043a\u043e\u0440\u0437\u0438\u043d\u044b, \u0442.\u043a. \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043a\u0446\u0438\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c.")})))}}),[n]),{cartBonusProduct:o,cartTotalPrice:y,programStatus:h,bonusesHardmode:j,disabledCategories:u,disabledCategoriesNames:_,bonusesDisabled:k,bonusesDisabledByCategory:g,bonusesDisabledByPromocode:I}};function bn(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(w.e)((function(e){return e.products.bonuses_items})),n=Object(w.e)((function(e){return e.cart.bonusProduct})),c=jn(),a=c.cartTotalPrice,r=c.disabledCategoriesNames,i=c.bonusesDisabled,o=c.bonusesDisabledByCategory,s=c.bonusesDisabledByPromocode;return i?null:Object(S.jsx)("div",{children:t.length?Object(S.jsxs)("div",{className:"cart--bonuses-products",children:[Object(S.jsx)("h2",{className:"bonuses-products--title",children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0430\u0440\u043e\u043a"}),s?Object(S.jsx)(Ht.a,{severity:"info",className:"custom-alert",sx:{mb:2,mr:2,ml:2},children:"\u0411\u043e\u043d\u0443\u0441\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0430."}):"",o?Object(S.jsxs)(Ht.a,{severity:"info",sx:{mb:2,mr:2,ml:2},className:"custom-alert",children:["\u0422\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:"," ",r.join(", ")," \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0448\u043a\u0430\u043b\u043e\u0439 \u043f\u043e\u0434\u0430\u0440\u043a\u043e\u0432."]}):null,Object(S.jsx)(nn.a,{name:"bonusesProducts",value:Object.keys(n).length?n.id:"",children:Object(S.jsx)(ot.a,{container:!0,spacing:2,children:Object.values(t).map((function(t){return Object(S.jsx)(Tr,{product:t,cartTotalPrice:a,bonusesDisabledByCategory:o,bonusesDisabledByPromocode:s,minicart:e},t.id)}))})})]}):""})}function mn(){var e=Object(w.d)(),t=Object(w.e)((function(e){return e.cart.promocodeProducts})),n=Object(w.e)((function(e){return e.cart.promocode})),c={};return t.attributes&&Object.values(t.attributes).forEach((function(e,t){c[t]=e.name})),Object(S.jsxs)("div",{className:"minicart--product","data-product-id":t.id,children:[Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:t.img?t.img:It,alt:t.title})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsx)("div",{className:"minicart--product-name",children:t.title}),Object(S.jsxs)("div",{className:"minicart--product-description",children:["variations"===t.type?Object(S.jsx)("div",{className:"minicart--product-attributes",children:Object.values(t.variant.attributes).map((function(e,t){return Object(S.jsxs)("div",{className:"minicart--product-attribute",children:[c[t],": ",e]},t)}))}):null,"variations"===t.type?t.variant.weight&&Object(S.jsxs)("div",{className:"weight",children:[t.variant.weight," \u0433\u0440."]}):Object(S.jsxs)("div",{children:[t.options.weight?Object(S.jsxs)("div",{className:"weight",children:[t.options.weight," \u0433\u0440."]}):"",t.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[t.options.count_rolls," ","\u0448\u0442."]}):""]}),Object(S.jsxs)("div",{className:"promocode-name",children:[" ","\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \xab",n.code,"\xbb"]})]}),Object(S.jsx)("div",{className:"minicart--product-remove",onClick:function(){e({type:"COMPLETELY_REMOVE_PROMOCODE"})},"data-product-id":t.id,children:Object(S.jsx)(_e.a,{})})]})]}),Object(S.jsxs)("div",{className:"minicart--product-result",children:[Object(S.jsx)(Wt,{oldPrice:"variations"===t.type&&t.variant?t.variant.price:t.options._price,price:t.options._promocode_price}),Object(S.jsxs)("div",{className:"minicart--product-quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(){e({type:"COMPLETELY_REMOVE_PROMOCODE"})},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:1,"data-product-id":t.id}),Object(S.jsx)(de.a,{className:"btn--default product-add btn-buy",disabled:!0,children:"+"})]})]})]})}var pn,On,hn,vn,fn=n(122),xn=n(438),gn=n(79),_n=n(8),yn=["className"],wn=Object(_n.a)((function(e){var t=e.className,n=Object(fn.a)(e,yn);return Object(S.jsx)(xn.a,Object(I.a)(Object(I.a)({},n),{},{arrow:!0,classes:{popper:t}}))}))((function(e){var t,n=e.theme;return t={},Object(cn.a)(t,"& .".concat(gn.a.arrow),{color:n.palette.common.black}),Object(cn.a)(t,"& .".concat(gn.a.tooltip),{backgroundColor:n.palette.common.black}),t})),Nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,c=Object(w.e)((function(e){return Object.values(e.cart.items)})),a=Object(w.e)((function(e){return e.cart.promocode})),r=Object(w.e)((function(e){return e.cart.bonusProduct})),i=Object(w.e)((function(e){return e.cart.subTotalPrice})),o=Object(w.e)((function(e){return e.cart.totalPrice})),s=Object(w.e)((function(e){var t=e.config.data.bonusProgramm;return{programStatus:"active"===t.status,deliveryCashback:t.deliveryPercent,selfDeliveryCashback:t.selfDeliveryPercent,specifiedCategories:t.categories,excludeCategories:"yes"===t.excludeCategories,allowWithPromocode:"active"===t.allowPromocode,allowWithBonusProduct:"active"===t.allowBonusProduct,allowWithDiscountProducts:"active"===t.allowSaleProduct,allowWithBonuses:"active"===t.allowWithBonuses}})),l=s.programStatus,d=s.deliveryCashback,u=s.selfDeliveryCashback,j=s.specifiedCategories,b=s.excludeCategories,m=s.allowWithPromocode,p=s.allowWithBonusProduct,O=s.allowWithDiscountProducts,h=s.allowWithBonuses,v=0,f=!m&&a.code,x=!p&&r.id,g=!h&&e,_=f||x||g;!_&&l&&c.forEach((function(e){if((null===j||void 0===j?void 0:j.length)&&b){if(e.items[0].categories.find((function(e){return j.includes(e)})))return}else if((null===j||void 0===j?void 0:j.length)&&!e.items[0].categories.some((function(e){return j.includes(e)})))return;e.items.forEach((function(e){var c;if(O||!(e.options._sale_price&&parseInt(e.options._regular_price)>parseInt(e.options._sale_price)||(null===(c=e.variant)||void 0===c?void 0:c._sale_price)))if((null===a||void 0===a?void 0:a.code)||t){var r=0;if(t&&n&&("fixed"===n.type?r=t/o:"percent"===n.type&&ne(n,e)&&(r=n.amount/100)),"fixed_cart"===a.type){var s=a.amount/i;v+=parseInt(e.options._price)*(1-s)*(1-r)}else("percent"===a.type||"fixed_product"===a.type)&&e.options._promocode_price>=0?v+=Math.ceil(e.options._promocode_price)*(1-r):v+=parseInt(e.options._price)*(1-r)}else v+=parseInt(e.options._price)}))}));var y=Math.floor(v*(d/100)),N=Math.floor(v*(u/100));return{deliveryAccruedBonuses:y,selfDeliveryAccruedBonuses:N,disabledByPromocode:f,disabledByBonusProduct:x,disabledByUsedBonuses:g}},Cn=n(243),kn=n.n(Cn),In=function(e){var t=e.handleCloseMiniCart,n=k().navigateTo,c=Object(w.e)((function(e){return e.config.data.bonusProgramm.paymentPercent})),a=Nn(),r=a.deliveryAccruedBonuses,i=a.selfDeliveryAccruedBonuses,o=Object(x.useState)(!1),s=Object(Ve.a)(o,2),l=s[0],d=s[1],u=i&&r?Object(S.jsxs)("div",{children:["\u041d\u0430\u0447\u0438\u0441\u043b\u0438\u043c"," ",Object(S.jsxs)("span",{className:"main-color",children:["+",i]})," ","\u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430\u0432\u044b\u043d\u043e\u0441 \u0438\u043b\u0438"," ",Object(S.jsxs)("span",{className:"main-color",children:["+",r]})," \u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443."]}):i?Object(S.jsxs)("div",{children:["\u041d\u0430\u0447\u0438\u0441\u043b\u0438\u043c"," ",Object(S.jsxs)("span",{className:"main-color",children:["+",i]})," ","\u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430\u0432\u044b\u043d\u043e\u0441."]}):r?Object(S.jsxs)("div",{children:["\u041d\u0430\u0447\u0438\u0441\u043b\u0438\u043c"," ",Object(S.jsxs)("span",{className:"main-color",children:["+",r]})," \u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443."]}):null;return Object(S.jsxs)("div",{className:"mini-cart-bonuses",children:[Object(S.jsxs)("div",{className:"mini-cart-bonuses--title",children:[Object(S.jsx)("span",{children:"\u041d\u0430\u0447\u0438\u0441\u043b\u0438\u043c \u0431\u043e\u043d\u0443\u0441\u044b"}),Object(S.jsx)(wn,{placement:"top",enterTouchDelay:0,leaveTouchDelay:5e3,open:l,onClose:function(){d(!1)},onOpen:function(){d(!0)},title:Object(S.jsxs)("div",{className:"mini-cart-bonuses--tooltip",children:[Object(S.jsx)("div",{children:u}),Object(S.jsxs)("div",{children:["\u0411\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0434\u043e"," ",Object(S.jsxs)("span",{className:"main-color",children:[c,"%"]})," ","\u043e\u0442 \u043e\u0431\u0449\u0435\u0439 \u0441\u0443\u043c\u043c\u044b \u0437\u0430\u043a\u0430\u0437\u0430."]}),Object(S.jsx)("div",{onClick:function(){t(),n("/bonuses")},className:"mini-cart-bonuses--tooltip-more",children:"\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})]}),children:Object(S.jsx)(kn.a,{onClick:function(){d(!0)}})})]}),Object(S.jsxs)("span",{className:"main-color",children:["+",r||i]})]})},Pn=n(172),Sn=n.n(Pn),En=function(e){var t,n,c=e.handleCloseMiniCart,a=e.handleMakeOrder,r=Object(w.e)((function(e){return e.config.data})),i=Object(w.e)((function(e){return e.cart.discount})),o=Object(w.e)((function(e){return e.cart.totalPrice})),s=Object(w.e)((function(e){return e.cart.subTotalPrice})),l=Object(w.e)((function(e){return e.cart.promocode})),d=Object(w.e)(zt);return Object(S.jsxs)("div",{className:"minicart--total-wrapper",children:[ie(r)&&Object(S.jsx)("div",{className:"minicart--promocode",children:Object(S.jsx)(Lc,{})}),i||"active"===(null===(t=r.bonusProgramm)||void 0===t?void 0:t.status)?Object(S.jsxs)("div",{className:"minicart--subtotal-price",children:[i?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"price",children:["\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430"," ",Object(S.jsxs)("span",{className:"money",children:[s.toLocaleString("ru-RU")," ","\u20bd"]})]}),Object(S.jsxs)("div",{className:"promocode",children:[Object(S.jsxs)("span",{children:["\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434"," ",Object(S.jsx)("span",{className:"main-color",children:l.code})]}),Object(S.jsxs)("span",{className:"money main-color",children:["-",i.toLocaleString("ru-RU")," ","\u20bd"]})]})]}):null,"active"===(null===(n=r.bonusProgramm)||void 0===n?void 0:n.status)?Object(S.jsx)(In,{handleCloseMiniCart:c}):null]}):null,Object(S.jsx)(Oe.a,{className:"minicart--total-divider",sx:{mb:"10px"}}),Object(S.jsxs)("div",{className:"minicart--total-block",children:[Object(S.jsx)("span",{className:"minicart--total-title",children:"\u0418\u0442\u043e\u0433\u043e"}),Object(S.jsxs)("span",{className:"minicart--total-price",children:[o.toLocaleString("ru-RU")," \u20bd"]})]}),Object(S.jsxs)(de.a,{variant:"button",onClick:a,className:"btn--action openCheckout",disabled:d,sx:{mt:2},children:["\u041a \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u0437\u0430\u043a\u0430\u0437\u0430",Object(S.jsx)(Sn.a,{className:"button-arrow-icon"})]})]})},Fn=function(){var e=Object(w.e)((function(e){return e.products.items})),t=Object(w.e)((function(e){return e.cart.items}));return Object.keys(t).map((function(n,c){if(e[n]&&void 0!==e[n].type&&"variations"===e[n].type)return t[n].items.map((function(e,c){return Object(S.jsx)(kc,{disabled:t[n].disabled,productIndex:c,productCart:t[n].items[c],productCount:1,productTotalPrice:t[n].totalPrice},c)}));var a,r=null===(a=t[n].items)||void 0===a?void 0:a.filter((function(e){var t;return!(null===(t=e.choosenModificators)||void 0===t?void 0:t.length)})),i=ln(r),o=!1;return t[n].items.map((function(e,c){var a;return(null===(a=e.choosenModificators)||void 0===a?void 0:a.length)?Object(S.jsx)(kc,{disabled:t[n].disabled,productIndex:c,productCart:e,productCount:1,productTotalPrice:e.options._promocode_price?Math.ceil(e.options._promocode_price):e.options._price},c):o?void 0:(o=!0,Object(S.jsx)(kc,{disabled:t[n].disabled,productIndex:c,productCart:e,productCount:r.length,productTotalPrice:i},c))}))}))},Tn=n(173),An=n.n(Tn),Mn=function(){var e=Object(w.d)(),t=Me().mectricOpenCart,n=Object(w.e)((function(e){return e.cart.totalPrice})),c=Object(w.e)((function(e){return e.cart.countItems}));return Object(S.jsxs)("button",{className:"btn--action minicart openMiniCart",onClick:function(){window.location.hash="minicart-sidebar",t(),e({type:"OPEN_MINI_CART"})},style:{height:window.fullWidthSite?"40px":"auto",marginLeft:window.fullWidthSite?"12px":"0"},children:[Object(S.jsx)(An.a,{className:"minicart--cart-icon"}),Object(S.jsx)("div",{className:"minicart--separator"}),Object(S.jsxs)("div",{className:"minicart--topcart--total",children:[Object(S.jsxs)("span",{className:"minicart--topcart--count-item",children:[c," ",Z(c,["\u0442\u043e\u0432\u0430\u0440","\u0442\u043e\u0432\u0430\u0440\u0430","\u0442\u043e\u0432\u0430\u0440\u043e\u0432"])]}),Object(S.jsxs)("span",{className:"minicart--topcart--price-total",children:[n.toLocaleString("ru-RU")," \u20bd"]})]})]})},Dn=["title","titleId"];function Gn(){return(Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Rn(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Bn(e,t){var n=e.title,c=e.titleId,a=Rn(e,Dn);return x.createElement("svg",Gn({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:"250px",height:"250px",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 16000 16000",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,pn||(pn=x.createElement("defs",null,x.createElement("style",null,".fil0{fill:currentColor}"))),x.createElement("g",{id:"\\u0421\\u043B\\u043E\\u0439_x0020_1"},On||(On=x.createElement("path",{className:"fil0",d:"M12515.54 10678.96c481.11-318.78 643.28-543.24 982.43-949.43 112.64-134.9 303.88-404.91 542.11-410.48 259.14-6.06 438.94 288.59 363.29 573.16-210.17 790.65-1162.43 1600.5-2040.26 1789.15 101.27-420.45 127.46-534.24 152.43-1002.4m-605.2-1232.82c96.48 256.27 231.58 975.18 240.79 1301.79 24.98 885.39-411.62 1539.04-1185.61 1901.59-295.44 138.39-838.96 313.92-1202.45 358.5 58.69-122.09 157.37-236.74 227.21-355.97 55.79-95.25 144.87-271.89 204.96-352.5 79.1-205.94 248.47-369.8 175.3-612.51-73.7-36.05-116.23-50.43-232.22-38.67-177.57 220.39-778.47 1697.09-1620.25 1912.88-531.32 136.2-644.79-599.77-670.86-1066.22-6.4-114.64 14.69-316.25-52.99-397-88.41-105.5-252.91-59.09-295.69 45.75-24.38 59.77-50.86 634.23-83.5 793.32-290.41 1415.3-1358.56 161.35-1778.8-481.48-272.54-416.89-345.54-814.74-541.29-814.88-526.82-.38 344.08 1145.2 457.07 1364.43-470.51-58.76-1176.05-305.34-1507.43-519.32-344.58-222.5-694.09-628.94-820.07-1163.82-220.41-935.83 279.19-1819.85 293.12-2585.5 6.73-370.08-101.4-546.07-157.73-859.51 209.67-3.89 414.97-2.8 624.12 15.43 237.33 20.69 373.43 32.7 341.92-250.32-229.89-188.21-726.71-114.75-1056.51-124.9-42.55-71.17-90.66-277.8-52.92-355.87 191.41 24.49 894.72 220.79 997.26 165.19 63.46-34.42 107.95-113.22 75.36-216.38-60.55-191.69-499.26-135.64-667.8-260.13l-418.96-60.11c-55.85-447.37 212.73-1265 321-1669.9 41.16-605.63-134.75-1435.98 115.21-2206.43 294.34-907.26 981.44-331.68 1382.51-4.39 467.47 381.48 325.2 459.89 692.76 279.76 902.29-442.17 1840.57-649.26 2856.99-390.12 1436.59 366.27 1053.51 745.17 1593.57 236.23 194.34-183.14 380.68-371.86 659.61-504.79 392.12-186.88 611.83-123.14 778.52 200.82 249.32 484.59 241.39 1500.79 200.19 2097-34.64 501.35 392.26 1346.83 321.78 1966.09-245.37 35.1-452.86 75.29-690.82 131.06-260.62 61.09-467.8 55.44-390.09 367.32 101.06 138.42 636.93-87.18 1084-130.73l-72.79 352.72c-241.75 18.16-985.47-55.73-1057.23 146.12-122.98 345.95 450.7 206.31 961.81 216.38-158.76 838.6-249.04 517.57-49.05 1569.07M3137.12 3761.51l4.53 1354.03c-53.33 177.62-98.6 319.48-147.55 514.06-46.14 183.41-73.56 330.92-106.48 528.6-28.69 172.29-68.04 415.03-68.04 593.52-119.67-2.67-105.16-26.47-238.16-26.47-217.66 0-1349.56-50.57-1349.56 211.7 0 179.54 8.12 105.28 79.39 211.7 333.47 0 667.4-52.93 1111.4-52.93 176 0 229.06 26.46 396.93 26.46 20.64 88.6 52.92 320.66 52.92 423.4-335.27 0-753.1 101.87-1042.92 174.32-213.94 53.48-578.43 123.22-560.28 321.3 26.68 291.12 386.51 116.83 533.26 75.07 128.52-36.57 240.74-61.06 360.55-89.3 230.03-54.24 546.47-110.93 815.24-110.93 152.23 653.41 264.72 614.11 68.96 1392.06-189.05 751.27-407.17 1586.38-95.95 2366.07 93.09 233.21 234.04 492.44 391.22 667.26 406.35 451.96 702.08 617.42 1319.33 824.1 275.4 92.21 533.95 158.18 848.79 209.68 766.21 125.34 229.18-11.51 753.7 331.25 207.61 135.66 474.08 273.49 785.75 214.34 272.28-51.67 532.4-272.69 585.51-500.66h52.93c107.16 459.97 766.19 734.44 1384.15 272.75 73.27-54.74 144.19-102.93 209.04-161.43 106.69-96.26 76.72-88.31 254.5-115.97 437.8-68.13 793.54-139.15 1185.55-269.86 1263.92-421.43 1163.59-933.76 1532.41-1034.4 104.54-28.53 188.12-48.54 287.42-83.05 843.41-293.13 1640.75-830.31 2045.05-1633.16 158.26-314.26 193.69-396.35 193.69-706.02 0-374.2-347.87-740.94-714.47-740.94-726.53 0-1021.6 1023.55-1587.72 1323.1-8.84-396.69-317.55-1218.53-317.55-1561.26 0-287.21 129.96-556.59 185.24-793.86 1102.92 0 1693.56 595.29 1693.56 79.39 0-245.56-1332.91-449.85-1587.72-449.85l26.47-423.4 635.08-26.46c337.09 0 568.17 52.93 899.71 52.93 202.13-301.86 2.8-353.43-298.12-389.89-355.56-43.09-666.42-33.51-1024.98-33.51-91.23 0-102.46 19.58-185.23 26.47-35.67-428.65-106.51-821.86-201.08-1201.41-26.86-107.81-40.35-170.14-73.47-270.54-126.52-383.58-43-471.42-43-962.56 0-864.45-18.06-2249.27-1032.01-2249.27-440.27 0-1187.89 578.89-1349.56 820.33-1420.4-751.58-2855.07-757.61-4286.85 0-61.74-92.2-452.54-428.48-555.47-503.01-577.8-418.37-1294.85-516.09-1611.24 268.02-121.55 301.22-214.87 692.14-214.87 1108.23"})),x.createElement("path",{d:"M10195.24 12299.55c-60.09 80.61-149.17 257.25-204.96 352.5-69.84 119.23-168.52 233.88-227.21 355.97 363.49-44.58 907.01-220.11 1202.45-358.5 773.99-362.55 1210.59-1016.2 1185.61-1901.59-9.21-326.61-144.31-1045.52-240.79-1301.79-62.13-34.05-234.14-282.54-456.57-93.6-271.05 230.24 229.34 775.4 119.59 1707.48-50.68 430.4-240.7 665.92-469.62 853.63-190.98 156.61-414.66 258.28-656.52 349.63-112.54 42.51-185.64 82.36-251.98 36.27m2320.3-1620.59c-24.97 468.16-51.16 581.95-152.43 1002.4 877.83-188.65 1830.09-998.5 2040.26-1789.15 75.65-284.57-104.15-579.22-363.29-573.16-238.23 5.57-429.47 275.58-542.11 410.48-339.15 406.19-501.32 630.65-982.43 949.43",style:{fill:"var(--main-color, #FDC54E)"}}),hn||(hn=x.createElement("path",{className:"fil0",d:"M7268.8 6874.88c-235.23 43.29-402.38 98.64-556.51 223.37-310.92 251.62-101.4 447.49 2.19 474.72 232.58 61.13 157.81-105.27 556.26-207.35 827.19-211.91 1039.98 273.85 1284.76 206.07 133.7-37.02 291.71-248.89 4.19-473.51-299.07-233.66-840.46-306.2-1290.89-223.3"})),x.createElement("path",{d:"M3523.37 5120.03c-108.27 404.9-376.85 1222.53-321 1669.9l418.96 60.11c175.61-7.94 123.75-218.71 174.59-523.19 61.57-368.71 292.44-1024.53 229.35-1175.97-32.33-77.6-120.26-144.23-227.84-150.4-101.99-5.85-134.96 23.47-199.8 68.78z",style:{fill:"var(--main-color, #FDC54E)"}}),vn||(vn=x.createElement("path",{className:"fil0",d:"M9320.73 5910c0 246.26-79.28 765.23 111.34 873.07 160.62 90.87 308.36 3.65 346.99-110.85 33.69-99.85 17.82-359.47 18.2-480.77 199.69 47.09 441.63-32.05 354.4-288.8-44.14-129.93-309.77-243.81-443.68-323.59-139.71-83.24-374.94-275.88-547.26-134-62.69 51.62-108.23 170.33-57.92 286 37.61 86.46 132.75 121.68 217.93 178.94m-3798.56 278.77c0 112.71-15.33 375.24 13.28 468.77 38.89 127.11 198.54 204.57 339.3 134.97 192.12-94.99 123.76-646.85 123.76-889.3 134.75-72.69 378.88-230.38 176.25-442.28-161.67-169.08-405.73 23.91-544.72 105.8-139.66 82.27-402.67 199.68-453.62 315.17-100.46 227.68 98.87 371.97 345.75 306.87"}))))}var Ln=x.forwardRef(Bn),Un=(n.p,n(33));n.p,n(214);var zn=function(){var e=k().navigateTo,t=Object(w.d)(),n=Me().metricVisitCheckout,c=Object(x.useRef)(),a=Object(w.e)((function(e){return e.config.data})),r=Object(w.e)((function(e){return e.products.bonuses_items})),i=Object(w.e)((function(e){return e.cart.items})),o=Object(w.e)((function(e){return e.cart.subTotalPrice})),s=Object(w.e)((function(e){return e.cart.promocode})),l=Object(w.e)((function(e){return e.cart.conditionalPromocode})),d=Object(w.e)((function(e){return e.cart.promocodeProducts})),u=Object(w.e)((function(e){return e.cart.bonusProduct})),j=Object(w.e)((function(e){return e.user.user})),b=Object(w.e)((function(e){return e.miniCart.miniCartOpen})),m=Object(w.e)(zt),p=window.CONFIG_empty_cart_image,O=function(e){"minicart-sidebar"!==window.location.hash&&e.oldURL.includes("#minicart-sidebar")&&h()};Object(x.useEffect)((function(){return window.addEventListener("hashchange",O),function(){window.removeEventListener("hashchange",O)}}),[]),b||"minicart-sidebar"!==window.location.hash||window.history.replaceState("",document.title,window.location.pathname);var h=function(){"#minicart-sidebar"===window.location.hash&&window.history.replaceState("",document.title,window.location.pathname),t({type:"CLOSE_MINI_CART"})};return Object(x.useEffect)((function(){if(0!==Object.keys(s).length&&s.constructor===Object&&!l){var e=X({promocode:s,promocodeProduct:d,items:i,cartTotal:o,config:a});"error"===e.status&&(t({type:"REMOVE_PROMOCODE"}),t(_t(s)),t(Ut({open:!0,message:e.alert})))}l&&!Object.keys(s).length&&("error"!==X({promocode:l,items:i,cartTotal:o,config:a}).status&&(t(gt(l)),t({type:"CLEAR_CONDITIONAL_PROMOCODE"})))}),[s,l,d,i,a,o]),Object(x.useEffect)((function(){"on"!==a.CONFIG_free_products_program_status&&t(vt({}))}),[a.CONFIG_free_products_program_status]),Object(S.jsxs)("div",{className:void 0!==r&&r.length?"minicart--wrapper active-bonuses":"minicart--wrapper",children:[Q()?null:Object(S.jsx)(Mn,{}),Object(S.jsx)(me.a,{anchor:"right",open:b,onClose:h,children:Object(S.jsxs)("div",{className:"minicart--inner",ref:c,children:[Object(S.jsxs)("div",{className:"minicart--product-list",children:[Object(S.jsxs)("h2",{className:Object(Ne.a)("minicart--inner-title","vk"===Y()&&"vk"),children:[Object(S.jsx)("div",{children:"\u041a\u043e\u0440\u0437\u0438\u043d\u0430"}),Object(S.jsx)(pe.a,{color:"inherit",onClick:h,className:"minicart--close",children:"vk"===Y()?Object(S.jsx)(dt.a,{icon:Un.b,className:"minicart--angle-icon"}):Object(S.jsx)(_e.a,{})})]}),void 0!==a.CONFIG_cart_info_text&&a.CONFIG_cart_info_text&&!m?Object(S.jsx)(Ht.a,{className:"minicart--text-info",severity:"info",sx:{mb:2,mr:2,ml:2},children:Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:a.CONFIG_cart_info_text}})}):null,m?Object(S.jsxs)("div",{className:"minicart--empty",children:[p?Object(S.jsx)("img",{src:p,className:"minicart--empty-logo",alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"}):Object(S.jsx)(Ln,{}),Object(S.jsx)("h4",{children:"\u041e\u0439, \u043f\u0443\u0441\u0442\u043e!"}),Object(S.jsx)("div",{className:"minicart--empty-text",children:"\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443."})]}):Object(S.jsx)(Fn,{}),u.id&&Object(S.jsx)(Vt,{productCart:u,productCount:1,productTotalPrice:u.options._price}),!!d.id&&Object(S.jsx)(mn,{}),m?null:Object(S.jsx)(Zt,{}),m?null:Object(S.jsx)(bn,{minicart:!0}),m?null:Object(S.jsx)(tn,{minicartInner:c})]}),Object(S.jsx)(En,{handleCloseMiniCart:h,handleMakeOrder:function(){!j.token&&ae(a)?t(D(!0)):(n(),t({type:"CLOSE_MINI_CART"}),window.scrollTo(0,0),e("/checkout"))}})]})})]})},Hn=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}));var Wn=function(){var e=g.a.useState(!1),t=Object(Ve.a)(e,2),n=t[0],c=(t[1],Object(w.d)()),a=Me().mectricOpenCart,r=Object(w.e)((function(e){var t=e.cart;return{bonuses_items:e.products.bonuses_items,cartCountItems:t.countItems}})),i=r.cartCountItems,o=(r.bonuses_items,{open:n});return Q()&&(o.TransitionComponent=Hn,o.fullScreen=!0),Object(S.jsxs)("div",{className:"minicart-mobile openCart",onClick:function(){window.location.hash="minicart-sidebar",a(),c({type:"OPEN_MINI_CART"})},children:[Object(S.jsx)("span",{className:"minicart-mobile--count-item",children:i}),Object(S.jsx)(An.a,{})]})};n(303);var Vn=function(e){return{type:"SET_OPEN_BONUSES_MODAL",payload:e}},Zn=n.p+"static/media/footer-bonuses-gift.9ba2e444.svg",Qn=(n(304),function(){var e=Object(x.useRef)(null),t=Object(x.useRef)(null),n=Object(x.useState)(!1),c=Object(Ve.a)(n,2),a=c[0],r=c[1];return Object(x.useEffect)((function(){var n,c,a=null===(n=e.current)||void 0===n?void 0:n.offsetHeight,i=null===(c=t.current)||void 0===c?void 0:c.scrollHeight;a&&i&&i>a&&r(!0)}),[]),{contentOverflow:a,containerRef:e,contentRef:t}}),qn=function(e){var t,n=e.bonusProduct,c=e.handleClose,a=Object(w.d)(),r=Qn(),i=r.contentOverflow,o=r.containerRef,s=r.contentRef,l=Object(w.e)((function(e){var t=e.products,n=e.cart,c=e.bonusesProductsModal;return{bonuses_items:t.bonuses_items,userCartBonusProduct:n.bonusProduct,openBonusesProductsModal:c.openBonusesProductsModal}}),w.c).userCartBonusProduct,d=jn(),u=d.cartTotalPrice,j=d.bonusesDisabledByCategory,b=d.bonusesDisabledByPromocode,m=Object(x.useState)(!1),p=Object(Ve.a)(m,2),O=p[0],h=p[1],v=function(){l.id!==n.id?u<n.limit||j||b||(a(vt(Object(I.a)({},n))),c()):a(vt({}))};return Object(S.jsxs)("div",{className:"bonuses-modal__cart product product-item ".concat(l.id===n.id?"bonuses-modal__cart-active":""),children:[Object(S.jsx)("div",{className:"product--image ",onClick:v,children:Object(S.jsx)("img",{src:n.img?n.img:It,alt:n.title})}),Object(S.jsxs)("div",{className:"bonuses-modal__inner-wrapper",children:[Object(S.jsx)("div",{className:"bonuses-modal__cart-title",onClick:v,dangerouslySetInnerHTML:{__html:n.full_title||n.title}}),Object(S.jsxs)("div",{className:"bonuses-modal__price-container",children:[Object(S.jsxs)("span",{className:"bonuses-modal__cart-price",children:[n.options._price," \u20bd",Object(S.jsx)(Bt,{className:"old-price-line"})]})," ",Object(S.jsx)("span",{className:"main-color",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"})]}),Object(S.jsx)("div",{ref:o,children:Object(S.jsx)("div",{ref:s,className:"bonuses-modal__cart-content ".concat(O?"bonuses-modal__cart-content--mod":""),dangerouslySetInnerHTML:{__html:n.content}})}),Object(S.jsxs)("div",{className:"bonuses-modal__cart-info",children:[Object(S.jsxs)("div",{className:"bonuses-modal__cart-cost",children:["\u043e\u0442 ",n.limit," \u20bd"]}),i&&Object(S.jsx)("div",{className:"bonuses-modal__detail-wrapper",children:Object(S.jsx)("div",{className:"bonuses-modal__cart-detail",onClick:function(){return h(!O)},children:O?"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})})]}),u>=n.limit&&l.id!==n.id&&Object(S.jsx)(de.a,{variant:"button",className:"btn btn--action",sx:{width:1,mt:2},onClick:v,disabled:b||j,children:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c"}),u>=n.limit&&l.id===n.id&&Object(S.jsx)(de.a,{variant:"button",className:"btn btn--action",sx:{width:1,mt:2},onClick:v,children:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c"}),u<n.limit&&Object(S.jsxs)(de.a,{disabled:!0,variant:"button",sx:{width:1,mt:2},className:"btn btn--outline",children:["\u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442"," ",(t=n.limit-u,null===t||void 0===t?null:(t<0&&(t=-t),t.toLocaleString("ru-RU",{style:"currency",currency:"RUB",minimumFractionDigits:0,maximumFractionDigits:2})))]})]})]})},Yn=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}));function Kn(){var e=Object(w.d)(),t=Object(w.e)((function(e){var t=e.products,n=e.bonusesProductsModal;return{bonuses_items:t.bonuses_items,openBonusesProductsModal:n.openBonusesProductsModal}}),w.c),n=t.bonuses_items,c=t.openBonusesProductsModal,a=Object(w.e)((function(e){return e.config.data.CONFIG_close_modal_by_cross})),r=jn(),i=r.cartTotalPrice,o=r.bonusesHardmode,s=r.disabledCategories,l=r.disabledCategoriesNames,d=r.bonusesDisabled,u=r.bonusesDisabledByPromocode;Object(x.useEffect)((function(){d&&c&&e(Vn(!1))}),[d]),c||"bonuses-modal"!==window.location.hash||window.history.replaceState("",document.title,window.location.pathname);var j=function(e){!window.location.hash&&e.oldURL.includes("#bonuses-modal")&&b()};Object(x.useEffect)((function(){return window.addEventListener("hashchange",j),function(){window.removeEventListener("hashchange",j)}}),[]);var b=function(){"#bonuses-modal"===window.location.hash&&window.history.replaceState("",document.title,window.location.pathname),e(Vn(!1))},m=0;n.length&&n.forEach((function(e){e.limit>m&&(m=e.limit)}));var p={open:c,maxWidth:"md"};return Q()&&(p.TransitionComponent=Yn,p.fullScreen=!0,p.scroll="body"),Object(S.jsxs)("div",{children:[Object(S.jsx)(He.a,{direction:"up",in:!d,mountOnEnter:!0,unmountOnExit:!0,children:Object(S.jsx)("div",{className:"footer-bonuses",children:Object(S.jsxs)(se.a,{className:"footer-bonuses__container",children:[Object(S.jsxs)("div",{className:"footer-bonuses__info",onClick:function(){window.location.hash="bonuses-modal",e(Vn(!0))},children:["\u0412\u044b\u0431\u0435\u0440\u0438 \u043f\u043e\u0434\u0430\u0440\u043e\u043a",Object(S.jsx)("img",{src:Zn,alt:"FooterBonusesGift",style:{marginLeft:10}})]}),Object(S.jsx)(Oe.a,{orientation:"vertical",sx:{borderColor:"#fff",height:"40px",borderWidth:"1px"}}),Object(S.jsxs)("div",{className:"footer-bonuses__points",children:[Object(S.jsx)("div",{className:"footer-bonuses__points-bg",style:{width:"".concat(i?i/m*100:0,"%")}}),n.map((function(e){return Object(S.jsx)("div",{className:"footer-bonuses__point",style:{left:"".concat(e.limit/m*100,"%")},children:Object(S.jsxs)("div",{className:"footer-bonuses__point-block",children:[e.limit,Object(S.jsx)("span",{className:"footer-bonuses__point-valute",children:"\u20bd"})]})},e.id)}))]})]})})}),Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md",fullWidth:!0,onClose:function(e,t){"escapeKeyDown"===t&&b(),"backdropClick"===t&&"active"!==a&&b()}},p),{},{className:"bonuses-modal--dialog",sx:{"& .MuiDialog-paper":{borderRadius:Q()?"0px":"20px"}},children:Object(S.jsx)("div",{className:"modal-alert--wrapper bonuses-modal--wrapper",children:Object(S.jsxs)("div",{className:"bonuses-modal--inner-wrapper",children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:b,"aria-label":"close",className:"modal-close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("h2",{className:"modal-alert--title",children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0430\u0440\u043e\u043a"}),Object(S.jsxs)(se.a,{disableGutters:!Q(),children:[u?Object(S.jsx)(Ht.a,{severity:"error",sx:{my:2},children:"\u0411\u043e\u043d\u0443\u0441\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u0430."}):null,o&&(null===s||void 0===s?void 0:s.length)?Object(S.jsxs)(Ht.a,{severity:"error",sx:{my:2},children:["\u0422\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:"," ",l.join(", ")," \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0448\u043a\u0430\u043b\u043e\u0439 \u043f\u043e\u0434\u0430\u0440\u043a\u043e\u0432."]}):null,!o&&(null===s||void 0===s?void 0:s.length)?Object(S.jsxs)(Ht.a,{severity:"error",sx:{my:2},children:["\u0422\u043e\u0432\u0430\u0440\u044b \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:"," ",l.join(", ")," \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0448\u043a\u0430\u043b\u0435 \u043f\u043e\u0434\u0430\u0440\u043a\u043e\u0432."]}):null,Object(S.jsx)("div",{className:"bonuses-modal__carts",children:Object(S.jsx)(ot.a,{container:!0,spacing:1,children:(null===n||void 0===n?void 0:n.length)&&n.map((function(e,t){return Object(S.jsxs)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},children:[Object(S.jsx)(qn,{bonusProduct:e,handleClose:b},"".concat(t,"_").concat(e.title)),Q()&&t!==n.length-1?Object(S.jsx)(Oe.a,{sx:{borderColor:"var(--divider-color)"}}):null]},e.id)}))})})]})]})})}))]})}function Jn(e){var t=e.product,n=Object(w.d)(),c=Me().metricAddProductToCart,a=Object(w.e)((function(e){return{cartProducts:e.cart.items}})).cartProducts,r=Object(w.e)((function(e){return e.config.data})),i=function(){c(t),n(ht(t))};return Object(S.jsxs)("div",{className:"addon-product addon-product-modal ".concat(a[t.id]?"addon-product-active":""),onClick:i,children:[Object(S.jsx)("div",{className:"addon-product--image",children:Object(S.jsx)("img",{className:"lazyload-image",src:t.img?t.img:It,alt:t.title})}),Object(S.jsx)("h4",{className:"addon-product--title",children:t.title}),Object(S.jsxs)("div",{className:"addon-product--buying",children:[Object(S.jsxs)("div",{className:"addon-product--price",children:["+",t.options._price," \u20bd"]}),a[t.id]?Object(S.jsxs)("div",{className:"product--quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(e){e.stopPropagation(),n(ft(t))},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:a[t.id].items.length}),Object(S.jsx)(de.a,{className:"btn--default product-add",onClick:function(e){e.stopPropagation(),i()},children:"+"})]}):Object(S.jsx)(de.a,{className:"btn--outline btn-buy",onClick:function(e){e.stopPropagation(),i()},children:r.CONFIG_product_buy_button_text?r.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"})]})]})}var Xn=n(499),$n=function(e){var t=e.product,n=e.choosenModificators,c=e.disabledAddButton,a=e.addProductModificator,r=e.decreaseProductModificator,i=Me().metricAddProductToCart,o=Object(w.e)((function(e){return e.config.data})),s=Object(x.useMemo)((function(){return n.find((function(e){return e.id===t.id}))}),[n]),l=function(){c||(i(t),a(Object(I.a)(Object(I.a)({},t),{},{count:1})))};return Object(S.jsxs)("div",{className:"modificator-product modificator-product-modal ".concat(s?"modificator-product-active":""),onClick:l,children:[Object(S.jsx)("div",{className:"modificator-product--image",children:Object(S.jsx)("img",{className:"lazyload-image",src:t.img?t.img:It,alt:t.title})}),Object(S.jsx)("h4",{className:"modificator-product--title",children:t.title}),Object(S.jsxs)("div",{className:"modificator-product--buying",children:[Object(S.jsxs)("div",{className:"modificator-product--price",children:["+",t.options._price," \u20bd"]}),s?Object(S.jsxs)("div",{className:"product--quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(e){e.stopPropagation(),r(t)},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:s.count,onClick:function(e){e.stopPropagation()}}),Object(S.jsx)(de.a,{className:"btn--default product-add",onClick:function(e){e.stopPropagation(),l()},disabled:c,children:"+"})]}):Object(S.jsx)(de.a,{className:"btn--outline btn-buy",onClick:function(e){e.stopPropagation(),l()},disabled:c,children:o.CONFIG_product_buy_button_text?o.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"})]})]})},ec=function(e){var t=e.category,n=e.choosenModificators,c=e.addEmptyRequiredCategory,a=e.deleteEmptyRequiredCategory,r=e.addProductModificator,i=e.decreaseProductModificator,o=Object(w.e)((function(e){return e.products})).items,s=t.products.map((function(e){return o[e]?o[e]:null})).filter((function(e){return e})),l=Object(x.useMemo)((function(){return n.filter((function(e){return t.products.includes(e.id)})).reduce((function(e,t){return e+t.count}),0)}),[n]),d=Object(x.useMemo)((function(){return"yes"===t.required&&("manual"===t.count_products_type&&l<t.count_products.min||"one"===t.count_products_type&&l<1||"all"===t.count_products_type&&!l)}),[n]),u=Object(x.useMemo)((function(){return"one"===t.count_products_type&&l>=1||"manual"===t.count_products_type&&l>=t.count_products.max}),[l]);return Object(x.useEffect)((function(){d?c(t.category_id):d||"yes"!==t.required||a(t.category_id)}),[d]),Object(S.jsxs)("div",{className:"modificator-products",children:[Object(S.jsx)("div",{className:"modificator-products--title",children:t.category_title}),Object(S.jsx)(Xn.a,{sx:{mt:1},in:d,unmountOnExit:!0,children:Object(S.jsx)(Ht.a,{severity:"info",sx:{border:"1px solid #99dfff"},children:"manual"===t.count_products_type?"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 ".concat(t.count_products.min," ").concat(1==t.count_products.min?"\u0442\u043e\u0432\u0430\u0440":2<=t.count_products.min<=4?"\u0442\u043e\u0432\u0430\u0440\u0430":"\u0442\u043e\u0432\u0430\u0440\u043e\u0432"," \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438"):"one"===t.count_products_type?"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u043e\u0432\u0430\u0440 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438":"all"===t.count_products_type?"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 1 \u0442\u043e\u0432\u0430\u0440 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438":null})}),Object(S.jsx)(ot.a,{container:!0,spacing:1,sx:{mt:"6px"},children:s.map((function(e){return Object(S.jsx)(ot.a,{item:!0,mobilexs:6,mobilesm:4,mobilemd:3,mobilelg:2,desctop:4,children:Object(S.jsx)($n,{product:e,category:t,disabledAddButton:u,choosenModificators:n,addEmptyRequiredCategory:c,deleteEmptyRequiredCategory:a,addProductModificator:r,decreaseProductModificator:i})},e.id)}))})]},t.category_id)},tc=n(439),nc=n(494),cc=n(470),ac=n(458),rc=n(472),ic=n(482),oc=n(500),sc=function(e){var t=Object(x.useState)([]),n=Object(Ve.a)(t,2),c=n[0],a=n[1],r=Object(x.useState)([]),i=Object(Ve.a)(r,2),o=i[0],s=i[1],l=Object(x.useState)(0),d=Object(Ve.a)(l,2),u=d[0],j=d[1],b=Object(x.useState)(!0),m=Object(Ve.a)(b,2),p=m[0],O=m[1];Object(x.useEffect)((function(){c.length&&a([]),o.length&&s([]),u&&j(0),p||O(!0)}),[e]);return{choosenModificators:c,emptyModificatorCategories:o,modificatorsAmount:u,modificatorsCondition:p,addEmptyRequiredCategory:function(e){o.includes(e)||(s((function(t){return[].concat(Object(an.a)(t),[e])})),p&&O(!1))},deleteEmptyRequiredCategory:function(e){var t=Object(an.a)(o),n=t.findIndex((function(t){return t===e}));n>=0&&t.splice(n,1),s(t),t.length||O(!0)},addProductModificator:function(e){var t=Object(an.a)(c),n=t.findIndex((function(t){return t.id===e.id}));n>=0?t[n].count++:t.push(e),a(t),j((function(t){return t+e.options._price}))},decreaseProductModificator:function(e){var t=Object(an.a)(c),n=t.findIndex((function(t){return t.id===e.id}));n>=0&&(t[n].count--,t[n].count<=0&&t.splice(n,1)),a(t),j((function(t){return t-e.options._price}))}}},lc=n(56),dc=n.n(lc),uc=(n(215),g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})));function jc(){var e,t=Object(w.d)(),n=Me().metricAddProductToCart,c=Object(w.e)((function(e){var t=e.productModal,n=e.products;e.cart;return{productModal:t.productModal,openProductModal:t.openProductModal,addon_products:n.addon_items}})),a=c.productModal,r=c.openProductModal,i=c.addon_products,o=Object(w.e)((function(e){return e.products.categories})),s=Object(w.e)((function(e){return e.products.items})),l=sc(null===a||void 0===a?void 0:a.id),d=l.choosenModificators,u=l.modificatorsAmount,j=l.modificatorsCondition,b=l.addEmptyRequiredCategory,m=l.deleteEmptyRequiredCategory,p=l.addProductModificator,O=l.decreaseProductModificator,h=Object(w.e)((function(e){return{config:e.config.data}})).config,v=Object(x.useState)({}),f=Object(Ve.a)(v,2),g=f[0],_=f[1],y=Object(x.useState)(!1),N=Object(Ve.a)(y,2),C=N[0],k=N[1],P=Object(x.useState)(!1),E=Object(Ve.a)(P,2),F=E[0],T=E[1],A=Object(x.useState)(!1),M=Object(Ve.a)(A,2),D=M[0],G=M[1],R=Object(x.useState)(!1),B=Object(Ve.a)(R,2),L=B[0],U=B[1];Object(x.useEffect)((function(){var e;if(a&&(null===(e=a.categories)||void 0===e?void 0:e.length)&&o){var t,n=!1;null===(t=a.categories)||void 0===t||t.forEach((function(e){var t=o.find((function(t){return t.term_id===e}));return t&&$(t).disabled&&(n=!0,"block"===t.limit_type?U(!0):W()),!1})),!n&&L&&U(!1)}}),[o,a]),Object(x.useEffect)((function(){var e={};if("variations"===a.type&&a.attributes&&(Object.keys(a.attributes).forEach((function(t,n){e[n]=Object.values(a.attributes)[n].options[0]})),_(e)),"variations"===a.type&&a.variants){var t=!1,n=!1;Object.values(a.variants).forEach((function(c,a){var r=!0;t||(Object.values(c.attributes).forEach((function(t,n){e[n]!==t&&(r=!1)})),r&&(k(c),t=n=!0))})),T(!n)}}),[a.attributes]);var z=function(){new URL(window.location.href).searchParams.has("product_id")||W()};Object(x.useEffect)((function(){return window.addEventListener("popstate",z),function(){window.removeEventListener("popstate",z)}}),[]),Object(x.useEffect)((function(){var e="vk"===Y()&&new URL(window.location.origin+window.location.hash.replace("#","").replace("*","#")).searchParams.get("product_id"),n=new URL(window.location.href).searchParams,c=e||n.get("product_id");if(c){var a=s[c];a&&!r?(t(wt(Object(I.a)({},a))),t(Nt(!0))):!a&&r&&W()}}),[s]);var H=function(e,t){var n=g;n[e]=t,_(Object(I.a)(Object(I.a)({},g),{},{dataAttributes:n}));var c=!1,r=!1;Object.values(a.variants).forEach((function(e,t){var a=!0;c||(Object.values(e.attributes).forEach((function(e,t){n[t]!==e&&(a=!1)})),a&&(k(e),c=r=!0))})),T(!r)},W=function(){var e=new URL(window.location.href);e.searchParams.has("product_id")&&(e.searchParams.delete("product_id"),window.history.replaceState("",document.title,window.location.pathname)),t({type:"CLEAR_MODAL_PRODUCT"}),k(!1),T(!1),G(!1),t(Nt(!1))},V={open:r,maxWidth:"md"};Q()&&(V.TransitionComponent=uc,V.fullScreen=!0,V.scroll="body");var Z=C?C.options:a.options,q=function(){return Z.energy_value||Z.protein||Z.fat||Z.carbohydrate?Object(S.jsxs)("div",{className:"product-modal--tooltip",children:[Object(S.jsx)("div",{className:"product-modal--tooltip-title",children:"\u041f\u0438\u0449\u0435\u0432\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u0430 100 \u0433. :"}),!!Z.energy_value&&Object(S.jsxs)("div",{className:"product-modal--tooltip-option",children:[Object(S.jsx)("div",{children:"\u042d\u043d\u0435\u0440\u0433. \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c"}),Object(S.jsxs)("div",{children:[Z.energy_value," \u043a\u043a\u0430\u043b."]})]}),!!Z.protein&&Object(S.jsxs)("div",{className:"product-modal--tooltip-option",children:[Object(S.jsx)("div",{children:"\u0411\u0435\u043b\u043a\u0438"}),Object(S.jsxs)("div",{children:[Z.protein," \u0433."]})]}),!!Z.fat&&Object(S.jsxs)("div",{className:"product-modal--tooltip-option",children:[Object(S.jsx)("div",{children:"\u0416\u0438\u0440\u044b"}),Object(S.jsxs)("div",{children:[Z.fat," \u0433."]})]}),!!Z.carbohydrate&&Object(S.jsxs)("div",{className:"product-modal--tooltip-option",children:[Object(S.jsx)("div",{children:"\u0423\u0433\u043b\u0435\u0432\u043e\u0434\u044b"}),Object(S.jsxs)("div",{children:[Z.carbohydrate," \u0433."]})]})]}):null};return Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({},V),{},{className:"product-modal-dialog",onClose:function(e,t){"escapeKeyDown"===t&&W(),"backdropClick"===t&&"active"!==h.CONFIG_close_modal_by_cross&&W()},children:a?Object(S.jsxs)("div",{className:"product-modal-wrapper",children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:W,"aria-label":"close",className:"modal-close ".concat("vk"===Y()?"vk":""),sx:{zIndex:1},children:Object(S.jsx)(_e.a,{})}),Object(S.jsxs)("div",{className:"product-modal",children:[Object(S.jsx)("div",{className:"product-modal--image",children:Object(S.jsx)(tc.a,{in:!0,children:Object(S.jsx)("img",{src:C&&C.img?C.img:a.fullImg?a.fullImg:a.img?a.img:It,alt:a.title,style:{filter:L?"grayscale(1)":""}})})}),Object(S.jsxs)("div",{className:"product-modal--info",children:[Object(S.jsxs)("div",{className:"product-modal--scrolling",children:[Object(S.jsxs)("div",{className:"product-modal--title-container",children:[Object(S.jsx)("div",{className:"product-modal--title",dangerouslySetInnerHTML:{__html:"<h4>".concat(a.full_title||a.title,"</h4>")}}),q()&&Object(S.jsx)(en.a,{onClickAway:function(){return G(!1)},children:Object(S.jsx)("div",{children:Object(S.jsx)(wn,{placement:"bottom-end",title:q(),disableTouchListener:!0,disableHoverListener:!0,open:D,children:Object(S.jsx)(dc.a,{className:"product-modal--title-info",onClick:function(){return G((function(e){return!e}))}})})})})]}),"variations"===a.type?Object(S.jsxs)(S.Fragment,{children:[C&&C.description?Object(S.jsx)("div",{className:"product-modal--description","data-product-id":a.id,dangerouslySetInnerHTML:{__html:C.description}}):Object(S.jsx)("div",{className:"product-modal--description","data-product-id":a.id,dangerouslySetInnerHTML:{__html:a.content.replace(/\n/g,"<br />")}}),Object(S.jsx)("div",{className:"product-modal--attributes",children:Object.values(a.attributes).map((function(e,t){return Object(S.jsx)("div",{className:"product-modal--attribute",children:"select"===h.CONFIG_type_variations?Object(S.jsxs)(nc.a,{fullWidth:!0,children:[Object(S.jsx)(cc.a,{id:"product-modal-attributes-label",children:e.name}),Object(S.jsx)(ac.a,{label:e.name,value:g[t],labelId:"product-modal-attributes-label",size:"small",children:Object.values(e.options).map((function(e,n){return Object(S.jsx)(rc.a,{onClick:function(){return H(t,e)},value:e,children:e},n)}))})]}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{className:"attribute--name",children:e.name}),Object(S.jsx)(ic.a,{color:"primary",value:g[t],orientation:"vertical"===h.CONFIG_type_variations?"vertical":"horizontal",exclusive:!0,className:"attribute--variations",children:Object.values(e.options).map((function(e,n){return Object(S.jsx)(oc.a,{className:"btn--variation",onClick:function(){return H(t,e)},value:e,children:e},n)}))})]})},t)}))})]}):Object(S.jsx)("div",{className:"product-modal--description","data-product-id":a.id,dangerouslySetInnerHTML:{__html:a.content.replace(/\n/g,"<br />")}}),F?Object(S.jsx)(Xn.a,{sx:{mt:1},in:!0,children:Object(S.jsx)(Ht.a,{severity:"error",className:"alert--wrong-variant",children:"\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d"})}):"",L?Object(S.jsx)(Xn.a,{sx:{mt:1},in:!0,children:Object(S.jsx)(Ht.a,{severity:"error",className:"alert--wrong-variant",children:"\u0422\u043e\u0432\u0430\u0440 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442"})}):"",null===(e=a.product_addons)||void 0===e?void 0:e.map((function(e){return Object(S.jsx)(ec,{category:e,choosenModificators:d,addEmptyRequiredCategory:b,deleteEmptyRequiredCategory:m,addProductModificator:p,decreaseProductModificator:O},e.category_id)})),!i.length||"hide"===h.CONFIG_addons_category_in_product||"without_modificators"===h.CONFIG_addons_category_in_product&&a.product_addons.length?null:Object(S.jsxs)("div",{className:"addon-products",children:[Object(S.jsx)("div",{className:"addon-products--title",children:h.CONFIG_addons_category_name}),Object(S.jsx)(ot.a,{container:!0,spacing:1,sx:{mt:"6px"},children:i.map((function(e){return Object(S.jsx)(ot.a,{item:!0,mobilexs:6,mobilesm:4,mobilemd:3,mobilelg:2,desctop:4,children:Object(S.jsx)(Jn,{product:e})},e.id)}))})]})]}),Object(S.jsxs)("div",{className:"product-modal--variations-buying",children:[Object(S.jsxs)("div",{className:"product-modal--price-wrapper",children:[Object(S.jsx)("div",{className:"product-modal--price",children:function(){return C?parseInt(C._regular_price)>parseInt(C.price)?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("span",{className:"product--old-price",children:[parseInt(C._regular_price)+u,"\u20bd",Object(S.jsx)(Bt,{className:"old-price-line"})]}),Object(S.jsxs)("span",{className:"product--sale-price main-color",children:[parseInt(C.price)+u," ","\u20bd"]})]}):Object(S.jsxs)("span",{children:[C.price+u," \u20bd"]}):parseInt(null===(e=a.options)||void 0===e?void 0:e._regular_price)>parseInt(null===(t=a.options)||void 0===t?void 0:t._price)?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("span",{className:"product--old-price",children:[parseInt(a.options._regular_price)+u," ","\u20bd",Object(S.jsx)(Bt,{className:"old-price-line"})]}),Object(S.jsxs)("span",{className:"product--sale-price main-color",children:[a.options._price+u," \u20bd"]})]}):Object(S.jsxs)("span",{children:[parseInt(a.options._price)+u," ","\u20bd"]});var e,t}()}),Object(S.jsx)("div",{className:"product-modal--stats",children:"variations"===a.type?Object(S.jsx)(S.Fragment,{children:C&&C.weight?Object(S.jsxs)("div",{className:"weight",children:[C.weight," ","\u0433\u0440."]}):""}):Object(S.jsxs)(S.Fragment,{children:[a.options.weight?Object(S.jsxs)("div",{className:"weight",children:[a.options.weight," ","\u0433\u0440."]}):"",a.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[a.options.count_rolls," ","\u0448\u0442."]}):""]})})]}),"variations"===a.type?Object(S.jsx)(de.a,{variant:"button",className:"btn--action btn-buy",onClick:function(){var e=J(a);e.options._price=C.price,e.variant=C,n(e),t(ht(Object(I.a)(Object(I.a)({},e),{},{choosenModificators:d,modificatorsAmount:u}))),W()},disabled:L||F||!j,"data-product-id":a.id,children:h.CONFIG_product_buy_button_text?h.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"}):Object(S.jsx)(de.a,{variant:"button",className:"btn--action btn-buy",onClick:function(){var e=J(a);n(e),t(ht(Object(I.a)(Object(I.a)({},e),{},{choosenModificators:d,modificatorsAmount:u}))),W()},disabled:L||!j,"data-product-id":a.id,children:h.CONFIG_product_buy_button_text?h.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"})]})]})]})]}):""}))}var bc=n(90),mc=n.n(bc),pc=n(148),Oc=(n(306),n(59)),hc=n.n(Oc),vc=n(98),fc=function(e){var t=e.onVerifyAuth,n=e.authSmartCaptchaWidgetId,c=e.smartCaptchaToken,a=e.updateError;return Object(x.useEffect)((function(){var e=window.smartCaptcha.render("auth-captcha-container",{sitekey:c||"",invisible:!0,callback:t,hideShield:!0});return window.smartCaptcha.subscribe(e,"network-error",(function(){a({status:"error",message:"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430"})})),window.smartCaptcha.subscribe(e,"javascript-error",(function(){a({status:"error",message:"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 JS"})})),n.current=e,function(){window.smartCaptcha.destroy(e)}}),[]),Object(S.jsx)(S.Fragment,{})},xc=function(e){var t=e.onVerifyRecall,n=e.recallSmartCaptchaWidgetId,c=e.smartCaptchaToken;return Object(x.useEffect)((function(){var e=window.smartCaptcha.render("recall-captcha-container",{sitekey:c||"",invisible:!0,callback:t,hideShield:!0});return n.current=e,function(){window.smartCaptcha.destroy(e)}}),[]),Object(S.jsx)(S.Fragment,{})},gc=function(e){var t=e.onVerifyResms,n=e.resmsSmartCaptchaWidgetId,c=e.smartCaptchaToken;return Object(x.useEffect)((function(){var e=window.smartCaptcha.render("resms-captcha-container",{sitekey:c||"",invisible:!0,callback:t,hideShield:!0});return n.current=e,function(){window.smartCaptcha.destroy(e)}}),[]),Object(S.jsx)(S.Fragment,{})},_c=n(174),yc=function(){var e=C().choosenTown,t=e?e.url:"https://"+q(),n="&platform="+Y();e&&(n+="&townId="+e.id);return{getRequestAPI:function(e,c,a){var r=t+"/?rest-api="+e+n;return c&&(r+=c),hc.a.get(r,a)},postRequestAPI:function(e,c,a,r){var i=t+"/?rest-api="+e+n;return c&&(i+=c),hc.a.post(i,a,r)}}},wc=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}));function Nc(){var e=Object(x.useRef)(null),t=C().choosenTown,n=Object(w.d)(),c=k().navigateTo,a=Object(N.g)().pathname,r=Object(_c.b)().executeRecaptcha,i=Me().metricVisitCheckout,o=yc(),s=o.getRequestAPI,l=(o.postRequestAPI,Object(w.e)((function(e){return e.config.data}))),d=Object(w.e)((function(e){return e.user.user})),u=Object(w.e)((function(e){return{openModalAuth:e.user.openModalAuth}})).openModalAuth,j=Object(w.e)((function(e){return e.miniCart})).miniCartOpen,b=g.a.useRef([]),m=g.a.useRef(),p=g.a.useRef(),O=g.a.useRef(),h=g.a.useRef(),v=g.a.useRef(),f=g.a.useRef(),_=g.a.useState(),y=Object(Ve.a)(_,2),P=y[0],E=y[1],F=g.a.useState(null),T=Object(Ve.a)(F,2),A=T[0],G=T[1],R=g.a.useState(),B=Object(Ve.a)(R,2),L=B[0],U=B[1],z=g.a.useState(!1),H=Object(Ve.a)(z,2),W=H[0],Z=H[1],K=g.a.useState(["","","",""]),J=Object(Ve.a)(K,2),X=J[0],$=J[1],ee=g.a.useState(!1),te=Object(Ve.a)(ee,2),ne=te[0],ce=te[1],ae=g.a.useState(!1),re=Object(Ve.a)(ae,2),ie=re[0],oe=re[1],se=g.a.useState(60),le=Object(Ve.a)(se,2),ue=le[0],je=le[1],be=g.a.useState(!1),me=Object(Ve.a)(be,2),Oe=me[0],he=me[1],ve=Object(x.useState)({}),fe=Object(Ve.a)(ve,2),xe=(fe[0],fe[1]),ge=Object(x.useState)(!1),ye=Object(Ve.a)(ge,2),we=ye[0],Ce=ye[1],ke=!!l.CONFIG_vk_auth_appId&&"active"===l.CONFIG_vk_auth_status;Object(x.useEffect)((function(){ke&&vc.a.init({appId:l.CONFIG_vk_auth_appId,appSettings:{agreements:"",promo:"",vkc_behavior:"",vkc_auth_action:"",vkc_brand:"",vkc_display_mode:""}})}),[]);var Ie=vc.b.buttonOneTapAuth({callback:function(e){var n=e.type;if(n)switch(n){case vc.c.OneTapAuthEventsSDK.LOGIN_SUCCESS:return void Te(e);case vc.c.ButtonOneTapAuthEventsSDK.SHOW_LOGIN:var c=t?t.url:"https://"+q();return vc.b.redirectAuth({url:c})}},options:{showAlternativeLogin:!1,showAgreements:!0,displayMode:"default",langId:0,buttonSkin:"primary",buttonStyles:{borderRadius:20,height:55}}});Object(x.useEffect)((function(){!u&&we&&Ce(!1),ke&&!we&&u&&setTimeout((function(){p.current&&(p.current.innerHTML="",p.current.append(Ie.getFrame()),Ie.authReadyPromise.then((function(){Ce(!0)})))}))}),[u]),Object(x.useEffect)((function(){var e=new URL(window.location.href);if(ke&&"active"===l.CONFIG_auth_vk_popup&&!d.token&&!e.searchParams.has("payload")){var t=vc.b.floatingOneTapAuth({callback:function(e){e.type===vc.c.OneTapAuthEventsSDK.LOGIN_SUCCESS&&(Te(e),t.destroy())},options:{styles:{zIndex:999}}});f.current=t,t&&(document.body.appendChild(t.getFrame()),setTimeout((function(){t.getFrame()&&(t.getFrame().style.transition="opacity ease-in-out .3s ",t.getFrame().style.opacity=0,setTimeout((function(){return t.destroy()}),500))}),3e4))}}),[]),Object(x.useEffect)((function(){var e;d.token&&f.current&&(null===(e=f.current)||void 0===e||e.destroy())}),[d.token]),Object(x.useEffect)((function(){ke&&(W?(Ie.destroy(),Ce(!1)):we||setTimeout((function(){p.current&&(p.current.innerHTML="",p.current.append(Ie.getFrame()),Ie.authReadyPromise.then((function(){Ce(!0)})))})))}),[W]),Object(x.useEffect)((function(){var e=new URL(window.location.href);if(e.searchParams.has("payload")){var t;try{t=JSON.parse(e.searchParams.get("payload"))}catch(c){console.log(c)}t&&t.uuid&&t.token&&(Te({payload:t}),n(Ut({open:!0,message:"\u0412\u0445\u043e\u0434\u0438\u043c \u0432 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"})))}}),[]),Object(x.useEffect)((function(){V.a.send("VKWebAppGetUserInfo").then((function(e){var t,n,c={};c.name=e.first_name||"",c.vk=e.id?"https://vk.com/id"+e.id:"",c.dayBirthday=(null===(t=e.bdate)||void 0===t?void 0:t.split(".")[0])||"",c.monthBirthday=(null===(n=e.bdate)||void 0===n?void 0:n.split(".")[1])||"",xe(c)}))}),[]);var Pe=function(){Se(),he(!0),oe(setInterval((function(){je((function(e){return--e}))}),1e3))},Se=function(){he(!1),je(60),ie&&clearInterval(ie)};Oe&&ue<1&&Se();var Ee={open:u,keepMounted:!1};Q()&&(Ee.TransitionComponent=wc,Ee.fullScreen=!0);var Fe=function(){n(D(!1))},Te=function(e){E(!0);var t="&uuid="+e.payload.uuid+"&token="+e.payload.token;s("vkAuth",t,{mode:"no-cors"}).then((function(e){console.log(e.data),"success"===e.data.status?(n(M(e.data.user)),G(null),(a.includes("/cart")||j)&&c("/checkout"),n({type:"CLOSE_MINI_CART"}),n(D(!1)),n({type:"CLOSE_MOBILE_MENU"}),n(Ut({open:!1,message:""})),V.a.send("VKWebAppStorageGet",{keys:["notificationsPermission"]}).then((function(e){"notificationsPermission"===e.keys[0].key||setTimeout((function(){V.a.send("VKWebAppAllowNotifications").then((function(e){e.result&&V.a.send("VKWebAppStorageSet",{key:"notificationsPermission"})}))}),1e3)}))):(G({status:e.data.status,message:e.data.message}),n(Ut({open:!0,message:e.data.message}))),E(!1)}))},Ae=function(){var t=Object(pc.a)(mc.a.mark((function t(){var n,c;return mc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!ne||"error_captcha"===(null===A||void 0===A?void 0:A.status)){t.next=19;break}if("yandex"!==l.CONFIG_auth_captcha_type){t.next=14;break}if(window.smartCaptcha){t.next=5;break}return G({status:"error",message:"\u041e\u0448\u0438\u0431\u043a\u0430: \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 smartCaptcha"}),t.abrupt("return");case 5:if(l.CONFIG_auth_smartcaptcha_site_token){t.next=8;break}return G({status:"error",message:"\u041e\u0448\u0438\u0431\u043a\u0430: \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043a\u0435\u043d smartCaptcha"}),t.abrupt("return");case 8:E(!0),e.current=setTimeout((function(){G({status:"error",message:"\u041e\u0448\u0438\u0431\u043a\u0430: \u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d smartCaptcha"}),E(!1)}),4e3),console.log("await for yandex captcha to execute"),null===(n=window.smartCaptcha)||void 0===n||n.execute(O.current),t.next=19;break;case 14:if("google"!==l.CONFIG_auth_captcha_type){t.next=19;break}return t.next=17,Je();case 17:c=t.sent,Re(c);case 19:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),De=function(){var e=Object(pc.a)(mc.a.mark((function e(){var t,n;return mc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ne){e.next=13;break}if(G(null),E(!0),"yandex"!==l.CONFIG_auth_captcha_type){e.next=8;break}console.log("await for yandex captcha to execute"),null===(t=window.smartCaptcha)||void 0===t||t.execute(h.current),e.next=13;break;case 8:if("google"!==l.CONFIG_auth_captcha_type){e.next=13;break}return e.next=11,Je();case 11:n=e.sent,Be(n);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ge=function(){var e=Object(pc.a)(mc.a.mark((function e(){var t,n;return mc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ne){e.next=13;break}if(G(null),E(!0),"yandex"!==l.CONFIG_auth_captcha_type){e.next=8;break}console.log("await for yandex captcha to execute"),null===(t=window.smartCaptcha)||void 0===t||t.execute(v.current),e.next=13;break;case 8:if("google"!==l.CONFIG_auth_captcha_type){e.next=13;break}return e.next=11,Je();case 11:n=e.sent,Le(n);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Re=function(e){var t,n=He(null===(t=m.current)||void 0===t?void 0:t.value),c="sms"===l.CONFIG_auth_type?"verifyCodeSms":"verifyCodeRobocall";s(c,"&phone="+n+"&recaptchaResponse="+e,{mode:"no-cors"}).then((function(e){var t;"yandex"===l.CONFIG_auth_captcha_type&&(null===(t=window.smartCaptcha)||void 0===t||t.reset(O.current));"success"===e.data.status?(Z(!0),G(null),Pe()):G({status:e.data.status,message:e.data.text}),E(!1)}))},Be=function(e){var t,n=He(null===(t=m.current)||void 0===t?void 0:t.value);s("verifyCodeRobocallAgain","&phone="+n+"&recaptchaResponse="+e,{mode:"no-cors"}).then((function(e){var t;"yandex"===l.CONFIG_auth_captcha_type&&(null===(t=window.smartCaptcha)||void 0===t||t.reset(h.current));E(!1),Pe(),"success"!==e.data.status&&G({status:e.data.status,message:e.data.text})}))},Le=function(e){var t,n=He(null===(t=m.current)||void 0===t?void 0:t.value);s("verifyCodeSms","&phone="+n+"&recaptchaResponse="+e,{mode:"no-cors"}).then((function(e){var t;"yandex"===l.CONFIG_auth_captcha_type&&(null===(t=window.smartCaptcha)||void 0===t||t.reset(v.current));E(!1),Pe(),"success"!==e.data.status&&G({status:e.data.status,message:e.data.text})}))},Ue=function(e,t){var r=e.target.value;if(/^[0-9]*$/.test(r)&&1===(X[t]+r).length&&!P){var o=Object(an.a)(X);o[t]=r,$(o);var l=b.current.find((function(e){return""===e.value}));if(l&&""!==r&&l.focus(),o.every((function(e){return""!==e}))){var d=He(L);E(!0);var u="&phone="+d+"&code="+o.join("");s("loginByPhoneCode",u,{mode:"no-cors"}).then((function(e){"success"===e.data.status?(n(M(e.data.user)),G(null),(a.includes("/cart")||j)&&(i(),c("/checkout")),n({type:"CLOSE_MINI_CART"}),n(D(!1)),n({type:"CLOSE_MOBILE_MENU"}),$(["","","",""]),Z(!1),U(""),ce(!1)):G({status:e.data.status,message:e.data.text}),E(!1)}))}}},ze=function(e,t){if("Backspace"===e.code&&0!==t&&""===b.current[t].value){b.current[t-1].focus();var n=Object(an.a)(X);n[t-1]="",$(n)}},He=function(e){return e.replace(/\D/g,"")},qe=Object(x.useCallback)((function(t){clearInterval(e.current),console.log("\ud83d\ude80 ~ onVerifyAuth ~ captchaType:",l.CONFIG_auth_captcha_type,",userToken:",t),Re(t)}),[]),Ye=Object(x.useCallback)((function(e){console.log("\ud83d\ude80 ~ onVerifyRecall ~ captchaType:",l.CONFIG_auth_captcha_type,",userToken:",e),Be(e)}),[]),Ke=Object(x.useCallback)((function(e){console.log("\ud83d\ude80 ~ onVerifyResms ~ captchaType:",l.CONFIG_auth_captcha_type,",userToken:",e),Le(e)}),[]),Je=function(){var e=Object(pc.a)(mc.a.mark((function e(){var t;return mc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("await for google captcha to execute"),e.prev=1,e.next=4,r("auth");case 4:return t=e.sent,console.log("\ud83d\ude80 ~ onVerify ~ captchaType:",l.CONFIG_auth_captcha_type,",userToken:",t),e.abrupt("return",t);case 9:e.prev=9,e.t0=e.catch(1),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(){return e.apply(this,arguments)}}();return Object(S.jsxs)(S.Fragment,{children:["yandex"===l.CONFIG_auth_captcha_type&&!d.token&&window.smartCaptcha&&"noauth"!==l.CONFIG_auth_type?Object(S.jsxs)("div",{id:"captcha-container",children:[Object(S.jsx)("div",{id:"auth-captcha-container",children:Object(S.jsx)(fc,{onVerifyAuth:qe,authSmartCaptchaWidgetId:O,smartCaptchaToken:l.CONFIG_auth_smartcaptcha_site_token,updateError:G})}),Object(S.jsx)("div",{id:"recall-captcha-container",children:Object(S.jsx)(xc,{onVerifyRecall:Ye,recallSmartCaptchaWidgetId:h,smartCaptchaToken:l.CONFIG_auth_smartcaptcha_site_token})}),Object(S.jsx)("div",{id:"resms-captcha-container",children:Object(S.jsx)(gc,{onVerifyResms:Ke,resmsSmartCaptchaWidgetId:v,smartCaptchaToken:l.CONFIG_auth_smartcaptcha_site_token})})]}):null,Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({},Ee),{},{onClose:function(e,t){"escapeKeyDown"===t&&Fe(),"backdropClick"===t&&"active"!==l.CONFIG_close_modal_by_cross&&Fe()},sx:{"& .MuiPaper-root":{borderRadius:Q()?"0px":"20px"}},children:Object(S.jsxs)("div",{className:Object(Ne.a)("auth-modal","vk"===Y()&&"vk"),children:[P&&Object(S.jsx)("div",{className:"loader-wrapper",children:Object(S.jsx)(Ze.a,{variant:"determinate"})}),Object(S.jsx)("h2",{className:"auth-modal--title",children:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f"}),Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:Fe,"aria-label":"close",className:"modal-close",children:Object(S.jsx)(_e.a,{})}),A&&Object(S.jsxs)(Ht.a,{severity:"error",sx:{mb:2},children:[Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:A.message.replace(/\n/g,"<br />")}}),"error_captcha"===(null===A||void 0===A?void 0:A.status)?Object(S.jsx)(de.a,{variant:"button",className:" btn--action",onClick:function(){return window.location.reload()},sx:{width:"100%",maxHeight:"34px",mt:"8px"},children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c"}):null]}),Object(S.jsxs)("div",{className:"phone-auth-wrapper",children:["noauth"===l.CONFIG_auth_type||ke&&"active"===l.CONFIG_auth_vk_disable_phone&&"vk"===Y()?null:Object(S.jsx)(Qe.a,{disabled:W,onKeyDown:function(e){var t=e.target.value.replace(/\D/g,"");8===e.keyCode&&1===t.length&&(e.target.value=""),"Enter"===e.key&&ne&&"error_captcha"!==(null===A||void 0===A?void 0:A.status)&&Ae()},onInput:function(e){var t=e.target,n=He(t.value),c=t.selectionStart,a="";if(!n)return t.value="";if(t.value.length===c){if(["7","8","9"].indexOf(n[0])>-1){"9"===n[0]&&(n="7"+n);var r="8"===n[0]?"8":"+7";a=t.value=r+" ",n.length>1&&(a+="("+n.substring(1,4)),n.length>=5&&(a+=") "+n.substring(4,7)),n.length>=8&&(a+="-"+n.substring(7,9)),n.length>=10&&(a+="-"+n.substring(9,11))}else a="+"+n.substring(0,16);t.value=a,U(a),n.length>=11?ce(!0):ce(!1)}else e.data&&/\D/g.test(e.data)&&(t.value=n)},onPaste:function(e){var t=e.target,n=He(t.value),c=e.clipboardData||window.clipboardData;if(c){var a=c.getData("Text");if(/\D/g.test(a))return void(t.value=n)}},label:"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430",className:"phone-input phone-mask",value:L||"",type:"tel",id:"user-phone",inputRef:m,autoFocus:!0}),W?Object(S.jsxs)("div",{children:[Object(S.jsx)("div",{className:"auth-modal--info",children:"sms"===l.CONFIG_auth_type?"\u041d\u0430 \u0432\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f.":"\u041d\u0430 \u0432\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d \u0437\u0432\u043e\u043d\u043e\u043a. \u0414\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 4 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0446\u0438\u0444\u0440\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430."}),Object(S.jsx)(de.a,{variant:"text",onClick:function(){ie&&clearInterval(ie),$(["","","",""]),Z(!W)},className:"phone-auth--change-number btn--action",children:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c"}),Object(S.jsxs)("div",{className:"phone-auth--code",children:[Object(S.jsx)("input",{type:Q()?"number":"text",className:"verify-code code-1",ref:function(e){return b.current[0]=e},onChange:function(e){return Ue(e,0)},value:X[0],onKeyDown:function(e){return ze(e,0)},autoComplete:"off",name:"code-1",autoFocus:!0}),Object(S.jsx)("input",{type:Q()?"number":"text",className:"verify-code code-2",ref:function(e){return b.current[1]=e},onChange:function(e){return Ue(e,1)},value:X[1],onKeyDown:function(e){return ze(e,1)},autoComplete:"off",name:"code-2"}),Object(S.jsx)("input",{type:Q()?"number":"text",className:"verify-code code-3",ref:function(e){return b.current[2]=e},onChange:function(e){return Ue(e,2)},value:X[2],onKeyDown:function(e){return ze(e,2)},autoComplete:"off",name:"code-3"}),Object(S.jsx)("input",{type:Q()?"number":"text",className:"verify-code code-4",ref:function(e){return b.current[3]=e},onChange:function(e){return Ue(e,3)},value:X[3],onKeyDown:function(e){return ze(e,3)},autoComplete:"off",name:"code-4"})]}),Object(S.jsxs)(de.a,{variant:"button",disabled:Oe,onClick:"sms"===l.CONFIG_auth_type?Ge:De,className:"phone-auth--recall btn--action",sx:{width:1},children:["sms"===l.CONFIG_auth_type?"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0435\u0449\u0451 \u0440\u0430\u0437":"\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0437\u0432\u043e\u043d\u043e\u043a",Oe&&Object(S.jsxs)("span",{className:"recall-timout",children:["\u0447\u0435\u0440\u0435\u0437 ",ue," \u0441\u0435\u043a."]})]}),"sms"===l.CONFIG_auth_type?null:Object(S.jsxs)("div",{className:"auth-modal--info",children:[Object(S.jsx)("b",{children:"\u041d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b \u0437\u0432\u043e\u043d\u043e\u043a?"}),Object(S.jsx)("br",{}),"\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430."]}),"robocallwithsms"===l.CONFIG_auth_type?Object(S.jsxs)(de.a,{variant:"button",disabled:Oe,onClick:Ge,className:"phone-auth--resms btn--gray",sx:{width:1,mt:2},children:["\u0417\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043c\u0441",Oe&&Object(S.jsxs)("span",{className:"resms-timout",children:["\u0447\u0435\u0440\u0435\u0437 ",ue," \u0441\u0435\u043a."]})]}):null]}):Object(S.jsxs)("div",{id:"recaptcha-container",children:["noauth"===l.CONFIG_auth_type||ke&&"active"===l.CONFIG_auth_vk_disable_phone&&"vk"===Y()?null:Object(S.jsx)(de.a,{variant:"button",onClick:Ae,className:"btn--action auth-btn",disabled:!ne||"error_captcha"===(null===A||void 0===A?void 0:A.status),children:"\u0412\u043e\u0439\u0442\u0438"}),ke&&Object(S.jsxs)("div",{className:"vkid-auth-wrapper",children:["noauth"!==l.CONFIG_auth_type&&("active"!==l.CONFIG_auth_vk_disable_phone||"vk"!==Y())&&we&&Object(S.jsx)("p",{className:"auth-modal--secondary-text",children:"\u0438\u043b\u0438"}),!we&&Object(S.jsx)(Ze.a,{className:"vkid-btn-loader",color:"vk"}),Object(S.jsx)("div",{ref:p})]})]})]}),Object(S.jsx)("div",{className:"auth-modal--footer",children:Object(S.jsxs)("small",{children:["\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430"," ",Object(S.jsx)("a",{href:t?"".concat(t.url,"/privacy"):"/privacy",target:"_blank",children:"\u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438"})," ","\u0438"," ",Object(S.jsx)("a",{href:t?"".concat(t.url,"/offert"):"/offert",target:"_blank",children:"\u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0430 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0444\u0435\u0440\u0442\u044b"}),"."]})})]})}))]})}var Cc=function(e){var t,n=e.product,c=e.productCount,a=Object(w.d)(),r=Me().metricAddProductToCart;return"variations"===n.type||(null===(t=n.choosenModificators)||void 0===t?void 0:t.length)?Object(S.jsx)("div",{className:"minicart--product-quantity",children:Object(S.jsx)(de.a,{onClick:function(){var e=J(n);n.modificatorsAmount&&(n.options._promocode_price&&(e.options._promocode_price-=n.modificatorsAmount),e.options._price-=n.modificatorsAmount),r(e),a(ht(e))},className:"minicart--variations-buy",sx:{height:"32px"},children:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435"})}):Object(S.jsxs)("div",{className:"minicart--product-quantity",children:[Object(S.jsx)(de.a,{className:"btn--default product-decrease",onClick:function(){a(ft(n))},children:"-"}),Object(S.jsx)("input",{className:"quantity",type:"text",readOnly:!0,value:c,"data-product-id":n.id}),Object(S.jsx)(de.a,{className:"btn--default product-add btn-buy",onClick:function(){r(n),a(ht(n))},children:"+"})]})};function kc(e){var t,n=e.productCart,c=e.productCount,a=e.productTotalPrice,r=e.productIndex,i=Object(w.d)(),o=Object(w.e)((function(e){var t=e.cart;return{promocodeProducts:t.promocodeProducts,promocode:t.promocode}})),s=(o.promocodeProducts,o.promocode,{});n.attributes&&Object.values(n.attributes).forEach((function(e,t){s[t]=e.name}));var l=function(){var e,t,r,i;return parseInt(n.options._promocode_price)?"variations"===n.type?Object(S.jsx)(Wt,{oldPrice:n.options._price,price:n.options._promocode_price}):Object(S.jsx)(Wt,{oldPrice:n.options._price*c,price:a}):"simple"===n.type&&parseInt(n.options._regular_price)>parseInt(n.options._sale_price)?Object(S.jsx)(Wt,{oldPrice:n.options._regular_price*c+(null!==(r=n.modificatorsAmount)&&void 0!==r?r:0),price:a}):"variations"===n.type&&parseInt(null===(e=n.variant)||void 0===e?void 0:e._regular_price)>parseInt(null===(t=n.variant)||void 0===t?void 0:t.price)?Object(S.jsx)(Wt,{oldPrice:parseInt(null===(i=n.variant)||void 0===i?void 0:i._regular_price)+n.modificatorsAmount,price:n.options._price}):"variations"===n.type?Object(S.jsxs)("span",{children:[parseInt(n.options._price).toLocaleString("ru-RU")," ","\u20bd"]}):Object(S.jsxs)("span",{children:[parseInt(a).toLocaleString("ru-RU")," \u20bd"]})}();return Object(S.jsxs)("div",{className:"minicart--product","data-product-id":n.id,children:[Object(S.jsxs)("div",{className:"minicart--product-info",children:[Object(S.jsx)("div",{className:"minicart--product-image",children:Object(S.jsx)("img",{src:n.img?n.img:It,alt:n.title})}),Object(S.jsxs)("div",{className:"minicart--product-inner",children:[Object(S.jsx)("div",{className:"minicart--product-name",children:n.title}),Object(S.jsxs)("div",{className:"minicart--product-description",children:["variations"===n.type?Object(S.jsx)("div",{className:"minicart--product-attributes",children:Object.values(n.variant.attributes).map((function(e,t){return Object(S.jsxs)("div",{className:"minicart--product-attribute",children:[s[t],": ",e]},t)}))}):null,(null===(t=n.choosenModificators)||void 0===t?void 0:t.length)?Object(S.jsxs)("div",{className:"minicart--product-attributes",children:["+"," ",n.choosenModificators.map((function(e,t,n){return t!==n.length-1?Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442.,"," "]},e.id):Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442."]},e.id)}))]}):null,"variations"===n.type?n.variant.weight&&Object(S.jsxs)("div",{className:"weight",children:[n.variant.weight," \u0433\u0440."]}):Object(S.jsxs)("div",{children:[n.options.weight?Object(S.jsxs)("div",{className:"weight",children:[n.options.weight," \u0433\u0440."]}):"",n.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[n.options.count_rolls," \u0448\u0442."]}):""]})]}),Object(S.jsx)("div",{className:"minicart--product-remove",onClick:function(){i(xt(Object(I.a)(Object(I.a)({},n),{},{productIndex:r})))},"data-product-id":n.id,children:Object(S.jsx)(_e.a,{})})]})]}),Object(S.jsxs)("div",{className:"minicart--product-result",children:[l,Object(S.jsx)(Cc,{product:n,productCount:c})]})]})}var Ic=n(175),Pc=n.n(Ic);var Sc=n(503),Ec=n(501),Fc=n(504),Tc=n(244),Ac=n.n(Tc),Mc=n(176),Dc=n.n(Mc),Gc=(n(324),function(e,t,n){var c=Object(x.useState)(null),a=Object(Ve.a)(c,2),r=a[0],i=a[1],o=Object(w.e)((function(e){return e.cart.conditionalPromocode})),s=Object(w.e)((function(e){return e.cart.items})),l=Object(w.e)((function(e){return e.products.categories})),d=Object(w.e)((function(e){return e.config.data})),u=Object(w.e)((function(e){return e.cart.subTotalPrice}));return Object(x.useEffect)((function(){if(o){var c=X({promocode:o,items:s,cartTotal:u,config:d,categories:l,typeDelivery:e,preorderDate:t,preorderTime:n});i(c.errors)}}),[o,s,u,d,l,e,t,n]),r}),Rc=function(e){var t=e.ignoreMinPrice,n=void 0!==t&&t,c=e.onlyMinPrice,a=void 0!==c&&c,r=e.typeDelivery,i=e.preorderDate,o=e.preorderTime,s=Object(w.e)((function(e){return e.cart.conditionalPromocode})),l=Object(w.e)((function(e){return e.cart.promocode})),d=Gc(r,i,o);if(!d)return null;var u=d.map((function(e){return a?"minPrice"===e.code?e.message:null:n&&"minPrice"===e.code?null:e.message})).filter((function(e){return e}));return u.length&&!(null===l||void 0===l?void 0:l.code)&&(null===s||void 0===s?void 0:s.code)?Object(S.jsxs)(Ht.a,{severity:"error",sx:{mt:2},children:["\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \xab",null===s||void 0===s?void 0:s.code,"\xbb \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0451\u043d:",u.map((function(e,t){return Object(S.jsx)("div",{children:e},t)}))]}):null},Bc=function(e){var t=Object(w.d)(),n=yc().postRequestAPI,c=e||{},a=c.onApply,r=void 0===a?function(){}:a,i=c.onError,o=void 0===i?function(){}:i,s=g.a.useState(!1),l=Object(Ve.a)(s,2),d=l[0],u=l[1],j=g.a.useState(""),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(w.e)((function(e){var t=e.user,n=e.cart,c=e.config;return{user:t.user,config:c.data,promocodeProduct:n.promocodeProducts,cartProducts:n.items,cartTotal:n.totalPrice,cartSubTotalPrice:n.subTotalPrice}})),h=O.user,v=O.config,f=O.promocodeProduct,x=O.cartProducts,_=O.cartSubTotalPrice;return{handleApplyPromocode:function(e,c){u(!0),n("getPromocode","",{promocode:e,cartProducts:x,token:!!h.token&&h.token,phone:!!h.phone&&h.phone}).then((function(e){(u(!1),"error"===e.data.status)?(p(e.data.message),o(),c&&t(Ut({open:!0,message:e.data.message}))):(p(""),r(),"error"===X({promocode:e.data.promocode,promocodeProduct:f,items:x,cartTotal:_,config:v,isInitial:!0}).status?(t(_t(e.data.promocode)),c&&t(Ut({open:!0,message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443."}))):(p(""),t(gt(e.data.promocode)),c&&t(Ut({open:!0,message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443."}))))}))},handleRemovePromocode:function(){t({type:"COMPLETELY_REMOVE_PROMOCODE"}),t(Ut({open:!0,message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0435\u043d."}))},loading:d,alertMessage:m,handleCloseAlertMessage:function(){p("")}}};function Lc(e){var t=e.ignoreMinPrice,n=void 0!==t&&t,c=e.typeDelivery,a=e.preorderDate,r=e.preorderTime,i=Bc(),o=i.handleApplyPromocode,s=i.handleRemovePromocode,l=i.loading,d=i.alertMessage,u=i.handleCloseAlertMessage,j=Object(w.e)((function(e){var t=e.cart,n=e.config;return{config:n.data,allowPromocodeWithBonusProduct:"on"===n.data.CONFIG_promocode_with_bonus_program,cartPromocode:t.promocode,conditionalPromocode:t.conditionalPromocode,cartTotal:t.totalPrice,userCartBonusProduct:t.bonusProduct}})),b=j.config,m=j.cartPromocode,p=j.conditionalPromocode,O=j.userCartBonusProduct,h=j.allowPromocodeWithBonusProduct,v=x.useState(m?m.code:""),f=Object(Ve.a)(v,2),g=f[0],_=f[1];return Object(S.jsxs)("div",{className:"promocode-wrapper",children:[Object(S.jsxs)("div",{className:"promocode--input-wrapper",children:[Object(S.jsx)(Qe.a,{size:"small",id:"promocode",label:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434",onInput:function(e){_(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&o(g)},value:g||(null===m||void 0===m?void 0:m.code)||(null===p||void 0===p?void 0:p.code)||"",disabled:void 0!==m.code&&!!m.code||!!(null===p||void 0===p?void 0:p.code)||!!O.id&&!h,InputProps:(null===p||void 0===p?void 0:p.code)||m.code?{startAdornment:Object(S.jsx)(Ec.a,{position:"start",children:(null===p||void 0===p?void 0:p.code)?Object(S.jsx)(Ac.a,{color:"error"}):m.code?Object(S.jsx)(Dc.a,{color:"success"}):null})}:{}}),void 0!==m.code&&m.code||(null===p||void 0===p?void 0:p.code)?Object(S.jsx)(Sc.a,{loading:l,size:"small",variant:"button",className:"btn--action promocode-button",onClick:function(){_(""),s()},children:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c"}):Object(S.jsx)(Sc.a,{loading:l||ce(b),size:"small",variant:"button",disabled:!!O.id&&!h,className:"btn--action promocode-button",onClick:function(){return o(g)},children:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c"})]}),Object(S.jsx)(Rc,{ignoreMinPrice:n,typeDelivery:c,preorderDate:a,preorderTime:r}),Object.keys(O).length&&!h?Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:2},children:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0441 \u043f\u043e\u0434\u0430\u0440\u043a\u0430\u043c\u0438."}):"",void 0!==m.description&&m.description&&Object(S.jsx)(Xn.a,{sx:{mt:1},in:!0,children:Object(S.jsxs)(Ht.a,{severity:"success",children:[Object(S.jsx)(Fc.a,{children:"\u0410\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0430!"}),m.description]})}),Object(S.jsx)(Xn.a,{sx:{mt:d?1:0},in:!!d,children:Object(S.jsx)(Ht.a,{severity:"error",action:Object(S.jsx)(pe.a,{"aria-label":"close",color:"inherit",size:"small",onClick:u,children:Object(S.jsx)(_e.a,{fontSize:"inherit"})}),sx:{mb:n?0:2},children:d})})]})}n(325);function Uc(e){var t=e.product;return Object(S.jsxs)("div",{className:"bonus-product",children:[Object(S.jsx)("div",{className:"bonus-product--image",children:Object(S.jsx)("img",{className:"lazyload-image",src:t.img?t.img:It,alt:t.title})}),Object(S.jsxs)("div",{children:[Object(S.jsx)("h4",{className:"bonus-product--title",children:t.title}),Object(S.jsxs)("div",{className:"bonus-product--info",children:[t.options.weight?Object(S.jsxs)("div",{className:"weight",children:[t.options.weight," \u0433\u0440."]}):"",t.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[t.options.count_rolls," \u0448\u0442."]}):""]})]})]})}n(193);function zc(e){var t,n=e.productCart,c=e.productCount,a=e.productTotalPrice,r=(e.productIndex,{});n.attributes&&Object.values(n.attributes).forEach((function(e,t){r[t]=e.name}));var i=Object(w.e)((function(e){var t=e.cart;return{promocodeProducts:t.promocodeProducts,promocode:t.promocode}}));i.promocodeProducts,i.promocode;return Object(S.jsxs)("div",{className:"checkout--product","data-product-id":n.id,children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:[n.title," x ",c," \u0448\u0442.",Object(S.jsx)("br",{}),"variations"===n.type&&Object(S.jsx)("div",{className:"minicart--product-attributes",children:Object.values(n.variant.attributes).map((function(e,t){return Object(S.jsxs)("div",{className:"minicart--product-attribute",children:[r[t],": ",e]},t)}))}),(null===(t=n.choosenModificators)||void 0===t?void 0:t.length)?Object(S.jsxs)("div",{className:"minicart--product-attributes",children:["+"," ",n.choosenModificators.map((function(e,t,n){return t!==n.length-1?Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442,"," "]},e.id):Object(S.jsxs)("span",{children:[e.title," ",e.count," \u0448\u0442"]},e.id)}))]}):null,"variations"===n.type?n.variant.weight&&Object(S.jsx)("div",{className:"minicart--product-attributes",children:Object(S.jsxs)("div",{className:"weight",children:[n.variant.weight," \u0433\u0440."]})}):Object(S.jsxs)("div",{className:"minicart--product-attributes",children:[n.options.weight?Object(S.jsxs)("div",{className:"weight",children:[n.options.weight," \u0433\u0440."]}):"",n.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[n.options.count_rolls," \u0448\u0442."]}):""]})]}),Object(S.jsx)("div",{className:"checkout--product-result",children:function(){var e,t,r,i;return parseInt(n.options._promocode_price)?"variations"===n.type?Object(S.jsx)(Wt,{oldPrice:n.options._price,price:n.options._promocode_price}):Object(S.jsx)(Wt,{oldPrice:n.options._price*c,price:a}):"simple"===n.type&&parseInt(n.options._regular_price)>parseInt(n.options._sale_price)?Object(S.jsx)(Wt,{oldPrice:n.options._regular_price*c+(null!==(r=n.modificatorsAmount)&&void 0!==r?r:0),price:a}):"variations"===n.type&&parseInt(null===(e=n.variant)||void 0===e?void 0:e._regular_price)>parseInt(null===(t=n.variant)||void 0===t?void 0:t.price)?Object(S.jsx)(Wt,{oldPrice:parseInt(null===(i=n.variant)||void 0===i?void 0:i._regular_price)+n.modificatorsAmount,price:n.options._price}):"variations"===n.type?Object(S.jsxs)("span",{children:[parseInt(n.options._price).toLocaleString("ru-RU")," ","\u20bd"]}):Object(S.jsxs)("span",{children:[parseInt(a).toLocaleString("ru-RU")," \u20bd"]})}()})]})}function Hc(){var e=Object(w.e)((function(e){return e.cart.promocode})),t=Object(w.e)((function(e){return e.cart.promocodeProducts})),n={};return t.attributes&&Object.values(t.attributes).forEach((function(e,t){n[t]=e.name})),Object(S.jsxs)("div",{className:"checkout--product","data-product-id":t.id,children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:[t.title,Object(S.jsxs)("div",{className:"minicart--product-attributes",children:["variations"===t.type?Object.values(t.variant.attributes).map((function(e,t){return Object(S.jsxs)("div",{className:"minicart--product-attribute",children:[n[t],": ",e]},t)})):null,"variations"===t.type?t.variant.weight&&Object(S.jsxs)("div",{className:"weight",children:[t.variant.weight," \u0433\u0440."]}):Object(S.jsxs)("div",{children:[t.options.weight?Object(S.jsxs)("div",{className:"weight",children:[t.options.weight," \u0433\u0440."]}):"",t.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[t.options.count_rolls," \u0448\u0442."]}):""]}),Object(S.jsxs)("div",{className:"promocode-name",children:["\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \xab",e.code,"\xbb"]})]})]}),Object(S.jsxs)("div",{className:"checkout--product-result",children:[Object(S.jsx)("span",{className:"old-price",children:"variations"===t.type&&t.variant?"".concat(t.variant.price," \u20bd"):"".concat(t.options._price," \u20bd")}),"\xa0",Object(S.jsxs)("span",{className:"main-color",children:[t.options._promocode_price," \u20bd"]})]})]})}var Wc=function(e){return{type:"SET_MODAL_SALE",payload:e}},Vc=function(){var e=Object(w.d)(),t=Object(w.e)((function(e){return e.pages.sales})),n=Object(x.useCallback)((function(){var t=new URL(window.location.href);t.searchParams.has("sale_id")&&(t.searchParams.delete("sale_id"),window.history.replaceState("",document.title,window.location.pathname)),e(Wc(null))}),[]),c=Object(x.useCallback)((function(t){var n=new URL(window.location.href);n.searchParams.has("sale_id")||(n.searchParams.append("sale_id",t.saleID),window.history.pushState({},"",n.href)),e(Wc(t))}),[]),a=Object(x.useCallback)((function(e){var n=e.replace("?sale_id=",""),a=null===t||void 0===t?void 0:t.find((function(e){return e.saleID==n}));a&&c(a)}),[]);return{handleCloseSaleModal:n,handleSetActiveSale:c,openSaleFromLink:a}};n(326),n(327),n(328),n(329);function Zc(){var e,t=Vc().openSaleFromLink,n=Y(),c=Object(w.e)((function(e){var t,c,a,r,i,o,s=e.banners;return Q()?"vk"===n&&(null===s||void 0===s||null===(t=s.vkMobileBanners)||void 0===t||null===(c=t.banners)||void 0===c?void 0:c.length)?s.vkMobileBanners:"android"!==n&&"ios"!==n||!(null===s||void 0===s||null===(a=s.mobileAppBanners)||void 0===a||null===(r=a.banners)||void 0===r?void 0:r.length)?null===s||void 0===s?void 0:s.mobileBanners:s.mobileAppBanners:"vk"===n&&(null===s||void 0===s||null===(i=s.vkBanners)||void 0===i||null===(o=i.banners)||void 0===o?void 0:o.length)?s.vkBanners:null===s||void 0===s?void 0:s.banners})),a=Object(x.useState)(),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=Object(x.useCallback)((function(e){e.newTab?window.open(e.link,"_blank"):!function(e){try{return Boolean(new URL(e))}catch(t){return!1}}(e.link)&&e.link.includes("?sale_id=")?t(e.link):window.location.href=e.link}),[]);if(!(null===c||void 0===c||null===(e=c.banners)||void 0===e?void 0:e.length))return null;var l={pagination:!0,slidesPerView:1,modules:[Kt.a,Kt.e]};return Q()?(l.spaceBetween=15,c.autoplay&&(l.autoplay={delay:c.autoplay})):(l.modules.push(Kt.d),l.navigation=!0,c.autoplay&&(l.autoplay={delay:c.autoplay}),l.spaceBetween=16),Object(S.jsx)(S.Fragment,{children:Object(S.jsx)("div",{className:Q()?"mobile-banners-wrapper":"banners-wrapper",children:Object(S.jsx)(se.a,{sx:{maxWidth:window.fullWidthSite?"1328px !important":"auto"},children:Object(S.jsx)(Yt.a,Object(I.a)(Object(I.a)({},l),{},{className:Object(Ne.a)(Q()?"bannersMobile-swiper":"banners-swiper"),onSwiper:function(e){return o(e)},loop:!0,loopAdditionalSlides:1,children:Q()?c.banners.map((function(e,t){return Object(S.jsx)(Yt.b,{className:"banner-slide",children:Object(S.jsx)("div",{className:"banner-slide--image-container",children:e.link?Object(S.jsx)("img",{src:e.img,alt:e.alt,style:{cursor:"pointer"},onClick:function(){return s(e)}}):Object(S.jsx)("img",{src:e.img,alt:e.alt})})},t)})):c.banners.map((function(e,t){return Object(S.jsx)(Yt.b,{className:"banner-slide",children:function(t){var n=t.isPrev,c=t.isNext;return Object(S.jsx)("div",{className:"banner-slide--image-container",children:Object(S.jsx)("img",{src:e.img,alt:e.alt,style:{cursor:e.link?"pointer":"auto"},onClick:function(){c?i.slideNext():n?i.slidePrev():e.link&&s(e)}})})}},t)}))}))})})})}n(330);var Qc=n(442),qc=n(121);n(331);function Yc(e){e.initStatus;var t=Me(),n=t.mectricClickAndroid,c=t.mectricClickIos,a=new qc.a,r=Object(w.e)((function(e){var t=e.config;return{widgetStatus:t.data.CONFIG_app_popup_vidget,icon:t.data.CONFIG_company_favicon,linkIos:t.data.CONFIG_APPSTORE,linkAndroid:t.data.CONFIG_GPLAY,installText:t.data.CONFIG_mobile_install_text}})),i=r.widgetStatus,o=r.icon,s=r.linkIos,l=r.linkAndroid,d=r.installText,u=x.useState(!0),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=K();if(a.get("refusedToInstallApp")||"site"!==Y()||!Q()||"disabled"===i)return null;var O,h=function(){a.set("refusedToInstallApp","true",{path:"/",expires:Object(Qc.a)(new Date,1)}),m(!b)};return"android"===p&&l?O=l:"ios"===p&&s?O=s:b=!1,Object(S.jsx)(x.Fragment,{children:Object(S.jsx)(me.a,{anchor:"bottom",open:b,onClose:h,className:"install-app--panel",children:Object(S.jsxs)("div",{className:"install-app--inner",children:[Object(S.jsx)("img",{className:"install-app--icon",src:o,alt:"App logo"}),Object(S.jsx)("h4",{className:"install-app--title",children:"\u0421\u043a\u0430\u0447\u0430\u0439 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"}),Object(S.jsx)(_e.a,{className:"install-app--close",onClick:h}),d?Object(S.jsx)("div",{className:"install-app--text",dangerouslySetInnerHTML:{__html:d}}):Object(S.jsx)("div",{className:"install-app--text",children:Object(S.jsxs)("ul",{children:[Object(S.jsx)("li",{children:"\u0417\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0439 \u0432\u043a\u0443\u0441\u043d\u044f\u0448\u043a\u0438 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a"}),Object(S.jsx)("li",{children:"\u041a\u043e\u043f\u0438 \u0438 \u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0439 \u0431\u043e\u043d\u0443\u0441\u044b"}),Object(S.jsx)("li",{children:"\u041f\u043e\u043b\u0443\u0447\u0430\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u0438\u0434\u043a\u0438 \u0438 \u0430\u043a\u0446\u0438\u0438"})]})}),Object(S.jsx)("a",{href:O,target:"_blank",rel:"noreferrer",className:"btn btn-lg btn--action w-100 t-center",onClick:"android"===p?n:"ios"===p?c:null,children:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"})]})})},"bottom")}var Kc,Jc,Xc,$c,ea=function(){var e=Object(w.e)((function(e){return e.config.data.workingTime})),t=Object(w.e)((function(e){return e.config.data.CONFIG_maintenance_strStart||"01.01.1970 00:00"})),n=Object(w.e)((function(e){return e.config.data.CONFIG_maintenance_strEnd||"01.01.1970 00:00"})),c=Object(w.e)((function(e){return e.config.data.CONFIG_maintenance_type})),a=Object(L.a)(new Date,{year:t.slice(6,10),month:parseInt(t.slice(3,5))-1,date:t.slice(0,2),hours:t.slice(11,13),minutes:t.slice(14),seconds:0,milliseconds:0}),r=Object(L.a)(new Date,{year:n.slice(6,10),month:parseInt(n.slice(3,5))-1,date:n.slice(0,2),hours:n.slice(11,13),minutes:n.slice(14),seconds:0,milliseconds:0}),i=Object(x.useMemo)((function(){return 0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1}),[]),o=(null===e||void 0===e?void 0:e[i][0])?Object(L.a)(new Date,{hours:e[i][0].slice(0,2),minutes:e[i][0].slice(3,5),seconds:0,milliseconds:0}):null,s=parseInt(null===e||void 0===e?void 0:e[i][0].slice(0,2))>=parseInt(null===e||void 0===e?void 0:e[i][1].slice(0,2)),l=(null===e||void 0===e?void 0:e[i][1])?Object(L.a)(new Date,{hours:s?23:e[i][1].slice(0,2),minutes:s?59:e[i][1].slice(3,5),seconds:s?59:0,milliseconds:0}):null,d=Object(x.useMemo)((function(){return 0===i?6:i-1}),[]),u=parseInt(null===e||void 0===e?void 0:e[d][0].slice(0,2))>=parseInt(null===e||void 0===e?void 0:e[d][1].slice(0,2))?Object(L.a)(new Date,{hours:null===e||void 0===e?void 0:e[d][1].slice(0,2),minutes:null===e||void 0===e?void 0:e[d][1].slice(3,5),seconds:0,milliseconds:0}):null,j=e.length&&(o&&l&&function(){try{return Object(U.a)(new Date,{start:o,end:l})}catch(e){return console.log("".concat(e.message,", Something wrong in working interval")),!0}}()||u&&function(){try{return Object(U.a)(new Date,{start:Object(z.a)(new Date),end:u})}catch(e){return console.log("".concat(e.message,", Something wrong in after midnight interval")),!1}}()),b=function(){try{return Object(U.a)(new Date,{start:a,end:r})}catch(e){return console.log("".concat(e.message,", Something wrong in maintenance interval")),!1}}()&&("fullClose"===c||"canViewSite"===c),m=window.location.href.includes("maintenance_preview");return{workingStatus:j,maintenanceStatus:!b&&!m,maintenanceDateStart:a,maintenanceDateEnd:r}},ta=["title","titleId"];function na(){return(na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function ca(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function aa(e,t){var n=e.title,c=e.titleId,a=ca(e,ta);return x.createElement("svg",na({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:"200px",height:"200px",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 21000 21000",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,Kc||(Kc=x.createElement("defs",null,x.createElement("style",null,".fil0{fill:currentColor}"))),x.createElement("g",{id:"\\u0421\\u043B\\u043E\\u0439_x0020_1"},Jc||(Jc=x.createElement("path",{className:"fil0",d:"M17305.13 15343.03c351.63-253.99 503.2-327.89 825.47-662.75 493.75-513.05 1017.09-1396.24 1496.54-1406.57 401.51-8.64 669.61 442.74 552.84 877.73-149.21 555.86-729.44 1369.26-1184.84 1715.24-505.51 384.08-1127.21 825.38-1920.86 999.87 155.16-621.78 216.74-819.66 230.85-1523.52m3447.91-1563.38v268.2c-47.08 477.65-331.36 951.83-619.46 1387.75-526.59 796.8-1350.92 1332.3-2210.9 1733.16-820.72 382.54-1064.04 200.82-1360.77 611.24-527.51 729.64-1470.65 1203.42-2481.01 1463.03-264.18 67.89-1493.65 272.53-1608.46 363.57-577.31 457.81-782.64 674.23-1539.26 674.23-432.57 0-883.54-411.18-965.88-764.66h-80.5c-76.25 327.3-557.5 764.66-965.89 764.66-607.91 0-946.61-147.4-1436.81-575.44-54.24-47.34-118.87-128.56-167.22-154.76-170.02-92.12-1480.8-115.63-2702.81-718.04-702.35-346.22-1024.17-629.94-1477.74-1258.94-933.52-1294.62-596.94-2877.3-236.07-4319.62 87.95-351.58 196.56-717.36 153.82-1068.73-53.96-443.64-164.13-669.64-250.45-1040.16-998.58 0-2141.26 442.7-2334.22 442.7-304.65 0-338.64-386.38-121.07-523.26 272.19-171.23 1821.07-482.87 2294.3-482.87 0-207.37-64.44-451.09-80.48-643.93-204.04 0-219.27-40.24-442.7-40.24h-603.68c-473.49 0-783.66 80.49-1247.6 80.49-66.68-99.59-106.08-181.96-120.74-250.48v-109.97c37.14-137.05 229.63-195.08 534.54-231.89 444.09-53.59 1469.54-107.01 1880.18-11.34 0-253.05 54.84-654.6 97.2-908.94 100.69-604.64 223.43-1015.97 392.62-1579.49l-6.89-2059.29c0-911.7 318.6-2575.7 1448.85-2575.7 867.6 0 1187.68 395.9 1770.87 845.06 150.31 115.76 255.97 264.26 402.37 362.3 113.8-26.53 1037.82-430.67 1483.8-568.7 405.79-125.61 1344.01-279.66 1776.06-279.66 216.27 0 257.47 37.95 482.96 43.44 1200.06 29.27 2394.48 715.81 2776.93 804.92 149.12-99.86 256.89-247.6 425.52-379.38l448.1-356.82c773.76-586.02 1832.73-761.59 2347.21 252.04 262.9 517.94 245.65 834.22 360.99 1329.31 180.94 0 280.62 6.46 386.9 96.06 409.74 345.45-209.76 748.33-312.86 943.86-99.76 189.23-23.16 754.02-74.04 972.34 171.72 0 269.45 11.33 364.05 78.65 256.12 182.23 232.04 674.52-283.55 686.02 204.82 426.88 399.26 1772.03 442.7 2293.98 178.18-85.51 1122.02-61.48 1406.47-38.15 529.07 43.42 1008.25 25.83 1008.25 400.36 0 314.16-377.77 232.71-610.04 207.69-297.44-32.05-525.96-46.71-838.79-46.71l-1006.13 40.24-40.26 643.93c399.5 0 2414.72 308.98 2414.72 684.16 0 591.5-532.19 204.15-1364.56 36.47-1375.36-277.06-1200.8-198.73-1297.38 118.75-306.78 1008.43-220.66 1041.53 54.19 2130.58 67.33 266.77 226.58 874.18 233.29 1175.31 657.03-439.97 1017.82-1146.98 1492.76-1606.12 5.96-5.74 14.71-13.84 20.76-19.48 512.83-477.48 1248.21-540.52 1673.13-31.74 194.6 233.01 289.77 471.12 314.68 710.01m-4364.07-308.77c151.51 440.4 349.01 1442.77 364.62 1980.49 62.99 2169.71-1693.36 3157.69-3633.37 3430.68 79.65-166.82 232.06-356.52 329.7-511.68 110.82-176.12 195.57-334.01 291.15-506.19 97.42-197.52 483.49-785.33 276.44-989.97-419.99-415.07-603.74 730.25-1452.77 1777.93-106.72 131.68-181.04 208.73-303.78 339.69-196.31 209.45-429.11 448.95-722.92 605.76-360.44 192.38-717.7 240.35-942.24-66.2-537.9-734.34-235.4-1732.97-531.97-2105.36-530.92-57.87-399.82 320.27-430.41 744.16-23.48 325.42-70.5 663.35-177.15 955.16-280.48 767.44-701.09 789.88-1362 332.52-560.15-387.64-1214.45-1274.57-1542.54-1919.74-125.73-247.26-236.39-497.32-390.28-718.29-1032.32-128.63 330.44 1623.38 559.7 2060.71-743.23-96.35-1757.76-448.51-2290.13-790.32-534.88-343.46-1071.26-961.3-1260.96-1797.54-320.2-1411.61 466.24-2855.51 453.68-3980.55-6.81-610.34-213.7-966.89-235.75-1226.57 410.62-29.47 1161.45 108.9 1436.98-44.97 126.81-447.11-140.16-459.09-546.19-484.82-348.34-22.07-729.21 1.88-1063.38-26.47l-76.5-537.18c367.4 37.58 1310.14 316.02 1551.11 256.9 219.29-220.63 165.06-426.19-147.36-520.02-220.63-66.26-554.23-99.17-723.17-198.74l-672.9-99.64c-110.44-556.47 313.29-1941.97 458.53-2459.83 76.76-339.99-11.31-986.37-15.59-1379.52-26.36-2416.63 563.49-3933.02 2647.7-1743.15 562.21 590.73 620.06-118.72 2463.62-527.74 1269.12-281.57 2469.14-100.15 3638.31 381.88 1315.49 542.34 686.6 562.93 1745.05-312.94 251.51-208.13 510.02-405.48 872.28-535.16 538.63-192.82 776.31 49.81 946.97 383.88 129.26 253 288.4 767.24 278.46 1082.22-441.24 24.29-1376.51-178.61-1397.94 345.79-22.98 562.04 853.65 362.1 1296.77 389.71-71.71 147.48-1037.81 1209.84-1124.55 1297.85-238.7 242.21-248.07 654.81 171.51 705.79 336.6 40.9 796.51-11.27 1157.95 11.79 115.9 559.42 530.81 1771.51 422.65 2362.63-374.43 57.37-1635.75 197.48-1672.55 547.27-45.28 430.34 441.64 260.97 716.75 189.85 309.2-79.92 629.08-144.83 965.68-178l-110.41 537c-380.62 26.48-1539.72-135.42-1619.85 259.2-83.65 412.01 353.95 327.08 614.34 307.48 248.99-18.75 614.73-38.62 858.96-6.16-72.5 390.22-217.66 667.27-237.17 1140.94-18.55 450.67 83.07 818.31 164.92 1239.47"})),x.createElement("path",{d:"M13741.07 17864.18c-95.58 172.18-180.33 330.07-291.15 506.19-97.64 155.16-250.05 344.86-329.7 511.68 1940.01-272.99 3696.36-1260.97 3633.37-3430.68-15.61-537.72-213.11-1540.09-364.62-1980.49-109.48-65.4-141.8-174.43-280-220.85-159.15-53.44-323.6-12.65-422.52 73.03-521.4 451.67 1108.93 2470.31-530.95 3895.92-261.56 227.37-966.95 596.97-1414.43 645.2m3564.06-2521.15c-14.11 703.86-75.69 901.74-230.85 1523.52 793.65-174.49 1415.35-615.79 1920.86-999.87 455.4-345.98 1035.63-1159.38 1184.84-1715.24 116.77-434.99-151.33-886.37-552.84-877.73-479.45 10.33-1002.79 893.52-1496.54 1406.57-322.27 334.86-473.84 408.76-825.47 662.75",style:{fill:"var(--main-color, #FDC54E)"}}),Xc||(Xc=x.createElement("path",{className:"fil0",d:"M17855.39 1204.55c-194.63 290.64-418.72 482.62-632.03 736.32-96.32 114.55-111.7 149.59-223.44 259.5-103.69 102.02-114.62 135.77-202.99 239.71-94.24 110.87-154.41 122.69-217.68 269.04-96.65 223.66 37.89 507.7 310.24 507.7h1891.53c287.25 0 516.88-715.62-158.4-727.01-278.88-4.7-567.47 2.59-847.73 2.59 32.5-121.69 372.88-469.31 493.46-593.16l342.1-382.33c143.1-153.81 452.3-478.56 452.3-674.57 0-198.91-163.3-362.21-362.22-362.21h-1811.04c-374.62 0-444.84 503.03-188.81 671.72 181.76 119.77 871.12 52.7 1154.71 52.7M9641.15 8630.06c-591.94 57.6-1410.76 274.96-1362.26 902.37 30.22 391.06 448.4 341.22 803.01 340.73 323.27-.42 2101.28 29.87 2275.63-33.14 534.89-193.27 148.18-1391.4-1716.38-1209.96"})),x.createElement("path",{d:"M3605.11 6970.8c-145.24 517.86-568.97 1903.36-458.53 2459.83l672.9 99.64c231.98-115.22 185.83-566.04 232.22-838.96 119.24-701.6 498.39-1562.94 301.28-1832.87-74.14-101.53-230.92-178.23-417.95-146.26-194.3 33.2-214.12 151.39-329.92 258.62",style:{fill:"var(--main-color, #FDC54E)"}}),$c||($c=x.createElement("path",{className:"fil0",d:"M12239.06 7316.53c-182.31 50.66-278.37 108.44-283.54 330.84-4.65 200.2 109.6 319.52 271.43 357.54 139.41 32.74 1142.23 32.25 1272.11-5.95 344.11-101.2 321.25-621.22-49.31-692.06-150.35-28.76-1090.24-23.86-1210.69 9.63m-5786.8 5.98c-436.19 159.86-321.04 638.96 52.65 693.26 155.7 22.63 1112.92 20.39 1234.54-22.3 322.15-113.09 329.41-640.58-114.9-691.69-184.03-21.19-1043.78-26.37-1172.29 20.73"}))))}var ra=x.forwardRef(aa),ia=(n.p,n(332),g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})));function oa(){var e,t=ea(),n=t.workingStatus,c=t.maintenanceStatus,a=Object(N.h)(),r=Object(w.e)((function(e){return e.config.data})),i=r.CONFIG_maintenance_text,o=r.CONFIG_maintenance_title,s=r.CONFIG_maintenance_type,l=r.CONFIG_preorder_limit_type,d=r.CONFIG_close_modal_by_cross,u=window.CONFIG_not_working_image,j=window.CONFIG_platform_off_image,b=Object(x.useState)(!1),m=Object(Ve.a)(b,2),p=m[0],O=m[1];Object(x.useEffect)((function(){n&&c||O(!0)}),[n,c]);var h=function(){O(!1)};if(n&&c||window.adminAccess&&!window.location.href.includes("maintenance_preview"))return null;var v={open:p,maxWidth:"md"};return Q()&&(v.TransitionComponent=ia,v.fullScreen=!0,v.scroll="body"),Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md"},v),{},{sx:{"& .MuiPaper-root":{borderRadius:Q()?"0px":"20px"}},onClose:function(e,t){if("escapeKeyDown"===t||"backdropClick"===t&&"active"!==d){if(!c&&"canViewSite"!==s)return;h()}},children:Object(S.jsxs)("div",{className:"modal-alert--wrapper we-closed-modal",children:[c||"canViewSite"===s?Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:h,"aria-label":"close",className:Object(Ne.a)("modal-close","vk"===Y()&&"vk"),children:Object(S.jsx)(_e.a,{})}):null,c?u?Object(S.jsx)("img",{src:u,className:"cat-sleep-img"}):Object(S.jsx)(ra,{className:"cat-sleep-img"}):j?Object(S.jsx)("img",{src:j,className:"cat-sleep-img"}):Object(S.jsx)(ra,{className:"cat-sleep-img"}),Object(S.jsx)("h2",{className:"main-color",children:!c&&o?o:"\u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044b."}),Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:c?"disable"===l||"currentDay"===l?"":"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437 \u0438 \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c!":i}}),!c&&"canViewSite"!==s||"disable"===l||"currentDay"===l?null:Object(S.jsx)(de.a,{className:"btn--action",variant:"contained",onClick:h,sx:{mt:"20px"},children:"\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u0435\u043d\u044e"}),!c&&"fullClose"===s&&(null===(e=window.towns)||void 0===e?void 0:e.length)?Object(S.jsx)(de.a,{className:"btn--action",variant:"contained",onClick:function(){"folder"===window.townsTypeRoute?a("/"):window.location.href=window.location.origin},sx:{mt:"20px"},children:"\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e"}):null]})}))}n(333);var sa=n(473);function la(e){return Object(S.jsx)(He.a,Object(I.a)(Object(I.a)({},e),{},{direction:"right"}))}function da(e){e.initStatus;var t=Object(w.d)(),n=Object(w.e)((function(e){return{alerts:e.systemAlerts}})).alerts,c=function(e,n){"clickaway"!==n&&t(Ut({open:!1,message:""}))};return Object(S.jsx)(sa.a,{open:n.open,anchorOrigin:{vertical:Q()?"top":"bottom",horizontal:"left"},autoHideDuration:6e3,onClose:c,TransitionComponent:la,message:n.message,action:Object(S.jsx)(x.Fragment,{children:Object(S.jsx)(pe.a,{"aria-label":"close",color:"inherit",sx:{p:.5},onClick:c,children:Object(S.jsx)(_e.a,{})})}),sx:{"& .MuiSnackbarContent-root":{backgroundColor:"rgb(50, 50, 50)",color:"#fff"}}},"TransitionRight")}var ua=n(142),ja=n(245),ba=n.n(ja),ma=(n(341),function(){return Object(S.jsx)(S.Fragment,{children:Object(an.a)(Array(4)).map((function(e,t){return Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:100,height:32,variant:"rounded",sx:{borderRadius:"15px",mr:"15px"}})},t)}))})}),pa=function(){return Object(S.jsx)("ul",{className:"categories-menu",children:Object(an.a)(Array(5)).map((function(e,t){return Object(S.jsx)("li",{children:Object(S.jsx)(Fe.a,{width:100,height:32,variant:"rounded",sx:{bgcolor:"rgba(255, 255, 255, 0.11)",borderRadius:"15px",mr:"15px"}})},t)}))})};function Oa(){ba.a.polyfill();var e=Object(w.d)(),t=Object(x.useRef)(),n=Object(x.useRef)(),c=Object(x.useRef)(),a=Object(N.g)().pathname,r=k().rootTownPathname,i=Me().metricViewCategory,o=Object(w.e)((function(e){return e.products.status})),s=Object(w.e)((function(e){return e.products.categories})),l=Object(w.e)((function(e){return e.products.items})),d=Object(w.e)((function(e){return e.config.data.CONFIG_type_categories})),u=Object(w.e)((function(e){return e.header})).mobileMenuOpen,j=Object(x.useState)(!1),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(x.useState)(null),h=Object(Ve.a)(O,2),v=h[0],f=h[1];Object(x.useEffect)((function(){if(s){var e=s.map((function(e){return $(e).disabled&&"block"!==e.limit_type?null:Object.values(l).find((function(t){return t.categories.includes(e.term_id)}))?e:void 0})).filter((function(e){return e}));f(e)}}),[s,l]),Object(x.useEffect)((function(){return window.addEventListener("scroll",_),function(){window.removeEventListener("scroll",_)}}),[m]);var g=document.querySelector(".fullwidth-header--wrapper"),_=function(){var e=g?g.offsetHeight:0;window.scrollY+e>=c.current.offsetTop&!m&&p(!0),window.scrollY+e<c.current.offsetTop&m&&p(!1)},y=function(){var e=document.querySelector(".sticked-top-bar .active");if(e){var t=e.parentElement;n.current.scrollTo({left:t.offsetLeft-n.current.offsetWidth/2+t.offsetWidth/2,behavior:"smooth"})}},C=a===r||a===r+"/";return Q()?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{ref:c}),Object(S.jsx)("div",{className:"sticked-top-bar--container",children:Object(S.jsx)("div",{className:Object(Ne.a)("sticked-top-bar",{sticked:m,white:"one"===d,filled:"two"===d,fullWidthSite:!!window.fullWidthSite}),ref:t,children:Object(S.jsxs)(se.a,{className:"inner-wrapper",children:[Object(S.jsxs)("ul",{className:"categories-menu",ref:n,children:[Q()?Object(S.jsx)("li",{children:Object(S.jsx)("a",{className:"menu-icon",children:Object(S.jsx)(xe.a,{onClick:function(){e(u?{type:"CLOSE_MOBILE_MENU"}:{type:"OPEN_MOBILE_MENU"})}})})}):null,(null===s||void 0===s?void 0:s.length)||o?null===v||void 0===v?void 0:v.map((function(e){var t=a.includes("/category/".concat(e.slug))||a.includes("/product-category/".concat(e.slug));return Object(S.jsx)("li",{className:"viewCategory","data-targetid":e.term_id,children:C?Object(S.jsx)(ua.Link,{activeClass:"active",to:"category-".concat(e.term_id),spy:!0,smooth:!0,offset:-70,duration:500,onSetActive:y,onClick:i,spyThrottle:520,children:e.name}):Object(S.jsx)(E,{to:"/category/".concat(e.slug),style:{textDecoration:"none"},className:Object(Ne.a)(t&&"active"),onClick:i,children:e.name})},e.term_id)})):Object(S.jsx)(ma,{})]}),Object(S.jsx)(zn,{})]})})})]}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{ref:c}),Object(S.jsx)("div",{className:Object(Ne.a)("sticked-top-bar",{sticked:m,white:"one"===d,filled:"two"===d,fullWidthSite:!!window.fullWidthSite}),ref:t,children:Object(S.jsxs)(se.a,{className:"inner-wrapper",children:[(null===s||void 0===s?void 0:s.length)||o?Object(S.jsx)($a,{ref:n,children:null===v||void 0===v?void 0:v.map((function(e){var t=a.includes("/category/".concat(e.slug))||a.includes("/product-category/".concat(e.slug));return Object(S.jsx)("li",{className:"viewCategory","data-targetid":e.term_id,children:C?Object(S.jsx)(ua.Link,{activeClass:"active",to:"category-".concat(e.term_id),spy:!0,smooth:!0,offset:window.fullWidthSite?-125:-70,duration:500,hashSpy:!0,spyThrottle:500,onClick:i,children:e.name}):Object(S.jsx)(E,{to:"/category/".concat(e.slug),onClick:i,style:{textDecoration:"none"},className:Object(Ne.a)(t&&"active"),children:e.name})},e.term_id)}))}):Object(S.jsx)(pa,{}),window.fullWidthSite?null:Object(S.jsx)(zn,{})]})})]})}var ha=n(260),va=n(459),fa=function(e){return Object(S.jsx)(ha.a,Object(I.a)({sx:{"& .MuiPaper-root":{borderRadius:"20px",mt:"3px"}}},e))},xa=function(e){var t=e.dontShowList,n=e.dontShowButton,c=e.products,a=void 0===c?[]:c,r=e.handleFilter,i=void 0===r?function(){}:r,o=k().navigateTo,s=Object(w.d)(),l=Object(P.c)(),d=Object(Ve.a)(l,1)[0].get("query"),u=Object(w.e)((function(e){return e.products})).categories,j=Object(x.useState)(d||null),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(x.useState)(null),h=Object(Ve.a)(O,2),v=h[0],f=h[1],g=Object(x.useState)(!1),_=Object(Ve.a)(g,2),y=_[0],N=_[1],C=new qe.a(a,{keys:["title"],minMatchCharLength:1,threshold:.2});Object(x.useEffect)((function(){if(d){var e=C.search(d);f(e)}}),[s]),Object(x.useEffect)((function(){if(t&&v&&v.length){var e=v.map((function(e){return e.item}));i(e)}else t&&m?i([]):t&&!m&&i(null)}),[v,m]);var E=null===u||void 0===u?void 0:u.filter((function(e){return $(e).disabled})).map((function(e){return e.term_id})),F=function(e){p(e);var t=C.search(e);f(t),e.length>=1?N(!0):N(!1)},T=t?null:(null===v||void 0===v?void 0:v.length)?Object(S.jsx)(ot.a,{container:!0,spacing:{xs:0,sm:2},children:v.map((function(e){return Object(S.jsx)(Lt,{product:e.item,disabled:e.item.categories.some((function(e){return null===E||void 0===E?void 0:E.includes(e)}))},e.id)}))}):Object(S.jsx)("div",{children:"\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e"}),A=function(){o("/search".concat(m?"?query="+m:""))};return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{style:{display:"flex",height:"40px",marginBottom:"16px"},children:[Object(S.jsx)(va.a,{freeSolo:!0,autoSelect:!0,inputValue:m||"",id:"search-bar",open:y,onClose:function(){return N(!1)},options:a,getOptionLabel:function(e){return e.title?e.title:""},renderOption:function(e,t){return Object(x.createElement)("li",Object(I.a)(Object(I.a)({},e),{},{key:t.id}),t.title)},onChange:function(e,t,n){"blur"!==n&&(t?F(t.title):(F(""),f(null)))},renderInput:function(e){return Object(S.jsx)(Qe.a,Object(I.a)(Object(I.a)({},e),{},{size:"small",label:"\u041f\u043e\u0438\u0441\u043a \u0442\u043e\u0432\u0430\u0440\u043e\u0432",value:m,onKeyPress:function(e){"Enter"===e.key&&A()},inputProps:Object(I.a)(Object(I.a)({},e.inputProps),{},{onKeyDown:function(e){"Enter"===e.key&&e.stopPropagation()}}),onChange:function(e){F(e.target.value)},InputProps:Object(I.a)(Object(I.a)({},e.InputProps),{},{endAdornment:Object(S.jsx)("div",{onClick:function(){F(""),f(null)},children:e.InputProps.endAdornment})}),sx:{"& .MuiInputBase-root":{borderRadius:"20px !important",bgcolor:"var(--background-color)",height:"40px"}}}))},PopperComponent:fa,sx:{flexGrow:1,"& .MuiAutocomplete-endAdornment":{position:"relative"}}}),n?null:Object(S.jsx)(de.a,{className:"btn--action",variant:"outlined",sx:{width:"100px",ml:1},onClick:A,children:"\u041d\u0430\u0439\u0442\u0438"})]}),T]})},ga=n(505),_a=n(502),ya=n(443);function wa(e){return Object(S.jsx)(He.a,Object(I.a)(Object(I.a)({},e),{},{direction:"right"}))}var Na,Ca=function(){var e=Object(x.useRef)(),t=Object(x.useState)(!1),n=Object(Ve.a)(t,2),c=n[0],a=n[1],r=Object(w.e)((function(e){return e.config})).data,i=Object(w.e)((function(e){return e.user.user.token})),o=Object(ya.a)("(min-width:600px)"),s=new qc.a,l=!s.get("popupWidgetWasShown")&&"active"===r.CONFIG_popup_widget_status&&r.CONFIG_popup_widget_text&&r.CONFIG_popup_widget_title&&(i||"active"!==r.CONFIG_popup_widget_show_auth_users),d=function(e,t){"clickaway"!==t&&(s.set("popupWidgetWasShown","true",{path:"/",expires:Object(Qc.a)(new Date,7),sameSite:"none",secure:!0}),a(!1))};return Object(x.useEffect)((function(){return l?e.current=setTimeout((function(){a(!0)}),1e3*parseInt(r.CONFIG_popup_widget_delay||60)):c&&a(!1),function(){e.current&&clearTimeout(e.current)}}),[l,r.CONFIG_popup_widget_delay]),Object(S.jsx)(sa.a,{open:c,anchorOrigin:{vertical:Q()?"top":"bottom",horizontal:"left"},onClose:d,TransitionComponent:wa,message:Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column"},children:[Object(S.jsx)(_a.a,{sx:{fontWeight:600,fontSize:"20px"},children:r.CONFIG_popup_widget_title}),Object(S.jsx)(_a.a,{sx:{mb:1},children:r.CONFIG_popup_widget_text}),Object(S.jsxs)(ga.a,{sx:{display:"flex",flexBasis:"0.5"},children:[Object(S.jsx)(de.a,{variant:"outlined",onClick:d,sx:{flexGrow:1},children:r.CONFIG_popup_widget_cancel_button||"\u041d\u0435\u0442"}),Object(S.jsx)(de.a,{onClick:function(){s.set("popupWidgetWasShown","true",{path:"/",expires:Object(Qc.a)(new Date,7),sameSite:"none",secure:!0}),a(!1),r.CONFIG_popup_widget_link&&window.open(r.CONFIG_popup_widget_link,"_blank")},variant:"contained",sx:{ml:1,flexGrow:1,flexBasis:"0.5"},className:"btn--action",children:r.CONFIG_popup_widget_apply_button||"\u0414\u0430"})]})]}),action:Object(S.jsx)(S.Fragment,{}),sx:{mb:4,"& .MuiPaper-root":{maxWidth:o?"320px":"auto",boxShadow:"var(--box-shadow)",borderRadius:"15px"},"& .MuiSnackbarContent-root":{backgroundColor:"var(--background-color)",color:"var(--text-color)"},"& .MuiSnackbarContent-message":{width:"100%"}},className:"subscribe-snackbar"},"TransitionRight")},ka=n(128),Ia=n.n(ka),Pa=(n(342),function(){var e=Object(x.useRef)(null),t=Object(w.e)((function(e){return{config:e.config.data}})).config;return Object(x.useEffect)((function(){if(e.current){var n=Ia.a.map(e.current).setView([t.CONFIG_latitude,t.CONFIG_longitude],17);Ia.a.tileLayer("https://tile2.maps.2gis.com/tiles?x={x}&y={y}&z={z}",{}).addTo(n),n.attributionControl.setPrefix("");var c=Ia.a.divIcon({className:"marker",html:'\n            <svg width="30" height="48" viewBox="0 0 30 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.0363806" d="M15 46.9999C16.6569 46.9999 18 46.3284 18 45.4999C18 44.6715 16.6569 43.9999 15 43.9999C13.3431 43.9999 12 44.6715 12 45.4999C12 46.3284 13.3431 46.9999 15 46.9999Z" fill="black"></path><path opacity="0.0363806" d="M15 47.9999C17.4853 47.9999 19.5 46.8807 19.5 45.4999C19.5 44.1192 17.4853 42.9999 15 42.9999C12.5147 42.9999 10.5 44.1192 10.5 45.4999C10.5 46.8807 12.5147 47.9999 15 47.9999Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M15 45.8836H15.8824C15.8824 29.2177 20.7768 23.7974 27.9874 23.7974H28.3297C29.0779 21.5907 30 17.9915 30 15.0004C30 7.1439 23.7679 0.000366211 15 0.000366211C6.23206 0.000366211 0 7.1439 0 15.0004C0 17.9915 0.922059 21.5907 1.67029 23.7974H2.01265C9.22412 23.7974 14.1176 29.2177 14.1176 45.8836H15Z" fill="url(#czar-a)"></path><defs><linearGradient id="czar-a" x1="15" y1="22.942" x2="15" y2="0.000366211" gradientUnits="userSpaceOnUse"><stop stop-color="#1B89EE"></stop><stop offset="1" stop-color="#3198EC"></stop></linearGradient></defs></svg>',iconSize:[30,48],iconAnchor:[15,48],popupAnchor:[0,-48]}),a=Ia.a.marker([t.CONFIG_latitude,t.CONFIG_longitude],{icon:c}).addTo(n),r=t.CONFIG_format_start_work&&t.CONFIG_format_end_work?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ".concat(t.CONFIG_format_start_work," \u0434\u043e \n                    ").concat(t.CONFIG_format_end_work):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e";a.bindPopup("<b>".concat(t.CONFIG_address,"</b><br>").concat(r));var i=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;t.CONFIG_filials.forEach((function(e){if(e.latitude&&e.longitude){var a=Ia.a.marker([e.latitude,e.longitude],{icon:c}).addTo(n),r=e.workingTime?e.workingTime[i][0]&&e.workingTime[i][1]?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ".concat(e.workingTime[i][0]," \u0434\u043e \n                        ").concat(e.workingTime[i][1]):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e":t.CONFIG_format_start_work&&t.CONFIG_format_end_work?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 \n                    ".concat(t.CONFIG_format_start_work," \n                    \u0434\u043e \n                    ").concat(t.CONFIG_format_end_work):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e";a.bindPopup("<b>".concat(e.address,"</b><br>").concat(r))}}))}}),[]),Object(S.jsx)("div",{style:{height:"100%"},ref:e})}),Sa=n(34),Ea=n(37),Fa=n(61),Ta=n(62),Aa=(n(343),function(e){Object(Fa.a)(n,e);var t=Object(Ta.a)(n);function n(e){var c;return Object(Sa.a)(this,n),(c=t.call(this,e)).refreshHandler=function(){window.localStorage.clear(),document.location.reload()},c.state={hasError:!1,errorInfo:null},c}return Object(Ea.a)(n,[{key:"render",value:function(){var e=window.CONFIG_error_image;return this.state.hasError?Object(S.jsxs)("div",{className:"error-page__wrapper",children:[e?Object(S.jsx)("img",{src:e,className:"error-page__image",alt:"\u041e\u0448\u0438\u0431\u043a\u0430"}):Object(S.jsx)(Ln,{className:"error-page__image"}),Object(S.jsx)("h4",{className:"error-page__title",children:"\u0423\u043f\u0441! \u0427\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a"}),Object(S.jsx)(de.a,{onClick:this.refreshHandler,className:"error-page__refresh-btn",variant:"contained",children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435"})]}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),n}(g.a.Component)),Ma=(n(227),function(e){var t=e.code,n=e.onApply,c=void 0===n?function(){}:n,a=e.onError,r=void 0===a?function(){}:a,i=Object(w.d)(),o=Bc({onApply:c,onError:r}),s=o.handleApplyPromocode,l=o.loading,d=Object(w.e)((function(e){return e.cart.promocode})),u=Object(w.e)((function(e){return e.cart.conditionalPromocode})),j=Object(w.e)((function(e){return"on"===e.config.data.CONFIG_promocode_with_bonus_program})),b=Object(w.e)((function(e){return e.cart.bonusProduct}));return Object(S.jsx)(Sc.a,{onClick:function(){i({type:"COMPLETELY_REMOVE_PROMOCODE"}),s(t,!0)},loading:l,variant:"contained",size:"small",disabled:(null===d||void 0===d?void 0:d.code)===t||(null===u||void 0===u?void 0:u.code)===t||!!b.id&&!j,tooltip:!0,sx:{"&.MuiLoadingButton-root.Mui-disabled":{bgcolor:"var(--counter-buttons-color)",color:"var(--text-color)"}},children:(null===d||void 0===d?void 0:d.code)===t||(null===u||void 0===u?void 0:u.code)===t?"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435":"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434"})}),Da=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})),Ga=function(){var e=Vc(),t=e.handleSetActiveSale,n=e.handleCloseSaleModal,c=Object(w.e)((function(e){return e.pages.sales})),a=Object(w.e)((function(e){return e.config.data.CONFIG_close_modal_by_cross})),r=Object(w.e)((function(e){return e.saleModal.activeSale})),i=Object(w.e)((function(e){return e.config.data})),o={open:!!r,maxWidth:"md"};Q()&&(o.TransitionComponent=Da,o.fullScreen=!0);var s=function(){new URL(window.location.href).searchParams.has("sale_id")||n()};return Object(x.useEffect)((function(){return r&&window.addEventListener("popstate",s),function(){window.removeEventListener("popstate",s)}}),[r]),Object(x.useEffect)((function(){var e=new URL(window.location.href).searchParams.get("sale_id");if(e){var a=c.find((function(t){return t.saleID==e}));a?t(a):!a&&r&&n()}}),[c]),r?Object(S.jsxs)(We.a,Object(I.a)(Object(I.a)({},o),{},{className:"sale-dialog",sx:{"& .MuiPaper-root":{borderRadius:Q()?"0px":"15px"}},onClose:function(e,t){"escapeKeyDown"===t&&n(),"backdropClick"===t&&"active"!==a&&n()},children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:n,"aria-label":"close",className:"modal-close",sx:"vk"!==Y&&Q()?{right:"17px",left:"unset"}:{},children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("div",{className:"sale-modal--container",children:Object(S.jsxs)("div",{className:"sale-modal",children:[Object(S.jsx)("h2",{className:"sale-modal--title",children:r.saleTitle}),Object(S.jsx)("div",{className:"sale--content",dangerouslySetInnerHTML:{__html:r.saleContent}}),r.promocodeCode&&ie(i)?Object(S.jsx)(Ma,{code:r.promocodeCode}):null]})})]})):null},Ra=function(){var e=ua.animateScroll,t=Object(x.useState)(!1),n=Object(Ve.a)(t,2),c=n[0],a=n[1];Object(x.useEffect)((function(){return window.addEventListener("scroll",r),function(){window.removeEventListener("scroll",r)}}),[c]);var r=function(){window.scrollY>=600&&!c?a(!0):window.scrollY<600&&c&&a(!1)};return Object(S.jsx)(tc.a,{in:c,timeout:300,children:Object(S.jsx)("div",{className:"scroll-to-top-btn",onClick:function(){e.scrollToTop({duration:800})},children:Object(S.jsx)(dt.a,{icon:Un.d})})})},Ba=(n(344),g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}))),La=function(e){var t=e.openModal,n=e.beforePaymentConfirm,c=e.beforePaymentCancel,a=e.content,r={open:t,maxWidth:"md"};return Q()&&(r.TransitionComponent=Ba,r.scroll="body"),Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md"},r),{},{sx:{"& .MuiPaper-root":{borderRadius:"20px"}},children:Object(S.jsxs)("div",{className:"modal-alert--wrapper before-payment-modal",children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:c,"aria-label":"close",className:"modal-close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("h2",{className:"main-color",children:"\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435"}),Object(S.jsx)("div",{className:"before-payment-modal--content",dangerouslySetInnerHTML:{__html:a}}),Object(S.jsxs)("div",{className:"before-payment-modal--buttons",children:[Object(S.jsx)(de.a,{className:"btn btn--outline-dark",onClick:c,children:"\u041e\u0442\u043c\u0435\u043d\u0430"}),Object(S.jsx)(de.a,{variant:"button",className:"btn btn--action",onClick:n,children:"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c"})]})]})}))},Ua=function(e){return{type:"SET_OPEN_DELIVERY_MODAL",payload:e}},za=function(e){return{type:"SET_DELIVERY_ZONE",payload:e}},Ha=n(506),Wa=n(507),Va=n(255),Za=(n(345),g.a.forwardRef((function(e,t){var n,c,a,r,i=e.dadataValue,o=e.handleDadataValueChange,s=e.error,l=e.helperText,d=Object(w.e)((function(e){return e.config.data})),u=Object(x.useState)(!(null===(n=d.deliveryZones)||void 0===n?void 0:n.daDataApiKey)),j=Object(Ve.a)(u,2),b=j[0],m=j[1];return Object(x.useEffect)((function(){var e,t={method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Token "+(null===(e=d.deliveryZones)||void 0===e?void 0:e.daDataApiKey)},body:JSON.stringify({query:"\u041c\u043e\u0441\u043a\u0432\u0430"})};fetch("https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address",t).then((function(e){e.ok||m(!0)})).then((function(e){})).catch((function(e){console.log("error",e),m(!0)}))}),[]),Object(S.jsxs)("div",{className:Object(Ne.a)("dadata-address-input",s&&"error"),children:[Object(S.jsxs)("div",{className:"dadata-input-container",children:[Object(S.jsx)(Va.a,{token:null===(c=d.deliveryZones)||void 0===c?void 0:c.daDataApiKey,value:i,filterLocationsBoost:[{kladr_id:(null===(a=d.deliveryZones)||void 0===a?void 0:a.townKladrId)?null===(r=d.deliveryZones)||void 0===r?void 0:r.townKladrId:""}],inputProps:{placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0443\u043b\u0438\u0446\u0443 \u0438 \u0434\u043e\u043c",disabled:b},onChange:o,minChars:1,ref:t}),Object(S.jsx)("fieldset",{className:"dadata-address-fieldset"})]}),s&&l?Object(S.jsx)("p",{className:"dadata-helper-text",children:l}):null,b&&Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:2},children:"\u041f\u043e\u0438\u0441\u043a \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435."})]})}))),Qa=n(54),qa=(n(346),g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}))),Ya=(Na=function(e){var t=e.ymaps,n=e.choosenAddress,c=e.onYandexApiError,a=e.handleChooseZoneDeliveryAddress,r=Object(w.d)(),i=Object(x.useRef)(null),o=Object(x.useRef)(null),s=Object(x.useRef)(),l=Object(w.e)((function(e){return e.deliveryAddressModal})).modalOpen,d=Object(w.e)((function(e){return e.config.data})),u=Object(x.useState)(null),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=Object(x.useState)(null),O=Object(Ve.a)(p,2),h=O[0],v=O[1],f=Object(x.useState)(""),g=Object(Ve.a)(f,2),_=g[0],y=g[1],N=Object(x.useState)(""),C=Object(Ve.a)(N,2),k=C[0],P=C[1],E=Object(x.useState)(""),F=Object(Ve.a)(E,2),T=F[0],A=F[1],M=Object(x.useState)(""),D=Object(Ve.a)(M,2),G=D[0],R=D[1],B=Object(x.useState)(""),L=Object(Ve.a)(B,2),U=L[0],z=L[1],H=Object(x.useState)(""),W=Object(Ve.a)(H,2),V=W[0],Z=W[1],q=Object(x.useState)(""),K=Object(Ve.a)(q,2),J=K[0],X=K[1],$=Object(x.useState)(null),ee=Object(Ve.a)($,2),te=ee[0],ne=ee[1],ce=Object(x.useState)(""),ae=Object(Ve.a)(ce,2),re=ae[0],ie=ae[1],oe=Object(x.useState)(!1),se=Object(Ve.a)(oe,2),le=se[0],ue=se[1],je=Object(x.useState)(!0),be=Object(Ve.a)(je,2),me=be[0],Oe=be[1],he=Object(x.useState)(),ve=Object(Ve.a)(he,2),fe=ve[0],xe=ve[1];Object(x.useEffect)((function(){i.current&&n&&o.current?(n.coordinates?(we(n.coordinates),o.current.geometry.setCoordinates(n.coordinates)):ke(),n.apartment?z(n.apartment):z(""),n.floor?X(n.floor):X(""),n.porch?Z(n.porch):Z(""),n.detachedHouse?ue(!0):ue(!1)):(ke(),z(""),X(""),Z(""),ue(!1),xe(null))}),[n,b,o.current]);var ge=function(){r(Ua(!1))},ye=function(e){y(e)};Object(x.useEffect)((function(){if(i.current)if(n&&n.coordinates){var e=null;i.current.geoObjects.each((function(t){"Polygon"===t.geometry.getType()&&t.geometry.getBounds()&&t.geometry.contains(n.coordinates)&&(e={name:t.options._options.name,deliveryPrice:t.options._options.deliveryPrice,orderMinPrice:t.options._options.orderMinPrice,freeDeliveryOrder:t.options._options.freeDeliveryOrder,deliveryTime:t.options._options.deliveryTime,index:t.options._options.index})})),r(za(e||null))}else r(za(null))}),[n,b]);var we=Object(x.useCallback)((function(e){t.geocode(e).then((function(t){var n=t.geoObjects.get(0);Ce(n),y(n.getAddressLine()),Se(n.getAddressLine()),ne(e),Ie({value:e,name:"coordinates"})})).catch((function(e){return c()}))}),[]),Ce=function(e){var t=e.getLocalities(),n="";t.length?(t.forEach((function(e,t,c){e&&(n+=e,t!=c.length-1&&(n+=", "))})),P(n)):P(null);var c=e.getThoroughfare();c?A(c):(A(n),P(null));var a=e.getPremiseNumber();R(a||null),ie(""),Ie({value:a,name:"home"})},ke=function(){var e;ye(""),ne(null),null===(e=s.current)||void 0===e||e.setInputValue(""),o.current&&o.current.geometry.setCoordinates(null)},Ie=function(e){var t=Object(I.a)({},h);return e?("apartment"===e.name&&e.name in t&&(t.apartment=le||e.value||"yes"===d.CONFIG_checkout_hide_apartment?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0432\u0430\u0440\u0442\u0438\u0440\u044b"),"coordinates"===e.name&&e.name in t&&(t.coordinates=e.value?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435"),"home"===e.name&&e.name in t&&(t.home=G?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430")):(t.apartment=le||U||"yes"===d.CONFIG_checkout_hide_apartment?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u043a\u0432\u0430\u0440\u0442\u0438\u0440\u044b",t.coordinates=te?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435",t.home=G?"":"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430"),v(Object(I.a)({},t)),Object.values(t).every((function(e){return""==e}))},Pe={open:l,maxWidth:"md",keepMounted:!0};Q()&&(Pe.TransitionComponent=qa,Pe.fullScreen=!0,Pe.scroll="body");var Se=function(e){s.current.setInputValue(e)};return Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({},Pe),{},{className:"delivery-address-modal--dialog",fullWidth:!0,onClose:function(e,t){"escapeKeyDown"===t&&ge(),"backdropClick"===t&&"active"!==d.CONFIG_close_modal_by_cross&&ge()},children:Object(S.jsxs)("div",{className:"delivery-address-modal--wrapper",children:[Object(S.jsxs)("div",{className:"delivery-address-modal--body",children:[Object(S.jsxs)("div",{className:Object(Ne.a)("delivery-address-modal--title-container","vk"===Y()&&"vk"),children:[Object(S.jsx)("h3",{children:"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430"}),Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:ge,"aria-label":"close",className:"modal-close",sx:{zIndex:1},children:Object(S.jsx)(_e.a,{})})]}),Object(S.jsx)(Za,{dadataValue:fe,searchInputValue:_,inputChangeHandler:ye,handleDadataValueChange:function(e){if(xe(e),e.data.geo_lat&&e.data.geo_lon){var t=[e.data.geo_lat,e.data.geo_lon];ne(t),o.current.geometry.setCoordinates(t),i.current.setCenter(t),i.current.setZoom(18)}else ne(null);var n=[];if(e.data.area_with_type&&n.push(e.data.area_with_type),e.data.city_with_type&&n.push(e.data.city_with_type),e.data.settlement_with_type&&n.push(e.data.settlement_with_type),n.length){var c=n.join(", ");P(c)}else P(null);if(e.data.street?A(e.data.street):A(null),e.data.house){var a=e.data.house;e.data.block&&(a+=e.data.block_type+e.data.block),R(a)}else R(null);e.data.kladr_id?ie(e.data.kladr_id):ie(null)},error:!!(null===h||void 0===h?void 0:h.coordinates)||!!(null===h||void 0===h?void 0:h.home),helperText:(null===h||void 0===h?void 0:h.coordinates)||(null===h||void 0===h?void 0:h.home),ref:s}),Object(S.jsx)(Ha.a,{control:Object(S.jsx)(Wa.a,{checked:le,onChange:function(e){var t;Ie({value:U,name:"apartment"}),t=e.target.checked,ue(t),t&&(z(""),X(""),Z(""))}}),label:"\u0427\u0430\u0441\u0442\u043d\u044b\u0439 \u0434\u043e\u043c",sx:{mb:2,ml:0}}),Object(S.jsx)(Xn.a,{in:!le,children:Object(S.jsxs)(ot.a,{container:!0,spacing:2,sx:{mb:2},children:["yes"===d.CONFIG_checkout_hide_porch?null:Object(S.jsx)(ot.a,{item:!0,mobilexs:12,mobilesm:12,mobilemd:4,children:Object(S.jsx)(Qe.a,{size:"small",label:"\u041f\u043e\u0434\u044a\u0435\u0437\u0434",value:V,onChange:function(e){Z(e.target.value)},sx:{"& fieldset":{borderRadius:"20px"},width:"100%"},className:"delivery-address-modal--sub-address"})}),"yes"===d.CONFIG_checkout_hide_floor?null:Object(S.jsx)(ot.a,{item:!0,mobilexs:12,mobilesm:12,mobilemd:4,children:Object(S.jsx)(Qe.a,{size:"small",label:"\u042d\u0442\u0430\u0436",value:J,onChange:function(e){X(e.target.value)},sx:{"& fieldset":{borderRadius:"20px"},width:"100%"},className:"delivery-address-modal--sub-address"})}),"yes"===d.CONFIG_checkout_hide_apartment?null:Object(S.jsx)(ot.a,{item:!0,mobilexs:12,mobilesm:12,mobilemd:4,children:Object(S.jsx)(Qe.a,{size:"small",label:"\u041a\u0432\u0430\u0440\u0442\u0438\u0440\u0430",value:U,onChange:function(e){Ie({value:e.target.value,name:"apartment"}),z(e.target.value)},error:!!(null===h||void 0===h?void 0:h.apartment),helperText:null===h||void 0===h?void 0:h.apartment,sx:{minWidth:"100px","& fieldset":{borderRadius:"20px"},width:"100%"},className:"delivery-address-modal--sub-address"})})]})}),Object(S.jsxs)(Qa.c,{defaultState:{center:d.deliveryZones.mapCenter||[d.CONFIG_latitude,d.CONFIG_longitude]||[55.76,37.64],zoom:d.deliveryZones.mapZoom||13},className:"delivery-address-modal--map-container",onLoad:function(e){m(e),function(e){i.current.controls.remove("routeEditor"),e.geocode("\u041c\u043e\u0441\u043a\u0432\u0430").then((function(e){})).catch((function(e){return c()})),d.deliveryZones.zones.forEach((function(t,n){if(!t.disableZone){var c="";t.orderMinPrice&&(c+="\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043e\u0442 ".concat(t.orderMinPrice," \u20bd<br>")),t.deliveryPrice&&"active"!==d.CONFIG_checkout_hide_delivery_price&&(c+="\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 ".concat(t.deliveryPrice," \u20bd<br>")),t.freeDeliveryOrder&&"active"!==d.CONFIG_checkout_hide_delivery_price&&(c+="\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0442 ".concat(t.freeDeliveryOrder," \u20bd<br>")),t.deliveryTime&&(c+="\u0412\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438  \u043e\u0442 ".concat(t.deliveryTime," \u043c\u0438\u043d."));var a=new e.Polygon(Object(an.a)(t.coordinates),{hintContent:c},{fillColor:t.fillColor||"#00FF00",fillOpacity:.5,strokeColor:t.strokeColor||"#aa0000",strokeWidth:2,hintOffset:Q()?[0,-100]:[10,20]});a.events.add("click",(function(e){var t=e.get("coords");o.current.geometry.setCoordinates(t),we(t)})),a.options._options.name=t.name,a.options._options.deliveryPrice=t.deliveryPrice,a.options._options.orderMinPrice=t.orderMinPrice,a.options._options.freeDeliveryOrder=t.freeDeliveryOrder,a.options._options.deliveryTime=t.deliveryTime,a.options._options.index=n,i.current.geoObjects.add(a)}})),i.current.events.add("click",(function(e){var t=e.get("coords");o.current.geometry.setCoordinates(t),we(t)}));try{i.current.geoObjects.getLength()&&i.current.setBounds(i.current.geoObjects.getBounds(),{checkZoomRange:!0})}catch(t){}}(e)},modules:["Polygon","geoObject.addon.hint"],instanceRef:i,options:{suppressMapOpenBlock:!0,yandexMapDisablePoiInteractivity:!0},children:[Object(S.jsx)(Qa.d,{instanceRef:o}),Object(S.jsx)(Qa.f,{}),Object(S.jsx)(Qa.b,{}),Object(S.jsx)(Qa.a,{})]}),h&&!Object.values(h).every((function(e){return""==e}))&&Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:2},children:"\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043b\u044f"}),!me&&Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:2},children:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0437\u043e\u043d\u0443 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438"})]}),Object(S.jsxs)("div",{className:"delivery-address-modal--buttons-container",children:[Q()?null:Object(S.jsx)(de.a,{className:"btn--outline-dark",variant:"button",onClick:ge,children:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"}),Object(S.jsx)(de.a,{className:"btn--action",variant:"button",onClick:function(){var e=null;if(te&&i.current.geoObjects.each((function(t){"Polygon"===t.geometry.getType()&&t.geometry.getBounds()&&t.geometry.contains(te)&&(e={name:t.options._options.name,deliveryPrice:t.options._options.deliveryPrice,orderMinPrice:t.options._options.orderMinPrice,freeDeliveryOrder:t.options._options.freeDeliveryOrder})})),Oe(!!e),Ie()&&e){var t="";k&&(t+="".concat(k,", ")),T&&(t+="".concat(T,", ")),G&&(t+="".concat(G)),U&&(t+=", \u043a\u0432. ".concat(U)),V&&(t+=", \u043f\u043e\u0434. ".concat(V)),J&&(t+=", \u044d\u0442\u0430\u0436 ".concat(J)),a({area:k,street:T,home:G,apartment:U,porch:V,floor:J,formate:t,coordinates:te,detachedHouse:le,kladrId:re}),r(Ua(!1)),ke()}},children:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441"})]})]})}))},Object(Qa.g)(Na,!0,["geocode"])),Ka=function(e){var t,n,c,a=e.order,r=e.setDisableRepeatButtons,i=e.disableRepeatButtons,o=yc(),s=o.postRequestAPI,l=o.getRequestAPI,d=k().navigateTo,u=Object(w.d)(),j=Object(x.useState)(!1),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(x.useState)(!1),h=Object(Ve.a)(O,2),v=h[0],f=h[1],g=Object(x.useState)(!1),_=Object(Ve.a)(g,2),y=_[0],N=_[1],C=Object(x.useState)(!1),P=Object(Ve.a)(C,2),E=P[0],F=P[1],T=Object(w.e)((function(e){var t=e.user,n=e.products,c=e.cart;return{user:t.user,products:n.items,bonuses_products:n.bonuses_items,cart:c}})),A=T.user,M=T.products,D=T.bonuses_products,G=T.cart,R=Object(w.e)((function(e){return e.config.data.CONFIG_bonuses_not_allowed_categories})),B=Object(w.e)((function(e){return e.config.data.CONFIG_bonuses_not_allowed_categories_hardmode})),L=Object(x.useCallback)((function(){u({type:"CLEAR_CART"});var e=0,t=!1;Object.values(a.products).forEach((function(n){if("variations"===n.type&&n.parent&&M[n.parent]&&M[n.parent].variants[n.id]){var c,a=J(M[n.parent]);a.options._price=M[n.parent].variants[n.id].price,a.variant=M[n.parent].variants[n.id];var r=n.modificators.reduce((function(e,t){return e+parseInt(t.price)*t.count}),0);u(ht(Object(I.a)(Object(I.a)({},a),{},{choosenModificators:n.modificators,modificatorsAmount:r})));var i=R&&R.length&&(null===(c=a.categories)||void 0===c?void 0:c.some((function(e){return R.includes(e)})));i&&"yes"===B&&(t=!0),i||(e+=M[n.parent].variants[n.id].price+r)}if("simple"===n.type&&void 0!==M[n.id]&&n.price===n.total_price)for(var o=1;o<=n.count;o++){var s,l=J(M[n.id]),d=n.modificators.reduce((function(e,t){return e+parseInt(t.price)*t.count}),0);u(ht(Object(I.a)(Object(I.a)({},l),{},{choosenModificators:n.modificators,modificatorsAmount:d})));var j=R&&R.length&&(null===(s=l.categories)||void 0===s?void 0:s.some((function(e){return R.includes(e)})));j&&"yes"===B&&(t=!0),j||(e+=M[n.id].options._price)}})),void 0===a.bonusProduct.id||t||Object.values(D).forEach((function(t){t.id===a.bonusProduct.id&&t.limit<=e&&u(vt(t))})),N(!0)}),[]);return Object(x.useEffect)((function(){y&&(void 0!==a.promocode.code?(f(!0),r(!0),s("getPromocode","",{promocode:a.promocode.code,cartProducts:G.items,token:!!A.token&&A.token,phone:!!A.phone&&A.phone}).then((function(e){f(!1),"success"===e.data.status?u(gt(e.data.promocode)):"error"===e.data.status&&e.data.message&&u(Ut({open:!0,message:e.data.message})),d("/checkout",{replace:!0})}))):d("/checkout",{replace:!0}))}),[y]),Object(S.jsxs)("div",{className:"account--user-order",children:[Object(S.jsxs)("div",{className:"account--user-order--header",children:[Object(S.jsxs)("div",{children:[Object(S.jsx)("div",{className:"account--user-order--time",children:a.time}),Object(S.jsx)("div",{className:"account--user-order--delivery-type",children:"delivery"===a.typeDelivery?"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430":"\u0421\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437"})]}),Object(S.jsx)("div",{className:"account--user-order--status",children:a.status})]}),Object(S.jsx)("div",{className:"account--user-order--delivery",children:"delivery"===a.typeDelivery?a.addressDelivery:a.selfDelivery}),a.products&&Object(S.jsxs)("div",{className:"account--user-order--products ".concat(m?"active":"no-active"),children:[Object.values(a.products).length?Object.values(a.products).map((function(e,t){return!m&&t<=2||m?Object(S.jsxs)("div",{className:"account--user-order--product",children:[Object(S.jsxs)("div",{children:[Object(S.jsxs)("div",{className:"account--user-order--product-name",children:[e.name,Object(S.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[" ","x ",e.count," \u0448\u0442."]})]}),e.modificators.length?Object(S.jsxs)("div",{className:"account--user-order--product-modificators",children:["+",e.modificators.map((function(e,t,n){return t!==n.length-1?Object(S.jsxs)("span",{className:"account--user-order--product-modificator",children:[" ",e.title," ",e.count," ","\u0448\u0442.,"]},e.id):Object(S.jsxs)("span",{className:"account--user-order--product-modificator",children:[" ",e.title," ",e.count,"\u0448\u0442."]},e.id)}))]}):null]}),Object(S.jsx)("div",{className:"account--user-order--product-price",children:e.total_price!==e.price?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("span",{className:"default-price",children:[e.price," \u20bd"]}),Object(S.jsxs)("span",{className:"sale-price",children:[e.total_price," \u20bd"]})]}):"".concat(e.total_price," \u20bd")})]},"".concat(a.ID,"-").concat(e.id,"-").concat(t)):null})):Object(S.jsx)("span",{children:"\u0422\u043e\u0432\u0430\u0440\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b"}),!!(null===(t=a.promocode)||void 0===t?void 0:t.promocodeProducts)&&Object(S.jsxs)("div",{className:"account--user-order--product",children:[Object(S.jsxs)("div",{className:"account--user-order--product-name",children:[a.promocode.promocodeProducts.title," x 1 \u0448\u0442."]}),Object(S.jsxs)("div",{className:"account--user-order--product-price",children:[null===(n=a.promocode)||void 0===n||null===(c=n.promocodeProducts.options)||void 0===c?void 0:c._price," ","\u20bd"]})]}),void 0!==a.bonusProduct.id&&Object(S.jsxs)("div",{className:"account--user-order--product",children:[Object(S.jsxs)("div",{className:"account--user-order--product-name",children:[a.bonusProduct.name," x 1 \u0448\u0442."]}),Object(S.jsx)("div",{className:"account--user-order--product-price main-color",children:"\u041f\u043e\u0434\u0430\u0440\u043e\u043a"})]},a.bonusProduct.id)]}),Object.values(a.products).length>3&&Object(S.jsx)("div",{className:"account--user-order--product-toggle-more",onClick:function(){return a.ID,void p(!m)},children:m?"\u0421\u043a\u0440\u044b\u0442\u044c":"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"}),a.promocode&&a.promocode.amount?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"account--user-order--subtotal",children:[Object(S.jsx)("b",{children:"\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430:"})," ",Object(S.jsxs)("b",{style:{whiteSpace:"nowrap"},children:[a.subtotal," \u20bd"]})]}),Object(S.jsxs)("div",{className:"account--user-order--promocode",children:[Object(S.jsxs)("b",{children:["\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434"," ",Object(S.jsx)("span",{className:"main-color",children:a.promocode.code}),":"]}),Object(S.jsxs)("div",{className:"account--user-order--promocode-discount main-color",style:{whiteSpace:"nowrap"},children:["- ",a.promocode.amount," \u20bd"]})]})]}):"",a.autoDiscount&&a.autoDiscountAmount?Object(S.jsxs)("div",{className:"account--user-order--auto-discount",children:[Object(S.jsxs)("div",{className:"auto-discount-name",children:[Object(S.jsx)("span",{children:"\u0421\u043a\u0438\u0434\u043a\u0430"}),Object(S.jsx)(wn,{placement:"top",title:a.autoDiscount,children:Object(S.jsx)(dc.a,{})})]}),Object(S.jsxs)("b",{className:"main-color",style:{whiteSpace:"nowrap"},children:["- ",a.autoDiscountAmount," \u20bd"]})]}):null,Object(S.jsxs)("div",{className:"account--user-order--total",children:[a.deliveryPrice?Object(S.jsxs)("div",{className:"account--user-order--total-delivery",children:[Object(S.jsx)("span",{children:"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430"}),Object(S.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[a.deliveryPrice," \u20bd"]})]}):null,Object(S.jsxs)("div",{className:"account--user-order--total-amount",children:[Object(S.jsx)("span",{children:"\u0418\u0442\u043e\u0433\u043e:"})," ",Object(S.jsxs)("span",{className:"main-color",style:{whiteSpace:"nowrap"},children:[parseInt(a.total).toLocaleString()," \u20bd"]})]})]}),"pending"===a.systemStatus?Object(S.jsx)(Sc.a,{loading:E,size:"small",variant:"button",className:"btn btn--dark repeat-order",onClick:function(){var e="&orderId="+a.ID;F(!0),l("getPaymentUrl",e).then((function(e){var t,n;"error"===(null===(t=e.data)||void 0===t?void 0:t.status)?u(Ut({open:!0,message:e.data.text||"\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u043f\u043e\u0437\u0434\u043d\u0435\u0435."})):(null===(n=e.data)||void 0===n?void 0:n.redirect)&&window.open(e.data.redirect,"_self")})).catch((function(e){u(Ut({open:!0,message:e.message}))})).finally((function(){F(!1)}))},loadingPosition:"start",children:"\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c"}):Object(S.jsx)(Sc.a,{loading:v,size:"small",variant:"button",className:"btn btn--dark repeat-order",onClick:i?null:L,disabled:!Object.values(a.products).length,loadingPosition:"start",children:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437"})]})},Ja=function(){var e=Object(x.useRef)(null),t=Object(x.useState)(!0),n=Object(Ve.a)(t,2),c=n[0],a=n[1],r=Object(w.e)((function(e){return e.config})).data;return Object(S.jsxs)(S.Fragment,{children:[c&&Object(S.jsx)("div",{className:"contacts--map",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:"100%"})}),Object(S.jsxs)(Qa.c,{defaultState:{center:r.deliveryZones.mapCenter||[r.CONFIG_latitude,r.CONFIG_longitude]||[55.76,37.64],zoom:r.deliveryZones.mapZoom||13},className:"contacts--map",onLoad:function(t){!function(t){e.current.controls.remove("routeEditor"),r.deliveryZones.zones.forEach((function(n,c){if(!n.disableZone){var a="";n.orderMinPrice&&(a+="\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043e\u0442 ".concat(n.orderMinPrice," \u20bd<br>")),n.deliveryPrice&&(a+="\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 ".concat(n.deliveryPrice," \u20bd<br>")),n.freeDeliveryOrder&&(a+="\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0442 ".concat(n.freeDeliveryOrder," \u20bd<br>")),n.deliveryTime&&(a+="\u0412\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438  \u043e\u0442 ".concat(n.deliveryTime," \u043c\u0438\u043d."));var r=new t.Polygon(Object(an.a)(n.coordinates),{balloonContent:a},{fillColor:n.fillColor||"#00FF00",fillOpacity:.5,strokeColor:n.strokeColor||"#aa0000",strokeWidth:2});e.current.geoObjects.add(r)}}));var n=r.CONFIG_format_start_work&&r.CONFIG_format_end_work?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ".concat(r.CONFIG_format_start_work," \u0434\u043e \n                    ").concat(r.CONFIG_format_end_work):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e",c="<b>".concat(r.CONFIG_address,"</b><br>").concat(n),i=new t.Placemark([r.CONFIG_latitude,r.CONFIG_longitude],{balloonContent:c});e.current.geoObjects.add(i);var o=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;r.CONFIG_filials.forEach((function(n){if(n.latitude&&n.longitude){var c=n.workingTime?n.workingTime[o][0]&&n.workingTime[o][1]?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 ".concat(n.workingTime[o][0]," \u0434\u043e \n                        ").concat(n.workingTime[o][1]):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e":r.CONFIG_format_start_work&&r.CONFIG_format_end_work?"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441 \n                    ".concat(r.CONFIG_format_start_work," \n                    \u0434\u043e \n                    ").concat(r.CONFIG_format_end_work):"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e",a="<b>".concat(n.address,"</b><br>").concat(c),i=new t.Placemark([n.latitude,n.longitude],{balloonContent:a});e.current.geoObjects.add(i)}}));try{e.current.geoObjects.getLength()&&e.current.setBounds(e.current.geoObjects.getBounds(),{checkZoomRange:!0})}catch(s){}a(!1)}(t)},modules:["Placemark","Polygon","geoObject.addon.balloon"],instanceRef:e,options:{suppressMapOpenBlock:!0,yandexMapDisablePoiInteractivity:!0},children:[Object(S.jsx)(Qa.f,{}),Object(S.jsx)(Qa.a,{})]})]})},Xa=function(e){var t=e.children,n=e.visibilityMap;return Object(x.useMemo)((function(){return Object.values(n).some((function(e){return!1===e}))}),[n])?Object(S.jsxs)("div",{className:"flexmenu--more",children:[Object(S.jsx)("div",{className:"btn btn--action",children:"\u0415\u0449\u0451"}),Object(S.jsx)("ul",{className:"flexmenu--dropdown",children:g.a.Children.map(t,(function(e){return n[e.props["data-targetid"]]?null:e}))})]}):null},$a=(n(347),g.a.forwardRef((function(e,t){var n=e.children,c=Object(x.useRef)(null),a=Object(x.useState)({}),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=function(e){var t={};e.forEach((function(e){var n=e.target.dataset.targetid;e.isIntersecting?t[n]=!0:t[n]=!1})),o((function(e){return Object(I.a)(Object(I.a)({},e),t)}))};return Object(x.useEffect)((function(){var e=new IntersectionObserver(s,{root:c.current,threshold:1,rootMargin:"0px -65px 0px 0px"});return Array.from(c.current.children).forEach((function(t){t.dataset.targetid&&e.observe(t)})),function(){e.disconnect()}}),[n]),Object(S.jsxs)("ul",{className:"categories-menu",ref:function(e){c.current=e,t.current=e},children:[g.a.Children.map(n,(function(e){return g.a.cloneElement(e,{className:i[e.props["data-targetid"]]?"visible":"invisible"})})),Object(S.jsx)(Xa,{visibilityMap:i,children:n})]})}))),er=n(467),tr=function(e){var t=e.deliveryAddress,n=e.handleChooseDeliveryAddress,c=e.iikoStreets,a=Object(w.e)((function(e){return e.user.user})),r=Object(w.e)((function(e){return e.config.data})),i=Object(w.e)((function(e){return"active"===e.config.data.useStreetsAutoComplete})),o=Object(x.useState)(!0),s=Object(Ve.a)(o,2),l=s[0],d=s[1],u=((null===a||void 0===a?void 0:a.addresses)&&Object.values(a.addresses)||[]).map((function(e,t){return"areaPrice"!==r.deliveryZones.deliveryPriceType||e.coordinates?"areaPrice"!==r.deliveryZones.deliveryPriceType&&i&&!c.includes(e.street)?null:(e.formate||(n=e.street+", \u0434. "+e.home,n+=e.porch?", \u043f\u043e\u0434. "+e.porch:"",n+=e.floor?", \u044d\u0442\u0430\u0436 "+e.floor:"",n+=e.apartment?", \u043a\u0432. "+e.apartment:""),Object(S.jsx)(Ha.a,{className:"custom-radio",value:t,control:Object(S.jsx)(er.a,{size:"small"}),disableTypography:!0,label:Object(S.jsxs)("div",{className:"user-address-label",children:[e.label&&Object(S.jsx)("span",{children:e.label}),Object(S.jsx)("span",{className:Object(Ne.a)(e.label&&"with-label"),children:e.formate||n})]})},t)):null;var n})).filter((function(e){return e})),j=u.slice(0,5),b=u.slice(5);return Object(S.jsxs)(nn.a,{value:t,"aria-labelledby":"deliveryAddress-label",name:"deliveryAddress",onChange:n,sx:{"& .MuiFormControlLabel-root":{alignItems:"start"}},children:[j,b.length?Object(S.jsx)("span",{onClick:function(){return d((function(e){return!e}))},className:"show-more",children:l?"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u0430\u0434\u0440\u0435\u0441\u0430":"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c"}):null,b.length?Object(S.jsx)(Xn.a,{in:!l,sx:{"& .MuiCollapse-wrapperInner":{display:"flex",flexDirection:"column"}},children:b}):null,Object(S.jsx)(Ha.a,{className:"custom-radio new-address",value:"new",control:Object(S.jsx)(er.a,{size:"small"}),label:"\u041d\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441"})]})},nr=function(e){var t=e.stack,n=e.stackIndex,c=e.handleOpenStack;return Object(S.jsx)("div",{className:"stories-slide--read-wrapper ".concat(t.isViewed?"viewed":""),onClick:function(){return c(n)},children:Object(S.jsx)("div",{className:"stories-slide--container",children:Object(S.jsx)("img",{src:t.previewImage})})})},cr=function(e){var t=e.closeSeeMore,n=e.onLinkClick,c=e.seeMoreOpened,a=e.description,r=e.title,i=e.link,o=e.active;document.querySelector(".stories-video");return Object(x.useEffect)((function(){!o&&c&&t()}),[o]),Object(S.jsx)(He.a,{in:c,direction:"up",children:Object(S.jsx)(ga.a,{sx:{position:"absolute",height:"100%",width:"100%",zIndex:"9999"},children:Object(S.jsxs)("div",{className:"see-more",children:[Object(S.jsxs)("div",{className:"see-more--close-container",onClick:t,children:[Object(S.jsx)("div",{children:"\u0421\u043a\u0440\u044b\u0442\u044c"}),Object(S.jsx)(dt.a,{icon:Un.a})]}),Object(S.jsxs)("div",{className:"see-more--inner-wrapper",children:[Object(S.jsx)("h2",{children:r}),Object(S.jsx)("div",{className:"see-more--content-body",children:a})]}),i?Object(S.jsx)("div",{className:"see-more--inner-link-container",children:Object(S.jsx)(de.a,{className:"see-more-collapsed--button",variant:"contained",onClick:function(){n(i)},children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})}):null]})})})},ar=(n(228),function(e){var t=e.openSeeMore;e.action,e.videoRef;return Object(S.jsx)("div",{className:"see-more-collapsed--container",children:Object(S.jsx)(de.a,{className:"see-more-collapsed--button",variant:"contained",onClick:function(){t()},children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})})}),rr=n(508),ir=function(e){var t=e.currentIndex,n=e.storyIndex,c=e.paused,a=e.playNextStory,r=e.interval,i=e.stack,o=(e.videoRef,Object(x.useState)(0)),s=Object(Ve.a)(o,2),l=s[0],d=s[1];return Object(x.useEffect)((function(){d(0)}),[i]),Object(x.useEffect)((function(){var e;return t!==n||c||(e=setTimeout((function(){a()}),r*((100-l)/100))),function(){clearTimeout(e)}}),[c,t,l,r]),Object(x.useEffect)((function(){var e;return t!==n||c||(l>=100&&d(0),e=setInterval((function(){d((function(t){return t>=100?(clearInterval(e),100):t+100/(r/100)}))}),100)),c&&clearInterval(e),n<t&&d(100),n>t&&d(0),function(){clearInterval(e)}}),[t,c,r]),Object(S.jsx)(ga.a,{sx:{width:"".concat(100/i.stories.length,"%"),ml:0===n?"0":"4px"},children:Object(S.jsx)(rr.a,{variant:"determinate",value:l,sx:{"& .MuiLinearProgress-bar":t>n?{transform:"translateX(0%)",transition:"none"}:t<=n&&0===l?{transition:"none"}:{transition:"transform .2s linear"},"&.MuiLinearProgress-root":{height:"3px",backgroundColor:"#fff"}}})})},or=n(247),sr=n.n(or),lr=g.a.forwardRef((function(e,t){var n=e.story,c=e.pause,a=e.play,r=e.updateStoryDuration,i=e.active,o=e.paused,s=Object(x.useRef)(null);return Object(x.useEffect)((function(){i&&c(),i||0===s.current.getCurrentTime()||s.current.seekTo(0,"seconds")}),[i]),Object(S.jsxs)("div",{className:"story-container",children:[Object(S.jsx)(ga.a,{className:"stories--background",sx:{backgroundImage:"url(".concat(n.url,")")}}),Object(S.jsx)(sr.a,{ref:s,url:n.url,loop:!0,muted:!0,playsinline:!0,playing:i&&!o,onReady:function(){r(1e3*s.current.getDuration()),a()},onStart:a,onPlay:a,onPause:c,onBuffer:c,onBufferEnd:a,config:{youtube:{playerVars:{controls:0,fs:0,iv_load_policy:3,modestbranding:1,rel:0,disablekb:1,showinfo:0}}},width:"100%",height:"100%"})]})})),dr=function(e){var t=e.story;e.pause,e.play,e.updateStoryDuration;return Object(S.jsx)("div",{className:"story-container",children:Object(S.jsx)("img",{src:t.url})})},ur=function(e){var t,n=e.stack,c=e.handleOpenPrevStack,a=e.handleOpenNextStack,r=e.handleClose,i=e.active,o=Vc().openSaleFromLink,s=Object(w.e)((function(e){return e.config.data})),l=Object(x.useRef)(null),d=Object(x.useRef)(null),u=Object(x.useRef)(!1),j=Object(x.useRef)(null),b=Object(x.useState)(0),m=Object(Ve.a)(b,2),p=m[0],O=m[1],h=Object(x.useState)(!1),v=Object(Ve.a)(h,2),f=v[0],g=v[1],_=Object(x.useState)(5e3),y=Object(Ve.a)(_,2),N=y[0],C=y[1],k=Object(x.useState)(!1),I=Object(Ve.a)(k,2),P=I[0],E=I[1],F=Object(x.useCallback)((function(){E(!0)}),[]),T=Object(x.useCallback)((function(){E(!1)}),[]);Object(x.useEffect)((function(){i&&P&&T(),u.current=!1}),[i]),Object(x.useEffect)((function(){if(Q()){var e=function(){l.current&&(l.current.style.height="".concat(window.innerHeight,"px"),l.current.style.width="".concat(window.innerWidth,"px"))};window.addEventListener("resize",e),e()}}),[]);var A=function(e){j.current=e.target,e.stopPropagation(),t=setTimeout((function(){u.current=!0,F(),d.current&&d.current.pause()}),200)},M=function(e){if(clearTimeout(t),u.current)return u.current=!1,j.current=null,T(),void(d.current&&d.current.play());P&&T(),p===n.stories.length-1?a():O((function(e){return e+1})),j.current=null},D=function(e){if(clearTimeout(t),u.current)return u.current=!1,j.current=null,T(),void(d.current&&d.current.play());P&&T(),(Q()||(null===e||void 0===e?void 0:e.target)===j.current)&&(p===n.stories.length-1?a():O((function(e){return e+1})),j.current=null)},G=function(e){if(clearTimeout(t),u.current)return u.current=!1,j.current=null,T(),void(d.current&&d.current.play());P&&T(),(Q()||(null===e||void 0===e?void 0:e.target)===j.current)&&(0===p?(O(0),c()):O((function(e){return e-1})),j.current=null)},R=function(e){e.includes("?sale_id=")?(r(),o(e)):(F(),window.open(e,"_blank"))},B=Object(x.useCallback)((function(e){C(e)}),[]);return Object(S.jsxs)(ga.a,{className:"stories-stack-container",sx:Q()?{height:"100vh",width:"100vw"}:{},ref:l,children:[i&&Object(S.jsx)(ga.a,{className:"progress-bar-container",sx:{opacity:P?"0":"1",transition:"opacity, 0.3s"},children:n.stories.map((function(e,t){return Object(S.jsx)(ir,{storyIndex:t,currentIndex:p,paused:P,playNextStory:M,interval:N,stack:n,videoRef:d},t)}))}),i&&Object(S.jsx)(pe.a,{edge:"start",color:"white",onClick:r,"aria-label":"close",className:"stories--modal-close",sx:{width:"1.5em",height:"1.5em"},children:Object(S.jsx)(_e.a,{})}),"video"===n.stories[p].type?Object(S.jsx)(lr,{active:i,story:n.stories[p],pause:F,play:T,paused:P,updateStoryDuration:B}):Object(S.jsx)(dr,{story:n.stories[p],pause:F,play:T,updateStoryDuration:B}),i&&Object(S.jsxs)("div",{className:"navigation-panels-container",children:[Object(S.jsx)("div",{className:"left-panel",onMouseDown:Q()?null:A,onMouseUp:Q()?null:G,onTouchStart:Q()?A:null,onTouchEnd:Q()?G:null}),Object(S.jsx)("div",{className:"right-panel",onMouseDown:Q()?null:A,onMouseUp:Q()?null:D,onTouchStart:Q()?A:null,onTouchEnd:Q()?D:null})]}),n.stories[p].promocodeCode&&ie(s)?Object(S.jsx)("div",{className:"stories--promocode-btn-container",children:Object(S.jsx)(Ma,{code:n.stories[p].promocodeCode,onApply:r})}):i&&n.stories[p].usePopup||i&&n.stories[p].link?Object(S.jsx)(ar,{openSeeMore:function(){n.stories[p].link&&"active"!==n.stories[p].usePopup?R(n.stories[p].link):(g(!0),F(),d.current&&d.current.pause())}}):null,n.stories[p].usePopup&&Object(S.jsx)(cr,{closeSeeMore:function(){g(!1),i&&(T(),d.current&&d.current.play())},onLinkClick:R,seeMoreOpened:f,title:n.stories[p].title,description:n.stories[p].description,link:n.stories[p].link,active:i})]})},jr=g.a.memo(ur),br=function(e){var t=e.open,n=e.handleClose,c=e.localStories,a=e.openedStackIndex,r=e.handleStackChange,i=Object(x.useState)(),o=Object(Ve.a)(i,2),s=o[0],l=o[1],d=Object(x.useCallback)((function(){s.activeIndex===c.length-1?n():s.slideNext()}),[s]),u=Object(x.useCallback)((function(){s.slidePrev()}),[s]);return Object(S.jsx)(We.a,{open:t,fullScreen:!0,BackdropProps:{style:{backgroundColor:"rgba(0,0,0,0.8)"}},sx:{"& .MuiPaper-root":{backgroundColor:"unset"}},onClose:function(e,t){"escapeKeyDown"===t&&n()},className:"stories--dialog",children:Object(S.jsx)(Yt.a,{slidesPerView:Q()?1:"auto",spaceBetween:Q()?0:50,centeredSlides:!0,initialSlide:a,className:"stories-swiper",modules:[Kt.b],effect:Q()?"slide":"coverflow",coverflowEffect:{rotate:0,stretch:25,scale:.85,depth:0,modifier:1,slideShadows:!1},onSlideChange:function(e){r(e.activeIndex)},slideToClickedSlide:!0,preventClicksPropagation:!1,touchStartPreventDefault:!1,onSwiper:function(e){return l(e)},children:c.map((function(e){return Object(S.jsx)(Yt.b,{children:function(t){var c=t.isActive;return Object(S.jsx)(jr,{stack:e,handleOpenPrevStack:u,handleOpenNextStack:d,active:c,handleClose:n})}},e.id)}))})})},mr=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})),pr=function(){var e=Object(x.useMemo)((function(){return new qc.a}),[]),t=e.get("viewedStories")||[],n=Object(w.e)((function(e){return e.stories.stories})),c=Object(x.useState)(null),a=Object(Ve.a)(c,2),r=a[0],i=a[1],o=Object(x.useState)(!1),s=Object(Ve.a)(o,2),l=s[0],d=s[1],u=Object(x.useState)(!1),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=Object(x.useCallback)((function(e){return e.sort((function(e,t){return e.isViewed===t.isViewed?0:e.isViewed?1:-1}))}),[]);Object(x.useEffect)((function(){if(null===n||void 0===n?void 0:n.length){var e=n.filter((function(e){var t;return null===(t=e.stories)||void 0===t?void 0:t.length})).map((function(e){return Object(I.a)(Object(I.a)({},e),{},{stories:e.stories.map((function(e){return e.seeMore?Object(I.a)(Object(I.a)({},e),{},{seeMore:function(e){var t=e.close;return Object(S.jsx)(cr,{close:t})}}):e}))})})).map((function(e){return Object(I.a)(Object(I.a)({},e),{},{isViewed:null===t||void 0===t?void 0:t.includes(e.id)})})),c=p(e);i(c)}}),[n]),Object(x.useEffect)((function(){if(r&&(0===b||b>0)&&!r[b].isViewed){var n=r.map((function(e){return J(e)}));if(n[b].isViewed=!0,!(null===t||void 0===t?void 0:t.includes(n[b].id))){var c=[].concat(Object(an.a)(t),[n[b].id]);e.set("viewedStories",c,{path:"/",expires:Object(Qc.a)(new Date,30),sameSite:"none",secure:!0})}i(n)}}),[b]);var O=Object(x.useCallback)((function(){var e=p(r);i(e),d(!1),m(!1)}),[r]),h=Object(x.useCallback)((function(e){d(!0),m(e)}),[]),v={open:l&&b>=0,maxWidth:"md"};return Q()&&(v.TransitionComponent=mr,v.fullScreen=!0,v.scroll="body"),r?Object(S.jsxs)(se.a,{children:[Object(S.jsxs)("div",{className:Object(Ne.a)("stories-list--container",window.fullWidthSite&&"fullWidthSite"),children:[Object(S.jsx)(Yt.a,{slidesPerView:"auto",spaceBetween:Q()?8:12,freeMode:!0,navigation:{prevEl:".stories-list--left-arrow",nextEl:".stories-list--right-arrow"},modules:[Kt.c,Kt.d],className:"stories-list--container",children:r.map((function(e,t){return Object(S.jsx)(Yt.b,{className:"reccomend-slide reccomend-addons-slide reccomend-slide--mini",children:Object(S.jsx)(nr,{stack:e,stackIndex:t,handleOpenStack:h})},e.id)}))}),Object(S.jsx)(dt.a,{icon:Un.b,className:"stories-list--left-arrow"}),Object(S.jsx)(dt.a,{icon:Un.c,className:"stories-list--right-arrow"})]}),l&&b>=0?Object(S.jsx)(br,{open:l&&b>=0,localStories:r,handleClose:O,openedStackIndex:b,handleStackChange:function(e){m(e)}}):null]}):null},Or=n(145),hr=n(248),vr=n.n(hr),fr=(n(231),function(e){var t=e.address,n=e.index,c=e.onDelete,a=e.onEdit,r=Object(x.useState)(!1),i=Object(Ve.a)(r,2),o=i[0],s=i[1],l=Object(x.useState)(t.label?t.label:""),d=Object(Ve.a)(l,2),u=d[0],j=d[1],b="";return t.formate?b=t.formate:(b=t.street+", \u0434. "+t.home,b+=t.porch?", \u043f\u043e\u0434. "+t.porch:"",b+=t.floor?", \u044d\u0442\u0430\u0436 "+t.floor:"",b+=t.apartment?", \u043a\u0432. "+t.apartment:""),Object(S.jsx)(Or.b,{draggableId:t.id,index:n,children:function(e,r){return Object(S.jsxs)("div",Object(I.a)(Object(I.a)({className:Object(Ne.a)(r.isDragging&&"dragging","addresses-list--item"),ref:e.innerRef},e.draggableProps),{},{children:[Object(S.jsxs)("div",{className:"addresses-list--item-inner-wrapper",children:[Object(S.jsx)("div",Object(I.a)(Object(I.a)({},e.dragHandleProps),{},{className:"addresses-list--drag-svg-container",children:Object(S.jsx)(xe.a,{className:"addresses-list--drag-svg"})})),o?Object(S.jsx)(Qe.a,{size:"small",placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \xab\u0414\u043e\u043c\xbb",value:u,onChange:function(e){j(e.target.value)},multiline:!0,sx:{width:"100%"}}):Object(S.jsxs)("div",{className:"addresses-list--name-container",children:[t.label&&Object(S.jsx)("span",{children:t.label}),Object(S.jsx)("span",{className:Object(Ne.a)("addresses-list--address-name",t.label&&"with-label"),children:b})]})]}),Object(S.jsxs)("div",{className:"addresses-list--buttons-container",children:[o?Object(S.jsx)(Dc.a,{onClick:function(){a(n,u),s(!1)},color:"success",className:"addresses-list--save-svg"}):Object(S.jsx)(wn,{placement:"top",title:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",children:Object(S.jsx)(vr.a,{className:"addresses-list--edit-svg",onClick:function(){return s(!0)}})}),Object(S.jsx)(wn,{placement:"top",title:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c",children:Object(S.jsx)(Pc.a,{className:"addresses-list--delete-svg",onClick:function(){return c(n)}})})]})]}))}})}),xr=function(){var e=Object(w.e)((function(e){var t;return null===(t=e.config.data.deliveryZones)||void 0===t?void 0:t.zones})),t=Object(w.e)((function(e){return"active"===e.config.data.CONFIG_contact_map_show_deliveryZones}));return"deliveryZones"===Object(w.e)((function(e){return e.config.data.CONFIG_contact_map_type}))&&e&&e.length&&t?Object(S.jsxs)("div",{className:"contacts-zones-info",children:[Object(S.jsx)("h4",{children:"\u0417\u043e\u043d\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438"}),Object(S.jsx)("div",{className:"contacts-zones-info--zones-container",children:e.map((function(e){if(!e.disableZone)return Object(S.jsx)("div",{className:"contacts-zones-info--zone",children:Object(S.jsxs)("div",{className:"zone-inner-wrapper",children:[Object(S.jsxs)("div",{className:"zone-header",children:[Object(S.jsx)("div",{className:"zone-color",style:{backgroundColor:e.fillColor}}),Object(S.jsxs)("div",{className:"zone-title",children:[Object(S.jsx)("span",{children:e.name}),e.deliveryTime?Object(S.jsxs)("span",{children:[", \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0442"," ",e.deliveryTime," \u043c\u0438\u043d."]}):null]})]}),Object(S.jsxs)("div",{className:"zone-body",children:[e.orderMinPrice?Object(S.jsxs)("div",{className:"zone-body--col",children:[Object(S.jsx)("div",{className:"zone-body--col-title",children:"\u041c\u0438\u043d. \u0437\u0430\u043a\u0430\u0437"}),Object(S.jsxs)("div",{className:"zone-body--col-value",children:[e.orderMinPrice," \u20bd"]})]}):null,e.deliveryPrice?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("hr",{className:"zone-body--hr"}),Object(S.jsxs)("div",{className:"zone-body--col",children:[Object(S.jsx)("div",{className:"zone-body--col-title",children:"\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438"}),Object(S.jsxs)("div",{className:"zone-body--col-value",children:[e.deliveryPrice," \u20bd"]})]})]}):null,e.freeDeliveryOrder?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("hr",{className:"zone-body--hr"}),Object(S.jsxs)("div",{className:"zone-body--col",children:[Object(S.jsx)("div",{className:"zone-body--col-title",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430"}),Object(S.jsxs)("div",{className:"zone-body--col-value",children:["\u043e\u0442 ",e.freeDeliveryOrder," ","\u20bd"]})]})]}):null]})]})})}))})]}):null},gr=n(249),_r=n.n(gr),yr=function(e){var t,n,c=e.error,a=e.loading,r=e.activeGateway,i=e.typeDelivery,o=e.deliveryZone,s=e.yandexApiError,l=e.handleSetError,d=e.handleBackToMenu,u=e.handleMakeOrder,j=e.handleOpenBeforePaymentModal,b=Object(w.e)((function(e){return e.config.data})),m=Object(w.e)((function(e){return e.config.status})),p=Object(w.e)((function(e){return e.cart.totalPrice})),O=Object(w.e)((function(e){return e.cart.promocode})),h=Object(w.e)((function(e){return e.cart.conditionalPromocode})),v=b.CONFIG_order_min_price&&"delivery"===i&&"fixedPrice"===b.deliveryZones.deliveryPriceType&&p<b.CONFIG_order_min_price,f=b.CONFIG_selforder_min_price&&("self"===i||"inRestoraunt"===i)&&p<b.CONFIG_selforder_min_price;return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"checkout--errors-container",children:[c&&Object(S.jsx)(Ht.a,{action:Object(S.jsx)(pe.a,{"aria-label":"close",color:"inherit",size:"small",onClick:function(){l("")},children:Object(S.jsx)(_e.a,{fontSize:"inherit"})}),severity:"error",sx:{mb:1},children:c}),Object(S.jsx)(Xn.a,{sx:{mb:1},in:f,unmountOnExit:!0,children:Object(S.jsxs)(Ht.a,{severity:"error",children:["\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437"," ",Object(S.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[b.CONFIG_selforder_min_price," \u20bd"]})]})}),Object(S.jsx)(Xn.a,{sx:{mb:1},in:v,unmountOnExit:!0,children:Object(S.jsxs)(Ht.a,{severity:"error",children:["\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443"," ",Object(S.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[b.CONFIG_order_min_price," \u20bd"]})]})}),Object(S.jsx)(Xn.a,{sx:{mb:1},in:o&&o.orderMinPrice>p,unmountOnExit:!0,children:Object(S.jsx)(Ht.a,{severity:"error",children:"\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443"})}),Object(S.jsx)(Xn.a,{sx:{mb:1},in:!(null===O||void 0===O?void 0:O.code)&&!!(null===h||void 0===h?void 0:h.code),unmountOnExit:!0,children:Object(S.jsx)(Rc,{onlyMinPrice:!0,typeDelivery:i})})]}),Object(S.jsxs)("div",{className:"checkout--button-container",children:[Object(S.jsxs)(de.a,{className:"btn--outline-dark",variant:"button",onClick:d,sx:{bgcolor:"var(--background) !important"},children:["\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437",Object(S.jsx)(_r.a,{className:"button-prev-arrow-icon"})]}),Object(S.jsxs)(Sc.a,{loading:a||!m,variant:"button",className:"btn--action makeOrder",onClick:function(){"card"!==r&&"cash"!==r&&b.CONFIG_order_text_before_payment?j(!0):u()},disabled:!!h||f||v||"delivery"===i&&"areaPrice"===(null===(t=b.deliveryZones)||void 0===t?void 0:t.deliveryPriceType)&&s||"areaPrice"===(null===(n=b.deliveryZones)||void 0===n?void 0:n.deliveryPriceType)&&o&&o.orderMinPrice>p,children:["\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437",Object(S.jsx)(Sn.a,{className:"button-arrow-icon"})]})]})]})},wr=n(444),Nr=n(461),Cr=function(e){var t=e.maxValue,n=e.usedBonuses,c=e.handleChangeUsedBonuses,a=e.disabled,r=Object(x.useState)(0),i=Object(Ve.a)(r,2),o=i[0],s=i[1];return Object(x.useEffect)((function(){o!==n&&s(n)}),[n]),Object(S.jsx)(S.Fragment,{children:Object(S.jsxs)(wr.a,{spacing:2,direction:"row",alignItems:"center",sx:{mb:"10px"},children:[Object(S.jsx)(Nr.a,{value:o,onChange:function(e,t){s(t)},onChangeCommitted:function(e,n){n>t?(s(t),c(t)):c(n)},"aria-label":"Default",valueLabelDisplay:"auto",min:0,max:t,disabled:a,sx:{"& .MuiSlider-valueLabel":{bgcolor:"#000"}}},n),t?Object(S.jsx)(ga.a,{sx:{color:"var(--text-color)",opacity:"0.6"},children:t}):null]})})},kr=function(e){return Object(S.jsx)(ha.a,Object(I.a)({sx:{"& .MuiPaper-root":{borderRadius:"12px",mt:"4px",mb:"8px"}}},e))},Ir=function(e){var t=e.streetProps,n=e.homeProps,c=e.newUserAddressStreet,a=e.newUserAddressHome,r=e.newUserAddressPorch,i=e.newUserAddressFloor,o=e.newUserAddressApartment,s=e.handleChangeNewUserAddress,l=e.iikoStreets,d=e.iikoError,u=Object(w.e)((function(e){return e.config.data})),j=Object(w.e)((function(e){return"active"===e.config.data.useStreetsAutoComplete}));return Object(S.jsxs)("div",{className:"checkout--form-new-address",children:[d&&j?Object(S.jsxs)(Ht.a,{severity:"error",sx:{mb:2,"& .MuiAlert-action":{flexDirection:"column",justifyContent:"center"}},action:Q()?null:Object(S.jsx)(de.a,{variant:"button",className:" btn--action",onClick:function(){return window.location.reload()},children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c"}),children:[Object(S.jsx)("div",{children:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u043b\u0438\u0446, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \xab\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\xbb."}),Q()?Object(S.jsx)(de.a,{variant:"button",className:" btn--action",onClick:function(){return window.location.reload()},sx:{width:"100%",mt:"8px"},children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c"}):null]}):null,Object(S.jsxs)(ot.a,{container:!0,spacing:2,children:[Object(S.jsx)(ot.a,{item:!0,xs:8,md:6,sx:{width:1},children:j?Object(S.jsx)(va.a,{options:l,clearText:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c",openText:"\u0420\u0430\u0441\u043a\u0440\u044b\u0442\u044c",closeText:"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c",noOptionsText:"\u0423\u043b\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430",disabled:d,value:c||null,onChange:function(e,t){s(t||"","street")},id:"street",PopperComponent:kr,renderInput:function(e){return Object(S.jsx)(Qe.a,Object(I.a)(Object(I.a)({},e),{},{label:"\u0423\u043b\u0438\u0446\u0430",size:"small"},t))},renderOption:function(e,t,n){return Object(x.createElement)("li",Object(I.a)(Object(I.a)({},e),{},{key:e.id}),t)}}):Object(S.jsx)(Qe.a,Object(I.a)({size:"small",id:"street",label:"\u0423\u043b\u0438\u0446\u0430",value:c,onChange:function(e){s(e.target.value,"street")},sx:{width:1}},t))}),Object(S.jsx)(ot.a,{item:!0,xs:4,md:6,sx:{width:1},children:Object(S.jsx)(Qe.a,Object(I.a)({size:"small",id:"home",label:"\u0414\u043e\u043c",value:a,onChange:function(e){s(e.target.value,"home")},sx:{width:1}},n))}),"yes"===u.CONFIG_checkout_hide_porch?null:Object(S.jsx)(ot.a,{item:!0,xs:4,md:4,children:Object(S.jsx)(Qe.a,{size:"small",id:"porch",label:"\u041f\u043e\u0434\u044a\u0435\u0437\u0434",value:r,onChange:function(e){s(e.target.value,"porch")},sx:{width:1}})}),"yes"===u.CONFIG_checkout_hide_floor?null:Object(S.jsx)(ot.a,{item:!0,xs:4,md:4,children:Object(S.jsx)(Qe.a,{size:"small",id:"floor",label:"\u042d\u0442\u0430\u0436",value:i,onChange:function(e){s(e.target.value,"floor")},sx:{width:1}})}),"yes"===u.CONFIG_checkout_hide_apartment?null:Object(S.jsx)(ot.a,{item:!0,xs:4,md:4,children:Object(S.jsx)(Qe.a,{size:"small",id:"apartment",label:"\u041a\u0432./\u041e\u0444\u0438\u0441",value:o,onChange:function(e){s(e.target.value,"apartment")},sx:{width:1}})})]})]})},Pr=function(e){var t=e.children,n=Object(w.e)((function(e){return e.config.data.CONFIG_auth_captcha_type})),c=Object(w.e)((function(e){return e.config.data.CONFIG_auth_recaptcha_site_token}));return"google"!==n?t:Object(S.jsx)(_c.a,{reCaptchaKey:c,children:t})},Sr=(n(354),g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))}))),Er=function(){var e=Object(w.e)((function(e){return e.config.data})),t=window.CONFIG_platform_off_image,n=Object(x.useState)(!1),c=Object(Ve.a)(n,2),a=c[0],r=c[1],i=e.CONFIG_hard_hours_strStart||"01.01.1970 00:00",o=e.CONFIG_hard_hours_strEnd||"01.01.1970 00:00",s=Object(L.a)(new Date,{year:i.slice(6,10),month:parseInt(i.slice(3,5))-1,date:i.slice(0,2),hours:i.slice(11,13),minutes:i.slice(14),seconds:0,milliseconds:0}),l=Object(L.a)(new Date,{year:o.slice(6,10),month:parseInt(o.slice(3,5))-1,date:o.slice(0,2),hours:o.slice(11,13),minutes:o.slice(14),seconds:0,milliseconds:0}),d=function(){try{return Object(U.a)(new Date,{start:s,end:l})}catch(e){return console.log("".concat(e.message,", Something wrong in hard hours interval")),!1}}();if(Object(x.useEffect)((function(){d&&"hardHours"===e.CONFIG_maintenance_type&&r(!0)}),[d,e.CONFIG_maintenance_type]),!d||"hardHours"!==e.CONFIG_maintenance_type)return null;var u=function(){r(!1)},j={open:a,maxWidth:"md"};return Q()&&(j.TransitionComponent=Sr,j.fullScreen=!0,j.scroll="body"),Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md"},j),{},{sx:{"& .MuiPaper-root":{borderRadius:Q()?"0px":"20px"}},onClose:function(t,n){"escapeKeyDown"===n&&u(),"backdropClick"===n&&"active"!==e.CONFIG_close_modal_by_cross&&u()},children:Object(S.jsxs)("div",{className:"modal-alert--wrapper hard-hours-modal",children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:u,"aria-label":"close",className:Object(Ne.a)("modal-close","vk"===Y()&&"vk"),children:Object(S.jsx)(_e.a,{})}),t?Object(S.jsx)("img",{src:t,className:"cat-sleep-img"}):Object(S.jsx)(ra,{className:"cat-sleep-img"}),Object(S.jsx)("h2",{className:"main-color",children:e.CONFIG_hard_hours_title||"\u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430"}),Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:e.CONFIG_hard_hours_text||"\u0421\u0435\u0439\u0447\u0430\u0441 \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043e. \u041f\u0440\u0438\u043d\u043e\u0441\u0438\u043c \u0438\u0437\u0432\u0438\u043d\u0435\u043d\u0438\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430."},style:{whiteSpace:"pre-line"}}),Object(S.jsx)(de.a,{className:"btn--action",variant:"contained",onClick:u,sx:{mt:"20px"},children:"\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u0435\u043d\u044e"})]})}))},Fr=function(e){var t=e.deliveryPrice,n=Object(w.e)((function(e){var t;return null===(t=e.deliveryAddressModal)||void 0===t?void 0:t.deliveryZone})),c=Object(w.e)((function(e){return e.config.data.CONFIG_checkout_hide_delivery_price}));return Object(S.jsxs)("div",{className:"result-delivery",children:[Object(S.jsxs)("div",{className:"result-delivery--title-container",children:[Object(S.jsx)("span",{children:"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430"}),!!n&&Object(S.jsx)(wn,{placement:"top",enterTouchDelay:0,title:Object(S.jsxs)("div",{children:[!!(null===n||void 0===n?void 0:n.orderMinPrice)&&Object(S.jsxs)("div",{children:["\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 \u043e\u0442"," ",null===n||void 0===n?void 0:n.orderMinPrice," \u20bd"]}),!!(null===n||void 0===n?void 0:n.deliveryPrice)&&"active"!==c&&Object(S.jsxs)("div",{children:["\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 ",null===n||void 0===n?void 0:n.deliveryPrice," \u20bd"]}),!!(null===n||void 0===n?void 0:n.freeDeliveryOrder)&&"active"!==c&&Object(S.jsxs)("div",{children:["\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043e\u0442"," ",null===n||void 0===n?void 0:n.freeDeliveryOrder," \u20bd"]}),!!(null===n||void 0===n?void 0:n.deliveryTime)&&Object(S.jsxs)("div",{children:["\u0412\u0440\u0435\u043c\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043e\u0442 ",null===n||void 0===n?void 0:n.deliveryTime," \u043c\u0438\u043d."]})]}),children:Object(S.jsx)(dc.a,{className:"checkout--info-icon"})})]}),Object(S.jsx)("span",{children:0===t?"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e":"".concat(t.toLocaleString("ru-RU")," \u20bd")})]})};var Tr=function(e){var t=e.product,n=e.cartTotalPrice,c=e.bonusesDisabledByCategory,a=e.bonusesDisabledByPromocode,r=e.minicart,i=Object(w.d)(),o=Object(w.e)((function(e){return e.cart.bonusProduct}));return Object(S.jsx)(ot.a,{item:!0,md:r?12:6,sm:12,sx:{width:"100%"},children:Object(S.jsx)(wn,{placement:"left",title:n<t.limit?"\u041e\u0442 "+t.limit+" \u20bd (\u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 "+(t.limit-n)+" \u20bd)":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c",children:Object(S.jsxs)("div",{disabled:!!(n<t.limit||a||c),className:"bonus-product-choose",onClick:function(){return function(e){o.id===e.id?i(vt({})):!a&&!c&&n>=e.limit&&i(vt(Object(I.a)({},e)))}(t)},children:[Object(S.jsx)(Ha.a,{disabled:!!(n<t.limit||a||c),value:t.id,control:Object(S.jsx)(er.a,{})}),Object(S.jsxs)("div",{className:"bonus-product-choose-content",children:[Object(S.jsx)(Uc,{product:t}),o.id===t.id?Object(S.jsx)("div",{className:"cart--product-remove",children:Object(S.jsx)(_e.a,{})}):null]})]})})})};function Ar(){var e=jn().cartBonusProduct,t={};return e.attributes&&Object.values(e.attributes).forEach((function(e,n){t[n]=e.name})),Object(S.jsxs)("div",{className:"checkout--product","data-product-id":e.id,children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:[e.title,Object(S.jsxs)("div",{className:"minicart--product-attributes",children:[e.options.weight?Object(S.jsxs)("div",{className:"weight",children:[e.options.weight," \u0433\u0440."]}):"",e.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[e.options.count_rolls," \u0448\u0442."]}):""]})]}),Object(S.jsx)("div",{className:"checkout--product-result",children:Object(S.jsx)("span",{className:"main-color",children:"\u041f\u043e\u0434\u0430\u0440\u043e\u043a"})})]})}var Mr=function(){var e=Object(w.d)(),t=C().choosenTown,n=Object(w.e)((function(e){return e.products})),c=n.categories,a=n.items,r=n.status,i=Object(w.e)((function(e){return e.cart})).items,o=Object(w.e)((function(e){return e.cart.promocode})),s=Object(w.e)((function(e){return e.cart.conditionalPromocode})),l=Object(w.e)((function(e){return e.config.data})),d=Object(w.e)((function(e){return e.config.status}));return Object(x.useEffect)((function(){l.currentTownId&&t&&l.currentTownId!==t.id&&e({type:"CLEAN_STORE"})}),[t,l.currentTownId]),Object(x.useEffect)((function(){if(c&&r&&a){var t=c.filter((function(e){return $(e).disabled})).map((function(e){return e.term_id})),n=[].concat.apply([],Object.values(i).map((function(e){return e.items}))),o=!1;n.forEach((function(n){if("simple"===n.type){var c,r=parseInt(n.options._price);n.modificatorsAmount&&(r-=parseInt(n.modificatorsAmount)),!(null===(c=n.categories)||void 0===c?void 0:c.some((function(e){return t.includes(e)})))&&a[n.id]&&r==parseInt(a[n.id].options._price)||(o=!0,e(xt(Object(I.a)(Object(I.a)({},n),{},{disabled:!0}))))}else if("variations"===n.type){var i,s;!(null===(i=n.categories)||void 0===i?void 0:i.some((function(e){return t.includes(e)})))&&a[n.id]&&(null===(s=a[n.id])||void 0===s?void 0:s.variants[n.variant.variant_id])&&n.variant.price==a[n.id].variants[n.variant.variant_id].price||(o=!0,e(xt(Object(I.a)(Object(I.a)({},n),{},{disabled:!0}))))}})),o&&e(Ut({open:!0,message:"\u0427\u0430\u0441\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u0437 \u043a\u043e\u0440\u0437\u0438\u043d\u044b, \u0442.\u043a. \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043a\u0446\u0438\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c."}))}}),[c,a,r]),Object(x.useEffect)((function(){!d||ie(l)||ce(o)&&!s||(e({type:"COMPLETELY_REMOVE_PROMOCODE"}),e(Ut({open:!0,message:"\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0431\u044b\u043b \u043e\u0442\u043c\u0435\u043d\u0435\u043d"})))}),[d]),Object(S.jsx)(S.Fragment,{})},Dr=n(120),Gr=function(){var e=new DOMParser,t=Object(w.e)((function(e){return e.config.data.CONFIG_code_metrika})),n=Object(w.e)((function(e){return e.config.data.CONFIG_code_google_analytics})),c=Object(w.e)((function(e){return e.config.data.CONFIG_code_vk_pixel})),a=Object(w.e)((function(e){return e.config.data.CONFIG_code_fb_pixel})),r=Object(w.e)((function(e){return e.config.data.CONFIG_code_tiktok_pixel}));if(!t&&!n&&!c&&!a&&!r)return null;var i=e.parseFromString(t,"text/html"),o=e.parseFromString(n,"text/html"),s=e.parseFromString(c,"text/html"),l=e.parseFromString(a,"text/html"),d=e.parseFromString(r,"text/html"),u=[],j=[],b=function(e){e.querySelectorAll("script").forEach((function(e){u.push(Object(I.a)(Object(I.a)(Object(I.a)(Object(I.a)({},e.src&&{src:e.src}),e.type&&{type:e.type}),e.async&&{async:e.async}),e.innerHTML&&{innerHTML:e.innerHTML}))})),e.querySelectorAll("body").forEach((function(e){j.push(Object(I.a)({},e.innerHTML&&{innerHTML:e.innerHTML}))}))};return i&&b(i),o&&b(o),s&&b(s),l&&b(l),d&&b(d),Object(S.jsx)(Dr.a,{async:!0,script:u,noscript:j})},Rr=function(e){var t=e.typeDelivery,n=e.handleChangeTypeDelivery,c=Object(w.e)((function(e){return"active"===e.config.data.CONFIG_type_receiving_delivery_status})),a=Object(w.e)((function(e){return e.config.data.CONFIG_type_receiving_delivery_name||"\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430"})),r=Object(w.e)((function(e){return"active"===e.config.data.CONFIG_type_receiving_selfdelivery_status})),i=Object(w.e)((function(e){return e.config.data.CONFIG_type_receiving_selfdelivery_name||"\u0421\u0430\u043c\u043e\u0432\u044b\u0432\u043e\u0437"})),o=Object(w.e)((function(e){return"active"===e.config.data.CONFIG_type_receiving_inRestoraunt_status})),s=Object(w.e)((function(e){return e.config.data.CONFIG_type_receiving_inRestoraunt_name||"\u0412 \u0437\u0430\u043b\u0435"}));return Object(S.jsxs)(nn.a,{row:!0,"aria-labelledby":"typeDelivery-label",name:"typeDelivery",value:t,onChange:n,sx:{"& .MuiFormControlLabel-root":{alignItems:"start"}},children:[c?Object(S.jsx)(Ha.a,{className:"custom-radio",value:"delivery",control:Object(S.jsx)(er.a,{}),label:a}):null,r?Object(S.jsx)(Ha.a,{className:"custom-radio",value:"self",control:Object(S.jsx)(er.a,{}),label:i}):null,o?Object(S.jsx)(Ha.a,{className:"custom-radio",value:"inRestoraunt",control:Object(S.jsx)(er.a,{}),label:s}):null]})},Br=function(e){var t=e.selfDeliveryAddress,n=e.handleChooseSelfDeliveryAddress,c=Object(w.e)((function(e){return e.config.data})),a=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1,r=function(e){return Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{children:e.address}),e.workingTime?e.workingTime[a][0]&&e.workingTime[a][1]?Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",e.workingTime[a][0]," \u0434\u043e"," ",e.workingTime[a][1]]}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})}):c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",c.CONFIG_format_start_work," \u0434\u043e"," ",c.CONFIG_format_end_work]}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})})]})};return Object(S.jsxs)("div",{className:"checkout--self-address-panel",children:[Object(S.jsx)("h4",{children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441"}),Object(S.jsxs)(nn.a,{value:t,"aria-labelledby":"selfDeliveryAddress-label",name:"selfDeliveryAddress",onChange:n,sx:{mb:2,"& .MuiFormControlLabel-root":{alignItems:"start"}},children:[Object(S.jsx)(Ha.a,{className:"custom-radio",value:"main",control:Object(S.jsx)(er.a,{size:"small"}),label:Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{children:c.CONFIG_address}),c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsx)("div",{children:Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",c.CONFIG_format_start_work," \u0434\u043e"," ",c.CONFIG_format_end_work]})}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})})]})}),c.CONFIG_filials&&c.CONFIG_filials.map((function(e,t){return Object(S.jsx)(Ha.a,{className:"custom-radio",value:t,control:Object(S.jsx)(er.a,{size:"small"}),label:r(e)},t)}))]})]})},Lr=function(e){var t=e.selfDeliveryAddress,n=e.handleChooseSelfDeliveryAddress,c=Object(w.e)((function(e){return e.config.data})),a=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1,r=function(e){return Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{children:e.address}),e.workingTime?e.workingTime[a][0]&&e.workingTime[a][1]?Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",e.workingTime[a][0]," \u0434\u043e"," ",e.workingTime[a][1]]}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})}):c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",c.CONFIG_format_start_work," \u0434\u043e"," ",c.CONFIG_format_end_work]}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})})]})};return Object(S.jsxs)("div",{className:"checkout--self-address-panel",children:[Object(S.jsx)("h4",{children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441"}),Object(S.jsxs)(nn.a,{value:t,"aria-labelledby":"selfDeliveryAddress-label",name:"selfDeliveryAddress",onChange:n,sx:{mb:2,"& .MuiFormControlLabel-root":{alignItems:"start"}},children:[Object(S.jsx)(Ha.a,{className:"custom-radio",value:"main",control:Object(S.jsx)(er.a,{size:"small"}),label:Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{children:c.CONFIG_address}),c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsx)("div",{children:Object(S.jsxs)("div",{className:"adress-schdedule",children:[Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"})," ",c.CONFIG_format_start_work," \u0434\u043e"," ",c.CONFIG_format_end_work]})}):Object(S.jsx)("div",{children:Object(S.jsx)("span",{children:"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"})})]})}),c.CONFIG_filials&&c.CONFIG_filials.map((function(e,t){return Object(S.jsx)(Ha.a,{className:"custom-radio",value:t,control:Object(S.jsx)(er.a,{size:"small"}),label:r(e)},t)}))]})]})},Ur=function(){var e=Object(w.d)(),t=Me().metricViewProduct,n=Object(w.e)(qt),c=Object(w.e)((function(e){return e.config.data.CONFIG_top_sales_title}));if(!n)return null;var a=function(n){var c=new URL(window.location.href);c.searchParams.has("product_id")||(c.searchParams.append("product_id",n.id),window.history.pushState({},"",c.href)),t(n),e(wt(Object(I.a)({},n))),e(Nt(!0))};return Object(S.jsx)(se.a,{children:Object(S.jsxs)("div",{className:"home-recommends",children:[Object(S.jsx)("h2",{className:"home-recommends--title",children:c||"\u0427\u0430\u0441\u0442\u043e \u0437\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442"}),Object(S.jsx)(Yt.a,{slidesPerView:"auto",spaceBetween:16,freeMode:!0,navigation:!0,modules:[Kt.c,Kt.d],children:n.map((function(e){return Object(S.jsx)(Yt.b,{className:"reccomend-slide reccomend-slide--mini",children:Object(S.jsx)(Jt,{product:e,onProductClick:a})},e.id)}))})]})})},zr=n(509),Hr=n(510),Wr=n(511),Vr=n(512),Zr=n(513),Qr=function(e){var t=e.sale,n=e.handleSetActiveSale,c=Qn(),a=c.contentOverflow,r=c.containerRef,i=c.contentRef,o=Object(w.e)((function(e){return e.config.data}));return Object(S.jsx)(ot.a,{item:!0,xs:12,md:4,lg:window.fullWidthSite?3:4,children:Object(S.jsxs)(zr.a,{className:"sale",children:[Object(S.jsxs)(Hr.a,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",flexGrow:1},onClick:function(){return n(t)},children:[t.saleImg?Object(S.jsx)(Wr.a,{component:"img",image:t.saleImg,alt:t.saleTitle}):null,Object(S.jsx)(Vr.a,{sx:{flexGrow:1,bgcolor:"var(--modal-background)",width:"100%"},children:Object(S.jsxs)("div",{className:"sale--content-inner-wrapper",children:[Object(S.jsx)(_a.a,{gutterBottom:!0,variant:"h5",component:"div",children:t.saleTitle}),Object(S.jsx)(_a.a,{variant:"body2",children:Object(S.jsx)("div",{ref:r,className:"sale--short-content",children:Object(S.jsx)("div",{ref:i,dangerouslySetInnerHTML:{__html:t.saleContent}})})}),a&&Object(S.jsx)("div",{className:"sale--fade",children:Object(S.jsx)("span",{children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})})]})})]}),t.promocodeCode&&ie(o)?Object(S.jsx)(Zr.a,{sx:{padding:2},children:Object(S.jsx)(Ma,{code:t.promocodeCode})}):null]})},t.saleID)},qr=n(89),Yr={items:[],addon_items:[],recommend_items:[],top_sales_products:[],bonuses_items:[],categories:[],productsIsLoading:!1,categoriesIsLoading:!1,status:!1},Kr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PRODUCTS_STATUS":return Object(I.a)(Object(I.a)({},e),{},{status:t.payload});case"SET_PRODUCTS":return Object(I.a)(Object(I.a)({},e),{},{items:t.payload,productsIsLoading:!0});case"SET_ADDON_PRODUCTS":return Object(I.a)(Object(I.a)({},e),{},{addon_items:t.payload});case"SET_RECOMMEND_PRODUCTS":return Object(I.a)(Object(I.a)({},e),{},{recommend_items:t.payload});case"SET_TOP_SALES_PRODUCTS":return Object(I.a)(Object(I.a)({},e),{},{top_sales_products:t.payload});case"SET_BONUSES_PRODUCTS":return Object(I.a)(Object(I.a)({},e),{},{bonuses_items:t.payload});case"SET_CATEGORIES":return Object(I.a)(Object(I.a)({},e),{},{categories:t.payload,categoriesIsLoading:!0});case"CLEAN_STORE":return Object(I.a)({},Yr);default:return e}},Jr={data:{},status:!1,openTownModal:!1},Xr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CONFIG":return Object(I.a)(Object(I.a)({},e),{},{data:t.payload});case"SET_STATUS":return Object(I.a)(Object(I.a)({},e),{},{status:t.payload});case"SET_TOWN_MODAL":return Object(I.a)(Object(I.a)({},e),{},{openTownModal:t.payload});case"CLEAN_STORE":return Object(I.a)({},Jr);default:return e}},$r=n(445),ei={banners:[],bannersMobile:[]},ti=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ei,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_BANNERS":return Object(I.a)(Object(I.a)({},$r.a),t.payload);case"CLEAN_STORE":return Object(I.a)({},ei);default:return e}},ni={open:!1,message:""},ci=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ni,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_ALERTS":return{open:t.payload.open,message:t.payload.message};case"CLEAN_STORE":return Object(I.a)({},ni);default:return e}},ai={gateways:{}},ri=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ai,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_GATEWAYS":return Object(I.a)(Object(I.a)({},e),{},{gateways:t.payload});case"CLEAN_STORE":return Object(I.a)({},ai);default:return e}},ii={topMenu:[],bottomMenu:[],sales:[]},oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ii,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TOP_MENU":return Object(I.a)(Object(I.a)({},e),{},{topMenu:t.payload});case"SET_BOTTOM_MENU":return Object(I.a)(Object(I.a)({},e),{},{bottomMenu:t.payload});case"SET_SALES":return Object(I.a)(Object(I.a)({},e),{},{sales:t.payload});case"CLEAN_STORE":return Object(I.a)({},ii);default:return e}},si={availableTime:{0:{timestamp:(new Date).getTime(),title:"\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435"}}},li=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:si,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ORDER_TIME":return Object(I.a)(Object(I.a)({},e),{},{availableTime:t.payload});case"CLEAN_STORE":return Object(I.a)({},si);default:return e}},di={openModalAuth:!1,user:{id:"",phone:"",name:"",email:"",vk:"",token:"",bonuses:0,dayBirthday:null,monthBirthday:null}},ui=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_LOGIN":case"LOGIN":return Object(I.a)(Object(I.a)({},e),{},{user:t.payload});case"LOGOUT":return di;case"SET_OPEN_AUTH_MODAL":return Object(I.a)(Object(I.a)({},e),{},{openModalAuth:t.payload});case"ADD_NEW_ADDRESS":var n=J(e.user);return n.addresses.push(t.payload),Object(I.a)(Object(I.a)({},e),{},{user:n});case"SAVE_ADDRESSES":var c=J(e.user);return c.addresses=t.payload,Object(I.a)(Object(I.a)({},e),{},{user:c});default:return e}},ji={productModal:!1,openProductModal:!1},bi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ji,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_MODAL_PRODUCT":return Object(I.a)(Object(I.a)({},e),{},{productModal:Object(I.a)({},t.payload)});case"CLEAR_MODAL_PRODUCT":return Object(I.a)(Object(I.a)({},e),{},{productModal:!1});case"SET_OPEN_MODAL":return Object(I.a)(Object(I.a)({},e),{},{openProductModal:t.payload});case"CLEAN_STORE":return Object(I.a)({},ji);default:return e}},mi={status:!1},pi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SHOW_LOADER":return console.log(1),Object(I.a)(Object(I.a)({},e),{},{status:t.payload});case"CLEAN_STORE":return Object(I.a)({},mi);default:return e}},Oi={openBonusesProductsModal:!1},hi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_OPEN_BONUSES_MODAL":return Object(I.a)(Object(I.a)({},e),{},{openBonusesProductsModal:t.payload});case"CLEAN_STORE":return Object(I.a)({},Oi);default:return e}},vi={mobileMenuOpen:!1},fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLOSE_MOBILE_MENU":return Object(I.a)(Object(I.a)({},e),{},{mobileMenuOpen:!1});case"OPEN_MOBILE_MENU":return Object(I.a)(Object(I.a)({},e),{},{mobileMenuOpen:!0});case"CLEAN_STORE":return Object(I.a)({},vi);default:return e}},xi={miniCartOpen:!1},gi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLOSE_MINI_CART":return Object(I.a)(Object(I.a)({},e),{},{miniCartOpen:!1});case"OPEN_MINI_CART":return Object(I.a)(Object(I.a)({},e),{},{miniCartOpen:!0});case"CLEAN_STORE":return Object(I.a)({},xi);default:return e}},_i={modalOpen:!1,deliveryZone:null},yi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_OPEN_DELIVERY_MODAL":return Object(I.a)(Object(I.a)({},e),{},{modalOpen:t.payload});case"SET_DELIVERY_ZONE":return Object(I.a)(Object(I.a)({},e),{},{deliveryZone:t.payload});case"CLEAN_STORE":return Object(I.a)({},_i);default:return e}},wi={stories:null},Ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_STORIES":return Object(I.a)(Object(I.a)({},e),{},{stories:t.payload});case"CLEAN_STORE":return Object(I.a)({},wi);default:return e}},Ci={autoDiscounts:null},ki=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ci,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_AUTO_DISCOUNTS":return Object(I.a)(Object(I.a)({},e),{},{autoDiscounts:t.payload});case"CLEAN_STORE":return Object(I.a)({},Ci);default:return e}},Ii={bonusProductModal:null},Pi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_MODAL_BONUS_PRODUCT":return Object(I.a)(Object(I.a)({},e),{},{bonusProductModal:t.payload});default:return e}},Si={activeSale:null},Ei=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Si,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_MODAL_SALE":return Object(I.a)(Object(I.a)({},e),{},{activeSale:t.payload});case"CLEAN_STORE":return Object(I.a)({},Si);default:return e}},Fi=Object(qr.c)({products:Kr,config:Xr,banners:ti,systemAlerts:ci,gateways:ri,user:ui,cart:un,orderTime:li,pages:oi,loader:pi,bonusesProductsModal:hi,productModal:bi,header:fi,miniCart:gi,deliveryAddressModal:yi,stories:Ni,autoDiscounts:ki,bonusProductModal:Pi,saleModal:Ei}),Ti=function(){try{var e,t,n,c,a=JSON.parse(window.localStorage.getItem("foodNinjaStore"));if(!a)return;var r=!0;if("folder"===window.townsTypeRoute){var i=window.towns.find((function(e){return e.id===a.config.data.currentTownId})),o=window.location.pathname.split("/").filter((function(e){return e}))[0];(!i||o&&o!==i.slug)&&(r=!1)}return r?(a.config.status=!1,(null===(e=a.productModal)||void 0===e?void 0:e.openProductModal)&&(a.productModal.openProductModal=!1,a.productModal.productModal=!1),(null===(t=a.miniCart)||void 0===t?void 0:t.miniCartOpen)&&(a.miniCart.miniCartOpen=!1),(null===(n=a.bonusesProductsModal)||void 0===n?void 0:n.openBonusesProductsModal)&&(a.bonusesProductsModal.openBonusesProductsModal=!1),(null===(c=a.user)||void 0===c?void 0:c.openModalAuth)&&(a.user.openModalAuth=!1),a.deliveryAddressModal&&(a.deliveryAddressModal.modalOpen=!1,a.deliveryAddressModal.deliveryZone=null),a):a.user?{user:a.user}:void 0}catch(s){return}}(),Ai=Object(qr.e)(Fi,Ti,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__());Ai.subscribe((function(){!function(e){try{var t=JSON.stringify(e);window.localStorage.setItem("foodNinjaStore",t)}catch(n){}}(Ai.getState())})),window.store=Ai;var Mi=Ai,Di=function(){return Object(S.jsx)(ot.a,{container:!0,spacing:{xs:0,sm:2},children:Object(an.a)(Array(8)).map((function(e,t){return Object(S.jsx)(ot.a,{xs:12,desctop:4,mg:3,item:!0,className:Object(Ne.a)("product-grid-item","default-layout"),children:Object(S.jsxs)("div",{className:"product product-item",children:[Object(S.jsx)("div",{className:"product--image",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:"100%",sx:{borderRadius:"10px"}})}),Object(S.jsxs)("div",{className:"product--inner-wrapper",children:[Object(S.jsx)("h4",{className:"product--title",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"75%",height:18,sx:{borderRadius:"20px"}})}),Object(S.jsxs)("div",{className:"product--description",children:[Object(S.jsx)(Fe.a,{width:"100%",height:18}),Object(S.jsx)(Fe.a,{width:"100%",height:18})]}),Object(S.jsxs)("div",{className:"product--buying",children:[Object(S.jsx)("div",{className:"product--price-wrapper",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:80,height:20,sx:{borderRadius:"20px"}})}),Object(S.jsx)(Fe.a,{variant:"rounded",width:75,height:40,sx:{borderRadius:"20px"}})]})]})]})},t)}))})},Gi=function(){return Object(S.jsx)("div",{className:Q()?"mobile-banners-wrapper":"banners-wrapper",children:Object(S.jsx)(se.a,{children:Object(S.jsx)("div",{className:"banners-skeleton",children:Object(S.jsx)(Fe.a,{variant:"rounded",className:"banners-skeleton--skeleton"})})})})},Ri=function(e){var t=e.category,n=e.products,c=Object.values(n).filter((function(e){return e.categories.includes(t.term_id)})),a=Object(w.e)((function(e){return e.config.data.CONFIG_type_products})),r=Object(x.useState)({}),i=Object(Ve.a)(r,2),o=i[0],s=i[1];if(!(null===c||void 0===c?void 0:c.length))return null;var l=$(t);return l.disabled&&"block"!==t.limit_type?null:Object(S.jsxs)("div",{id:"category-".concat(t.term_id),className:"category-".concat(t.term_id," product--category-container"),children:[Object(S.jsx)("h2",{children:t.name},"title-".concat(t.term_id)),l.message?Object(S.jsx)(Ht.a,{severity:l.disabled?"error":"info",sx:{mb:1},children:l.message}):null,Object.values(t.tags).length?Object(S.jsx)(ga.a,{className:"product--category-tags-container",sx:"one"===a?{mb:"8px"}:{},children:t.tags&&Object.values(t.tags).map((function(e){return Object(S.jsx)(de.a,{variant:"button",className:"btn btn--tag ".concat(o.hasOwnProperty(t.term_id)&&o[t.term_id].includes(e.term_id)?"btn--tag-active btn--action":""),sx:{mr:1,mb:1,px:1,bgcolor:"var(--background)"},onClick:function(){return function(e,t){var n=J(o);n[e]&&n[e].includes(t)?delete n[e]:n[e]=[t],s(n)}(t.term_id,e.term_id)},children:e.name},"tag-".concat(e.term_id))}))}):null,Object(S.jsx)(ot.a,{container:!0,spacing:{xs:0,sm:2},children:c.sort((function(e,t){return e.order>t.order?1:-1})).map((function(e){return o.hasOwnProperty(t.term_id)&&o[t.term_id].length?Object.values(e.tags).filter((function(e){return o[t.term_id].includes(e.term_id)})).length?Object(S.jsx)(Lt,{product:e,disabled:l.disabled},e.id):"":Object(S.jsx)(Lt,{product:e,category:t,disabled:l.disabled},e.id)}))},"grid-".concat(t.term_id))]})};function Bi(){var e=Object(w.e)((function(e){return e.config.data})),t=Object(w.e)((function(e){return!ce(e.config.data)})),n=Object(w.e)((function(e){return e.products.status})),c=Object(w.e)((function(e){return e.products.items})),a=Object(w.e)((function(e){return e.products.categories})),r=Object(x.useMemo)((function(){return e.CONFIG_searching_disable?null:[].concat.apply([],Object.values(c)).filter((function(t){return(1!==t.categories.length||!t.categories.includes(parseInt(e.CONFIG_bonuses_category)))&&!t.categories.every((function(t){var n;return null===(n=e.CONFIG_exclude_categories)||void 0===n?void 0:n.includes(t)}))}))}),[c,e.CONFIG_searching_disable]);return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(it,{}),!!window.newHeaderDesign&&Object(S.jsx)(Oa,{}),Object(S.jsxs)("div",{className:"home",children:[t?"stories"===e.CONFIG_type_slider?Object(S.jsx)(pr,{}):Object(S.jsx)(Zc,{}):Object(S.jsx)(Gi,{}),!window.newHeaderDesign&&Object(S.jsx)(Oa,{}),t?Object(S.jsx)(Ur,{}):null,Object(S.jsxs)(se.a,{children:[!t||e.CONFIG_searching_disable?null:Object(S.jsx)(xa,{dontShowList:!0,products:r}),(null===a||void 0===a?void 0:a.length)||n?a.map((function(e){return Object(S.jsx)(Ri,{products:c,category:e},"container-category-".concat(e.term_id))})):Object(S.jsxs)("div",{className:"product--category-container",children:[Object(S.jsx)("h2",{children:Object(S.jsx)(Fe.a,{variant:"rounded",width:200,height:22,sx:{borderRadius:"20px"}})}),Object(S.jsx)(Di,{})]})]}),Object(S.jsx)(jc,{}),Object(S.jsx)(Ca,{}),Object(S.jsxs)("div",{className:"screen-footer",children:[Q()?Object(S.jsx)(Wn,{}):"",Q()?null:Object(S.jsx)(Ra,{}),Object(S.jsx)(Kn,{})]})]}),Object(S.jsx)(Ot,{})]})}var Li=function(){return Object(S.jsx)(S.Fragment,{children:Object(an.a)(Array(3)).map((function(e,t){return Object(S.jsx)(ot.a,{item:!0,xs:12,md:4,children:Object(S.jsx)(zr.a,{className:"sale",children:Object(S.jsxs)(Hr.a,{sx:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"start"},children:[Object(S.jsx)(Wr.a,{sx:{width:"100%"},children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:190})}),Object(S.jsx)(Vr.a,{sx:{flexGrow:1,width:"100%"},children:Object(S.jsxs)("div",{className:"sale--content-inner-wrapper",children:[Object(S.jsx)(_a.a,{gutterBottom:!0,variant:"h5",component:"div",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:150,height:18})}),Object(S.jsxs)(_a.a,{variant:"body2",children:[Object(S.jsx)(Fe.a,{width:"100%"}),Object(S.jsx)(Fe.a,{width:"100%"}),Object(S.jsx)(Fe.a,{width:"50%"})]})]})})]})})},t)}))})};function Ui(){var e=Vc().handleSetActiveSale,t=Object(w.e)((function(e){return e.pages.sales})),n=Object(w.e)((function(e){return e.config.data}));return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsx)(Oa,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:1},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u0410\u043a\u0446\u0438\u0438"}),Object(S.jsx)("div",{className:"sales-wrapper",children:Object(S.jsx)(ot.a,{container:!0,spacing:4,children:!t.length&&ce(n)?Object(S.jsx)(Li,{}):t.length?t.map((function(t,n){return Object(S.jsx)(Qr,{sale:t,handleSetActiveSale:e},t.saleID)})):Object(S.jsx)(ot.a,{item:!0,xs:12,md:4,children:Object(S.jsx)("div",{className:"sale--empty-list-placeholder",children:"\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0430\u043a\u0446\u0438\u0439."})})})})]}),Object(S.jsx)(Ot,{})]})}n(355);var zi=function(){return Object(S.jsxs)(ot.a,{container:!0,spacing:4,children:[Object(S.jsxs)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},children:[Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)(Fe.a,{width:150,sx:{mb:"6px"}}),Object(S.jsx)(Fe.a,{width:200,sx:{mb:"6px"}}),Object(S.jsx)(Fe.a,{width:200,sx:{mb:"6px"}})]}),Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)(Fe.a,{width:150,sx:{mb:"6px"}}),Object(S.jsx)(Fe.a,{width:200,sx:{mb:"6px"}}),Object(S.jsx)(Fe.a,{width:200,sx:{mb:"6px"}})]})]}),Object(S.jsx)(ot.a,{item:!0,sm:12,md:8,sx:{width:1},children:Object(S.jsx)("div",{className:"contacts--map",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:"100%"})})})]})};function Hi(){var e,t,n=Me().mectricClickPhone,c=Object(w.e)((function(e){return{config:e.config.data}})).config,a=c.CONFIG_home_phones?c.CONFIG_home_phones.split(";"):[],r=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1;return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{className:"contacts-page",sx:{maxWidth:"1328px !important"},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b"}),ce(c)?Object(S.jsx)(zi,{}):Object(S.jsxs)(ot.a,{container:!0,spacing:4,children:[Object(S.jsxs)(ot.a,{item:!0,sm:12,md:4,sx:{width:1},children:[c.CONFIG_address&&Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)("h4",{children:"\u0422\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0434\u0430\u0436"}),Object(S.jsxs)("div",{className:"contacts--adress",children:[Object(S.jsxs)("div",{children:[Object(S.jsx)(dt.a,{icon:Un.h}),c.CONFIG_address]}),Object(S.jsx)("div",{children:a&&a.map((function(e,t){return e.replace(/\D+/g,"")&&Object(S.jsxs)("div",{className:"contacts--phone",children:[Object(S.jsx)(dt.a,{icon:Un.i}),Object(S.jsx)("a",{href:"tel:".concat(e.replace(/[^0-9+]+/g,"")),onClick:n,target:"_parent",children:e})]},t)}))}),c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"," ",c.CONFIG_format_start_work," ","\u0434\u043e"," ",c.CONFIG_format_end_work]}):Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"]}),(null===(e=c.CONFIG_filials)||void 0===e?void 0:e.length)?Object(S.jsx)(Oe.a,{sx:{my:"8px",width:"200px"}}):null]}),null===(t=c.CONFIG_filials)||void 0===t?void 0:t.map((function(e,t,a){return Object(S.jsxs)("div",{className:"contacts--adress",children:[Object(S.jsxs)("div",{children:[Object(S.jsx)(dt.a,{icon:Un.h}),e.address]}),e.phones.map((function(e){if(e)return Object(S.jsxs)("div",{className:"contacts--phone",children:[Object(S.jsx)(dt.a,{icon:Un.i}),Object(S.jsx)("a",{href:"tel:".concat(e.replace(/[^0-9+]+/g,"")),onClick:n,target:"_parent",children:e})]})})),e.workingTime?e.workingTime[r][0]&&e.workingTime[r][1]?Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"," ",e.workingTime[r][0]," ","\u0434\u043e"," ",e.workingTime[r][1]]}):Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"]}):c.CONFIG_format_start_work&&c.CONFIG_format_end_work?Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0441"," ",c.CONFIG_format_start_work," ","\u0434\u043e"," ",c.CONFIG_format_end_work]}):Object(S.jsxs)("div",{className:"contacts--schedule",children:[Object(S.jsx)(dt.a,{icon:Un.f}),"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e"]}),t===a.length-1?null:Object(S.jsx)(Oe.a,{sx:{my:"8px",width:"200px"}})]})}))]}),c.CONFIG_additional_contacts?Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)("h4",{children:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f"}),Object(S.jsxs)("div",{className:"contacts--additional-info",children:[Object(S.jsx)(dt.a,{icon:Un.e}),Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:c.CONFIG_additional_contacts}})]})]}):null,Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)("h4",{children:"\u0421\u043e\u0446\u0441\u0435\u0442\u0438"}),c.CONFIG_email&&Object(S.jsxs)("div",{className:"contacts--email",children:[Object(S.jsx)(dt.a,{icon:Un.g})," ",Object(S.jsx)("a",{href:"android"===Y()||"ios"===Y()?"#":"mailto:".concat(c.CONFIG_email),children:c.CONFIG_email})]}),c.CONFIG_vk&&Object(S.jsxs)("div",{className:"contacts--vk",children:[Object(S.jsx)(dt.a,{icon:ut.f})," ",Object(S.jsx)("a",{href:c.CONFIG_vk,children:c.CONFIG_vk.replace("https://","")})]}),c.CONFIG_fb&&Object(S.jsx)("div",{className:"contacts--fb",children:Object(S.jsx)("a",{href:c.CONFIG_fb,children:c.CONFIG_fb.replace("https://","")})}),c.CONFIG_instagram&&Object(S.jsx)("div",{className:"contacts--instagram",children:Object(S.jsx)("a",{href:c.CONFIG_instagram,children:c.CONFIG_instagram.replace("https://","")})}),c.CONFIG_ok&&Object(S.jsxs)("div",{className:"contacts--ok",children:[Object(S.jsx)(dt.a,{icon:ut.d})," ",Object(S.jsx)("a",{href:c.CONFIG_ok,children:c.CONFIG_ok.replace("https://","")})]}),c.CONFIG_tg&&Object(S.jsxs)("div",{className:"contacts--tg",children:[Object(S.jsx)(dt.a,{icon:ut.e})," ",Object(S.jsx)("a",{href:c.CONFIG_tg,children:c.CONFIG_tg.replace("https://","")})]})]}),c.CONFIG_legalInfo&&Object(S.jsxs)("div",{className:"contacts--block",children:[Object(S.jsx)("h4",{children:"\u042e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f"}),c.CONFIG_legalInfo]})]}),Object(S.jsxs)(ot.a,{item:!0,sm:12,md:8,sx:{width:1},children:["deliveryZones"===c.CONFIG_contact_map_type?Object(S.jsx)(Qa.e,{query:{apikey:c.deliveryZones?c.deliveryZones.apiKey:""},children:Object(S.jsx)(Ja,{})}):"iframe"===c.CONFIG_contact_map_type&&c.CONFIG_contact_map_script?Object(S.jsx)("div",{className:"contacts--map",dangerouslySetInnerHTML:{__html:c.CONFIG_contact_map_script}}):Object(S.jsx)("div",{id:"map",className:"contacts--map",children:Object(S.jsx)(Pa,{})}),Object(S.jsx)(xr,{}),c.CONFIG_contact_delivery_info&&Object(S.jsx)("div",{className:"contacts--delivery-info",dangerouslySetInnerHTML:{__html:c.CONFIG_contact_delivery_info.replace(/\n/g,"<br />")}})]})]})]}),Object(S.jsx)(Ot,{})]})}var Wi=n(463),Vi=n(520),Zi=(n(232),n(446)),Qi=n(521),qi=n(462);function Yi(){var e=yc().postRequestAPI,t=Object(w.e)((function(e){var t=e.user,n=e.config,c=e.products;e.cart;return{products:c.items,bonuses_products:c.bonuses_items,user:t.user,mainLoading:n.status}})),n=t.user,c=t.mainLoading,a=(t.products,t.bonuses_products,Object(x.useState)("loading")),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=Object(x.useState)(0),l=Object(Ve.a)(s,2),d=l[0],u=l[1],j=Object(x.useState)(1),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(x.useState)(),h=Object(Ve.a)(O,2),v=h[0],f=h[1],g=Object(x.useState)(!1),_=Object(Ve.a)(g,2),y=_[0],N=_[1];Object(x.useEffect)((function(){var t=hc.a.CancelToken.source();return c&&"loaded"!==i&&e("getUserOrders","",{phone:n.phone,token:n.token,page:1},{cancelToken:t.token}).then((function(e){"success"===e.data.status&&(f(e.data.orders),o("loaded"),u(e.data.pages))})).catch((function(e){})),function(){t.cancel()}}),[c]);return Object(S.jsxs)("div",{children:["loading"===i?Object(S.jsx)("div",{className:"pageInner",children:Object(S.jsxs)(ot.a,{container:!0,spacing:4,children:[Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",animation:"wave",height:287,width:"100%"})}),Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",height:287,width:"100%",animation:"wave"})}),Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",height:287,width:"100%",animation:"wave"})}),Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",height:287,width:"100%",animation:"wave"})}),Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",height:287,width:"100%",animation:"wave"})}),Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Fe.a,{className:"user-order-skeleton",variant:"rectangular",height:287,width:"100%",animation:"wave"})})]})}):Object(S.jsx)(ot.a,{container:!0,spacing:4,className:"account--orders",children:(null===v||void 0===v?void 0:v.length)?v.map((function(e){return Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsx)(Ka,{order:e,setDisableRepeatButtons:N,disableRepeatButtons:y})},e.ID)})):Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,lg:4,sx:{width:1},children:Object(S.jsxs)("div",{className:"account--empty-orders-placeholder",children:[Object(S.jsx)("p",{children:"\u0412\u044b \u0435\u0449\u0435 \u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u043e\u0432"}),Object(S.jsx)(E,{to:"/",children:"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043c\u0435\u043d\u044e"})]})})}),d?Object(S.jsx)(qi.a,{defaultPage:m,page:m,onChange:function(t,c){o("loading"),p(c),e("getUserOrders","",{phone:n.phone,token:n.token,page:c}).then((function(e){"success"===e.data.status&&(f(e.data.orders),o("loaded"),u(e.data.pages))}))},count:d,sx:{mt:4}}):""]})}var Ki=n(495),Ji=g.a.forwardRef((function(e,t){return Object(S.jsx)(He.a,Object(I.a)({direction:"up",ref:t},e))})),Xi=function(e){var t="";["7","8","9"].indexOf(e[0])>-1?("9"===e[0]&&(e="7"+e),t=("8"===e[0]?"8":"+7")+" ",e.length>1&&(t+="("+e.substring(1,4)),e.length>=5&&(t+=") "+e.substring(4,7)),e.length>=8&&(t+="-"+e.substring(7,9)),e.length>=10&&(t+="-"+e.substring(9,11))):t="+"+e.substring(0,16);return t},$i=function(e){return e.replace(/\D/g,"")},eo=function(){var e=k().navigateTo,t=yc().postRequestAPI,n=Object(w.d)(),c=Object(w.e)((function(e){var t=e.user,n=e.config;return{user:t.user,config:n.data}}),w.c),a=c.user,r=(c.config,g.a.useState("settings")),i=Object(Ve.a)(r,2),o=(i[0],i[1],g.a.useState(!1)),s=Object(Ve.a)(o,2),l=s[0],d=s[1],u=g.a.useState(!1),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=g.a.useState(!0),O=Object(Ve.a)(p,2),h=O[0],v=O[1],f=g.a.useState(""),_=Object(Ve.a)(f,2),y=_[0],N=_[1],C=g.a.useState(a.email?a.email:""),P=Object(Ve.a)(C,2),E=P[0],F=(P[1],g.a.useState(null)),T=Object(Ve.a)(F,2),M=T[0],D=T[1],G=g.a.useState(null),R=Object(Ve.a)(G,2),B=R[0],L=R[1],U=g.a.useState(a.vk?a.vk:""),z=Object(Ve.a)(U,2),H=z[0],W=z[1],V=g.a.useState(!1),Z=Object(Ve.a)(V,2),q=Z[0],Y=Z[1],K=g.a.useState(""),J=Object(Ve.a)(K,2),X=J[0],$=J[1];Object(x.useEffect)((function(){a.dayBirthday&&D(a.dayBirthday),a.monthBirthday&&L(a.monthBirthday-1)}),[a.dayBirthday,a.monthBirthday]),Object(x.useEffect)((function(){a.phone&&$(Xi(a.phone))}),[a.phone]),Object(x.useEffect)((function(){a.name&&N(a.name)}),[a.name]);var ee=function(){Y(!q)},te={error:!y.trim()&&!h,helperText:y.trim()||h?"":"\u041f\u043e\u043b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},ne={error:11!==$i(X).length&&!h,helperText:11===$i(X).length||h?"":"\u041d\u043e\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e"};var ce={open:q,maxWidth:"md"};return Q()&&(ce.TransitionComponent=Ji,ce.fullScreen=!0,ce.scroll="body"),Object(S.jsxs)("div",{children:[Object(S.jsx)(ot.a,{container:!0,columnSpacing:5,children:Object(S.jsxs)(ot.a,{item:!0,sm:12,md:5,children:[Object(S.jsx)(Qe.a,Object(I.a)({id:"userName",label:"\u0412\u0430\u0448\u0435 \u0438\u043c\u044f",onInput:function(e){N(e.target.value)},value:y,sx:{width:1,mb:4},size:"small",inputProps:{maxLength:50}},te)),Object(S.jsx)(Qe.a,Object(I.a)({disabled:!0,id:"userPhone",label:"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430",onKeyDown:function(e){var t=e.target.value.replace(/\D/g,"");8===e.keyCode&&1===t.length&&(e.target.value="")},onInput:function(e){var t,n=e.target,c=$i(n.value),a=n.selectionStart;if(!c)return n.value="";n.value.length===a?(t=Xi(c),n.value=t,$(t)):e.data&&/\D/g.test(e.data)&&(n.value=c)},onPaste:function(e){var t=e.target,n=$i(t.value),c=e.clipboardData||window.clipboardData;if(c){var a=c.getData("Text");if(/\D/g.test(a))return void(t.value=n)}},value:X,sx:{width:1,mb:4},size:"small"},ne)),Object(S.jsxs)(nc.a,{sx:{width:1,mb:4},children:[Object(S.jsxs)(ga.a,{sx:{display:"flex",flexWrap:"nowrap"},children:[Object(S.jsx)(Qe.a,{id:"userBirthDay",value:M||"",select:!0,disabled:!!a.dayBirthday,label:"\u0414\u0435\u043d\u044c",sx:{width:.3,minWidth:"80px",border:"none",mr:"10px"},size:"small",SelectProps:{MenuProps:{PaperProps:{sx:{maxHeight:"200px"}}}},onChange:function(e){D(e.target.value),B||L(0)},children:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new Date(e,t,1),c=[];n.getMonth()==t;)c.push(n.getDate()),n.setDate(n.getDate()+1);return a.dayBirthday||!B||c.includes(M)||D(1),c}(2022,B||0).map((function(e){return Object(S.jsx)(rc.a,{value:e,children:e},e)}))}),Object(S.jsxs)(Qe.a,{id:"userBirthMonth",value:B||0==B?B:"",select:!0,disabled:!!a.monthBirthday,label:"\u041c\u0435\u0441\u044f\u0446",sx:{width:.7},size:"small",onChange:function(e){L(e.target.value),M||D(1)},SelectProps:{MenuProps:{PaperProps:{sx:{maxHeight:"200px"}}}},children:[Object(S.jsx)(rc.a,{value:0,children:"\u042f\u043d\u0432\u0430\u0440\u044c"}),Object(S.jsx)(rc.a,{value:1,children:"\u0424\u0435\u0432\u0440\u0430\u043b\u044c"}),Object(S.jsx)(rc.a,{value:2,children:"\u041c\u0430\u0440\u0442"}),Object(S.jsx)(rc.a,{value:3,children:"\u0410\u043f\u0440\u0435\u043b\u044c"}),Object(S.jsx)(rc.a,{value:4,children:"\u041c\u0430\u0439"}),Object(S.jsx)(rc.a,{value:5,children:"\u0418\u044e\u043d\u044c"}),Object(S.jsx)(rc.a,{value:6,children:"\u0418\u044e\u043b\u044c"}),Object(S.jsx)(rc.a,{value:7,children:"\u0410\u0432\u0433\u0443\u0441\u0442"}),Object(S.jsx)(rc.a,{value:8,children:"\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c"}),Object(S.jsx)(rc.a,{value:9,children:"\u041e\u043a\u0442\u044f\u0431\u0440\u044c"}),Object(S.jsx)(rc.a,{value:10,children:"\u041d\u043e\u044f\u0431\u0440\u044c"}),Object(S.jsx)(rc.a,{value:11,children:"\u0414\u0435\u043a\u0430\u0431\u0440\u044c"})]})]}),Object(S.jsx)(Ki.a,{id:"userBirthday-helper-text",disabled:!!a.dayBirthday,sx:{ml:0},children:a.dayBirthday?Object(S.jsx)("div",{children:"\u0412\u0430\u0448 \u0434\u0435\u043d\u044c \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f"}):Object(S.jsx)("div",{children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448 \u0434\u0435\u043d\u044c \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f. \u0423\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437"})})]}),Object(S.jsx)(Qe.a,{id:"userPhone",label:"\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435",onInput:function(e){W(e.target.value)},value:H,size:"small",inputProps:{maxLength:50},sx:{width:1,mb:4}})]})}),Object(S.jsxs)("div",{className:"button-group",children:[Object(S.jsx)(Sc.a,{loading:l,sx:{mr:1.5},className:"btn--action",variant:"button",onClick:function(){v(!0),y.trim()&&11==$i(X).length?h&&(d(!0),t("saveLogin","",{name:y.trim(),phone:$i(X),email:E,vk:H.trim(),token:a.token,dayBirthday:M,monthBirthday:B+1}).then((function(e){d(!1),m(!1),N(e.data.user.name),n(A(e.data.user)),n(Ut({open:!0,message:e.data.message}))}))):v(!1)},children:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"}),Object(S.jsx)(de.a,{className:"btn--outline-dark",variant:"button",onClick:function(){n({type:"LOGOUT"}),e("/")},sx:{mr:1.5},children:"\u0412\u044b\u0439\u0442\u0438"})]}),Object(S.jsx)("hr",{className:"account-separator"}),Object(S.jsx)("div",{className:"deleting-account",children:Object(S.jsx)("button",{className:"btn--delete-account",onClick:ee,children:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442"})}),Object(S.jsx)(We.a,Object(I.a)(Object(I.a)({maxWidth:"md"},ce),{},{className:"account-dialog",PaperProps:{sx:{borderRadius:Q()?"0px":"20px"}},children:Object(S.jsxs)("div",{className:"modal-alert--wrapper",children:[Object(S.jsx)(pe.a,{edge:"start",color:"inherit",onClick:ee,"aria-label":"close",className:"modal-close",children:Object(S.jsx)(_e.a,{})}),Object(S.jsx)("h2",{className:"modal-alert--title",children:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430"}),Object(S.jsxs)("div",{className:"modal-alert--inner",children:["\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442?",Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:1.5,mb:4},children:"\u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0431\u0435\u0437\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u043e."}),Object(S.jsxs)("div",{className:"button-group",children:[Object(S.jsx)(Sc.a,{loading:b,sx:{mr:1.5},className:"btn--outline-dark",variant:"button",onClick:function(){m(!0),t("deleteLogin","",{name:y,phone:$i(X),token:a.token}).then((function(e){m(!1),n({type:"LOGOUT"})}))},children:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c"}),Object(S.jsx)(de.a,{variant:"button",className:"btn btn--action",onClick:ee,children:"\u041e\u0442\u043c\u0435\u043d\u0430"})]})]})]})}))]})},to=n(484),no=function(){var e=yc().postRequestAPI,t=Object(w.d)(),n=Object(x.useRef)(),c=Object(w.e)((function(e){return e.user.user.phone})),a=Object(w.e)((function(e){return e.user.user.token})),r=Object(w.e)((function(e){return e.user.user.addresses||[]})),i=Object(x.useState)(r.map((function(e,t){return Object(I.a)(Object(I.a)({},e),{},{id:"item-".concat(t)})}))),o=Object(Ve.a)(i,2),s=o[0],l=o[1],d=Object(x.useState)(!1),u=Object(Ve.a)(d,2),j=u[0],b=u[1],m=Object(x.useState)(!1),p=Object(Ve.a)(m,2),O=p[0],h=p[1],v=function(e){var t=J(s);t.splice(e,1),l(t)},f=function(e,t){var n=J(s);n[e].label=t,l(n)};return Object(S.jsxs)("div",{className:"addresses-list",children:[Object(S.jsx)(ot.a,{container:!0,children:Object(S.jsxs)(ot.a,{item:!0,xs:12,md:6,ref:n,children:[s.length?Object(S.jsx)(Or.a,{onDragEnd:function(e){var t=e.destination,n=e.source;if(t){var c=function(e,t,n){var c=J(e),a=c.splice(t,1),r=Object(Ve.a)(a,1)[0];return c.splice(n,0,r),c}(s,n.index,t.index);l(c)}},children:Object(S.jsx)(Or.c,{droppableId:"droppable",children:function(e){return Object(S.jsx)("div",Object(I.a)(Object(I.a)({ref:e.innerRef},e.droppableProps),{},{children:Object(S.jsxs)(to.a,{children:[s.map((function(e,t){return Object(S.jsx)(Xn.a,{children:Object(S.jsx)(fr,{address:e,index:t,onDelete:v,onEdit:f})},e.id)})),e.placeholder]})}))}})}):Object(S.jsx)("div",{className:"addresses-list--item addresses-list--placeholder",children:"\u0423 \u0432\u0430\u0441 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432"}),Object(S.jsx)("div",{className:"addresses-list--save-button-container",children:Object(S.jsx)(Sc.a,{loading:j,onClick:function(){b(!0),Array.isArray(s)?e("saveAddresses","",{phone:c,token:a,addresses:s}).then((function(e){b(!1),h(!0),t(function(e){return{type:"SAVE_ADDRESSES",payload:e}}(s))})):console.log("\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c")},className:"btn--action",variant:"button",children:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"})})]})}),Object(S.jsx)(sa.a,{open:O,autoHideDuration:4e3,onClose:function(){h(!1)},message:"\u0410\u0434\u0440\u0435\u0441\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b!",sx:{"& .MuiSnackbarContent-root":{backgroundColor:"rgb(50, 50, 50)",color:"#fff"}}})]})},co=function(){var e=Object(w.e)((function(e){var t=e.config.data.bonusProgramm;return{deliveryCashback:t.deliveryPercent,selfDeliveryCashback:t.selfDeliveryPercent}})),t=e.deliveryCashback,n=e.selfDeliveryCashback;return t||n?Object(S.jsx)("div",{className:"bonus-page--accrue-info-main",children:t&&n?t===n?Object(S.jsxs)(S.Fragment,{children:["\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c"," ",Object(S.jsxs)("span",{className:"main-color",children:[t,"%"]})," ","\u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438."]}):Object(S.jsxs)(S.Fragment,{children:["\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c"," ",Object(S.jsxs)("span",{className:"main-color",children:[t,"%"]})," ","\u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438"," ",Object(S.jsxs)("span",{className:"main-color",children:[n,"%"]})," ","\u2014 \u043e\u0442 \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430\u0432\u044b\u043d\u043e\u0441."]}):t&&!n?Object(S.jsxs)(S.Fragment,{children:["\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438"," ",Object(S.jsxs)("span",{className:"main-color",children:[t,"%"]})," \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443."]}):Object(S.jsxs)(S.Fragment,{children:["\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438"," ",Object(S.jsxs)("span",{className:"main-color",children:[n,"%"]})," ","\u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u043d\u0430\u0432\u044b\u043d\u043e\u0441."]})}):null},ao=function(){return Object(S.jsx)("div",{className:"bonus-page--additional-info-container",children:Object(S.jsxs)(ot.a,{container:!0,spacing:2,justifyContent:"center",children:[Object(S.jsx)(ot.a,{item:!0,xs:12,mobilelg:6,children:Object(S.jsxs)("div",{className:"bonus-page--additional-info-block",children:[Object(S.jsx)("h3",{children:"\u041f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u043a\u0435\u0448\u0431\u044d\u043a \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0437\u0430\u043a\u0430\u0437\u043e\u043c"}),Object(S.jsx)("span",{children:"\u0411\u043e\u043d\u0443\u0441\u044b \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0437\u0430\u043a\u0430\u0437\u043e\u043c. \u0411\u0430\u043b\u0430\u043d\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435."})]})}),Object(S.jsx)(ot.a,{item:!0,xs:12,mobilelg:6,children:Object(S.jsxs)("div",{className:"bonus-page--additional-info-block",children:[Object(S.jsx)("h3",{children:"\u041c\u0435\u043d\u044f\u0439\u0442\u0435 \u0431\u043e\u043d\u0443\u0441\u044b \u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u044b"}),Object(S.jsx)("span",{children:"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0431\u043b\u044e\u0434\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0438 \u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435 \u0431\u043e\u043d\u0443\u0441\u044b \u043f\u0440\u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043a\u0430\u0437\u0430."})]})})]})})},ro=function(){var e=Object(w.e)((function(e){return e.products.categories})),t=Object(w.e)((function(e){var t=e.config.data.bonusProgramm;return{"specified\u0421ategories":t.categories,excludeCategories:"yes"===t.excludeCategories,allowWithPromocode:"active"===t.allowPromocode,allowWithBonusProduct:"active"===t.allowBonusProduct,allowWithDiscountProducts:"active"===t.allowSaleProduct,allowWithBonuses:"active"===t.allowWithBonuses}})),n=t.specified\u0421ategories,c=t.excludeCategories,a=t.allowWithPromocode,r=t.allowWithBonusProduct,i=t.allowWithDiscountProducts,o=t.allowWithBonuses;if(!n.length&&a&&r&&i&&o)return null;var s=[];return n.length&&n.forEach((function(t){var n=e.find((function(e){return e.term_id===t}));n&&s.push("\xab".concat(n.name,"\xbb"))})),Object(S.jsxs)("div",{className:"bonus-page--accrue-info",children:[Object(S.jsx)("h3",{children:"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f"}),s.length?c?Object(S.jsxs)("div",{children:["\u0411\u043e\u043d\u0443\u0441\u044b \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u0442\u043e\u0432\u0430\u0440\u044b, \u043a\u0440\u043e\u043c\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ",s.join(", "),i?"":" \u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u043e\u0439","."]}):Object(S.jsxs)("div",{children:["\u0411\u043e\u043d\u0443\u0441\u044b \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439:"," ",s.join(", "),i?"":", \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u043e\u0439","."]}):i?null:Object(S.jsx)("div",{children:"\u0411\u043e\u043d\u0443\u0441\u044b \u043d\u0435 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u044b \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u043e\u0439."}),a&&r&&i&&o?null:Object(S.jsxs)("div",{className:"accrue-info--disable-reasons-container",children:["\u0411\u043e\u043d\u0443\u0441\u044b \u043d\u0435 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u0432\u044b:",Object(S.jsxs)("ul",{children:[a?null:Object(S.jsx)("li",{children:"\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434"}),r?null:Object(S.jsx)("li",{children:"\u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043f\u043e\u0434\u0430\u0440\u043e\u043a"}),o?null:Object(S.jsx)("li",{children:"\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0431\u043e\u043d\u0443\u0441\u044b \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0430\u043a\u0430\u0437\u0430"})]})]})]})},io=function(){var e=Object(w.e)((function(e){return e.products.categories})),t=Object(w.e)((function(e){var t=e.config.data.bonusProgramm;return{"specified\u0421ategories":t.paymentCategories,excludeCategories:"yes"===t.paymentExcludeCategories,disableMinPrice:"active"===t.paymentIgnoreMinimalPrice,allowWithPromocode:"active"!==t.paymentDisableWithPromocode,allowWithBonusProduct:"active"!==t.paymentDisableWithBonusProduct,allowWithDiscountProducts:"active"!==t.paymentDisableWithSaleProduct}})),n=t.specified\u0421ategories,c=t.excludeCategories,a=t.disableMinPrice,r=t.allowWithPromocode,i=t.allowWithBonusProduct,o=t.allowWithDiscountProducts;if(a&&!n.length&&r&&i&&o)return null;var s=[];n.length&&n.forEach((function(t){var n=e.find((function(e){return e.term_id===t}));n&&s.push("\xab".concat(n.name,"\xbb"))}));var l=[];r||l.push("c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c"),i||l.push("c \u043f\u043e\u0434\u0430\u0440\u043a\u0430\u043c\u0438"),o||l.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435"),s.length&&c&&l.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ".concat(s.join(", "))),s.length&&!c&&l.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043a\u0440\u043e\u043c\u0435: ".concat(s.join(", ")));var d="";return l.length&&l.forEach((function(e,t,n){0===t?d+=e:t===n.length-1?d+=" \u0438 "+e:d+=", "+e})),Object(S.jsxs)("div",{className:"bonus-page--payment-info",children:[Object(S.jsx)("h3",{children:"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f"}),a?null:Object(S.jsx)("div",{children:"\u0411\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u043c\u043c\u0443 \u0441\u0432\u044b\u0448\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430."}),l.length?Object(S.jsxs)("div",{children:["\u041e\u043f\u043b\u0430\u0442\u0430 \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 ",d,"."]}):null]})},oo=function(e){var t=e.borderType,n=k().navigateTo,c=Object(w.e)((function(e){return e.user.user})),a=Object(w.e)((function(e){return{useBonusesLimit:e.config.data.bonusProgramm.paymentPercent}})).useBonusesLimit,r=c.bonuses?parseInt(c.bonuses):0;return Object(S.jsx)(ot.a,{item:!0,xs:12,sm:6,desctop:12,children:Object(S.jsxs)("div",{className:Object(Ne.a)("user-bonuses-info","solid"===t&&"solid"),children:[Object(S.jsxs)("div",{children:["\u0411\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0434\u043e ",a,"% \u043e\u0442 \u043e\u0431\u0449\u0435\u0439 \u0441\u0443\u043c\u043c\u044b \u0437\u0430\u043a\u0430\u0437\u0430"]}),Object(S.jsxs)("div",{className:"user-bonuses-info--exchange",children:[Object(S.jsx)("span",{children:"1 \u0431\u043e\u043d\u0443\u0441 = "}),Object(S.jsx)("span",{style:{whiteSpace:"nowrap"},children:"1 \u0440\u0443\u0431\u043b\u044c"})]}),c.token?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{className:"user-bonuses-info--user-bonuses-title",children:"\u0423 \u0432\u0430\u0441 \u043d\u0430 \u0441\u0447\u0435\u0442\u0443"}),Object(S.jsxs)("div",{className:"user-bonuses-info--user-bonuses",children:[Object(S.jsx)("span",{className:"main-color",children:r.toLocaleString("ru-RU")})," ",Z(r,["\u0431\u043e\u043d\u0443\u0441","\u0431\u043e\u043d\u0443\u0441\u0430","\u0431\u043e\u043d\u0443\u0441\u043e\u0432"])]})]}):null,Object(S.jsx)(de.a,{onClick:function(){window.scrollTo(0,0),n("/")},variant:"contained",className:"btn--action",sx:{mt:"20px",width:"100%",whiteSpace:"nowrap"},children:"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043c\u0435\u043d\u044e"})]})})},so=n(483),lo=n(515),uo=n(516),jo=n(517),bo=n(518),mo=n(514),po=n(519),Oo=n(460),ho=function(){var e=yc().getRequestAPI,t=Object(w.e)((function(e){return e.user.user})),n=Object(x.useState)(!1),c=Object(Ve.a)(n,2),a=c[0],r=c[1],i=Object(x.useState)(!1),o=Object(Ve.a)(i,2),s=o[0],l=o[1],d=Object(x.useState)(0),u=Object(Ve.a)(d,2),j=u[0],b=u[1],m=Object(x.useState)(0),p=Object(Ve.a)(m,2),O=p[0],h=p[1],v=Object(x.useState)(null),f=Object(Ve.a)(v,2),g=f[0],_=f[1];Object(x.useEffect)((function(){var n=hc.a.CancelToken.source();return t.token&&t.phone&&(r(!0),e("getUserBonuses","",{params:{token:t.token,phone:t.phone,page:j+1,perPage:8},cancelToken:n.token}).then((function(e){var t;"success"===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.status)?(h(e.data.bonusesHistory.total),_(e.data.bonusesHistory.items),r(!1)):(r(!1),l(!0))})).catch((function(e){l(!0),console.log(e.message)}))),function(){n.cancel()}}),[j]);var y=function(e,t){b(t)};if(!g&&!a&&!s)return null;if((!(null===g||void 0===g?void 0:g.length)||s)&&!a)return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h3",{children:"\u0418c\u0442\u043e\u0440\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439"}),Object(S.jsxs)("div",{className:"user-bonuses-history",children:[Object(S.jsx)("div",{className:"user-bonuses-history--empty-table",children:s?"\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0437\u0436\u0435":"\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430 \u043f\u0443\u0441\u0442\u043e"}),Object(S.jsx)(so.a,{component:"div",count:O,rowsPerPage:8,rowsPerPageOptions:[],page:j,onPageChange:y,labelDisplayedRows:function(e){var t=e.from,n=e.to,c=e.count;return(null===g||void 0===g?void 0:g.length)?"".concat(t,"-").concat(n," \u0438\u0437 ").concat(c):""},sx:{"& p":{marginBottom:0}}})]})]});var N=j>0?Math.max(0,8-(null===g||void 0===g?void 0:g.length)):0;return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h3",{children:"\u0418c\u0442\u043e\u0440\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439"}),Object(S.jsxs)("div",{className:"user-bonuses-history",children:[Object(S.jsxs)("div",{className:"user-bonuses-history--table-container",children:[Q()?Object(S.jsx)("div",{className:"user-bonuses-history--mobile-table",children:!g&&a?Object(an.a)(Array(8)).map((function(){return Object(S.jsx)("div",{className:"mobile-table--operation",children:Object(S.jsx)(Fe.a,{sx:{width:"100%"}})})})):Object(S.jsxs)(S.Fragment,{children:[g.map((function(e){return Object(S.jsxs)("div",{className:"mobile-table--operation",children:[Object(S.jsxs)("div",{className:"mobile-table--operation-left-col",children:[Object(S.jsx)("div",{className:"mobile-table--operation-text",children:e.text}),Object(S.jsx)("div",{className:"mobile-table--operation-date",children:Object(Oo.a)(parseInt(1e3*e.time),"d.MM.yyyy H:mm")})]}),Object(S.jsxs)("div",{className:"mobile-table--operation-right-col",children:[Object(S.jsxs)("div",{className:Object(Ne.a)("mobile-table--operation-amount","add"===e.type?"add":"decrease"),children:["add"===e.type?"+":"-",parseInt(e.amount).toLocaleString("ru-RU")]}),Object(S.jsx)("div",{className:"mobile-table--operation-type",children:"add"===e.type?"\u041d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435":"decrease"===e.type?"\u0421\u043f\u0438\u0441\u0430\u043d\u0438\u0435":e.type})]})]})})),N>0&&Object(S.jsx)("div",{style:{height:86*N,borderBottom:"1px solid #f1f1f1"}})]})}):Object(S.jsx)(lo.a,{children:Object(S.jsxs)(uo.a,{sx:{"& .MuiTableCell-root":{borderColor:"var(--divider-color)"}},children:[Object(S.jsx)(jo.a,{sx:{"& .MuiTableCell-head":{fontWeight:700,lineHeight:1.5}},children:Object(S.jsxs)(bo.a,{children:[Object(S.jsx)(mo.a,{width:"22%",children:"\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f"}),Object(S.jsx)(mo.a,{align:"left",width:"20%",children:"\u0422\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438"}),Object(S.jsx)(mo.a,{align:"left",children:"\u0421\u0443\u043c\u043c\u0430"}),Object(S.jsx)(mo.a,{align:"left",children:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f"})]})}),a&&!g?Object(S.jsx)(po.a,{children:Object(an.a)(Array(8)).map((function(e,t){return Object(S.jsxs)(bo.a,{style:{height:53},children:[Object(S.jsx)(mo.a,{children:Object(S.jsx)(Fe.a,{})}),Object(S.jsx)(mo.a,{width:"20%",children:Object(S.jsx)(Fe.a,{})}),Object(S.jsx)(mo.a,{width:"15%",children:Object(S.jsx)(Fe.a,{})}),Object(S.jsx)(mo.a,{children:Object(S.jsx)(Fe.a,{})})]},t)}))}):Object(S.jsxs)(po.a,{sx:{position:"relative"},children:[g.map((function(e){return Object(S.jsxs)(bo.a,{children:[Object(S.jsx)(mo.a,{width:"22%",children:Object(Oo.a)(parseInt(1e3*e.time),"d.MM.yyyy H:mm")}),Object(S.jsx)(mo.a,{align:"left",width:"20%",children:"add"===e.type?"\u041d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435":"decrease"===e.type?"\u0421\u043f\u0438\u0441\u0430\u043d\u0438\u0435":e.type}),Object(S.jsx)(mo.a,{align:"left",children:Object(S.jsxs)("span",{className:Object(Ne.a)("operation-amount","add"===e.type?"add":"decrease"),children:["add"===e.type?"+":"-",parseInt(e.amount).toLocaleString("ru-RU")]})}),Object(S.jsx)(mo.a,{align:"left",children:e.text})]},e.id)})),N>0&&Object(S.jsx)(bo.a,{style:{height:53*N},children:Object(S.jsx)(mo.a,{colSpan:6})})]})]})}),a&&(null===g||void 0===g?void 0:g.length)?Object(S.jsx)(ga.a,{sx:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:0,left:0,width:"100%",height:"100%",bgcolor:"var(--loading-backdrop-color)",borderRadius:"8px 8px 0 0"},children:Object(S.jsx)(Ze.a,{size:44})}):null]}),Object(S.jsx)(so.a,{component:"div",count:O,rowsPerPage:8,rowsPerPageOptions:[],page:j,onPageChange:y,labelDisplayedRows:function(e){var t=e.from,n=e.to,c=e.count;return(null===g||void 0===g?void 0:g.length)?"".concat(t,"-").concat(n," \u0438\u0437 ").concat(c):""},sx:{"& p":{marginBottom:0}}})]})]})},vo=function(){var e=yc().postRequestAPI,t=Object(w.e)((function(e){return e.user.user})),n=Object(w.e)((function(e){return e.config.status})),c=Object(w.e)((function(e){var t;return"active"===(null===(t=e.config.data.bonusProgramm)||void 0===t?void 0:t.status)})),a=Object(w.e)((function(e){return e.config.data.bonusProgrammType})),r=Object(x.useState)(0),i=Object(Ve.a)(r,2),o=i[0],s=i[1],l=Object(x.useState)(!c),d=Object(Ve.a)(l,2),u=d[0],j=d[1],b=Object(x.useState)(!1),m=Object(Ve.a)(b,2),p=m[0],O=m[1];return Object(x.useEffect)((function(){if(("frontpad"===a||"sbis"===a)&&t.token&&t.phone&&n){j(!0);var c="";"frontpad"===a?c="getFrontpadBonuses":"sbis"===a&&(c="getSbisBonuses"),e(c,"",{token:t.token,phone:t.phone}).then((function(e){var t,n;"success"===e.data.status?(null===(t=e.data.user)||void 0===t?void 0:t.bonuses)>0&&s(null===(n=e.data.user)||void 0===n?void 0:n.bonuses):O(!0);j(!1)}))}}),[a,n]),Object(S.jsx)("div",{className:"account-user-bonuses",children:c?Object(S.jsxs)(ot.a,{container:!0,justifyContent:"space-between",wrap:"wrap-reverse",alignItems:"flex-end",children:[Object(S.jsxs)(ot.a,{item:!0,xs:12,desctop:8,children:[Object(S.jsx)(ho,{}),Object(S.jsx)(co,{}),Object(S.jsx)(ao,{}),Object(S.jsx)(ro,{}),Object(S.jsx)(io,{})]}),Object(S.jsx)(ot.a,{item:!0,container:!0,xs:12,desctop:3,sx:Object(cn.a)({position:"sticky",height:"fit-content",top:"20px"},"@media (max-width: 899px)",{position:"static"}),children:Object(S.jsx)(oo,{borderType:"solid"})})]}):p?Object(S.jsx)("span",{children:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441 \u0431\u043e\u043d\u0443\u0441\u043e\u0432. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043f\u043e\u0437\u0436\u0435."}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("p",{children:["\u041d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0447\u0435\u0442\u0443"," ",u?Object(S.jsx)(Ze.a,{size:14}):Object(S.jsx)("span",{className:"main-color",children:o}),Object(S.jsx)("span",{children:" \u0431\u043e\u043d\u0443\u0441\u043e\u0432."}),Object(S.jsx)(wn,{placement:"top",title:"\u0411\u043e\u043d\u0443\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f 1 \u0440\u0430\u0437 \u0432 15 \u043c\u0438\u043d\u0443\u0442",children:Object(S.jsx)(dc.a,{className:"checkout--info-icon"})})]}),Object(S.jsxs)("p",{children:["1 \u0431\u043e\u043d\u0443\u0441 = ",Object(S.jsx)("span",{className:"main-color",children:"1 \u20bd"})]})]})})};function fo(){var e,t=Object(w.d)(),n=Object(w.e)((function(e){return e.user.user}),w.c),c=Object(w.e)((function(e){return e.config.data})),a=Object(x.useState)(window.location.hash?window.location.hash.slice(1):"settings"),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=!!c.bonusProgrammStatus||"active"===(null===(e=c.bonusProgramm)||void 0===e?void 0:e.status);return Object(S.jsxs)(ga.a,{sx:{minHeight:"100vh",display:"flex",flexDirection:"column"},children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:1,maxWidth:"1328px !important"},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u041b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442"}),n.token?Object(S.jsxs)(Zi.a,{value:i,children:[Object(S.jsxs)(Wi.a,{onChange:function(e,t){o(t),window.location.hash=t},className:"account--tab-list",variant:"scrollable",scrollButtons:!0,allowScrollButtonsMobile:!0,value:i,sx:{"& .MuiTabs-scrollButtons.Mui-disabled":{opacity:Q()?.3:0}},children:[Object(S.jsx)(Vi.a,{disableRipple:!0,label:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",value:"settings"}),s?Object(S.jsx)(Vi.a,{disableRipple:!0,label:"\u0411\u043e\u043d\u0443\u0441\u044b",value:"bonuses"}):null,Object(S.jsx)(Vi.a,{disableRipple:!0,label:"\u0417\u0430\u043a\u0430\u0437\u044b",value:"orders"}),Object(S.jsx)(Vi.a,{disableRipple:!0,label:"\u041c\u043e\u0438 \u0430\u0434\u0440\u0435\u0441\u0430",value:"addresses"})]}),Object(S.jsx)(Qi.a,{value:"settings",sx:{boxShadow:"var(--box-shadow)",borderRadius:"10px 10px 10px 10px",bgcolor:"var(--modal-background)"},children:Object(S.jsx)(eo,{})}),s?Object(S.jsx)(Qi.a,{value:"bonuses",sx:{boxShadow:"var(--box-shadow)",borderRadius:"10px",bgcolor:"var(--modal-background)"},children:Object(S.jsx)(vo,{})}):null,Object(S.jsx)(Qi.a,{value:"orders",sx:{boxShadow:"var(--box-shadow)",borderRadius:"10px",bgcolor:"var(--modal-background)"},children:Object(S.jsx)(Yi,{})}),Object(S.jsx)(Qi.a,{value:"addresses",sx:{boxShadow:"var(--box-shadow)",borderRadius:"10px",bgcolor:"var(--modal-background)"},children:Object(S.jsx)(no,{})})]}):Object(S.jsxs)("div",{className:"auth",children:[Object(S.jsx)("p",{children:"\u0412\u044b \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u044b."}),Object(S.jsxs)("p",{children:[Object(S.jsx)("a",{className:"main-color",onClick:function(){t(D(!0))},children:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c"}),", \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0439\u0442\u0438 \u0432 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442."]})]})]}),Object(S.jsx)(Ot,{})]})}n.p;var xo,go,_o,yo,wo=["title","titleId"];function No(){return(No=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Co(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ko(e,t){var n=e.title,c=e.titleId,a=Co(e,wo);return x.createElement("svg",No({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:"250px",height:"250px",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"optimizeQuality",fillRule:"evenodd",clipRule:"evenodd"},viewBox:"0 0 20000 20000",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,xo||(xo=x.createElement("defs",null,x.createElement("style",null,".fil0{fill:currentColor}"))),x.createElement("g",{id:"\\u0421\\u043B\\u043E\\u0439_x0020_1"},x.createElement("g",{id:"_1809337801760"},go||(go=x.createElement("path",{className:"fil0",d:"M14501.82 12686.11c888.5-591.15 1106.25-1350.22 1524.52-1359.98 259.21-6.05 439.04 288.63 363.36 573.2-210.55 791.65-1161.62 1599.49-2040.41 1789.33 101.31-420.94 127.15-534.41 152.53-1002.55m-605.12-1232.34c99.48 289.32 229.65 947.62 240.39 1300.82 27.13 892.6-417.36 1539.65-1185.71 1901.61-319.19 150.36-811.41 300.96-1200.57 357.65l407.15-673c88.92-169.77 467.29-736.25-33.45-685.35-121.35 151.04-174.96 320.19-266.2 489.36-337.84 626.37-1513.07 2192.37-1906.37 1031.71-217.8-642.75 8.23-1250.29-372.09-1118.06-226.34 78.69-22.8 645.6-285.53 1225.88-392.92 867.81-1355.55-336.08-1640.54-773.6-101.88-156.41-189.68-308.78-280.39-487.11-103.33-203.11-100.77-400.8-379.3-366.77-122.59 152.79-112.3 155.26-26.55 348.84 215.3 486.02 390.02 657.24 570.76 1006.53-491.31-69.53-1157.39-293.6-1507.43-519.32-344.51-222.16-694.19-629.32-820.08-1163.8-220.49-936.08 279.45-1820.54 293.08-2585.35 6.61-370.87-101.3-545.69-157.7-859.72 209.79-3.64 414.85-2.74 624.12 15.52 237.44 20.72 373.43 32.6 341.92-250.39-242.2-198.49-735.4-95.96-1078.46-128.32l-48.83-352.47c259.69 26.78 843.22 210.04 1025.59 169.02 140.18-154.44 97.96-289.75-125.45-349.34-115.01-30.68-399.5-77.19-475-129.34l-423.1-60.33c-52.03-408.03 209.24-1308.2 322.72-1672.5 42.2-616.34-137.5-1425.52 115.21-2205.18 294.09-907.33 981.47-331.57 1382.47-4.42 467.27 381.23 325.39 460.05 692.79 279.79 901.86-442.5 1840.6-649.06 2856.95-390.12 1435.49 365.72 1053.85 745.42 1593.62 236.22 279.38-263.56 1065.19-1029.51 1438.07-303.98 249.75 485.94 241.37 1499.61 200.19 2096.97-34.2 496.07 391.61 1349.39 321.78 1966.1-237.95 34.04-463.7 77.83-690.81 130.99-260.34 60.93-468.23 55.95-389.98 367.36 174.13 108.21 269.97 27.56 494.84-26.01 184.46-43.94 384.33-84.75 589.02-104.66l-72.75 352.7c-241.36 18.01-985.54-55.69-1057.22 146.12-122.83 345.83 450.61 206.52 961.8 216.39-158.86 838.21-249.09 519.04-48.96 1569.56M5123.39 5768.64l4.53 1354.03c-53.33 177.62-98.6 319.48-147.55 514.06-46.14 183.41-73.56 330.92-106.48 528.6-28.69 172.29-68.04 415.03-68.04 593.52-119.67-2.67-105.16-26.47-238.16-26.47-217.66 0-1349.56-50.57-1349.56 211.7 0 179.54 8.12 105.28 79.39 211.7 333.47 0 667.4-52.93 1111.4-52.93 176 0 229.06 26.46 396.93 26.46 20.64 88.6 52.92 320.66 52.92 423.4-335.27 0-753.1 101.87-1042.92 174.32-213.94 53.48-578.43 123.22-560.28 321.3 26.68 291.12 386.51 116.83 533.26 75.07 128.52-36.57 240.74-61.06 360.55-89.3 230.03-54.24 546.47-110.93 815.24-110.93 152.23 653.41 264.72 614.11 68.96 1392.06-189.05 751.27-407.17 1586.38-95.95 2366.07 93.09 233.21 234.04 492.44 391.22 667.26 406.35 451.96 702.08 617.42 1319.33 824.1 275.4 92.21 533.95 158.18 848.79 209.68 766.21 125.34 229.18-11.51 753.7 331.25 207.61 135.66 474.08 273.49 785.75 214.34 272.28-51.67 532.4-272.69 585.51-500.66h52.93c107.16 459.97 766.19 734.44 1384.15 272.75 73.27-54.74 144.19-102.93 209.04-161.43 106.69-96.26 76.72-88.31 254.5-115.97 437.8-68.13 793.54-139.15 1185.55-269.86 529.46-176.54 1002.49-446.38 1313.93-882.42 154.82-216.77 141.4-107.91 505.91-235.02 844.04-294.34 1640.17-829.19 2045.04-1633.17 158.26-314.26 193.69-396.35 193.69-706.02 0-374.2-347.87-740.94-714.47-740.94-726.53 0-1021.6 1023.55-1587.72 1323.1-8.84-396.69-317.55-1218.53-317.55-1561.26 0-287.21 129.96-556.59 185.24-793.86 1102.92 0 1693.56 595.29 1693.56 79.39 0-245.56-1332.91-449.85-1587.72-449.85l26.47-423.4 635.08-26.46c337.09 0 568.17 52.93 899.71 52.93 202.13-301.86 2.8-353.43-298.12-389.89-355.56-43.09-666.42-33.51-1024.98-33.51-91.23 0-102.46 19.58-185.23 26.47-35.67-428.65-106.51-821.86-201.08-1201.41-26.86-107.81-40.35-170.14-73.47-270.54-126.52-383.58-43-471.42-43-962.56 0-864.45-18.06-2249.27-1032.01-2249.27-440.27 0-1187.89 578.89-1349.56 820.33-1420.4-751.58-2855.07-757.61-4286.85 0-61.74-92.2-452.54-428.48-555.47-503.01-577.8-418.37-1294.85-516.09-1611.24 268.02-121.55 301.22-214.87 692.14-214.87 1108.23"})),x.createElement("path",{d:"m12157.96 14340.85-407.15 673c389.16-56.69 881.38-207.29 1200.57-357.65 768.35-361.96 1212.84-1009.01 1185.71-1901.61-10.74-353.2-140.91-1011.5-240.39-1300.82-56.56-32.78-233.62-284.32-457.79-95.29-269.63 227.37 228.15 791.39 120.39 1707-49.76 422.79-251.7 676.27-469.87 854.51-153.56 125.45-663.03 411.88-931.47 420.86m2343.86-1654.74c-25.38 468.14-51.22 581.61-152.53 1002.55 878.79-189.84 1829.86-997.68 2040.41-1789.33 75.68-284.57-104.15-579.25-363.36-573.2-418.27 9.76-636.02 768.83-1524.52 1359.98",style:{fill:"var(--main-color, #FDC54E)"}}),_o||(_o=x.createElement("path",{className:"fil0",d:"M8687.34 8772.32c-164.58 58.7-248.82 272.55 24.27 474.13 154.38 113.96 341.62 187.75 569.14 223.79 456.15 72.26 994.19-3.97 1282.02-246.73 165.24-139.36 216.23-420.27-46.03-462.72-219.99-35.62-489.24 421.32-1265.27 209.24-363.29-99.28-340.17-277.59-564.13-197.71"})),x.createElement("path",{d:"M5509.68 7125.94c-113.48 364.3-374.75 1264.47-322.72 1672.5l423.1 60.33c169.86-7.63 124.97-239.62 172.23-527.26 33.58-204.38 77.9-387.64 129.29-584.73 39.69-152.25 296.42-714.19-127.93-738.71-121.69-7.04-158.58 42.59-254.18 105.48-4.71 3.09-12.95 8.68-19.79 12.39",style:{fill:"var(--main-color, #FDC54E)"}}),yo||(yo=x.createElement("path",{className:"fil0",d:"M7456.84 7798.46c-608.68 138.78-535.68 492.9-366.51 582.21 241 127.23 438.89-284.56 931.77-85.95 135.81 54.72 228.01 199.78 407.52 66.51 161.6-119.98 75.85-305.44-25.24-395.69-202.24-180.53-612.45-243.48-947.54-167.08m3982.81-373.9c-209.15 105.13-132.5 552.53-132.66 805.05-.07 126.59-25.1 320.15 28.11 430.02 48.88 100.94 194.44 171.84 326.79 102.49 225.02-117.92 103.49-1212.69 101.27-1218.76-39.25-107.42-177.77-192.06-323.51-118.8"})))))}var Io=x.forwardRef(ko);n.p,n(356);function Po(){var e=Object(w.d)(),t=Me().metricMakeOrder,n=Object(w.e)((function(e){return e.cart.items})),c=Object(w.e)((function(e){return e.cart.promocode})),a=Object(w.e)((function(e){return e.user.user.phone})),r=Object(w.e)((function(e){return e.user.user.token})),i=Object(w.e)((function(e){return e.config.data.CONFIG_confirm_order_text})),o=window.CONFIG_order_confirm_image;return Object(x.useEffect)((function(){t(n,c,a),e({type:"CLEAR_CART"})}),[]),Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:1},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u0417\u0430\u043a\u0430\u0437 \u043f\u0440\u0438\u043d\u044f\u0442"}),Object(S.jsxs)("div",{className:"order-complete-page",children:[Object(S.jsx)("div",{className:"order-complete--logo-container",children:o?Object(S.jsx)("img",{src:o,className:"order-complete--logo",alt:"\u0417\u0430\u043a\u0430\u0437 \u043f\u0440\u0438\u043d\u044f\u0442"}):Object(S.jsx)(Io,{className:"order-complete--logo"})}),Object(S.jsxs)("div",{className:"order-complete-page--content-container",children:[i?Object(S.jsx)("div",{className:"order-complete-page--content",dangerouslySetInnerHTML:{__html:i}}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("p",{children:"\u0412\u0430\u0448 \u0437\u0430\u043a\u0430\u0437 \u043f\u0440\u0438\u043d\u044f\u0442."}),Object(S.jsx)("p",{children:"\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0432\u044f\u0436\u0435\u0442\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430."})]}),r?Object(S.jsx)(E,{className:"btn btn--action",to:"/account#orders",style:{marginTop:"15px"},children:"\u0412 \u043c\u043e\u0438 \u0437\u0430\u043a\u0430\u0437\u044b"}):Object(S.jsx)(E,{className:"btn btn--action",to:"/",style:{marginTop:"15px"},children:"\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"})]})]})]}),Object(S.jsx)(Ot,{})]})}function So(){var e=Object(w.e)((function(e){var t=e.config,n=e.cart;return{delimiter:t.data.CONFIG_count_rolls_for_free_addons,sauceImg:t.data.CONFIG_free_sauce_image,vasabiImg:t.data.CONFIG_free_vasabi_image,imbirImg:t.data.CONFIG_free_imbir_image,totalRolls:n.totalRolls}})),t=e.delimiter,n=e.totalRolls,c=0;return t&&(c=parseInt(n/t),n%t&&c++),Object(S.jsx)("div",{children:c?Object(S.jsxs)("div",{className:"free-addons",children:[Object(S.jsxs)("div",{className:"checkout--product",children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:["\u0421\u043e\u0435\u0432\u044b\u0439 \u0441\u043e\u0443\u0441 x ",c," \u0448\u0442."]}),Object(S.jsx)("div",{className:"checkout--product-result",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"})]}),Object(S.jsxs)("div",{className:"checkout--product",children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:["\u0412\u0430\u0441\u0430\u0431\u0438 x ",c," \u0448\u0442."]}),Object(S.jsx)("div",{className:"checkout--product-result",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"})]}),Object(S.jsxs)("div",{className:"checkout--product",children:[Object(S.jsxs)("div",{className:"checkout--product-name",children:["\u0418\u043c\u0431\u0438\u0440\u044c x ",c," \u0448\u0442."]}),Object(S.jsx)("div",{className:"checkout--product-result",children:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"})]})]}):""})}var Eo,Fo,To,Ao,Mo,Do,Go,Ro,Bo,Lo,Uo,zo,Ho,Wo,Vo,Zo,Qo=n(447),qo=n(485),Yo=n(448),Ko=n(449),Jo=n(450),Xo=n(451),$o=n(251),es=n(476),ts=n(452),ns=n(453),cs=n(454),as=n(455),rs=n(252),is=Object(x.forwardRef)((function(e,t){var n,c,a=e.preorderDate,r=e.preorderTime,i=e.handlePreorderDateChange,o=e.handlePreorderTimeChange,s=e.asSoonAsPosible,l=e.error,d=e.helperText,u=ea(),j=u.workingStatus,b=u.maintenanceStatus,m=u.maintenanceDateStart,p=u.maintenanceDateEnd,O=Object(w.e)((function(e){return e.cart})),h=O.promocode,v=O.conditionalPromocode||h,f=Object(w.e)((function(e){return e.config.data})),g=Object(w.e)((function(e){return Object.values(e.cart.items)})),_=Object(w.e)((function(e){return e.products.categories})),y=Object(w.e)((function(e){return e.cart.bonusProduct})),N=0===Object(H.a)(a)?6:Object(H.a)(a)-1,C=["\u043f\u043d","\u0432\u0442","\u0441\u0440","\u0447\u0442","\u043f\u0442","\u0441\u0431","\u0432\u0441"],k=f.orderingTime[N]||[f.CONFIG_schedule_ordering_start,f.CONFIG_schedule_ordering_end],I=0===Object(H.a)(new Date)?6:Object(H.a)(new Date)-1,P=f.orderingTime[I]||[f.CONFIG_schedule_ordering_start,f.CONFIG_schedule_ordering_end],E=parseInt(P[0].slice(0,2))>=parseInt(P[1].slice(0,2)),F=Object(L.a)(new Date,{hours:E?23:P[1].slice(0,2),minutes:E?59:P[1].slice(3,5),seconds:0,milliseconds:0}),T=Object(L.a)(new Date,{hours:k[0].slice(0,2),minutes:k[0].slice(3,5),seconds:0,milliseconds:0}),A=parseInt(k[0].slice(0,2))>=parseInt(k[1].slice(0,2)),M=Object(L.a)(new Date,{hours:A?23:k[1].slice(0,2),minutes:A?59:k[1].slice(3,5),seconds:0,milliseconds:0}),D=0===N?6:N-1,W=f.orderingTime[D]||[f.CONFIG_schedule_ordering_start,f.CONFIG_schedule_ordering_end],V=parseInt(W[0].slice(0,2))>=parseInt(W[1].slice(0,2)),Z=Object(L.a)(new Date,{hours:W[1].slice(0,2),minutes:W[1].slice(3,5),seconds:0,milliseconds:0});r&&(Object(U.a)(r,{start:Object(Qo.a)(a)?new Date:T,end:M})||V&&Object(U.a)(r,{start:Object(z.a)(new Date),end:Z})||o("")),Object(Qo.a)(a)&&Object(B.a)(new Date,T)&&(T=new Date,T=Object(qo.a)(T,{nearestTo:30,roundingMethod:"ceil"})),Object(Qo.a)(a)&&f.CONFIG_time_order_delay&&Object(B.a)(Object(Yo.a)(new Date,f.CONFIG_time_order_delay),T)&&(T=Object(Yo.a)(new Date,f.CONFIG_time_order_delay),T=Object(qo.a)(T,{nearestTo:30,roundingMethod:"ceil"}));var Q,q=[];if(V)for(Object(Qo.a)(a)?(Q=new Date,f.CONFIG_time_order_delay&&(Q=Object(Yo.a)(new Date,f.CONFIG_time_order_delay)),Q=Object(qo.a)(Q,{nearestTo:30,roundingMethod:"ceil"})):Q=Object(z.a)(new Date);Object(Ko.a)(Q,Z)<1;)q.push(Q),Q=Object(Yo.a)(Q,30);if(k[0]&&k[1])for(;Object(Ko.a)(T,M)<1;)q.push(T),T=Object(Yo.a)(T,30);1==Object(Ko.a)(q[q.length-1],Object(Jo.a)(new Date))&&q.pop();var Y=null===(n=f.orderingTime)||void 0===n?void 0:n.map((function(e,t){var n=0===t?6:t-1,c=f.orderingTime[n]||[f.CONFIG_schedule_ordering_start,f.CONFIG_schedule_ordering_end],a=parseInt(c[0].slice(0,2))>=parseInt(c[1].slice(0,2));if((!e[0]||!e[1])&&!a)return t})).filter((function(e){if(e||0===e)return!0})),K=0===I?6:I-1,J=f.orderingTime[K]||[f.CONFIG_schedule_ordering_start,f.CONFIG_schedule_ordering_end],X=parseInt(J[0].slice(0,2))>=parseInt(J[1].slice(0,2)),$=Object(L.a)(new Date,{hours:J[1].slice(0,2),minutes:J[1].slice(3,5),seconds:0,milliseconds:0}),ee=Object(R.a)(Object(Yo.a)(new Date,f.CONFIG_time_order_delay),F)||X&&Object(R.a)(Object(Yo.a)(new Date,f.CONFIG_time_order_delay),$),ne=te(P[0],P[1]),ae=f.CONFIG_disable_preorder_unworktime&&!ne||"disable"===f.CONFIG_preorder_limit_type||!ee&&"currentDay"===f.CONFIG_preorder_limit_type?[]:"currentDay"===f.CONFIG_preorder_limit_type?[new Date]:Object(Xo.a)({start:ee?new Date:Object(Qc.a)(new Date,1),end:Object(Qc.a)(new Date,"days"===f.CONFIG_preorder_limit_type&&f.CONFIG_preorder_limit_days?f.CONFIG_preorder_limit_days:30)}),ie=null===(c=v.days)||void 0===c?void 0:c.map((function(e,t){if(!e)return t})).filter((function(e){if(e||0===e)return!0})),oe=new Set,se=[],le=[],de=[];g.forEach((function(e){e.items[0].categories.forEach((function(e){var t=_.find((function(t){return t.term_id===e}));t&&t.useTimeLimit&&(de.includes("\xab".concat(t.name,"\xbb"))||de.push("\xab".concat(t.name,"\xbb")),Array.isArray(t.days)&&t.days.forEach((function(e,t){e||oe.add(t)})),t.timeLimitStart&&!se.includes(t.timeLimitStart)&&se.push(t.timeLimitStart),t.timeLimitEnd&&!le.includes(t.timeLimitEnd)&&le.push(t.timeLimitEnd))}))})),se.sort().reverse(),le.sort();var ue=[];y.id&&f.CONFIG_bonuses_use_limit_time&&f.CONFIG_bonuses_days&&f.CONFIG_bonuses_days.length&&f.CONFIG_bonuses_days.forEach((function(e,t){e||ue.push(t)}));var je=("currentDay"===f.CONFIG_preorder_limit_type||"disable"===f.CONFIG_preorder_limit_type||f.CONFIG_disable_preorder_unworktime)&&!ne;Object(x.useEffect)((function(){j&&b&&!je&&ne&&i("\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435")}),[j,b,je,ne]);var be=Object(G.a)(v.endDateFormat,"dd.MM.yyyy HH:mm",new Date),me=Object($o.a)(a,be),pe=f.CONFIG_preorder_disable_promocodes_start_date?Object(G.a)(f.CONFIG_preorder_disable_promocodes_start_date,"dd.MM.yyyy HH:mm",new Date):null,Oe=Object($o.a)(a,pe),he=f.CONFIG_preorder_disable_promocodes_end_date?Object(G.a)(f.CONFIG_preorder_disable_promocodes_end_date,"dd.MM.yyyy HH:mm",new Date):null,ve=Object($o.a)(a,he);!ce(v)&&"on"===f.CONFIG_preorder_disable_promocodes&&(!f.CONFIG_preorder_disable_promocodes_start_date||!f.CONFIG_preorder_disable_promocodes_end_date||r&&re(f.CONFIG_preorder_disable_promocodes_start_date,f.CONFIG_preorder_disable_promocodes_end_date,!0,a))&&(a&&!s&&i(""),r&&o(""));return Object(S.jsxs)("div",{className:"checkout--order-time",children:[Object(S.jsx)("h3",{children:"\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437?"}),de.length?Object(S.jsxs)(Ht.a,{severity:"info",sx:{mt:2,mb:2},children:["\u041f\u0440\u0435\u0434\u0437\u0430\u043a\u0430\u0437 \u043f\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c"," ",de.join(", ")," \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043d\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438."]}):null,je?Object(S.jsx)(Ht.a,{severity:"error",sx:{mt:2,mb:2},children:"\u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u0430\u0437\u044b \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0437\u0434\u043d\u0435\u0435."}):null,f.CONFIG_preorder_text?Object(S.jsx)(Ht.a,{severity:"info",sx:{mt:2,mb:2},children:f.CONFIG_preorder_text}):null,Object(S.jsxs)(ga.a,{sx:{display:"flex"},children:[Object(S.jsxs)(nc.a,{sx:{minWidth:120},size:"small",error:l,children:[Object(S.jsx)(cc.a,{id:"preorder-date-select-label",children:"\u0414\u0430\u0442\u0430"}),Object(S.jsxs)(ac.a,{label:"\u0414\u0430\u0442\u0430",labelId:"preorder-date-select-label",id:"preorder-date-select",value:s||(a?Object(es.a)(a):""),autoWidth:!0,MenuProps:{PaperProps:{sx:{maxHeight:500}}},sx:{bgcolor:"var(--background-color)"},disabled:je,children:[j&&b&&ne?Object(S.jsx)(rc.a,{value:"\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435",onClick:function(){i("\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435")},divider:!!(null===ae||void 0===ae?void 0:ae.length),sx:{justifyContent:"center"},children:"\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435"},"\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435"):null,ae.map((function(e,t,n){var c=f.CONFIG_preorder_disable_promocodes_end_date?Object(G.a)(f.CONFIG_preorder_disable_promocodes_end_date,"dd.MM.yyyy HH:mm",new Date):null,a=Object($o.a)(e,c)?Object(Jo.a)(e):e,r=!ce(v)&&"on"===f.CONFIG_preorder_disable_promocodes&&!!f.CONFIG_preorder_disable_promocodes_start_date&&!!f.CONFIG_preorder_disable_promocodes_end_date&&re(f.CONFIG_preorder_disable_promocodes_start_date,f.CONFIG_preorder_disable_promocodes_end_date,!0,a),o=(null===ie||void 0===ie?void 0:ie.includes(0===Object(H.a)(e)?6:Object(H.a)(e)-1))||!!v.endDate&&Object(ts.a)(e)>v.endDate,s=oe.has(0===Object(H.a)(e)?6:Object(H.a)(e)-1),l=ue.includes(0===Object(H.a)(e)?6:Object(H.a)(e)-1),d=0===Object(H.a)(e)?6:Object(H.a)(e)-1,u=null===Y||void 0===Y?void 0:Y.includes(d),j=(Object(B.a)(e,m)||Object(ns.a)(e,m))&&Object(R.a)(Object(L.a)(e,{hours:23,minutes:50}),p),b=function(e){return g.find((function(t){var n,c=t.items[0].options._sale_price_dates_to;if(!(null===(n=t.items[0].options)||void 0===n?void 0:n._sale_price)||!c)return!1;var a=Object(Jo.a)(Object(G.a)(c,"dd.MM.yyyy",new Date));return!!Object(B.a)(e,a)}))}(e),O=o||r||u||j||s||l||b;return Object(S.jsxs)(rc.a,{value:Object(es.a)(e),sx:{justifyContent:"center",flexDirection:"column"},divider:t<n.length-1,disabled:O,onClick:function(){O||i(e)},children:[Object(S.jsxs)("span",{children:[Object(Oo.a)(e,"d MMMM"),", ",C[d]]}),O?Object(S.jsx)("div",{style:{fontSize:"12px",lineHeight:"1"},children:u||j?"\u041d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u043d\u044c":o||r?"\u041d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c":s?"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0435\u0439":l?"\u041d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u043e\u0434\u0430\u0440\u043a\u043e\u043c":b?"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0441\u043a\u0438\u0434\u043a\u043e\u0439":null}):null]},Object(es.a)(e))}))]}),Object(S.jsx)(Ki.a,{children:d})]}),!s&&a?Object(S.jsxs)(nc.a,{sx:{minWidth:120,ml:1},size:"small",error:l,children:[Object(S.jsx)(cc.a,{id:"preorder-time-select-label",children:"\u0412\u0440\u0435\u043c\u044f"}),Object(S.jsx)(ac.a,{label:"\u0412\u0440\u0435\u043c\u044f",labelId:"preorder-time-select-label",id:"preorder-time-select",defaultValue:"",value:r||"",onChange:function(e){o(e.target.value)},autoWidth:!0,MenuProps:{PaperProps:{sx:{maxHeight:500}}},sx:{bgcolor:"var(--background-color)"},children:q.map((function(e,t,n){var c=!1;if("on"===f.CONFIG_preorder_disable_promocodes&&pe&&he&&!ce(v)){var r=Object(L.a)(pe,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}),i=Object(L.a)(he,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()});Oe&&!ve&&Object(U.a)(e,{start:r,end:Object(Jo.a)(e)})&&(c=!0),!Oe&&ve&&Object(U.a)(e,{start:Object(z.a)(e),end:i})&&(c=!0),Oe&&ve&&Object(U.a)(e,{start:r,end:i})&&(c=!0)}var o=be?Object(L.a)(be,{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}):null,s=o&&me&&Object(B.a)(e,o)||!!v&&!!v.endTime&&!!v.startTime&&!te(v.startTime,v.endTime,e),d=!!se.length&&!!le.length&&!te(se[0],le[0],e),u=!!y.id&&!!f.CONFIG_bonuses_use_limit_time&&!te(f.CONFIG_bonuses_start_active,f.CONFIG_bonuses_end_active,e),j=!1;if(Object(es.a)(a)===Object(es.a)(m)&&Object(es.a)(a)===Object(es.a)(p)){var b=Object(L.a)(new Date,{hours:Object(cs.a)(m),minutes:Object(as.a)(m),seconds:0,milliseconds:0}),O=Object(L.a)(new Date,{hours:Object(cs.a)(p),minutes:Object(as.a)(p),seconds:0,milliseconds:0});try{Object(U.a)(e,{start:b,end:O})&&(j=!0)}catch(l){console.log("".concat(l.message,", Something wrong in maintenance interval"))}}else if(Object(es.a)(a)===Object(es.a)(m)){var h=Object(L.a)(new Date,{hours:Object(cs.a)(m),minutes:Object(as.a)(m),seconds:0,milliseconds:0});Object(B.a)(e,h)&&(j=!0)}else if(Object(es.a)(a)===Object(es.a)(p)){var x=Object(L.a)(new Date,{hours:Object(cs.a)(p),minutes:Object(as.a)(p),seconds:0,milliseconds:0});Object(R.a)(e,x)&&(j=!0)}var g=s||c||j||d||u;return Object(S.jsxs)(rc.a,{value:Object(rs.a)(e),divider:t<n.length-1,disabled:g,sx:{justifyContent:"center",flexDirection:"column"},children:[Object(Oo.a)(e,"H:mm"),(s||c)&&Object(S.jsx)("div",{style:{fontSize:"12px",lineHeight:"1"},children:"\u041d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c"})||d&&Object(S.jsx)("div",{style:{fontSize:"12px",lineHeight:"1"},children:"\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0435\u0439"})||u&&Object(S.jsx)("div",{style:{fontSize:"12px",lineHeight:"1"},children:"\u041d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u043e\u0434\u0430\u0440\u043a\u043e\u043c"})]},Object(rs.a)(e))}))})]}):null]})]})})),os=["title","titleId"];function ss(){return(ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function ls(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ds(e,t){var n=e.title,c=e.titleId,a=ls(e,os);return x.createElement("svg",ss({xmlns:"http://www.w3.org/2000/svg",height:23,width:23,fill:"currentColor",viewBox:"0 0 612 612",xmlSpace:"preserve",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,Eo||(Eo=x.createElement("path",{d:"M612 336.604c0-30.184-18.865-55.058-45.276-64.91v-92.02c0-15.861-12.856-29.416-29.416-29.416h-38.499v-43.041c0-20.402-16.629-31.721-32.42-31.721H50.587c-24.874 0-45.276 18.097-49.818 41.503C0 120.003 0 123.008 0 126.781c0 3.004 0 5.31.769 7.546v24.874C0 160.738 0 162.205 0 163.743v321.476c0 27.948 22.638 51.285 51.285 51.285h486.721c15.861 0 29.416-12.856 29.416-29.416V401.514c25.713-9.782 44.578-34.726 44.578-64.91M50.587 103.444h415.802c4.542 0 4.542 1.537 4.542 3.773v43.041H50.587c-1.537 0-3.004 0-4.542-.769-.769 0-.769 0-1.537-.769-.769 0-1.537-.769-2.236-.769-.769 0-.769-.769-1.537-.769-.769 0-1.537-.769-2.236-.769-.769 0-.769-.769-1.537-1.537l-1.537-1.537-1.537-1.537c-.769-.769-.769-.769-.769-1.537-.769-.769-.769-1.537-1.537-2.236l-.769-.769c-.769-.769-.769-1.537-1.537-3.004-.769-1.537-.769-2.236-.769-3.773s-.769-2.236-.769-3.773 0-2.236.769-3.773v-.769c1.677-10.409 10.761-18.724 22.08-18.724m488.188 404.483c0 .769-.769 1.537-1.537 1.537H50.587c-12.856 0-23.407-10.551-23.407-23.407v-313.93c.769 0 .769 0 1.537.769.769.769 2.236.769 3.004 1.537.769 0 1.537.769 2.236.769.769.769 2.236.769 3.773.769.769 0 1.537 0 2.236.769 1.537 0 2.236.769 3.773.769h493.568c.769 0 1.537.769 1.537 1.537v87.548H470.93c-38.499 0-69.452 30.953-69.452 69.452s30.953 69.452 69.452 69.452h67.915v102.431h-.07zm11.319-130.589c-3.005.769-5.31.769-7.546.769H470.86c-22.638 0-41.503-18.865-41.503-41.503s18.865-41.503 41.503-41.503h71.688c2.236 0 5.31 0 7.546.769 19.634 3.773 33.957 20.402 33.957 40.735s-14.323 36.96-33.957 40.733m-53.521-40.734c0 8.315-6.777 15.092-15.092 15.092s-15.092-6.777-15.092-15.092 6.777-15.092 15.092-15.092 15.092 6.777 15.092 15.092"})),Fo||(Fo=x.createElement("g",null)),To||(To=x.createElement("g",null)),Ao||(Ao=x.createElement("g",null)),Mo||(Mo=x.createElement("g",null)),Do||(Do=x.createElement("g",null)),Go||(Go=x.createElement("g",null)),Ro||(Ro=x.createElement("g",null)),Bo||(Bo=x.createElement("g",null)),Lo||(Lo=x.createElement("g",null)),Uo||(Uo=x.createElement("g",null)),zo||(zo=x.createElement("g",null)),Ho||(Ho=x.createElement("g",null)),Wo||(Wo=x.createElement("g",null)),Vo||(Vo=x.createElement("g",null)),Zo||(Zo=x.createElement("g",null)))}var us,js,bs,ms,ps,Os,hs,vs,fs,xs,gs,_s,ys,ws,Ns,Cs,ks=x.forwardRef(ds),Is=(n.p,["title","titleId"]);function Ps(){return(Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Ss(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Es(e,t){var n=e.title,c=e.titleId,a=Ss(e,Is);return x.createElement("svg",Ps({xmlns:"http://www.w3.org/2000/svg",height:23,width:23,viewBox:"0 44.181 335.802 247.44",xmlSpace:"preserve",fill:"currentColor",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,us||(us=x.createElement("path",{d:"M290.821 291.621H44.988C20.18 291.621 0 271.428 0 246.633V89.169c0-24.808 20.18-44.988 44.988-44.988h245.826c24.795 0 44.988 20.18 44.988 44.988v157.464c.007 24.801-20.18 44.988-44.981 44.988M44.988 57.035c-17.725 0-32.134 14.409-32.134 32.134v157.464c0 17.719 14.409 32.134 32.134 32.134h245.826c17.719 0 32.134-14.415 32.134-32.134V89.169c0-17.725-14.415-32.134-32.134-32.134zm186.757 24.936c16.035 0 29.036 12.995 29.036 29.036s-12.995 29.043-29.036 29.043-29.036-13.001-29.036-29.043 13.001-29.036 29.036-29.036m40.483 0c16.035 0 29.043 12.995 29.043 29.036s-13.001 29.043-29.043 29.043c-16.041 0-29.036-13.001-29.036-29.043s13.001-29.036 29.036-29.036M34.544 216.645h53.529v19.281H34.544zm71.062 0h53.536v19.281h-53.536zm71.048 0h53.548v19.281h-53.548zm71.062 0h53.548v19.281h-53.548zM34.544 81.977h101.191v19.281H34.544zm0 38.259h53.542v19.281H34.544z"})),js||(js=x.createElement("g",null)),bs||(bs=x.createElement("g",null)),ms||(ms=x.createElement("g",null)),ps||(ps=x.createElement("g",null)),Os||(Os=x.createElement("g",null)),hs||(hs=x.createElement("g",null)),vs||(vs=x.createElement("g",null)),fs||(fs=x.createElement("g",null)),xs||(xs=x.createElement("g",null)),gs||(gs=x.createElement("g",null)),_s||(_s=x.createElement("g",null)),ys||(ys=x.createElement("g",null)),ws||(ws=x.createElement("g",null)),Ns||(Ns=x.createElement("g",null)),Cs||(Cs=x.createElement("g",null)))}var Fs,Ts,As=x.forwardRef(Es),Ms=(n.p,["title","titleId"]);function Ds(){return(Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c])}return e}).apply(this,arguments)}function Gs(e,t){if(null==e)return{};var n,c,a=function(e,t){if(null==e)return{};var n,c,a={},r=Object.keys(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(c=0;c<r.length;c++)n=r[c],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Rs(e,t){var n=e.title,c=e.titleId,a=Gs(e,Ms);return x.createElement("svg",Ds({width:23,height:23,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 23 23",ref:t,"aria-labelledby":c},a),n?x.createElement("title",{id:c},n):null,Fs||(Fs=x.createElement("path",{fill:"none",d:"M-1.15 -1.15h25.3v25.3H-1.15z"})),Ts||(Ts=x.createElement("path",{stroke:"null",d:"M21.849 9.361v-1.15H1.112v1.15zm0 1.15H1.112v6.325c0 0.954 0.774 1.725 1.728 1.725h17.28a1.725 1.725 0 0 0 1.728 -1.725zm0 -3.45v-0.575c0 -0.952 -0.774 -1.725 -1.728 -1.725H2.841c-0.954 0 -1.728 0.773 -1.728 1.725v0.575zm-4.608 10.043a2.311 2.311 0 0 1 -2.782 -0.366 2.3 2.3 0 0 1 0 -3.252 2.311 2.311 0 0 1 2.782 -0.367 2.302 2.302 0 0 1 3.456 1.993 2.302 2.302 0 0 1 -3.456 1.992zm-0.865 -0.879a2.3 2.3 0 0 1 -0.287 -1.113c0 -0.405 0.103 -0.784 0.287 -1.114 -0.383 -0.098 -0.805 0.005 -1.102 0.301a1.149 1.149 0 0 0 1.102 1.926zM-0.04 6.487c0 -1.587 1.29 -2.875 2.881 -2.875h17.28A2.875 2.875 0 0 1 23 6.486v10.35c0 1.587 -1.288 2.875 -2.88 2.875H2.841a2.875 2.875 0 0 1 -2.881 -2.875zm18.432 9.775a1.15 1.15 0 1 0 0.002 -2.302 1.15 1.15 0 0 0 -0.002 2.302z",strokeWidth:1.15})))}var Bs=x.forwardRef(Rs),Ls=(n.p,function(e){var t=e.typeDelivery,n=e.preorderDate,c=e.usedBonuses,a=Object(w.e)((function(e){return e.autoDiscounts.autoDiscounts})),r=Object(w.e)((function(e){return e.cart.items})),i=Object(w.e)((function(e){return e.cart.promocode})),o=Object(w.e)((function(e){return e.cart.bonusProduct})),s=Object(w.e)((function(e){return e.cart.subTotalPrice})),l=Object(w.e)((function(e){return e.cart.totalPrice})),d=null,u=0;if(a&&a.length&&a.forEach((function(e){!d&&function(e){var t,n=e.discount,c=e.cartProducts,a=e.cartTotal,r=e.promocode,i=e.bonusProduct,o=e.typeDelivery,s=e.preorderDate,l=e.usedBonuses,d=Object.values(c);if("on"!==n.status)return!1;if(n.platforms){var u=Y();if("on"!==n.platforms[u])return!1}if(r.code&&"on"!==n.allowPromocode)return!1;if(i.id&&"on"!==n.allowBonusProduct)return!1;if(l&&"on"!==n.allowUserBonuses)return!1;var j=s||new Date;if(n.strStart&&n.strStop){var b=Object(G.a)(n.strStart,"yyyy-MM-dd",new Date),m=Object(G.a)(n.strStop,"yyyy-MM-dd'T'HH:mm",new Date);try{if(!Object(U.a)(j,{start:b,end:m}))return!1}catch(N){return console.log("".concat(N.message,", Something wrong in discount dates interval")),!1}}if((null===(t=n.categories)||void 0===t?void 0:t.length)&&"fixed"===n.type)if(n.excludeCategories){var p=!1;if(d.forEach((function(e){var t,c;e.items[0].id!=(null===(t=r.promocodeProducts)||void 0===t?void 0:t.id)&&(null===(c=e.items[0].categories)||void 0===c?void 0:c.some((function(e){return n.categories.includes(e)})))&&(p=!0)})),p)return!1}else{var O=!1;if(d.forEach((function(e){var t,c;e.items[0].id!=(null===(t=r.promocodeProducts)||void 0===t?void 0:t.id)&&((null===(c=e.items[0].categories)||void 0===c?void 0:c.some((function(e){return n.categories.includes(e)})))||(O=!0))})),O)return!1}if("yes"!==n.excludeSaleProduct&&"fixed"===n.type){var h=!1;if(d.forEach((function(e){var t;(e.items[0].options._sale_price||(null===(t=e.items[0].variant)||void 0===t?void 0:t._sale_price))&&(h=!0)})),h)return!1}if("percent"===n.type&&!Object.values(c).find((function(e){return ne(n,e.items[0])})))return!1;if(n.start_time&&n.stop_time){var v=parseInt(n.start_time.slice(0,2))>parseInt(n.stop_time.slice(0,2)),f=Object(L.a)(j,{hours:parseInt(n.start_time.slice(0,2)),minutes:parseInt(n.start_time.slice(3)),seconds:0,milliseconds:0}),x=Object(L.a)(j,{hours:v?23:parseInt(n.stop_time.slice(0,2)),minutes:v?59:parseInt(n.stop_time.slice(3)),seconds:0,milliseconds:0}),g=Object(L.a)(j,{hours:parseInt(n.stop_time.slice(0,2)),minutes:parseInt(n.stop_time.slice(3)),seconds:0,milliseconds:0});if(!(function(){try{return Object(U.a)(j,{start:f,end:x})}catch(N){return console.log("".concat(N.message,", Something wrong in discount time interval")),!1}}()||v&&function(){try{return Object(U.a)(j,{start:Object(z.a)(j),end:g})}catch(N){return console.log("".concat(N.message,", Something wrong in discount after midnight interval")),!1}}()))return!1}if(n.days&&7===n.days.length){var _=0===Object(H.a)(j)?6:Object(H.a)(j)-1;if("1"!==n.days[_])return!1}if(o){if("delivery"===n.typeDelivery&&"delivery"!==o)return!1;if("self"===n.typeDelivery&&"self"!==o&&"inRestoraunt"!==o)return!1}var y=parseInt(n.deliveryMinOrderTotal),w=""===n.selfDeliveryMinOrderTotal?y:parseInt(n.selfDeliveryMinOrderTotal);return"fixed_product"===r.type&&(a=a-parseFloat(r.promocodeProducts.options._price)+parseFloat(r.productPrice)),!("delivery"===o&&y>a)&&("self"!==o&&"inRestoraunt"!==o||!(w>a))}({discount:e,cartProducts:r,cartTotal:s,promocode:i,bonusProduct:o,typeDelivery:t,preorderDate:n,usedBonuses:c})&&(d=e)})),d)if("fixed"===d.type)u=d.amount;else if("percent"===d.type){var j=0;Object.values(r).forEach((function(e){e.items.forEach((function(e){if(ne(d,e))if("fixed_cart"===i.type){var t=i.amount/s;j+=parseInt(e.options._price)*(1-t)}else"percent"===i.type&&e.options._promocode_price?j+=parseInt(e.options._promocode_price):j+=parseInt(e.options._price)}))})),u=Math.floor(j*(d.amount/100))}return u>l&&(u=l),{autoDiscountAmount:u,autoDiscount:d}}),Us=function(e){var t=e.userBonuses,n=e.typeDelivery,c=e.deliveryZone,a=e.autoDiscountAmount,r=Object(w.e)((function(e){return e.products.categories})),i=Object(w.e)((function(e){return Object.values(e.cart.items)})),o=Object(w.e)((function(e){return a?e.cart.totalPrice-a:e.cart.totalPrice})),s=Object(w.e)((function(e){return e.cart.promocode})),l=Object(w.e)((function(e){return e.cart.bonusProduct})),d=Object(w.e)((function(e){return parseInt(e.config.data.CONFIG_order_min_price)})),u=Object(w.e)((function(e){return parseInt(e.config.data.CONFIG_selforder_min_price)})),j=Object(w.e)((function(e){var t=e.config.data,n=t.bonusProgramm,c=t.bonusProgrammStatus,a=t.bonusProgrammAllowPromocode,r=t.bonusProgrammAllowBonusProduct,i=t.bonusProgrammAllowDiscountProduct,o=t.bonusProgrammLimit;return{programStatus:"active"===n.status,useBonusesLimit:"active"===n.status?n.paymentPercent:o,specifiedCategories:n.paymentCategories,excludeCategories:"yes"===n.paymentExcludeCategories,disableMinPrice:"active"===n.paymentIgnoreMinimalPrice,allowWithPromocode:"active"!==n.paymentDisableWithPromocode,allowWithBonusProduct:"active"!==n.paymentDisableWithBonusProduct,allowWithDiscountProducts:"active"!==n.paymentDisableWithSaleProduct,integrationProgramStatus:!!c,integrationAllowWithPromocode:a,integrationAllowWithBonusProduct:r,integrationAllowWithDiscountProducts:i}})),b=j.programStatus,m=j.useBonusesLimit,p=j.specifiedCategories,O=j.excludeCategories,h=j.disableMinPrice,v=j.allowWithPromocode,f=j.allowWithBonusProduct,x=j.allowWithDiscountProducts,g=j.integrationProgramStatus,_=j.integrationAllowWithPromocode,y=j.integrationAllowWithBonusProduct,N=j.integrationAllowWithDiscountProducts,C=0;"delivery"===n&&(C=c?Math.max((null===c||void 0===c?void 0:c.orderMinPrice)?null===c||void 0===c?void 0:c.orderMinPrice:0,(null===s||void 0===s?void 0:s.coupon_min_price)?null===s||void 0===s?void 0:s.coupon_min_price:0):Math.max(d||0,(null===s||void 0===s?void 0:s.coupon_min_price)?null===s||void 0===s?void 0:s.coupon_min_price:0)),"self"!==n&&"inRestoraunt"!==n||(C=Math.max(u||0,(null===s||void 0===s?void 0:s.coupon_selfdelivery_min_price)?null===s||void 0===s?void 0:s.coupon_selfdelivery_min_price:0));var k=Math.min(Math.floor(o/100*parseInt(m)),t);h&&b||o-k<C&&(k=o-C)<0&&(k=0);var I=!1,P=!1,S=[],E=[];if((null===p||void 0===p?void 0:p.length)&&b)if(O){var F=p.filter((function(e){return i.find((function(t){return t.items[0].categories.includes(e)}))}));F.length&&(I=!0,F.forEach((function(e){var t=r.find((function(t){return t.term_id===e}));t&&S.push("\xab".concat(t.name,"\xbb"))})))}else{i.find((function(e){var t;return!(null===(t=e.items[0].categories)||void 0===t?void 0:t.some((function(e){return p.includes(e)})))}))&&(P=!0,p.forEach((function(e){var t=r.find((function(t){return t.term_id===e}));t&&E.push("\xab".concat(t.name,"\xbb"))})))}var T=!!s.code&&(b&&!v||!b&&g&&!_),A=!!l.id&&(b&&!f||!b&&g&&!y),M=function(e){return e.find((function(e){var t;if(e.items[0].options._sale_price||(null===(t=e.items[0].variant)||void 0===t?void 0:t._sale_price))return!0}))}(i)&&(b&&!x||!b&&g&&!N);return(T||A||M||I||P)&&(k=0),{userBonuses:t,useBonusesLimit:m,maxBonuses:k,disabledByPromocode:T,disabledByBonusProduct:A,disabledByDiscountProduct:M,disabledByExcludedCategory:I,disabledByOnlyCategories:P,excludedCategoriesNamesInCart:S,specifiedCategoriesNames:E}},zs=function(e){var t=e.usedBonuses,n=e.handleChangeUsedBonuses,c=e.typeDelivery,a=e.deliveryZone,r=e.autoDiscount,i=e.autoDiscountAmount,o=k().navigateTo,s=yc().postRequestAPI,l=Object(w.e)((function(e){return e.user.user})),d=Object(w.e)((function(e){return"active"===e.config.data.bonusProgramm.status})),u=Object(w.e)((function(e){return e.config.data.bonusProgrammType})),j=Object(x.useState)(0),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(x.useState)(!d),h=Object(Ve.a)(O,2),v=h[0],f=h[1],g=Nn(t,i,r),_=g.deliveryAccruedBonuses,y=g.selfDeliveryAccruedBonuses,N=Us({userBonuses:m,typeDelivery:c,deliveryZone:a,autoDiscountAmount:i}),C=N.useBonusesLimit,I=N.maxBonuses,P=N.disabledByPromocode,E=N.disabledByBonusProduct,F=N.disabledByDiscountProduct,T=N.disabledByExcludedCategory,A=N.disabledByOnlyCategories,M=N.excludedCategoriesNamesInCart,D=N.specifiedCategoriesNames;Object(x.useEffect)((function(){if(l)if(d)p(l.bonuses>0||0===l.bonuses?parseInt(l.bonuses):0);else if(l.token&&l.phone){f(!0);var e="";"frontpad"===u?e="getFrontpadBonuses":"sbis"===u&&(e="getSbisBonuses"),s(e,"",{token:l.token,phone:l.phone}).then((function(e){var t,n;(null===(t=e.data.user)||void 0===t?void 0:t.bonuses)>=0&&p(null===(n=e.data.user)||void 0===n?void 0:n.bonuses);f(!1)}))}}),[d,u]),Object(x.useEffect)((function(){t>I&&n(I)}),[I]);var G=[];P&&G.push("c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434\u043e\u043c"),E&&G.push("c \u043f\u043e\u0434\u0430\u0440\u043a\u0430\u043c\u0438"),F&&G.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u043f\u043e \u0441\u043a\u0438\u0434\u043a\u0435"),T&&G.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: ".concat(M.join(", "))),A&&G.push("c \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043a\u0440\u043e\u043c\u0435: ".concat(D.join(", ")));var R="";return G.length&&G.forEach((function(e,t,n){0===t?R+=e:t===n.length-1?R+=" \u0438 "+e:R+=", "+e})),Object(S.jsxs)("div",{className:"checkout--user-bonuses",children:[Object(S.jsxs)("div",{className:"checkout--bonuses-payming",children:[Object(S.jsxs)("div",{className:"checkout--payming-bonuses-info",children:[Object(S.jsx)("span",{className:"title",children:"\u041e\u043f\u043b\u0430\u0442\u0430 \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438"}),Object(S.jsx)(wn,{placement:"top",enterTouchDelay:0,title:Object(S.jsxs)(ga.a,{sx:{fontSize:"13px",m:"6px"},children:[Object(S.jsx)(ga.a,{className:"main-color",sx:{mb:"6px"},children:"\u0411\u043e\u043d\u0443\u0441\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430!"}),d?Object(S.jsxs)(ga.a,{sx:{mb:"6px"},children:[Object(S.jsx)("div",{children:"\u041d\u0430\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u0435\u0448\u0431\u044d\u043a:"}),Object(S.jsxs)("div",{children:[Object(S.jsxs)("span",{className:"main-color",children:["+",_]})," ","\u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443"]}),Object(S.jsxs)("div",{children:[Object(S.jsxs)("span",{className:"main-color",children:["+",y]})," ","\u0437\u0430 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430\u0432\u044b\u043d\u043e\u0441"]})]}):null,Object(S.jsxs)(ga.a,{sx:{mb:"6px"},children:["\u0411\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0434\u043e"," ",Object(S.jsxs)("span",{className:"main-color",children:[C,"%"]})," ","\u043e\u0442 \u0441\u0443\u043c\u043c\u044b \u0437\u0430\u043a\u0430\u0437\u0430!"]}),d?null:Object(S.jsx)(ga.a,{sx:{mb:"6px"},children:"\u0411\u043e\u043d\u0443\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f 1 \u0440\u0430\u0437 \u0432 15 \u043c\u0438\u043d\u0443\u0442"}),d?Object(S.jsx)(ga.a,{onClick:function(){o("/bonuses")},sx:{color:"var(--main-color)",cursor:"pointer",width:"fit-content",textDecoration:"underline"},children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0431\u043e\u043d\u0443\u0441\u0430\u0445"}):null]}),children:Object(S.jsx)(dc.a,{className:"checkout--info-icon"})})]}),v?Object(S.jsx)(Ze.a,{size:20}):Object(S.jsxs)("span",{className:"bonuses-price",children:[Object(S.jsx)("span",{className:"money",children:t.toLocaleString("ru-RU")})," ","\u20bd"]})]}),Object(S.jsx)(Xn.a,{in:!!r&&!!i&&!r.allowUserBonuses,children:Object(S.jsxs)(Ht.a,{severity:"error",sx:{mb:"10px"},children:["\u0421\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u043e\u043d\u0443\u0441\u043e\u0432 \u043e\u0442\u043c\u0435\u043d\u0438\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u043a\u0438\u0434\u043a\u0438 \xab",null===r||void 0===r?void 0:r.name,"\xbb"]})}),Object(S.jsx)(Cr,{disabled:P||E||F||T||A||0===I,maxValue:I,handleChangeUsedBonuses:n,usedBonuses:t}),G.length?Object(S.jsxs)(Ht.a,{severity:"error",sx:{mb:"10px"},children:["\u041e\u043f\u043b\u0430\u0442\u0430 \u0431\u043e\u043d\u0443\u0441\u0430\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 ",R,"."]}):null]})},Hs=function(){return Object(S.jsxs)("div",{className:"checkout--address-panel",children:[Object(S.jsx)("h4",{children:"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441"}),Object(S.jsx)(Fe.a,{variant:"rounded",width:200,height:18,sx:{borderRadius:"20px",mb:"16px"}}),Object(S.jsx)(Fe.a,{variant:"rounded",width:240,height:18,sx:{borderRadius:"20px",mb:"16px"}}),Object(S.jsx)(Fe.a,{variant:"rounded",width:170,height:18,sx:{borderRadius:"20px",mb:"16px"}})]})},Ws=function(e){var t="";["7","8","9"].indexOf(e[0])>-1?("9"===e[0]&&(e="7"+e),t=("8"===e[0]?"8":"+7")+" ",e.length>1&&(t+="("+e.substring(1,4)),e.length>=5&&(t+=") "+e.substring(4,7)),e.length>=8&&(t+="-"+e.substring(7,9)),e.length>=10&&(t+="-"+e.substring(9,11))):t="+"+e.substring(0,16);return t},Vs=function(e){return e.replace(/\D/g,"")};function Zs(){var e,t,n,c,a,r,i,o=Object(w.d)(),s=yc(),l=s.getRequestAPI,d=s.postRequestAPI,u=Object(w.e)((function(e){var t=e.user,n=e.config,c=e.cart,a=e.gateways,r=(e.orderTime,e.products);return{user:t.user,config:n.data,configStatus:n.status,gateways:a.gateways,cart:c,cartProducts:c.items,items:r.items,categories:r.categories,promocode:c.promocode,conditionalPromocode:c.conditionalPromocode,promocodeProducts:c.promocodeProducts,userCartBonusProduct:c.bonusProduct,cartTotalPrice:c.totalPrice,cartSubTotalPrice:c.subTotalPrice,isDeliveryHidden:"active"===n.data.CONFIG_checkout_hide_delivery_price}})),j=u.user,b=u.config,m=u.configStatus,p=u.cart,O=u.cartProducts,h=u.items,v=(u.categories,u.promocode),f=u.conditionalPromocode,g=u.promocodeProducts,_=u.userCartBonusProduct,y=u.cartSubTotalPrice,N=u.cartTotalPrice,C=u.gateways,P=u.isDeliveryHidden,E=Object(w.e)((function(e){return e.deliveryAddressModal}),w.c).deliveryZone,F=k().navigateTo,T=Object(x.useState)(!1),A=Object(Ve.a)(T,2),D=A[0],G=A[1],R=Object(x.useState)(!0),B=Object(Ve.a)(R,2),U=B[0],z=B[1],H=Object(x.useState)(null),W=Object(Ve.a)(H,2),V=W[0],Z=W[1],q=Object(x.useState)(j.name?j.name:""),Y=Object(Ve.a)(q,2),K=Y[0],$=Y[1],ee=Object(x.useState)(j.phone?Ws(j.phone):""),te=Object(Ve.a)(ee,2),ne=te[0],re=te[1],oe=Object(x.useState)("active"===b.CONFIG_type_receiving_selfdelivery_status&&v&&"self"===v.typeDelivery?"self":"active"===b.CONFIG_type_receiving_delivery_status?"delivery":"active"===b.CONFIG_type_receiving_selfdelivery_status?"self":"active"===b.CONFIG_type_receiving_inRestoraunt_status?"inRestoraunt":"self"),le=Object(Ve.a)(oe,2),ue=le[0],je=le[1],be=Object(x.useState)(null),me=Object(Ve.a)(be,2),pe=me[0],he=me[1],ve=Object(x.useState)("main"),fe=Object(Ve.a)(ve,2),xe=fe[0],ge=fe[1],_e=Object(x.useState)(!(!Array.isArray(C)||!C.length)&&C[0].id),ye=Object(Ve.a)(_e,2),we=ye[0],Ne=ye[1],Ce=Object(x.useState)(null),ke=Object(Ve.a)(Ce,2),Ie=ke[0],Pe=ke[1],Se=Object(x.useState)(""),Ee=Object(Ve.a)(Se,2),Te=Ee[0],Ae=Ee[1],Me=Object(x.useState)(!1),De=Object(Ve.a)(Me,2),Ge=De[0],Re=De[1],Be=Object(x.useState)(""),Le=Object(Ve.a)(Be,2),Ue=Le[0],ze=Le[1],He=Object(x.useState)(""),We=Object(Ve.a)(He,2),Ze=We[0],qe=We[1],Ye=Object(x.useState)(""),Ke=Object(Ve.a)(Ye,2),Je=Ke[0],Xe=Ke[1],$e=Object(x.useState)(""),et=Object(Ve.a)($e,2),tt=et[0],nt=et[1],ct=Object(x.useState)(""),at=Object(Ve.a)(ct,2),rt=at[0],st=at[1],lt=Object(x.useState)(""),dt=Object(Ve.a)(lt,2),ut=dt[0],jt=dt[1],bt=Object(x.useState)(""),mt=Object(Ve.a)(bt,2),pt=mt[0],ht=mt[1],ft=Object(x.useState)(""),xt=Object(Ve.a)(ft,2),wt=xt[0],Nt=xt[1],Ct=Object(x.useState)(""),kt=Object(Ve.a)(Ct,2),It=kt[0],Pt=kt[1],St=Object(x.useState)(0),Et=Object(Ve.a)(St,2),Ft=Et[0],Tt=Et[1],At=Object(x.useState)(1),Mt=Object(Ve.a)(At,2),Dt=Mt[0],Gt=Mt[1],Rt=Object(x.useState)(""),Bt=Object(Ve.a)(Rt,2),Lt=Bt[0],zt=Bt[1],Wt=Object(x.useState)(!1),Vt=Object(Ve.a)(Wt,2),Zt=Vt[0],Qt=Vt[1],qt=Object(x.useState)(!1),Yt=Object(Ve.a)(qt,2),Kt=Yt[0],Jt=Yt[1],Xt=Object(x.useState)(!1),$t=Object(Ve.a)(Xt,2),en=$t[0],tn=$t[1],nn=Object(x.useState)(null),cn=Object(Ve.a)(nn,2),an=cn[0],rn=cn[1],on=Object(x.useState)([]),sn=Object(Ve.a)(on,2),dn=sn[0],un=sn[1],jn=Object(x.useState)(!1),bn=Object(Ve.a)(jn,2),mn=bn[0],pn=bn[1],On=Ls({typeDelivery:ue,preorderDate:Ie,usedBonuses:Ft}),hn=On.autoDiscountAmount,vn=On.autoDiscount;Object(x.useEffect)((function(){if(j.token&&j.phone){var e="&token="+j.token+"&phone="+j.phone;l("checkLogin",e,{mode:"no-cors"}).then((function(e){"success"===e.data.status&&o(M(e.data.user))}))}}),[]),Object(x.useEffect)((function(){return"fixed_product"===v.type&&v.productSelfDeliveryPrice&&o(yt(ue)),function(){"fixed_product"===v.type&&v.productSelfDeliveryPrice&&"delivery"!==ue&&o(yt("delivery"))}}),[ue,v]),Object(x.useEffect)((function(){"active"===b.useStreetsAutoComplete&&l("getIikoStreets").then((function(e){"success"===e.data.status&&e.data.streets&&e.data.streets.length?un(e.data.streets):pn(!0)}))}),[b.useStreetsAutoComplete]),Object(x.useEffect)((function(){return"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),window.scrollTo(0,0),function(){window.history.scrollRestoration="auto"}}),[]),Object(x.useEffect)((function(){"on"!==b.CONFIG_free_products_program_status&&o(vt({}))}),[b.CONFIG_free_products_program_status]),Object(x.useEffect)((function(){var e;"areaPrice"!==(null===(e=b.deliveryZones)||void 0===e?void 0:e.deliveryPriceType)&&o(za(null))}),[null===(e=b.deliveryZones)||void 0===e?void 0:e.deliveryPriceType]),Object(x.useEffect)((function(){var e;if("delivery"===ue)if(j.addresses&&j.addresses.length)if("areaPrice"!==(null===(e=b.deliveryZones)||void 0===e?void 0:e.deliveryPriceType)||en)if("active"!==b.useStreetsAutoComplete||mn)he(0);else{var t=j.addresses.findIndex((function(e){return dn.includes(e.street)}));he(t>=0?t:"new")}else{var n=j.addresses.findIndex((function(e){return e.coordinates}));n>=0?(he(n),rn(j.addresses[n])):he("new")}else he("new")}),[ue,null===(t=b.deliveryZones)||void 0===t?void 0:t.deliveryPriceType,j.addresses,b.useStreetsAutoComplete,dn,mn]);var fn=function(e,t){ge(t)},xn=function(){if("delivery"===ue){var e,t;if("areaPrice"===(null===(e=b.deliveryZones)||void 0===e?void 0:e.deliveryPriceType)&&E&&!en){var n,c,a=N-hn;return((null===(n=b.bonusProgramm)||void 0===n?void 0:n.status)&&"active"!==(null===(c=b.bonusProgramm)||void 0===c?void 0:c.paymentIgnoreDeliveryPrice)||b.bonusProgrammStatus&&!b.bonusProgrammPaymentIgnoreDeliveryPrice)&&Ft&&(a-=Ft),!E.deliveryPrice||E.freeDeliveryOrder&&a>=E.freeDeliveryOrder?0:parseInt(E.deliveryPrice)}if("areaPrice"!==(null===(t=b.deliveryZones)||void 0===t?void 0:t.deliveryPriceType)&&b.CONFIG_order_delivery_price)return parseInt(b.CONFIG_order_delivery_price)}return 0}(),gn=function(){var e=!0;if(z(!0),Z(null),!K||11!==Vs(ne).length)return e=!1,z(!1),void Z("\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f");if("delivery"===ue&&"new"===pe&&("areaPrice"!==b.deliveryZones.deliveryPriceType&&!Ze||!Je))return e=!1,z(!1),void Z("\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f");if("delivery"===ue&&"areaPrice"===b.deliveryZones.deliveryPriceType&&!en&&!E)return e=!1,z(!1),void Z("\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0437\u043e\u043d\u0443 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438");if(!Ie||!Te&&!Ge)return e=!1,z(!1),void Z("\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f");if(e){G(!0);var t=J(O);g.id&&(t[g.id]?(t[g.id].items.push(g),t[g.id].totalPrice+=parseFloat(v.productPrice)):t[g.id]={items:[g],totalPrice:parseFloat(v.productPrice)}),d("makeOrder","",{name:K,phone:Vs(ne),userPhone:j.phone,token:j.token,typeDelivery:ue,deliveryAddress:pe,selfDeliveryAddress:xe,newUserAddressArea:Ue,newUserAddressStreet:Ze,newUserAddressHome:Je,newUserAddressPorch:tt,newUserAddressFloor:rt,newUserAddressApartment:ut,newUserAddressCoordinates:pt,newUserAddressKladrId:wt,deliveryZoneIndex:E&&E.index,orderDeliveryPrice:xn,orderTime:Object(Oo.a)(Ie,"dd.MM.yyyy HH:mm"),commentOrder:It,activeGateway:we,countUsers:Dt,promocode:v.code,promocodeProducts:g,moneyBack:Lt,products:t,bonusProduct:_,bonuses:Ft,dontRecall:Zt,autoDiscountId:null===vn||void 0===vn?void 0:vn.id,autoDiscountAmount:hn}).then((function(e){G(!1),"success"===e.data.status?(window.scrollTo(0,0),F("/order-complete",{replace:!0})):"need_payment"===e.data.status?window.location.href=e.data.redirect:(Z(e.data.text),"promocode_error"===e.data.reason&&o({type:"COMPLETELY_REMOVE_PROMOCODE"}))}))}},_n=Object(x.useCallback)((function(){window.scrollTo(0,0),F("/")}),[]);Object(x.useEffect)((function(){if(0!==Object.keys(v).length&&v.constructor===Object&&!f){var e=X({promocode:v,promocodeProduct:g,items:O,cartTotal:y,config:b,typeDelivery:ue,preorderDate:Ie,preorderTime:Te});"error"===e.status&&(o({type:"REMOVE_PROMOCODE"}),o(_t(v)),o(Ut({open:!0,message:e.alert})))}f&&!Object.keys(v).length&&("error"!==X({promocode:f,items:O,cartTotal:y,config:b,typeDelivery:ue,preorderDate:Ie,preorderTime:Te}).status&&(o(gt(f)),o({type:"CLEAR_CONDITIONAL_PROMOCODE"})))}),[b,v,ue,f,Ie,Te]);var yn={error:!K&&!U,helperText:K||U?"":"\u041f\u043e\u043b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},Nn={error:11!==Vs(ne).length&&!U,helperText:11===Vs(ne).length||U?"":"\u041d\u043e\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u043e"},Cn={error:!Ze&&"new"===pe&&!U,helperText:Ze||"new"!==pe||U?"":"\u041f\u043e\u043b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},kn={error:!Je&&"new"===pe&&!U,helperText:Je||"new"!==pe||U?"":"\u041f\u043e\u043b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},In={error:!(Je&&E||U),helperText:Je||U?E||U?"":"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0437\u043e\u043d\u0443 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438":"\u041f\u043e\u043b\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f"},Pn={error:!U&&(!Ie||!Te&&!Ge),helperText:U?"":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f"};j.addresses&&j.addresses.length&&j.addresses.map((function(e,t){if(!e.formate){var n=e.street+", \u0434. "+e.home;n+=e.porch?", \u043f\u043e\u0434. "+e.porch:"",n+=e.floor?", \u044d\u0442\u0430\u0436 "+e.floor:"",n+=e.apartment?", \u043a\u0432. "+e.apartment:"",j.addresses[t].formate=n}}));var Sn=Object(x.useCallback)((function(e){return e.id?"cash"===e.id?Object(S.jsx)(ks,{}):"card"===e.id?Object(S.jsx)(As,{}):Object(S.jsx)(Bs,{}):Object(S.jsx)("div",{})}),[C]);return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{className:"checkout checkout-wrapper",sx:{maxWidth:"1328px !important"},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430"}),Object(S.jsxs)(ot.a,{container:!0,columnSpacing:5,children:[Object(S.jsxs)(ot.a,{item:!0,xs:12,container:!0,spacing:5,children:[Object(S.jsxs)(ot.a,{item:!0,xs:12,md:7,children:[Object(S.jsx)("div",{className:"checkout--user",children:Object(S.jsxs)(ot.a,{container:!0,spacing:4,children:[Object(S.jsx)(ot.a,{item:!0,sm:12,md:6,sx:{width:1},children:Object(S.jsx)("div",{className:"checkout--user-name",children:Object(S.jsx)(Qe.a,Object(I.a)({size:"small",id:"userName",label:"\u0412\u0430\u0448\u0435 \u0438\u043c\u044f",onInput:function(e){$(e.target.value)},value:K,sx:{width:1,"& .MuiInputBase-root":{bgcolor:"var(--background-color)"}}},yn))})}),Object(S.jsx)(ot.a,{item:!0,sm:12,md:6,sx:{width:1},children:Object(S.jsx)("div",{className:"checkout--user-phone",children:Object(S.jsx)(Qe.a,Object(I.a)(Object(I.a)({size:"small",id:"userPhone",label:"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430",onKeyDown:function(e){var t=e.target.value.replace(/\D/g,"");8===e.keyCode&&1===t.length&&(e.target.value="")},onInput:function(e){var t,n=e.target,c=Vs(n.value),a=n.selectionStart;if(!c)return n.value="";n.value.length===a?(t=Ws(c),n.value=t,re(t)):e.data&&/\D/g.test(e.data)&&(n.value=c)},onPaste:function(e){var t=e.target,n=Vs(t.value),c=e.clipboardData||window.clipboardData;if(c){var a=c.getData("Text");if(/\D/g.test(a))return void(t.value=n)}},value:ne,sx:{width:1,"& .MuiInputBase-root":{bgcolor:"var(--background-color)"}}},Nn),{},{disabled:ae(b)&&!("active"===b.CONFIG_allow_change_phone&&"vk"===j.lastTypeAuth)}))})})]})}),Object(S.jsxs)("div",{className:"checkout--delivery",children:[Object(S.jsxs)("div",{className:"checkout--delivery-type",children:[Object(S.jsx)("h3",{children:"\u041a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437?"}),Object(S.jsx)("p",{children:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431."}),ce(b)?Object(S.jsxs)(ga.a,{sx:{display:"flex"},children:[Object(S.jsx)(Fe.a,{variant:"rounded",width:120,height:18,sx:{borderRadius:"20px",mr:"16px"}}),Object(S.jsx)(Fe.a,{variant:"rounded",width:120,height:18,sx:{borderRadius:"20px"}})]}):Object(S.jsx)(Rr,{typeDelivery:ue,handleChangeTypeDelivery:function(e,t){"self"===t||"inRestoraunt"===t?(je(t),rn(null),qe(""),Xe(""),jt(""),nt(""),st("")):je(t)}})]}),Object(S.jsx)(Oe.a,{sx:{my:"20px",borderColor:"var(--divider-color-contrast)"}}),ce(b)?Object(S.jsx)(Hs,{}):"delivery"===ue?Object(S.jsxs)("div",{className:"checkout--address-panel",children:[Object(S.jsx)("h4",{children:"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441"}),void 0!==b.CONFIG_delivery_info_text&&b.CONFIG_delivery_info_text&&Object(S.jsx)(Ht.a,{severity:"info",sx:{mt:2,mb:2},children:Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:b.CONFIG_delivery_info_text}})}),en?Object(S.jsxs)(Ht.a,{severity:"error",sx:{mt:2,mb:2,"& .MuiAlert-action":{flexDirection:"column",justifyContent:"center"}},action:Q()?null:Object(S.jsx)(de.a,{variant:"button",className:" btn--action",onClick:function(){return window.location.reload()},children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c"}),children:[Object(S.jsx)("div",{children:"\u041f\u043e\u0442\u0435\u0440\u044f\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u042f\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u0440\u0442\u0430\u043c\u0438, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \xab\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c\xbb."}),Q()?Object(S.jsx)(de.a,{variant:"button",className:" btn--action",onClick:function(){return window.location.reload()},sx:{width:"100%",mt:"8px"},children:"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c"}):null]}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(tr,{deliveryAddress:pe,handleChooseDeliveryAddress:function(e,t){he(t),rn(j.addresses[t])},iikoStreets:dn}),"areaPrice"===(null===(n=b.deliveryZones)||void 0===n?void 0:n.deliveryPriceType)&&"new"===pe?Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(Qe.a,Object(I.a)({size:"small",placeholder:"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441",value:(null===an||void 0===an?void 0:an.formate)||"",multiline:!0,focused:!1,fullWidth:!0,onClick:function(e){e.stopPropagation(),o(Ua(!0))},InputProps:{readOnly:!0,endAdornment:Object(S.jsx)("span",{className:"text-field__text-adornment",onClick:function(e){e.stopPropagation(),o(Ua(!0))},children:(null===an||void 0===an?void 0:an.formate)?"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c":"\u0423\u043a\u0430\u0437\u0430\u0442\u044c"})},sx:{"& .MuiOutlinedInput-root":{cursor:"pointer"},"& .MuiOutlinedInput-input":{cursor:"pointer"}}},In))}):null,"new"===pe&&"areaPrice"!==(null===(c=b.deliveryZones)||void 0===c?void 0:c.deliveryPriceType)&&Object(S.jsx)(Ir,{streetProps:Cn,homeProps:kn,newUserAddressStreet:Ze,newUserAddressHome:Je,newUserAddressPorch:tt,newUserAddressFloor:rt,newUserAddressApartment:ut,handleChangeNewUserAddress:function(e,t){switch(t){case"street":qe(e);break;case"home":Xe(e);break;case"porch":nt(e);break;case"floor":st(e);break;case"apartment":jt(e)}},iikoStreets:dn,iikoError:mn})]})]}):"self"===ue?Object(S.jsx)(Br,{selfDeliveryAddress:xe,handleChooseSelfDeliveryAddress:fn}):"inRestoraunt"===ue?Object(S.jsx)(Lr,{selfDeliveryAddress:xe,handleChooseSelfDeliveryAddress:fn}):null]}),Object(S.jsx)(Qa.e,{query:{apikey:b.deliveryZones?b.deliveryZones.apiKey:""},children:"areaPrice"===(null===(a=b.deliveryZones)||void 0===a?void 0:a.deliveryPriceType)&&!en&&m?Object(S.jsx)(Ya,{choosenAddress:an,onYandexApiError:function(){tn(!0),o(za(null))},handleChooseZoneDeliveryAddress:function(e){rn(e),ze(e.area),qe(e.street),Xe(e.home),jt(e.apartment),nt(e.porch),st(e.floor),ht(e.coordinates),Nt(e.kladrId)}}):null}),ce(b)?null:Object(S.jsx)(is,Object(I.a)({preorderDate:Ie,preorderTime:Te,handlePreorderDateChange:function(e){if("\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435"===e)return Pe(new Date),void Re(e);Re(!1),Te&&Pe(Object(L.a)(e,{hours:Object(cs.a)(Te),minutes:Object(as.a)(Te),seconds:0,milliseconds:0})),Te||Pe(e||null)},handlePreorderTimeChange:function(e){if(Ae(e),e&&Ie){var t=Object(L.a)(Ie,{hours:Object(cs.a)(new Date(e)),minutes:Object(as.a)(new Date(e)),seconds:0,milliseconds:0});Pe(t)}else if(e){var n=Object(Qc.a)(new Date,1),c=Object(L.a)(n,{hours:Object(cs.a)(new Date(e)),minutes:Object(as.a)(new Date(e)),seconds:0,milliseconds:0});Pe(c)}},asSoonAsPosible:Ge},Pn)),Object(S.jsxs)("div",{className:"checkout--comment-order",children:[Object(S.jsx)("h3",{children:"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0437\u0430\u043a\u0430\u0437\u0443"}),Object(S.jsx)(Qe.a,{id:"commentOrder",label:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043a \u0437\u0430\u043a\u0430\u0437\u0443",multiline:!0,maxRows:8,value:It,onInput:function(e,t){Pt(e.target.value)},inputProps:{maxLength:300},sx:{width:1,"& .MuiInputBase-root":{bgcolor:"var(--background-color)"}}})]}),Q()?null:Object(S.jsx)(yr,{error:V,loading:D,activeGateway:we,typeDelivery:ue,deliveryZone:E,yandexApiError:en,handleSetError:function(e){Z(e)},handleBackToMenu:_n,handleMakeOrder:gn,handleOpenBeforePaymentModal:function(e){Jt(e)}})]}),Object(S.jsx)(ot.a,{item:!0,sm:12,md:5,sx:{width:1},className:"checkout--total-wrapper",children:Object(S.jsxs)("div",{className:"checkout--total-panel",children:[Object(S.jsx)("h3",{className:"checkout--total-panel--title",children:"\u0412\u0430\u0448 \u0437\u0430\u043a\u0430\u0437"}),Object(S.jsxs)("div",{className:"checkout--products",children:[Object.keys(O).map((function(e,t){if(h[e]&&void 0!==h[e].type&&"variations"===h[e].type)return O[e].items.map((function(t,n){return Object(S.jsx)(zc,{productIndex:n,productCart:O[e].items[n],productCount:1,productTotalPrice:O[e].totalPrice},n)}));var n,c=null===(n=O[e].items)||void 0===n?void 0:n.filter((function(e){var t;return!(null===(t=e.choosenModificators)||void 0===t?void 0:t.length)})),a=ln(c),r=!1;return O[e].items.map((function(e,t){var n;return(null===(n=e.choosenModificators)||void 0===n?void 0:n.length)?Object(S.jsx)(zc,{productIndex:t,productCart:e,productCount:1,productTotalPrice:e.options._promocode_price?Math.ceil(e.options._promocode_price):e.options._price},t):r?void 0:(r=!0,Object(S.jsx)(zc,{productIndex:t,productCart:e,productCount:c.length,productTotalPrice:a},t))}))})),g.id?Object(S.jsx)(Hc,{}):null,_.id&&Object(S.jsx)(Ar,{}),Object(S.jsx)(So,{})]}),ie(b)&&Object(S.jsx)("div",{className:"checkout--promocode",children:Object(S.jsx)(Lc,{ignoreMinPrice:!0,typeDelivery:ue,preorderDate:Ie,preorderTime:Te})}),Object(S.jsx)("hr",{className:"checkout--total-panel--separator"}),p.discount||hn||"delivery"===ue&&!P?Object(S.jsxs)("div",{className:"checkout--subtotal-price",children:["\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430",Object(S.jsxs)("span",{className:"money",children:[p.subTotalPrice.toLocaleString("ru-RU")," ","\u20bd"]})]}):null,Object(S.jsxs)("div",{className:"checkout--total-panel--result",children:[v.code&&p.discount?Object(S.jsxs)("div",{className:"checkout--promocode-total",children:[Object(S.jsxs)("div",{className:"checkout--promocode-name",children:["\u041f\u0440\u043e\u043c\u043e\u043a\u043e\u0434"," ",Object(S.jsx)("span",{className:"main-color",children:v.code})]}),Object(S.jsxs)("span",{className:"money main-color",children:["-",p.discount.toLocaleString("ru-RU")," ","\u20bd"]})]}):null,vn&&hn?Object(S.jsxs)("div",{className:"checkout--auto-discount-container",children:[Object(S.jsxs)("div",{className:"checkout--auto-discount-name",children:[Object(S.jsx)("span",{children:"\u0421\u043a\u0438\u0434\u043a\u0430"}),Object(S.jsx)(wn,{placement:"top",enterTouchDelay:0,title:vn.name,children:Object(S.jsx)(dc.a,{className:"checkout--info-icon"})})]}),Object(S.jsxs)("span",{className:"checkout--auto-discount-amount main-color",children:["-",hn.toLocaleString("ru-RU")," ","\u20bd"]})]}):null,"delivery"!==ue||P||"areaPrice"===(null===(r=b.deliveryZones)||void 0===r?void 0:r.deliveryPriceType)&&(!E||en)?null:Object(S.jsx)(Fr,{deliveryPrice:xn}),Object(S.jsx)(Oe.a,{sx:{my:"20px",borderColor:"var(--divider-color-contrast)"},className:"checkout-result-total-divider"}),Object(S.jsxs)("div",{className:"result-total",children:[Object(S.jsx)("span",{className:"price-title",children:"\u0418\u0442\u043e\u0433\u043e"}),Object(S.jsxs)("span",{className:"money",children:[function(){var e=N;return Ft&&(e-=Ft),vn&&hn&&(e-=hn),"delivery"===ue&&(e+=xn),e}().toLocaleString("ru-RU")," ","\u20bd"]})]})]}),b.bonusProgrammStatus||"active"===(null===(i=b.bonusProgramm)||void 0===i?void 0:i.status)?Object(S.jsx)(zs,{usedBonuses:Ft,handleChangeUsedBonuses:function(e){Tt(e)},typeDelivery:ue,deliveryZone:E,autoDiscount:vn,autoDiscountAmount:hn}):null,Object(S.jsx)("hr",{className:"checkout--total-panel--separator"}),ce(b)?Object(S.jsxs)("div",{className:"checkout--gateways",children:[Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:40,sx:{borderRadius:"12px",mb:"8px"}}),Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:40,sx:{borderRadius:"12px"}})]}):Object(S.jsxs)("div",{className:"checkout--gateways",children:[Object(S.jsx)("h4",{children:"\u0421\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b"}),Array.isArray(C)&&!!C.length&&Object(S.jsx)(ic.a,{value:we,onChange:function(e,t){t&&Ne(t)},orientation:"vertical",exclusive:!0,className:"checkout--gateways-btn-group",children:C.map((function(e,t){return Object(S.jsxs)(oc.a,{value:e.id,label:e.title,className:"checkout--gateways-btn",children:[Object(S.jsxs)("div",{className:"checkout--gateways-title-container",children:[Object(S.jsx)(er.a,{size:"small",checked:we===e.id}),Object(S.jsx)("div",{children:e.title})]}),Sn(e)]},t)}))}),Object(S.jsxs)("div",{className:"checkout--gateways-inputs",children:["yes"===b.CONFIG_checkout_hide_count_person?null:Object(S.jsxs)("div",{className:"checkout--gateways-input",children:[Object(S.jsx)("b",{children:b.CONFIG_checkout_count_person_name||"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0441\u043e\u043d"}),Object(S.jsxs)(ac.a,{id:"count_peoples",value:Dt,sx:{width:1,mt:.5},size:"small",onChange:function(e,t){Gt(e.target.value)},children:[Object(S.jsx)(rc.a,{value:1,children:"1"}),Object(S.jsx)(rc.a,{value:2,children:"2"}),Object(S.jsx)(rc.a,{value:3,children:"3"}),Object(S.jsx)(rc.a,{value:4,children:"4"}),Object(S.jsx)(rc.a,{value:5,children:"5"}),Object(S.jsx)(rc.a,{value:6,children:"6"}),Object(S.jsx)(rc.a,{value:7,children:"7"}),Object(S.jsx)(rc.a,{value:8,children:"8"}),Object(S.jsx)(rc.a,{value:9,children:"9"}),Object(S.jsx)(rc.a,{value:10,children:"10"})]})]}),"cash"===we&&Object(S.jsxs)("div",{className:"checkout--gateways-input",children:[Object(S.jsx)("b",{children:"\u041f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0434\u0430\u0447\u0443 \u0441"}),Object(S.jsx)(Qe.a,{size:"small",id:"money_back",value:Lt,onChange:function(e){var t=e.target.value;parseFloat(t)<1||"0"==(null===t||void 0===t?void 0:t[0])||!t.match(/^\d+$/)?zt(""):zt(t)},inputProps:{type:"tel",min:1,step:1},sx:{width:1,mt:.5}})]})]})]}),"on"===b.CONFIG_checkout_dont_recall?Object(S.jsx)(Ha.a,{control:Object(S.jsx)(Wa.a,{checked:Zt,onChange:function(){return Qt(!Zt)},name:"gilad"}),label:b.CONFIG_checkout_dont_recall_text||"\u041d\u0435 \u043f\u0435\u0440\u0435\u0437\u0432\u0430\u043d\u0438\u0432\u0430\u0439\u0442\u0435 \u043c\u043d\u0435"}):null]})})]}),Q()?Object(S.jsx)(ot.a,{item:!0,xs:12,md:7,children:Object(S.jsx)(yr,{error:V,loading:D,activeGateway:we,typeDelivery:ue,deliveryZone:E,yandexApiError:en,handleSetError:function(e){Z(e)},handleBackToMenu:_n,handleMakeOrder:gn,handleOpenBeforePaymentModal:function(e){Jt(e)}})}):null]}),Object(S.jsx)("div",{className:""})]}),b.CONFIG_order_text_before_payment?Object(S.jsx)(La,{openModal:Kt,beforePaymentConfirm:function(){Jt(!1),gn()},beforePaymentCancel:function(){Jt(!1)},content:b.CONFIG_order_text_before_payment}):null,Object(S.jsx)(Ot,{})]})}function Qs(){return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:1},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430"}),Object(S.jsxs)("p",{children:["\u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430 ",Object(S.jsx)(E,{to:"/",children:"\u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"}),"."]})]}),Object(S.jsx)(Ot,{})]})}function qs(){var e=k().navigateTo,t=yc().getRequestAPI,n=Object(w.e)((function(e){return{mainLoading:e.config.status}})).mainLoading,c=Object(w.e)((function(e){return"on"===e.config.data.CONFIG_empty_page_redirect})),a=g.a.useState("loading"),r=Object(Ve.a)(a,2),i=r[0],o=r[1],s=g.a.useState(),l=Object(Ve.a)(s,2),d=l[0],u=l[1],j=g.a.useState(),b=Object(Ve.a)(j,2),m=b[0],p=b[1],O=Object(N.g)().pathname;return g.a.useEffect((function(){if(console.log(O),n){o("loading");var a="&path="+O.slice(1);t("getPage",a,{mode:"no-cors"}).then((function(t){"success"===t.data.status?(u(t.data.pageTitle),p(t.data.pageContent),o("loaded")):c?e("/"):o("error")}))}}),[n,O]),Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsx)(se.a,{sx:{flexGrow:1},children:"loading"===i?Object(S.jsxs)("div",{className:"pageInner",children:[Object(S.jsx)("h1",{className:"page-title",children:Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.5}})}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.5}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.35}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.35}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.5}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.65}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.6}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}})]}):"error"===i?Object(S.jsxs)("div",{className:"pageInner",children:[Object(S.jsx)("h1",{className:"page-title",children:"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430"}),Object(S.jsxs)("p",{children:["\u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430"," ",Object(S.jsx)(E,{to:"/",children:"\u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"}),"."]})]}):Object(S.jsxs)("div",{className:"pageInner",children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:d}),Object(S.jsx)("div",{className:"pageContent",dangerouslySetInnerHTML:{__html:m}})]})}),Object(S.jsx)(Ot,{})]})}n(357);var Ys=function(){return Object(S.jsxs)("div",{className:"product-modal",children:[Object(S.jsx)("div",{className:"product-page--image",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:"100%",height:"100%",sx:{aspectRatio:"1",borderRadius:"20px"}})}),Object(S.jsxs)("div",{className:"product-modal--info no-bg",children:[Object(S.jsx)("h1",{className:"product-modal--title",style:{marginBottom:10},children:Object(S.jsx)(Fe.a,{variant:"rounded",width:300,height:30,sx:{borderRadius:"20px"}})}),Object(S.jsxs)("div",{className:"product-modal--description",children:[Object(S.jsx)(Fe.a,{width:"80%"}),Object(S.jsx)(Fe.a,{width:"90%"}),Object(S.jsx)(Fe.a,{width:200})]}),Object(S.jsxs)("div",{className:"variations-buying",children:[Object(S.jsx)("div",{className:"product-modal--price-wrapper",children:Object(S.jsx)(Fe.a,{variant:"rounded",width:100,height:28,sx:{borderRadius:"20px"}})}),Object(S.jsx)(Fe.a,{variant:"rounded",height:40,sx:{borderRadius:"20px",flexBasis:"50%"}})]})]})]})};function Ks(){var e,t,n=Object(w.d)(),c=k().navigateTo,a=Me().metricAddProductToCart,r=Object(w.e)((function(e){var t=e.products,n=e.cart;return{products:t.items,addon_products:t.addon_items,cartProducts:n.items,productsStatus:t.status}})),i=r.addon_products,o=(r.cartProducts,r.products),s=r.productsStatus,l=sc(null===H||void 0===H?void 0:H.id),d=l.choosenModificators,u=l.modificatorsAmount,j=l.modificatorsCondition,b=l.addEmptyRequiredCategory,m=l.deleteEmptyRequiredCategory,p=l.addProductModificator,O=l.decreaseProductModificator,h=Object(w.e)((function(e){return{config:e.config.data}})).config,v=Object(w.e)((function(e){return e.products}),w.c).categories,f=Object(x.useState)({}),g=Object(Ve.a)(f,2),_=g[0],y=g[1],N=Object(x.useState)(!1),C=Object(Ve.a)(N,2),P=C[0],E=C[1],F=Object(x.useState)(!1),T=Object(Ve.a)(F,2),A=T[0],M=T[1],D=Object(x.useState)(null),G=Object(Ve.a)(D,2),R=G[0],B=G[1],L=window.location.pathname.split("/").filter((function(e){return e})),U=Object(x.useState)(null),z=Object(Ve.a)(U,2),H=z[0],W=z[1];if(Object(x.useEffect)((function(){if(o){var e=Object.values(o).find((function(e){return e.slug===L[L.length-1]}));e&&W(e)}}),[o]),Object(x.useEffect)((function(){if(H){var e={};if("variations"===H.type&&H.attributes&&(Object.keys(H.attributes).forEach((function(t,n){e[n]=Object.values(H.attributes)[n].options[0]})),y(e)),"variations"===H.type&&H.variants){var t=!1,n=!1;Object.values(H.variants).forEach((function(c,a){var r=!0;t||(Object.values(c.attributes).forEach((function(t,n){e[n]!==t&&(r=!1)})),r&&(E(c),t=n=!0))})),M(!n)}}}),[H]),Object(x.useEffect)((function(){if(H&&H.categories&&v){var e=!1;H.categories.forEach((function(t){var n=v.find((function(e){return e.term_id===t}));if(n){var c=$(n);c.disabled&&(e=!0,B(Object(I.a)(Object(I.a)({},n),{},{message:c.message})))}})),!e&&R&&B(null)}}),[H,v]),s&&(!H||R&&"block"!==R.limit_type))return"on"===h.CONFIG_empty_page_redirect?c("/"):c("/not-found"),null;var V=function(e,t){var n=_;n[e]=t,y(Object(I.a)(Object(I.a)({},_),{},{dataAttributes:n}));var c=!1,a=!1;Object.values(H.variants).forEach((function(e,t){var r=!0;c||(Object.values(e.attributes).forEach((function(e,t){n[t]!==e&&(r=!1)})),r&&(E(e),c=a=!0))})),M(!a)},Z={"@context":"http://schema.org","@type":"Product",offers:(null===H||void 0===H||null===(e=H.variants)||void 0===e?void 0:e.length)?H.variants.map((function(e){return{"@type":"Offer",availability:"https://schema.org/InStock",price:e.price,priceCurrency:"RUB",description:e.description}})):{"@type":"Offer",availability:"https://schema.org/InStock",price:null===H||void 0===H?void 0:H.options._price,priceCurrency:"RUB"},name:(null===H||void 0===H?void 0:H.full_title)||(null===H||void 0===H?void 0:H.title),description:null===H||void 0===H?void 0:H.content.replace(/\n/g,""),url:window.location.href,image:{"@type":"ImageObject",url:(null===H||void 0===H?void 0:H.fullImg)||(null===H||void 0===H?void 0:H.img),image:(null===H||void 0===H?void 0:H.fullImg)||(null===H||void 0===H?void 0:H.img),name:(null===H||void 0===H?void 0:H.full_title)||(null===H||void 0===H?void 0:H.title)}};return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[Object(S.jsx)(Dr.a,{children:Object(S.jsx)("script",{type:"application/ld+json",children:JSON.stringify(Z)})}),Object(S.jsx)(it,{}),Object(S.jsx)(Oa,{}),Object(S.jsx)(se.a,{sx:{flexGrow:"1"},children:H||s?H?Object(S.jsxs)("div",{className:"product-modal",children:[Object(S.jsx)("div",{className:"product-page--image",children:Object(S.jsx)(tc.a,{in:!0,children:Object(S.jsx)("img",{src:P&&P.img?P.img:H.fullImg?H.fullImg:H.img?H.img:It,alt:H.title})})}),Object(S.jsxs)("div",{className:"product-modal--info no-bg",children:[Object(S.jsx)("div",{className:"product-modal--title",dangerouslySetInnerHTML:{__html:"<h1>".concat(H.full_title||H.title,"</h1>")},style:{marginBottom:5}}),"variations"===H.type?Object(S.jsxs)(S.Fragment,{children:[P&&P.description?Object(S.jsx)("div",{className:"product-modal--description","data-product-id":H.id,dangerouslySetInnerHTML:{__html:P.description}}):Object(S.jsx)("div",{className:"product-modal--description","data-product-id":H.id,dangerouslySetInnerHTML:{__html:H.content.replace(/\n/g,"<br />")}}),Object(S.jsx)("div",{className:"product-modal--attributes",children:Object.values(H.attributes).map((function(e,t){return Object(S.jsx)("div",{className:"product-modal--attribute",children:"select"===h.CONFIG_type_variations?Object(S.jsxs)(nc.a,{fullWidth:!0,children:[Object(S.jsx)(cc.a,{id:"product-modal-attributes-label",children:e.name}),Object(S.jsx)(ac.a,{label:e.name,value:_[t],labelId:"product-modal-attributes-label",sx:{bgcolor:"#fff"},size:"small",children:Object.values(e.options).map((function(e,n){return Object(S.jsx)(rc.a,{onClick:function(){return V(t,e)},value:e,children:e},n)}))})]}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("div",{className:"attribute--name",children:e.name}),Object(S.jsx)(ic.a,{color:"primary",value:_[t],orientation:"vertical"===h.CONFIG_type_variations?"vertical":"horizontal",exclusive:!0,className:"attribute--variations",children:Object.values(e.options).map((function(e,n){return Object(S.jsx)(oc.a,{className:"btn--variation",onClick:function(){return V(t,e)},value:e,children:e},n)}))})]})},t)}))})]}):Object(S.jsx)("div",{className:"product-modal--description","data-product-id":H.id,dangerouslySetInnerHTML:{__html:H.content.replace(/\n/g,"<br />")}}),A?Object(S.jsx)(Xn.a,{sx:{mt:1},in:!0,children:Object(S.jsx)(Ht.a,{severity:"error",className:"alert--wrong-variant",children:"\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d"})}):"",Object(S.jsxs)("div",{className:"variations-buying",children:[Object(S.jsxs)("div",{className:"product-modal--price-wrapper",children:[Object(S.jsx)("div",{className:"product-modal--price",children:function(){return P?parseInt(P._regular_price)>parseInt(P.price)?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("span",{className:"product--old-price",children:[parseInt(P._regular_price)+u,"\u20bd"]}),Object(S.jsxs)("span",{className:"product--sale-price main-color",children:[parseInt(P.price)+u," ","\u20bd"]})]}):Object(S.jsxs)("span",{children:[P.price+u," \u20bd"]}):parseInt(null===(e=H.options)||void 0===e?void 0:e._regular_price)>parseInt(null===(t=H.options)||void 0===t?void 0:t._price)?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("span",{className:"product--old-price",children:[parseInt(H.options._regular_price)+u," ","\u20bd"]}),Object(S.jsxs)("span",{className:"product--sale-price main-color",children:[H.options._price+u," \u20bd"]})]}):Object(S.jsxs)("span",{children:[parseInt(H.options._price)+u," ","\u20bd"]});var e,t}()}),Object(S.jsx)("div",{className:"product-modal--stats",children:"variations"===H.type?Object(S.jsx)(S.Fragment,{children:P&&P.weight?Object(S.jsxs)("div",{className:"weight",children:[P.weight," ","\u0433\u0440."]}):""}):Object(S.jsxs)(S.Fragment,{children:[H.options.weight?Object(S.jsxs)("div",{className:"weight",children:[H.options.weight," ","\u0433\u0440."]}):"",H.options.count_rolls?Object(S.jsxs)("div",{className:"count-rolls",children:[H.options.count_rolls," ","\u0448\u0442."]}):""]})})]}),"variations"===H.type?Object(S.jsx)(de.a,{variant:"button",className:"btn--action btn-buy",onClick:function(){var e=J(H);e.options._price=P.price,e.variant=P,a(e),n(ht(Object(I.a)(Object(I.a)({},e),{},{choosenModificators:d,modificatorsAmount:u})))},disabled:R||!j||A,"data-product-id":H.id,children:h.CONFIG_product_buy_button_text?h.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"}):Object(S.jsx)(de.a,{variant:"button",className:"btn--action btn-buy",onClick:function(){var e=J(H);a(e),n(ht(Object(I.a)(Object(I.a)({},e),{},{choosenModificators:d,modificatorsAmount:u})))},disabled:R||!j,"data-product-id":H.id,children:h.CONFIG_product_buy_button_text?h.CONFIG_product_buy_button_text:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c"})]}),R?Object(S.jsx)(Xn.a,{sx:{mt:1},in:!0,children:Object(S.jsx)(Ht.a,{severity:"error",className:"alert--wrong-variant",children:R.message})}):"",null===(t=H.product_addons)||void 0===t?void 0:t.map((function(e){return Object(S.jsx)(ec,{category:e,choosenModificators:d,addEmptyRequiredCategory:b,deleteEmptyRequiredCategory:m,addProductModificator:p,decreaseProductModificator:O},e.category_id)})),!i.length||"hide"===h.CONFIG_addons_category_in_product||"without_modificators"===h.CONFIG_addons_category_in_product&&H.product_addons.length?null:Object(S.jsxs)("div",{className:"addon-products",children:[Object(S.jsx)("div",{className:"addon-products--title",children:h.CONFIG_addons_category_name}),Object(S.jsx)(ot.a,{container:!0,spacing:1,sx:{mt:"6px"},children:i.map((function(e){return Object(S.jsx)(ot.a,{item:!0,mobilexs:6,mobilesm:4,mobilemd:3,mobilelg:2,desctop:4,children:Object(S.jsx)(Jn,{product:e},e.id)})}))})]})]})]}):null:Object(S.jsx)(Ys,{})}),Object(S.jsx)(Ot,{})]})}var Js=function(){var e,t=Object(N.i)(),n=k().navigateTo,c=Object(w.e)((function(e){var t=e.config;return{configStatus:!ce(t.data),config:t.data,productLayout:t.data.CONFIG_type_products}})),a=c.configStatus,r=c.config,i=c.productLayout,o=Object(w.e)((function(e){var t=e.products;e.productModal;return{products:t.items,categories:t.categories,productsStatus:t.status}})),s=o.products,l=o.categories,d=o.productsStatus,u=Object(x.useState)([]),j=Object(Ve.a)(u,2),b=j[0],m=j[1],p=Object(x.useState)([]),O=Object(Ve.a)(p,2),h=O[0],v=O[1],f=Object(x.useState)({}),g=Object(Ve.a)(f,2),_=g[0],y=g[1],C=l.find((function(e){return e.slug===t.categoryName})),I=C?$(C):{};if(Object(x.useEffect)((function(){Object.values(s).length&&v([].concat.apply([],Object.values(s)))}),[s]),Object(x.useEffect)((function(){if(C){var e=[].concat.apply([],Object.values(s)).filter((function(e){return e.categories.includes(C.term_id)}));m(e)}}),[C]),(null===l||void 0===l?void 0:l.length)&&(!C||I.disabled&&"block"!==C.limit_type))return"on"===r.CONFIG_empty_page_redirect?n("/"):n("/not-found"),null;return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsx)(Oa,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:"1"},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:C?C.name:d?"":Object(S.jsx)(Fe.a,{variant:"rounded",width:350,height:40})}),!a||r.CONFIG_searching_disable?null:Object(S.jsx)(xa,{products:b,dontShowList:!0,dontShowButton:!0,handleFilter:function(e){v(e||[].concat.apply([],Object.values(s)))}}),I.message?Object(S.jsx)(Ht.a,{severity:I.disabled?"error":"info",sx:{mb:1},children:I.message}):null,C&&Object.values(C.tags).length?Object(S.jsx)(ga.a,{className:"product--category-tags-container",sx:"one"===i?{mb:"8px"}:{},children:C.tags&&Object.values(C.tags).map((function(e,t){return Object(S.jsx)(de.a,{variant:"button",className:"btn btn--tag ".concat(_.hasOwnProperty(C.term_id)&&_[C.term_id].includes(e.term_id)?"btn--tag-active btn--action":""),sx:{mr:1,mb:1,bgcolor:"#fff"},onClick:function(){return function(e,t){var n=J(_);n[e]&&n[e].includes(t)?delete n[e]:n[e]=[t],y(n)}(C.term_id,e.term_id)},children:e.name},"tag-".concat(e.term_id))}))}):null,(null===h||void 0===h?void 0:h.length)||d||C?C?Object(S.jsx)(ot.a,{container:!0,spacing:{xs:0,sm:2},children:null===h||void 0===h||null===(e=h.sort((function(e,t){return e.order>t.order?1:-1})))||void 0===e?void 0:e.map((function(e){return e.categories.includes(C.term_id)?_.hasOwnProperty(C.term_id)&&_[C.term_id].length?Object.values(e.tags).filter((function(e){return _[C.term_id].includes(e.term_id)})).length?Object(S.jsx)(Lt,{product:e},e.id):"":Object(S.jsx)(Lt,{product:e,disabled:$(C).disabled},e.id):""}))}):null:Object(S.jsx)(Di,{})]}),Object(S.jsx)(jc,{}),Object(S.jsxs)("div",{className:"screen-footer",children:[Q()?Object(S.jsx)(Wn,{}):"",Object(S.jsx)(Kn,{})]}),Object(S.jsx)(Ot,{})]})},Xs=function(){var e=k().navigateTo,t=Object(w.e)((function(e){return{products:e.products.items}})).products,n=Object(w.e)((function(e){return e.config.data}));n.CONFIG_searching_disable&&e("/");var c=[].concat.apply([],Object.values(t)).filter((function(e){return(1!==e.categories.length||!e.categories.includes(parseInt(n.CONFIG_bonuses_category)))&&!e.categories.every((function(e){var t;return null===(t=n.CONFIG_exclude_categories)||void 0===t?void 0:t.includes(e)}))}));return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsx)(Oa,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:"1"},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u041f\u043e\u0438\u0441\u043a \u0442\u043e\u0432\u0430\u0440\u043e\u0432"}),Object(S.jsx)(xa,{products:c})]}),Object(S.jsxs)("div",{className:"screen-footer",children:[Q()?Object(S.jsx)(Wn,{}):"",Object(S.jsx)(Kn,{})]}),Object(S.jsx)(jc,{}),Object(S.jsx)(Ot,{})]})},$s=(n(358),function(){return Object(S.jsxs)("div",{children:[Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.5}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.35}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.35}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.5}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.25}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.15}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.45}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.65}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.6}}),Object(S.jsx)(Fe.a,{variant:"text",animation:"wave",sx:{width:.55}})]})}),el=function(){var e=k().navigateTo,t=Object(w.e)((function(e){var t,n;return null===(t=e.config.data)||void 0===t||null===(n=t.bonusProgramm)||void 0===n?void 0:n.status})),n=Object(w.e)((function(e){return!ce(e.config.data)}));return Object(x.useEffect)((function(){n&&"active"!==t&&e("/")}),[n,t]),Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",height:"100vh"},className:"bonus-page",children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:"1"},children:[Object(S.jsx)("h1",{children:"\u0411\u043e\u043d\u0443\u0441\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430"}),n?Object(S.jsxs)(ot.a,{container:!0,justifyContent:"space-between",wrap:"wrap-reverse",alignItems:"flex-end",children:[Object(S.jsxs)(ot.a,{item:!0,xs:12,desctop:8,children:[Object(S.jsx)(co,{}),Object(S.jsx)(ao,{}),Object(S.jsx)(ro,{}),Object(S.jsx)(io,{})]}),Object(S.jsx)(ot.a,{item:!0,container:!0,xs:12,desctop:3,sx:Object(cn.a)({position:"sticky",height:"fit-content",top:"80px"},"@media (max-width: 899px)",{position:"static"}),children:Object(S.jsx)(oo,{})})]}):Object(S.jsx)($s,{})]}),Object(S.jsx)(Ot,{})]})},tl=(n(359),function(){var e=window.CONFIG_logo_align;return Object(S.jsxs)("div",{className:"choose-town-page",children:[Object(S.jsx)("div",{className:"choose-town-page--logo-container",children:window.CONFIG_company_logo_main?Object(S.jsx)("img",{src:"active"!==window.CONFIG_design_dark_theme?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"}):null}),Object(S.jsx)("div",{className:"choose-town-page--page-backdrop",children:Object(S.jsxs)("div",{className:"choose-town-page--block",children:[Object(S.jsx)("div",{className:"block--image-container",style:{textAlign:"center"===e?"center":"right"===e?"end":"start"},children:window.CONFIG_company_logo_main?Object(S.jsx)("img",{src:"active"!==window.CONFIG_design_dark_theme?window.CONFIG_company_logo_main:window.CONFIG_company_logo_footer,alt:"\u041b\u043e\u0433\u043e\u0442\u0438\u043f"}):null}),Object(S.jsx)(Ye,{})]})})]})}),nl=(n(360),function(){var e=window.CONFIG_order_failed_image;return Object(S.jsxs)(ga.a,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[Object(S.jsx)(it,{}),Object(S.jsxs)(se.a,{sx:{flexGrow:1},children:[Object(S.jsx)("h1",{className:"page-title",lang:"ru",children:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430"}),Object(S.jsxs)("div",{className:"order-failed-page",children:[Object(S.jsx)("div",{className:"order-failed--logo-container",children:Object(S.jsx)("div",{className:"order-failed--logo-inner-container",children:e?Object(S.jsx)("img",{src:e,className:"order-failed--logo",alt:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430"}):Object(S.jsx)(Ln,{className:"order-failed--logo"})})}),Object(S.jsxs)("div",{className:"order-failed-page--content-container",children:[Object(S.jsx)("p",{className:"order-failed-page--content",children:"\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437."}),Object(S.jsx)(E,{className:"btn btn--action",to:"/",style:{marginTop:"15px"},children:"\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"})]})]})]}),Object(S.jsx)(Ot,{})]})}),cl=function(){var e=K(),t=k().rootTownPathname,n=Object(w.e)((function(e){return e.config.data}));return Object(w.e)((function(e){return e.config.status}))&&("android"===e&&n.CONFIG_GPLAY?window.location.href=n.CONFIG_GPLAY:"ios"===e&&n.CONFIG_APPSTORE?window.location.href=n.CONFIG_APPSTORE:window.location.href="https://".concat(q()).concat(t)),Object(S.jsx)(S.Fragment,{})},al=function(e){return[{path:"product/*",element:Object(S.jsx)(Ks,{})},{path:"checkout",element:Object(S.jsx)(Zs,{})},{path:"sales",element:Object(S.jsx)(Ui,{})},{path:"contacts",element:Object(S.jsx)(Hi,{}),exact:!0},{path:"account",element:Object(S.jsx)(fo,{})},{path:"order-complete",element:Object(S.jsx)(Po,{})},{path:"order-failed",element:Object(S.jsx)(nl,{})},{path:"search",element:Object(S.jsx)(Xs,{})},{path:"category/:categoryName",element:Object(S.jsx)(Js,{})},{path:"product-category/:categoryName",element:Object(S.jsx)(Js,{})},{path:"bonuses",element:Object(S.jsx)(el,{})},{path:"qr-mobile",element:Object(S.jsx)(cl,{})},{path:"*",element:Object(S.jsx)(qs,{})},{path:"not-found",element:Object(S.jsx)(Qs,{})}]},rl=function(e){return{type:"SET_PRODUCTS_STATUS",payload:e}},il=n(464),ol=n(456),sl=(n.p,n.p,n(361),function(e){var t=Object(w.e)((function(e){return e.config.data.CONFIG_company_name})),n=Object(w.e)((function(e){return e.config.data.CONFIG_format_phone})),c=Object(w.e)((function(e){return e.config.data.CONFIG_email})),a=Object(w.e)((function(e){return e.config.data.CONFIG_vk})),r=Object(w.e)((function(e){return e.config.data.CONFIG_company_logo_main})),i=Object(w.e)((function(e){return e.config.data.CONFIG_town})),o=Object(w.e)((function(e){return e.config.data.CONFIG_address}));return{organizationLD:{"@context":"https://schema.org","@type":"Organization",name:t,telephone:n,email:c,sameAs:[a],logo:r,address:{"@type":"PostalAddress",addressCountry:"RU",addressLocality:"\u0420\u043e\u0441\u0441\u0438\u044f, ".concat(i),streetAddress:o}}}});var ll,dl=function(){var e=C().choosenTown,t=Object(w.d)();Object(ol.a)({locale:il.a});var n=Object(N.h)(),c=yc().getRequestAPI,a=sl().organizationLD,r=Object(w.e)((function(e){return e.config.status})),i=Object(w.e)((function(e){return ce(e.config.data)})),o=Object(w.e)((function(e){return e.config.data.CONFIG_vk_group_id})),s=Object(w.e)((function(e){return e.user})).user;return Object(x.useEffect)((function(){t(F(!1)),t(rl(!1)),c("getSiteData").then((function(e){t({type:"SET_CONFIG",payload:e.data.config}),t({type:"SET_TOP_MENU",payload:e.data.top_menu}),t(function(e){return{type:"SET_BOTTOM_MENU",payload:e}}(e.data.bottom_menu)),t({type:"SET_SALES",payload:e.data.sales}),t(function(e){return{type:"SET_GATEWAYS",payload:e}}(e.data.gateways)),t({type:"SET_BANNERS",payload:e.data.banners}),t({type:"SET_STORIES",payload:e.data.stories}),t({type:"SET_AUTO_DISCOUNTS",payload:e.data.autoDiscounts}),t(F(!0)),t({type:"SET_CATEGORIES",payload:e.data.categories}),t({type:"SET_PRODUCTS",payload:e.data.products}),t(function(e){return{type:"SET_ADDON_PRODUCTS",payload:e}}(e.data.addon_products)),t(function(e){return{type:"SET_RECOMMEND_PRODUCTS",payload:e}}(e.data.recommend_products)),t(function(e){return{type:"SET_TOP_SALES_PRODUCTS",payload:e}}(e.data.top_sales_products)),t(function(e){return{type:"SET_BONUSES_PRODUCTS",payload:e}}(e.data.bonuses_products)),t(rl(!0))}))}),[t,e]),Object(x.useEffect)((function(){if(s.token&&s.phone){var e="&token="+s.token+"&phone="+s.phone;c("checkLogin",e,{mode:"no-cors"}).then((function(e){"success"===e.data.status?t(M(e.data.user)):t({type:"LOGOUT"})}))}}),[t]),Object(x.useEffect)((function(){if("vk"===Y()&&r&&o){var e=window.location.hash;window.location.href.includes("vk_access_token_settings")&&(e=e.replace("#","").replace("*","#"),n(e,{replace:!0})),setInterval((function(){var t=window.location.href.replace(window.location.origin,"").replace("#","*");e!==t&&(V.a.send("VKWebAppSetLocation",{location:t}),e=t)}),500),V.a.send("VKWebAppStorageGet",{keys:["messagesFromGroupLastRequest"]}).then((function(e){var t=+e.keys[0].value;Date.now()-t>432e6&&setTimeout((function(){V.a.send("VKWebAppAllowMessagesFromGroup",{group_id:o}).catch((function(){V.a.send("VKWebAppStorageSet",{key:"messagesFromGroupLastRequest",value:"".concat(Date.now())})}))}),15e3)}))}}),[r,o]),"folder"!==window.townsTypeRoute||e||n("/"),Object(S.jsxs)("div",{children:[Object(S.jsx)(Dr.a,{children:Object(S.jsx)("script",{type:"application/ld+json",children:JSON.stringify(a)})}),Object(S.jsxs)(ga.a,{children:[Object(S.jsx)(N.b,{}),r?Object(S.jsx)(Pr,{children:Object(S.jsx)(Nc,{})}):null,Object(S.jsx)(Ga,{}),Object(S.jsx)(da,{}),Object(S.jsx)(Yc,{}),i?null:Object(S.jsx)(oa,{}),i?null:Object(S.jsx)(Er,{}),i?null:Object(S.jsx)(Mr,{}),r?Object(S.jsx)(Gr,{}):null]})]})},ul=function(){var e,t=Object(N.g)(),n=Object(N.h)(),c=Object(w.e)((function(e){var t,n;return null===(t=e.config)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.currentTownId})),a=null===(e=window.towns)||void 0===e?void 0:e.find((function(e){return e.id==c})),r="folder"===window.townsTypeRoute,i="on"===window.CONFIG_main_site_choose_town;return Object(x.useEffect)((function(){r&&a&&"/"===t.pathname&&n("/".concat(a.slug))}),[]),Object(S.jsxs)(N.e,{children:[i||r?Object(S.jsx)(N.c,{exact:!0,path:"/",element:Object(S.jsx)(tl,{})}):null,i?Object(S.jsx)(N.c,{exact:!0,path:"*",element:Object(S.jsx)(N.a,{to:"/",replace:!0})}):null,i?null:Object(S.jsxs)(N.c,{element:Object(S.jsx)(dl,{}),children:[r?Object(S.jsx)(N.c,{exact:!0,path:"/:town",element:Object(S.jsx)(Bi,{})}):Object(S.jsx)(N.c,{exact:!0,path:"/",element:Object(S.jsx)(Bi,{})}),r?Object(S.jsx)(N.c,{path:"/:town",children:al().map((function(e,t){var n=e.path,c=e.element;return Object(S.jsx)(N.c,{path:n,element:c},t)}))}):Object(S.jsx)(S.Fragment,{children:al().map((function(e,t){var n=e.path,c=e.element;return Object(S.jsx)(N.c,{path:n,element:c},t)}))})]})]})},jl=n(32),bl=n(253),ml=(n(362),'\nbody {\n    font-family: "Cera", sans-serif !important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "Cera", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "Cera", sans-serif !important;\n}\n'),pl=(n(363),n(364),n(365),n(366),n(367),{light:{text:"#000",background:"#fff",rgbBackground:"255, 255 , 255",boxShadow:"0 0 20px rgb(0 0 0 / 10%)",productBackground:"#fff",productBoxShadow:"0 0 20px rgb(0 0 0 / 10%)",productHoverBoxShadow:"0 0 20px rgb(0 0 0 / 20%)",productBorder:"#fff",productFadeColor:"255, 255, 255",recommendProductBoxShadow:"0 0 20px rgb(0 0 0 / 10%)",modalBackground:"#fff",rgbModalBackground:"255, 255 , 255",modalBackgroundPrimary:"#f2f3f5",addonBackground:"#fff",variationsBackround:"#dee2e6",selectedVariationBackround:"#fff",bodyBackground:window.backgroundColor&&"default"!==window.backgroundColor?window.backgroundColor:"#fff",miniCartBackground:"#f3f3f7",headerBackground:"#fff",headerBorder:window.fullWidthSite?"rgba(156, 157, 172, 0.25)":"#fff",mobileMenuBtnHover:"#dadce3",topMenuBackground:"transparent",topMenuBorder:window.newHeaderDesign?"1px solid #eee":"none",stickedBarBackground:"255, 255, 255",stickedBarOpacity:window.fullWidthSite?"1":"0.75",dividerColor:"#eee",dividerColorContrast:"#ccc",counterButtonsColor:"#f3f3f7",loadingBackdropColor:"rgba(255,255,255,0.7)",footerBackground:"#333",scrollBtnBackground:"#fff",scrollBtnColor:window.CONFIG_main_color},dark:{text:"#e1e3e6",background:"#141414",rgbBackground:"20, 20 , 20",boxShadow:"0 0 20px rgb(255 255 255 / 5%)",productBackground:"#222222",productBoxShadow:"0 0 10px rgb(255 255 255 / 10%)",productHoverBoxShadow:"0 0 10px rgb(255 255 255 / 20%)",productBorder:"#363738",productFadeColor:"34, 34, 34",recommendProductBoxShadow:"none",modalBackground:"#292929",rgbModalBackground:"41, 41, 41",modalBackgroundPrimary:"#292929",modalContrast:"#292929",addonBackground:"#1a1a1a",variationsBackround:"#1a1a1a",selectedVariationBackround:"#333",bodyBackground:window.backgroundColor?window.backgroundColor:"#141414",miniCartBackground:"#202021",headerBackground:window.newHeaderDesign?"transparent":"#222222",headerBorder:window.newHeaderDesign?"transparent":"#363738",mobileMenuBtnHover:"#535353",topMenuBackground:window.newHeaderDesign?"#222222":"transparent",topMenuBorder:window.newHeaderDesign?"1px solid #363738":"none",stickedBarBackground:"0, 0, 0",stickedBarOpacity:window.fullWidthSite?"1":"0.75",dividerColor:"#363738",dividerColorContrast:"#363738",counterButtonsColor:"rgba(255, 255, 255, 0.08)",loadingBackdropColor:"rgba(255,255,255,0.15)",footerBackground:"#222",scrollBtnBackground:window.CONFIG_main_color,scrollBtnColor:"#fff"}}),Ol=Object(bl.a)(ll||(ll=Object(jl.a)(["\n\t:root {\n\t\t--main-color: ",";\n        \n\t\t--sec-color: ",";\n        ","\n        \n\t}\n    ","\n    "])),(function(e){return e.mainColor.match(/#[a-f0-9]{6}\b/gi)?e.mainColor:"#ff5722"}),(function(e){return e.secondColor.match(/#[a-f0-9]{6}\b/gi)?e.secondColor:"#000"}),(function(e){return"\n        --text-color: ".concat(e.colors.text,";\n        --background-color: ").concat(e.colors.background,";\n        --rgb-background-color: ").concat(e.colors.rgbBackground,";\n        --body-background: ").concat(e.colors.bodyBackground,";\n        --box-shadow: ").concat(e.colors.boxShadow,";\n        --product-background: ").concat(e.colors.productBackground,";\n        --product-box-shadow: ").concat(e.colors.productBoxShadow,";\n        --product-hover-box-shadow: ").concat(e.colors.productHoverBoxShadow,";\n        --product-border: ").concat(e.colors.productBorder,";\n        --product-fade-color: ").concat(e.colors.productFadeColor,";\n        --recommend-product-box-shadow: ").concat(e.colors.recommendProductBoxShadow,";\n        --modal-background: ").concat(e.colors.modalBackground,";\n        --rgb-modal-background: ").concat(e.colors.rgbModalBackground,";\n        --modal-background-primary: ").concat(e.colors.modalBackgroundPrimary,";\n        --addon-background:").concat(e.colors.addonBackground,";\n        --variations-backround:").concat(e.colors.variationsBackround,";\n        --selected-variation-backround:").concat(e.colors.selectedVariationBackround,";\n        --mini-cart-background: ").concat(e.colors.miniCartBackground,";\n        --header-background: ").concat(e.colors.headerBackground,";\n        --header-border: ").concat(e.colors.headerBorder,";\n        --mobile-menu-btn-hover: ").concat(e.colors.mobileMenuBtnHover,";\n        --top-menu-background: ").concat(e.colors.topMenuBackground,";\n        --top-menu-border: ").concat(e.colors.topMenuBorder,";\n        --sticked-bar-background: ").concat(e.colors.stickedBarBackground,";\n        --sticked-bar-opacity: ").concat(e.colors.stickedBarOpacity,";\n        --divider-color: ").concat(e.colors.dividerColor,";\n        --divider-color-contrast: ").concat(e.colors.dividerColorContrast,";\n        --counter-buttons-color: ").concat(e.colors.counterButtonsColor,";\n        --loading-backdrop-color: ").concat(e.colors.loadingBackdropColor,";\n        --footer-background: ").concat(e.colors.footerBackground,";\n        --scroll-btn-background: ").concat(e.colors.scrollBtnBackground,";\n        --scroll-btn-color: ").concat(e.colors.scrollBtnColor,";\n        ")}),(function(e){switch(e.font){case"cera":return ml;case"manrope":return'\nbody {\n    font-family: "Manrope", sans-serif!important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "Manrope", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "Manrope", sans-serif  !important;\n}\n';case"nunito":return'\nbody {\n    font-family: "Nunito", sans-serif!important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "Nunito", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "Nunito", sans-serif  !important;\n}\n';case"firasans":return'\nbody {\n    font-family: "Fira Sans", sans-serif!important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "Fira Sans", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "Fira Sans", sans-serif  !important;\n}\n';case"ptsans":return'\nbody {\n    font-family: "PT Sans", sans-serif!important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "PT Sans", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "PT Sans", sans-serif  !important;\n}\n';case"rubik":return'\nbody {\n    font-family: "Rubik", sans-serif!important;\n    font-size: 16px;\n    font-weight: 500;\n}\ninput,\nselect,\nbutton {\n    font-family: "Rubik", sans-serif !important;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n    font-family: "Rubik", sans-serif  !important;\n}\n';default:return ml}})),hl=function(){var e="dark"===("active"==window.CONFIG_design_dark_theme?"dark":"light")?pl.dark:pl.light,t=window.CONFIG_main_color?window.CONFIG_main_color:"#000",n=window.CONFIG_second_color?window.CONFIG_second_color:"#000";return Object(S.jsx)(Ol,{mainColor:t,secondColor:n,font:window.CONFIG_type_font,colors:e})},vl=n(256),fl=n(474),xl=function(e){var t=e.children,n=window.CONFIG_main_color?window.CONFIG_main_color:"#000",c=window.CONFIG_second_color?window.CONFIG_second_color:"#000",a="active"==window.CONFIG_design_dark_theme?"dark":"light",r=Object(x.useMemo)((function(){return e=a,Object(I.a)({primary:{light:"#757ce8",main:n.match(/#[a-f0-9]{6}\b/gi)?n:"#000",dark:c.match(/#[a-f0-9]{6}\b/gi)?c:"#000",contrastText:"#fff"},secondary:{light:"#ff7961",main:c.match(/#[a-f0-9]{6}\b/gi)?c:"#000",dark:"#ba000d",contrastText:"#000"},white:{main:"#fff",contrastText:"#fff"},vk:{main:"#0177ff"},mode:e},"light"===e?{}:{background:{paper:"#141414"}});var e}),[a]),i=Object(vl.a)({palette:r,typography:{fontFamily:"inherit",button:{textTransform:"none",fontSize:16}},components:{MuiButton:{styleOverrides:{root:{borderRadius:20,padding:"6px 20px !important",boxShadow:"none","&:hover":{boxShadow:"none"}}}},MuiContainer:{styleOverrides:{root:{maxWidth:window.fullWidthSite?"none !important":"1328px !important"}}}},breakpoints:{values:{xs:0,sm:600,md:900,mg:1050,lg:1200,xl:1536,xxl:1750,mobilexs:0,mobilesm:375,mobilemd:600,mobilelg:720,desctop:899}}});return Object(S.jsx)(fl.a,{theme:i,children:t})};V.a.send("VKWebAppInit"),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage("our-mobile-app-check"),y.a.render(Object(S.jsx)(g.a.StrictMode,{children:Object(S.jsx)(P.a,{children:Object(S.jsxs)(xl,{children:[Object(S.jsx)(hl,{}),Object(S.jsx)(Aa,{children:Object(S.jsxs)(w.a,{store:Mi,children:[Object(S.jsx)(ee,{}),Object(S.jsx)(ul,{})]})})]})})}),document.getElementById("root"))}},[[368,1,2]]]);
//# sourceMappingURL=main.04ba2763.chunk.js.map