1(self.webpackChunk=self.webpackChunk||[]).push([[524],{9090:(e,t,n)=>{var o={"./Cart.jsx":9234,"./Order.jsx":8136};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=9090},7690:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});n(2675),n(9463),n(2259),n(5700),n(6280),n(6918),n(3792),n(9572),n(4170),n(2892),n(9904),n(4185),n(875),n(3548),n(287),n(6099),n(825),n(7764),n(2953);var o=n(2891),r=n(6540),i=n(961);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function c(e,t,n){return t=u(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var h,f={};var v=function(){if(h)return f;h=1;var e=i;return f.createRoot=e.createRoot,f.hydrateRoot=e.hydrateRoot,f}(),p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(o=[{key:"connect",value:function(){var e=this.propsValue?this.propsValue:null;if(this.dispatchEvent("connect",{component:this.componentValue,props:e}),!this.componentValue)throw new Error("No component specified.");var t=window.resolveReactComponent(this.componentValue);this._renderReactElement(r.createElement(t,e,null)),this.dispatchEvent("mount",{componentName:this.componentValue,component:t,props:e})}},{key:"disconnect",value:function(){this.permanentValue||(this.element.root.unmount(),this.dispatchEvent("unmount",{component:this.componentValue,props:this.propsValue?this.propsValue:null}))}},{key:"_renderReactElement",value:function(e){var t=this.element;t.root||(t.root=v.createRoot(this.element)),t.root.render(e)}},{key:"dispatchEvent",value:function(e,t){this.dispatch(e,{detail:t,prefix:"react"})}}])&&s(n.prototype,o),i&&s(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,i}(o.xI);p.values={component:String,props:Object,permanent:{type:Boolean,default:!1}};const _={"symfony--ux-react--react":p}},2924:(e,t,n)=>{"use strict";n(6280),n(6918),n(8706),n(1629),n(3792),n(8598),n(2062),n(9432),n(6099),n(7495),n(5440),n(8992),n(3949),n(1454),n(3500),n(2953);var o,r,i;(0,n(3066).E)(void 0);o=n(9090),i={},(r=o).keys().forEach((function(e){i[e]=r(e).default})),window.resolveReactComponent=function(e){var t=i["./".concat(e,".jsx")]||i["./".concat(e,".tsx")];if(void 0===t){var n=Object.keys(i).map((function(e){return e.replace("./","").replace(".jsx","").replace(".tsx","")}));throw new Error('React controller "'.concat(e,'" does not exist. Possible values: ').concat(n.join(", ")))}return t}},9234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var o=n(6540),r=n(3443),i=n(7286),a=(n(4423),n(2062),n(2010),n(9432),n(1699),n(1454),n(4848));function s(){return(0,a.jsxs)("div",{className:"cart__items content",children:[(0,a.jsx)("div",{className:"product__heading",style:{marginBottom:20},children:"ÐоÑзина пÑÑÑа"}),(0,a.jsx)("p",{children:"ÐоÑмоÑÑиÑе пÑÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° главной ÑÑÑаниÑе или воÑполÑзÑйÑеÑÑ ÐºÐ°Ñалогом"})]})}var l=function(e){var t=e.items;return 0===Object.keys(t).length?(0,a.jsx)(s,{}):(0,a.jsx)("div",{className:"cart__items",children:Object.keys(t).map((function(e){return(0,a.jsx)(c,{id:e},e)}))})},c=function(e){var t,n,o=e.id,r=null===i.A||void 0===i.A||null===(t=i.A.info)||void 0===t||null===(t=t.items)||void 0===t?void 0:t[o];if(!r)return(0,a.jsx)(a.Fragment,{});var s=r.product,l=r.cost,c=r.cost_old,d=r.count,u=!1;
1i.A.changedCountItems.includes(s.id)&&(u=!0);var m="item__name";return u&&(m+=" item__name-changed"),(0,a.jsxs)("div",{className:"item",children:[(0,a.jsx)("a",{href:s.url,className:"item__image",target:"_blank",children:(null===(n=s.image)||void 0===n?void 0:n.url)&&(0,a.jsx)("img",{src:s.image.url,alt:s.name})}),(0,a.jsxs)("div",{className:"item__body",children:[(0,a.jsx)("a",{href:s.url,className:m,target:"_blank",children:s.name}),s.size&&(0,a.jsxs)("div",{className:"item__measurements",children:[(0,a.jsx)("span",{children:"РазмеÑ:"})," ",s.size]}),u&&(0,a.jsx)("div",{className:"item__countChanged",children:"ÐалиÑие изменилоÑÑ Ð°Ð²ÑомаÑиÑеÑки"})]}),(0,a.jsx)("div",{className:"item__counter",children:(0,a.jsxs)("div",{className:"product__counter",children:[(0,a.jsx)("div",{className:"minus",onClick:function(){return i.A.handle(o,d.value-1)},children:(0,a.jsx)("svg",{children:(0,a.jsx)("use",{xlinkHref:"/images/sprite.svg#minus"})})}),(0,a.jsx)("div",{className:"count",children:d.value}),(0,a.jsx)("div",{className:"plus",onClick:function(){return i.A.handle(o,d.value+1)},children:(0,a.jsx)("svg",{children:(0,a.jsx)("use",{xlinkHref:"/images/sprite.svg#plus"})})})]})}),(0,a.jsx)("div",{className:"item__price",children:c.value>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:l.displayed}),(0,a.jsx)("div",{className:"item__price_old",children:c.displayed})]}):(0,a.jsx)(a.Fragment,{children:l.displayed})}),(0,a.jsx)("div",{className:"item__remove",onClick:function(){return i.A.remove(o)},children:(0,a.jsx)("svg",{children:(0,a.jsx)("use",{xlinkHref:"/images/sprite.svg#cross"})})})]})},d=(0,r.PA)((function(e){var t,n=e.item;return 0===(null===(t=Object.keys(n.items))||void 0===t?void 0:t.length)?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)("div",{className:"cart__total",children:(0,a.jsxs)("div",{className:"block",children:[(0,a.jsx)("a",{href:n.order_url,className:"site__button",children:"ÐеÑейÑи к оÑоÑмлениÑ"}),(0,a.jsx)("div",{className:"block__text",children:"СпоÑÐ¾Ð±Ñ Ð¾Ð¿Ð»Ð°ÑÑ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ ÑоваÑа можно вÑбÑаÑÑ Ð¿Ñи оÑоÑмлении заказа"}),(0,a.jsxs)("div",{className:"block__total",children:[(0,a.jsxs)("div",{className:"tRow",children:[(0,a.jsx)("div",{className:"tRow__text tRow__text_medium",children:"ÐаÑа коÑзина"}),(0,a.jsx)("div",{className:"tRow__text",children:n.count.displayed})]}),(0,a.jsxs)("div",{className:"tRow",children:[(0,a.jsxs)("div",{className:"tRow__text",children:["ТоваÑÑ (",n.count.value,")"]}),(0,a.jsx)("div",{className:"tRow__text tRow__text_bold",children:n.cost.displayed})]}),n.discount.value>0&&(0,a.jsxs)("div",{className:"tRow",children:[(0,a.jsx)("div",{className:"tRow__text",children:"Скидка"}),(0,a.jsxs)("div",{className:"tRow__text tRow__text_bold",children:["-",n.discount.displayed]})]}),n.discount_promocode.value>0&&(0,a.jsxs)("div",{className:"tRow",children:[(0,a.jsx)("div",{className:"tRow__text",children:"Скидка по пÑомокодÑ"}),(0,a.jsxs)("div",{className:"tRow__text tRow__text_bold",children:["-",n.discount_promocode.displayed]})]})]}),(0,a.jsxs)("div",{className:"tRow",children:[(0,a.jsx)("div",{className:"tRow__total",children:"ÐÑого:"}),(0,a.jsx)("div",{className:"tRow__total",children:n.cost_discount.displayed})]})]})})}));function u(e){var t=(0,r.PA)((function(){return(0,o.useEffect)((function(){i.A.get(!0)}),[]),(0,a.jsxs)("div",{className:"cart__container",children:[i.A.loading&&(0,a.jsx)("div",{className:"smallPreloader",children:(0,a.jsx)("div",{className:"smallPreloader__loader"})}),(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"cart",children:[(0,a.jsx)(l,{items:i.A.info.items}),(0,a.jsx)(d,{item:i.A.info})]})})]})}));return(0,a.jsx)(t,{})}},8136:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});n(6449),n(4423),n(2062),n(3514),n(2010),n(2892),n(9432),n(7495),n(1699),n(5440),n(1454);var o=n(6540),r=n(7286),i=(n(2675),n(9463),n(2259),n(5700),n(6280),n(6918),n(1629),n(3792),n(4114),n(9572),n(4185),n(6099),n(906),n(7764),n(8992),n(3949),n(3500),n(2953),n(7813)),a=n(1083);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,d(o.key),o)}}
1function c(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}const u=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"info",c(c(c(c({name:"",surname:"",phone:"",email:"",deliveryType:null,deliveryMethod:"",paymentType:1,comment:"",address:"",rawAddress:"",place:"",country:"",city:"",street:""},"place",""),"house",""),"block",""),"agreement",!1)),c(this,"deliveriesList",[]),c(this,"paymentsTypes",[]),c(this,"deliveryCost",0),c(this,"paymentError",!1),c(this,"loading",!1),c(this,"outOfStocks",{}),(0,i.l_)(this)},t=[{key:"validateEmail",value:function(e){var t=e.replace(/\s+/g,"");return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}},{key:"handle",value:function(){var e=this,t="hasError";document.querySelectorAll(".".concat(t)).forEach((function(e){return e.classList.remove(t)}));var n=["name","surname","phone","email","agreement"];"courier"===this.info.deliveryMethod&&(n.push("address"),n.push("place"));var o=[];Object.keys(this.info).map((function(t){e.info[t]&&""!==e.info[t]||!n.includes(t)||("address"===t?""===e.info.rawAddress&&o.push(t):o.push(t))}));var s=this.info.phone.replace(/\D/g,"");if(s.length<11&&o.push("phone"),this.validateEmail(this.info.email)||o.push("email"),console.log(this.info),console.log(n),o.length>0)return o.map((function(e){var n=document.querySelector('[data-field="'.concat(e,'"]'));n&&n.classList.add(t)})),void window.scrollTo({top:0,behavior:"smooth"});var l=new FormData;if(l.append("name",this.info.name),l.append("surname",this.info.surname),l.append("phone",s),l.append("email",this.info.email),l.append("comment",this.info.comment),l.append("comment",this.info.comment),l.append("paymentMethod",this.info.paymentType),l.append("receiptMethod",this.info.deliveryType),l.append("deliveryCost",this.deliveryCost),r.A.promocodeExist&&l.append("promocode",r.A.info.promocode),"courier"===this.info.deliveryMethod){var c=this.info.address;""===c&&(c=this.info.rawAddress),l.append("address[full]",c),l.append("address[place]",this.info.place),l.append("address[country]",this.info.country),l.append("address[city]",this.info.city),l.append("address[street]",this.info.street),l.append("address[house]",this.info.house),l.append("address[block]",this.info.block)}this.loading=!0,a.A.post("/api/order/create",l).then((function(t){(0,i.h5)((function(){var n,o;if(e.loading=!1,null!==(n=t.data)&&void 0!==n&&n.error_code)return e.paymentError=!0;if(null!==(o=t.data)&&void 0!==o&&o.redirect_url){var r=t.data.redirect_url;window.location.href=r}}))})).catch((function(t){(0,i.h5)((function(){var n,o;e.outOfStocks=null!==(n=null==t||null===(o=t.response)||void 0===o||null===(o=o.data)||void 0===o||null===(o=o.errors)||void 0===o?void 0:o.out_of_stocks)&&void 0!==n?n:{}})),e.handleError(t),window.scrollTo({top:0,behavior:"smooth"})}))}},{key:"setDeliveryType",value:function(e){this.info.deliveryType=e.id,this.info.deliveryMethod=e.type,this.deliveryCost=e.price}},{key:"setPaymentType",value:function(e){this.info.paymentType=e.id}},{key:"setInfo",value:function(e,t){this.info[e]=t}},{key:"getDeliveriesList",value:function(){var e=this;a.A.get("/api/delivery/list").then((function(t){(0,i.h5)((function(){var n;e.deliveriesList=t.data,null!==(n=t.data)&&void 0!==n&&n[0]&&e.setDeliveryType(t.data[0])}))})).catch((function(t){return e.handleError(t)}))}},{key:"getPaymentsList",value:function(){var e=this;a.A.get("/api/payment/list").then((function(t){(0,i.h5)((function(){var n;e.paymentsTypes=t.data,null!==(n=t.data)&&void 0!==n&&n[0]&&e.setPaymentType(t.data[0])}))})).catch((function(t){return e.handleError(t)}))}},{key:"handleError",value:function(e){var t=this;(0,i.h5)((function(){t.loading=!1,console.log(e)}))}}],t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}());var m=n(3443),h=n(2121),f=n(4848),v=function(e){return(0,f.jsxs)(f.Fragment,{children:[new Intl.NumberFormat("ru-RU").format(e)," ",(0,f.jsx)("i",{children:"â½"})]})};function p(e){var t=(0,m.PA)((function(){var t;return(0,o.useEffect)((function(){var t,n,o,i;u.getDeliveriesList(),u.getPaymentsList(),u.setInfo("phone",null!==(t=null==e?void 0:e.phone)&&void 0!==t?t:""),u.setInfo("email",null!==(n=null==e?void 0:e.email)&&void 0!==n?n:""),u.setInfo("name",null!==(o=null==e?void 0:e.firstname)&&void 0!==o?o:""),u.setInfo("surname",null!==(i=null==e?void 0:e.surname)&&void 0!==i?i:""),r.A.get(!0,!1,!1)}),[]),(0,f.jsxs)("div",{className:"order",children:[(r.A.loading||u.loading)&&(0,f.jsx)("div",{className:"smallPreloader",children:(0,f.jsx)("div",{className:"smallPreloader__loader"})}),(0,f.jsxs)("div",{className:"container",children:[(0,f.jsx)("div",{className:"site__heading site__heading_big",children:"ÐÑоÑмление заказа"}),(0,f.jsxs)("div",{className:"order__info",children:[(0,f.jsxs)("div",{className:"order__info-section",children:[(0,f.jsxs)("div",{className:"order__info-heading",children:[(0,f.jsx)("span",{className:"heading__number",children:"1."}),(0,f.jsx)("span",{children:"ТоваÑÑ Ð² коÑзине"})]}),(0,f.jsx)("div",{className:"order__items",children:Object.keys(r.A.info.items).map((function(e){var t,n,o=r.A.info.items[e],i=o.cost,a=o.cost_old,s=o.count,l=r.A.info.items[e].product,c=Object.keys(u.outOfStocks).includes(String(l.id)),d=null!==(t=c||0===l.amount)&&void 0!==t&&t,m="item",h="ÑÐ¾Ð²Ð°Ñ Ð·Ð°ÐºÐ¾Ð½ÑилÑÑ";if(d&&(m+=" outOfStock"),l.amount<s.value||c){d=!0;var v=l.amount;c&&(v=u.outOfStocks[l.id]),h="налиÑие изменилоÑÑ: ".concat(v," ÑÑ,")}return(0,f.jsxs)("div",{className:m,children:[(0,f.jsx)("a",{href:l.url,className:"item__image",target:"_blank",children:(null===(n=l.image)||void 0===n?void 0:n.url)&&(0,f.jsx)("img",{src:l.image.url,alt:l.name})}),(0,f.jsxs)("div",{className:"item__name",children:[(0,f.jsx)("a",{href:l.url,target:"_blank",children:l.name}),d&&(0,f.jsxs)("div",{className:"outOfStock__reason",style:{fontSize:"12px"},children:[h," ",(0,f.jsx)("a",{href:"/cart",children:(0,f.jsx)("span",{children:"в коÑзин
1Ñ"})})]})]}),(0,f.jsxs)("div",{className:"item__count",children:[s.value," ÑÑ"]}),(0,f.jsxs)("div",{className:"item__prices",children:[(0,f.jsx)("div",{className:"item__price",children:i.displayed}),a.value>0&&(0,f.jsx)("div",{className:"item__price item__price_old",children:a.displayed})]})]},e)}))})]}),(0,f.jsxs)("div",{className:"order__info-section",children:[(0,f.jsxs)("div",{className:"order__info-heading",children:[(0,f.jsx)("span",{className:"heading__number",children:"2."}),(0,f.jsx)("span",{children:"ÐаннÑе полÑÑаÑелÑ"})]}),(0,f.jsxs)("div",{className:"form__fields",children:[(0,f.jsx)("div",{className:"form__input","data-field":"name",children:(0,f.jsx)("input",{type:"text",placeholder:"ÐмÑ*",value:u.info.name,onChange:function(e){return(0,i.h5)((function(){return u.info.name=e.target.value}))}})}),(0,f.jsx)("div",{className:"form__input","data-field":"surname",children:(0,f.jsx)("input",{type:"text",placeholder:"ФамилиÑ*",value:u.info.surname,onChange:function(e){return(0,i.h5)((function(){return u.info.surname=e.target.value}))}})}),(0,f.jsx)("div",{className:"form__input","data-field":"phone",children:(0,f.jsx)("input",{type:"tel2",placeholder:"ТелеÑон*",value:u.info.phone,onChange:function(e){return(0,i.h5)((function(){var t="+",n=e.target.value.replace(/\D/g,"");if(""===n)return e.target.value="+7";if(!n.charAt(1)||9===Number(n.charAt(1))){var o=n.charAt(0);"7"!==o&&(o="7"),n=n.substring(1),t+="".concat(o),n.length>0&&(t+=" ".concat(n.substring(0,3))),n.length>3&&(t+=" ".concat(n.substring(3,6))),n.length>6&&(t+="-".concat(n.substring(6,8))),n.length>8&&(t+="-".concat(n.substring(8,10))),u.info.phone=t}}))}})}),(0,f.jsx)("div",{className:"form__input","data-field":"email",children:(0,f.jsx)("input",{type:"text",placeholder:"ÐлекÑÑÐ¾Ð½Ð½Ð°Ñ Ð¿Ð¾ÑÑа*",value:u.info.email,onChange:function(e){return(0,i.h5)((function(){return u.info.email=e.target.value}))}})})]})]}),(0,f.jsxs)("div",{className:"order__info-section",children:[(0,f.jsxs)("div",{className:"order__info-heading",children:[(0,f.jsx)("span",{className:"heading__number",children:"3."}),(0,f.jsx)("span",{children:"СпоÑоб оплаÑÑ"})]}),(0,f.jsx)("div",{className:"form__radios",children:u.paymentsTypes.map((function(e){var t="payment".concat(e.id),n="label";return u.info.paymentType===e.id&&(n+=" checked"),(0,f.jsxs)(o.Fragment,{children:[(0,f.jsx)("div",{className:"form__radio",children:(0,f.jsxs)("label",{className:n,onClick:function(){return u.setPaymentType(e)},children:[(0,f.jsx)("span",{className:"label__dot"}),(0,f.jsx)("span",{className:"label__text",children:(0,f.jsx)("span",{className:"name",children:e.name})})]})}),"cash"!==e.type&&(0,f.jsx)("div",{className:"form__image",children:(0,f.jsx)("img",{src:"/images/paymentSystems.png",alt:""})})]},t)}))})]}),(0,f.jsxs)("div",{className:"order__info-section",children:[(0,f.jsxs)("div",{className:"order__info-heading",children:[(0,f.jsx)("span",{className:"heading__number",children:"4."}),(0,f.jsx)("span",{children:"СпоÑоб полÑÑениÑ"})]}),(0,f.jsx)("div",{className:"form__radios",children:u.deliveriesList.map((function(e){var t="delivery".concat(e.id),n="label";return u.info.deliveryType===e.id&&(n+=" checked"),(0,f.jsx)("div",{className:"form__radio",children:(0,f.jsxs)("label",{className:n,onClick:function(){return u.setDeliveryType(e)},children:[(0,f.jsx)("span",{className:"label__dot"}),(0,f.jsx)("span",{className:"label__text",children:(0,f.jsx)("span",{className:"name",children:e.name})})]})},t)}))}),(0,f.jsxs)("div",{className:"order__info-fields",children:["courier"===u.info.deliveryMethod&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:"form__input","data-field":"address",children:(0,f.jsx)(h.OO,{token:"bc2a06f8333b1c11e01f280ae5802094754c4dfb",value:u.info.address,inputProps:{placeholder:"ÐдÑÐµÑ Ð´Ð¾ÑÑавки (гоÑод/ÑлиÑа/дом)*",autoComplete:"off",onChange:function(e){(0,i.h5)((function(){u.info.rawAddress=e.target.value,u.info.address=""}))}},count:5,onChange:function(e){var t,n,o,r,a,s,l,c,d,m,h,f;d=null!==(null==e||null===(t=e.data)||void 0===t?void 0:t.city)?e.data.city:null!==(null==e||null===(n=e.data)||void 0===n?void 0:n.settlement_with_type)?e.data.settlement_with_type:e.data.value,m=null!==(null==e||null===(o=e.data)||void 0===o?void 0:o.street_with_type)?e.data.street_with_type:null!==(null==e||null===(r=e.data)||void 0===r?void 0:r.settlement_with_type)?e.data.settlement_with_type:"",null!==(null==e||null===(a=e.data)||void 0===a?void 0:a.house)&&(h=e.data.house),null!==(null==e||null===(s=e.data)||void 0===s?void 0:s.flat)&&(f=e.data.flat);var v=null!==(l=null==e||null===(c=e.data)||void 0===c?void 0:c.country)&&void 0!==l?l:"РоÑÑиÑ";(0,i.h5)((function(){var t,n;u.info.address=e.value,u.info.country=v,u.info.city=d,u.info.street=m,u.info.place=f,u.info.house=h,u.info.block=null!==(t=null==e||null===(n=e.data)||void 0===n?void 0:n.block)&&void 0!==t?t:""}))},filterLocations:[{country:"РоÑÑиÑ"}]})}),(0,f.jsx)("div",{className:"form__input","data-field":"place",children:(0,f.jsx)("input",{type:"text",placeholder:"ÐÐ¾Ð¼ÐµÑ ÐºÐ²Ð°ÑÑиÑÑ/оÑиÑа*",value:u.info.place,onChange:function(e){return(0,i.h5)((function(){return u.info.place=e.target.value}))},autoComplete:"off"})})]}),(0,f.jsx)("div",{className:"form__input",children:(0,f.jsx)("textarea",{placeholder:"ÐомменÑаÑий к Ð·Ð°ÐºÐ°Ð·Ñ (подÑезд, ÑÑаж и дÑ.)",value:u.info.comment,onChange:function(e){return(0,i.h5)((function(){return u.info.comment=e.target.value}))}})})]})]}),(0,f.jsxs)("div",{className:"order__info-section order__info-section_footer",children:[(0,f.jsx)("div",{className:"order__info-heading",children:(0,f.jsx)("span",{children:"ÐÑомокод"})}),(0,f.jsxs)("div",{className:"order__promocode",children:[(0,f.jsxs)("div",{className:"form__input",children:[(0,f.jsx)("input",{type:"text",placeholder:"ÐведиÑе пÑомокод",value:r.A.info.promocode,onChange:function(e){return(0,i.h5)((function(){return r.A.info.promocode=e.target.value}))}}),r.A.promocodeExist?(0,f.jsx)("div",{className:"form__input-text",children:"ÐÑомокод пÑименен"}):(0,f.jsx)("div",{className:"form__input-text form__input-text_error",children:r.A.promocodeError})]}),(0,f.jsx)("div",{className:"site__button site__button_inverted",onClick:function(e){!1===r.A.promocodeExist?r.A.checkPromocode():r.A.removePromocode()},children:!1===r.A.promocodeExist?"ÐÐ ÐÐÐÐÐТЬ":"УÐÐÐÐТЬ"})]}),(null===(t=r.A.info)||void 0===t||null===(t=t.cost)||void 0===t?void 0:t.value)>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:"order__total",children:[(0,f.jsx)("div",{className:"order__total-row order__total-row_wide",children:(0,f.jsx)("div",{className:"order__total-text",children:"ÐÐ°Ñ Ð·Ð°ÐºÐ°Ð·:"})}),(0,f.jsxs)("div",{className:"order__total-row",children:[(0,f.jsx)("div",{className:"order__total-text order__total-text_small",children:"ТоваÑÑ:"}),(0,f.jsx)("div",{className:"order__total-sum order__total-sum_small",children:r.A.info.cost.displayed})]}),u.deliveryCost>0&&(0,f.jsxs)("div",{className:"order__total-row",children:[(0,f.jsx)("div",{className:"order__total-text order__total-text_small",children:"ÐоÑÑавка:"}),(0,f.jsx)("div",{className:"order__total-sum order__total-sum_small",children:v(u.deliveryCost)})]}),(0,f.jsxs)("div",{className:"order__total-row",children:[(0,f.jsx)("div",{className:"order__total-text",children:"ÐÑого:"}),(0,f.jsxs)("div",{className:"order__total-row-prices",children:[(0,f.jsx)("div",{className:"order__total-sum",children:v(r.A.info.cost_discount.value+u.deliveryCost)}),r.A.info.cost.value!==r.A.info.cost_discount.value&&(0,f.jsx)("div",{className:"order__total-old",children:r.A.info.cost.displayed})]})]})]}),(0,f.jsx)("div",{className:"site__button site__button_inverted order__button",onClick:function(){return u.handle()},children:"ÐФÐÐ ÐÐТЬ ÐÐÐÐÐ"}),(0,f.jsxs)("div",{className:"order__agreement","data-field":"agreement",children:[(0,f.jsx)("input",{type:"checkbox",id:"orderAgreement",onChange:function(e){return(0,i.h5)((function(){return u.info.agreement=e.target.checked}))},value:u.info.agreement}),(0,f.jsxs)("label",{htmlFor:"orderAgreement",children:[(0,f.jsx)("span",{className:"checkbox",children:(0,f.jsx)("svg",{children:(0,f.jsx)("use",{xlinkHref:"/images/sprite.svg#chevronDownBold"})})}),(0,f.jsxs)("span",{className:"text",children:["Я пÑоÑиÑал и ÑоглаÑен Ñ Ð¿Ñавилами обÑабоÑки пеÑÑоналÑнÑÑ
даннÑÑ
и ",(0,f.jsx)("a",{href:"/politika-konfidentsialnosti",target:"_blank",children:"полиÑикой конÑиденÑиалÑноÑÑи"})]})]})]}),u.paymentError&&(0,f.jsx)("div",{className:"order__button",children:(0,f.jsx)("div",{className:"form__input-text form__input-text_error",children:"ÐÑоизоÑла оÑибка. ÐопÑобÑйÑе позже"})})]})]})]})]})]})}));return(0,f.jsx)(t,{})}},7286:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(2675),n(9463),n(2259),n(5700),n(6280),n(6918),n(1629),n(3792),n(4114),n(739),n(9572),n(3110),n(2892),n(4185),n(9432),n(6099),n(7764),n(8992),n(3949),n(3500),n(2953);var o=n(7813),r=n(1083);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,l(o.key),o)}}function s(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}const c=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"loading",!0),s(this,"info",{items:{},promocode:""}),s(this,"promocodeError",""),s(this,"promocodeExist",!1),s(this,"changedCountItems",[]),(0,o.l_)(this)},t=[{key:"get",value:function(){var e=this,t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.loading=!0),r.A.get("/cart/detail
1s").then((function(n){e.updateBadgeCount(n.data.count.value),(0,o.h5)((function(){if(e.info=n.data,null===e.info.promocode?e.info.promocode="":e.promocodeExist=!0,e.loading=!1,t){var o,r,i=null!==(o=null===(r=n.data)||void 0===r?void 0:r.items)&&void 0!==o?o:{},a=[];Object.keys(i).forEach((function(t){var n=i[t],o=n.product;o.amount<n.count.value&&(a.push(o.id),e.handle(o.id,o.amount,!1))})),a.length>0&&(e.changedCountItems=a,e.get())}}))}))}},{key:"handle",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];r.A.post("/cart/set",{id:e,count:n}).then((function(e){o&&t.get()}))}},{key:"remove",value:function(e){var t=this;r.A.post("/cart/remove",{id:e}).then((function(e){t.get()}))}},{key:"clear",value:function(){var e=this;r.A.post("/cart/clear").then((function(t){e.get()}))}},{key:"updateBadgeCount",value:function(e){document.querySelector(".header__cart .counter").innerText=e}},{key:"handleError",value:function(e){this.loading=!1,console.log(e)}},{key:"checkPromocode",value:function(){var e=this;""!==this.info.promocode&&(this.loading=!0,r.A.post("/promocode/apply",JSON.stringify({code:this.info.promocode})).then((function(t){(0,o.h5)((function(){!1===t.data.status?(e.promocodeError=t.data.error,e.promocodeExist=!1):e.promocodeExist=!0,e.get(),e.loading=!1}))})).catch((function(t){return e.handleError(t)})))}},{key:"removePromocode",value:function(){var e=this;this.loading=!0,r.A.post("/promocode/cancel").then((function(t){(0,o.h5)((function(){var n;!0===(null===(n=t.data)||void 0===n?void 0:n.status)&&(e.promocodeError="",e.info.promocode="",e.promocodeExist=!1),e.get(),e.loading=!1}))})).catch((function(t){return e.handleError(t)}))}}],t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}())}},e=>{e.O(0,[406],(()=>{return t=2924,e(e.s=t);var t}));e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.