1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3042],{2217:function(e,t,n){n.d(t,{k:function(){return InputCaption}});var r=n(85893),a=n(67294),l=n(93967),i=n.n(l),o=n(82729),u=n(89542),s=n(52015),c=n(86546);function _templateObject(){let e=(0,o._)(["\n color: ",";\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,o._)(["\n color: ",";\n "]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,o._)(["\n color: ",";\n "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,o._)(["\n ",";\n display: block;\n margin-top: 4px;\n text-align: left;\n width: 100%;\n "]);return _templateObject3=function(){return e},e}let d={InputCaption:(0,s.ZP)(u.ZT).withConfig({componentId:"sc-1e1bb8e-0"})(_templateObject3(),e=>{let{$inputCaptionError:t,$inputCaptionDisabled:n}=e;switch(!0){case!!t:return(0,s.iv)(_templateObject(),c.$_.statusError50);case n:return(0,s.iv)(_templateObject1(),c.$_.defaultGray60);default:return(0,s.iv)(_templateObject2(),c.$_.defaultGray60)}})},InputCaption=e=>{let{className:t,captionText:n,errorText:l,disabled:o}=e,u=(0,a.useMemo)(()=>l||n||"",[n,l]);return u?(0,r.jsx)(d.InputCaption,{$inputCaptionError:l,$inputCaptionDisabled:o,className:i()(t),variant:"badge",children:u}):null}},10719:function(e,t,n){n.d(t,{A:function(){return selectPortalParams},E:function(){return selectOpenedPortalByName}});var r=n(77236);let select=e=>e.portal,selectOpenedPortalByName=e=>t=>{var n;return null===(n=select(t))||void 0===n?void 0:n[e]},selectPortalParams=e=>(0,r.Yh)([selectOpenedPortalByName(e)],e=>null==e?void 0:e.params)},36184:function(e,t,n){n.d(t,{CE:function(){return r},Fh:function(){return s},_u:function(){return i},cc:function(){return u},d8:function(){return l},jl:function(){return a},pr:function(){return o}});let r="pre-order",a="pre-order-mutate",l="delivery-address_create_mutate_key",i="want-use-bonuses-mutate",o="legal",u="create-order",s="share-order"},13042:function(e,t,n){n.r(t),n.d(t,{ShareOrderModal:function(){return ShareOrderModal}});var r=n(85893),a=n(67294),l=n(91444),i=n(82580),o=n(97434),u=n(71015),s=n(85642),c=n(54465),d=n(89542),h=n(16310),p=n(52513),m=n(42896),b=n(17425),f=n(52806),v=n(68306),_=n(23513),x=n(71469),O=n(10719),g=n(71261),j=n(98029),C=n(77056),y=n(36184);let useShareOrder=()=>{let{mutateAsync:e,isPending:t}=(0,j.D)({networkMode:"always",mutationKey:[y.Fh],mutationFn:C.E.shareOrder});return{mutateAsync:e,isPending:t}};var E=n(29107),T=n(10055),S=n(2217),M=n(6531),R=n(82729),w=n(52015),$=n(86546);function _templateObject(){let e=(0,R._)(["\n margin-top: 16px;\n margin-bottom: 16px;\n @media "," {\n margin-top: 8px;\n }\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,R._)(["\n margin-bottom: 24px;\n @media "," {\n margin-bottom: 20px;\n }\n "]);return _templateObject1=function(){return e},e}let A={EmailField:w.ZP.div.withConfig({componentId:"sc-5315378a-0"})(_templateObject(),$.j$.SCREEN_MOBILE),Field:w.ZP.div.withConfig({componentId:"sc-5315378a-1"})(_templateObject1(),$.j$.SCREEN_MOBILE)},L=(0,h.Ry)({email:(0,h.Z_)().min(b.il,b.Y3.SHORT_EMAIL_AND_PHONE).required(f.ur.REQUIRED).test("isEmail",f.ur.INCORRECT,e=>!e.length||(0,m.i2)(e||"")),captcha:(0,h.Z_)().required(v.s.REQUIRED)}),ShareOrderModal=()=>{let e=(0,p.T)(),t=(0,p.C)((0,O.A)(x.e.SHARE_ORDER.name)),{sendShareOrder:n}=(0,c.h)(),{order:h}=t,{number:m}=h,b=(0,p.C)(E.tT),{mutateAsync:f}=useShareOrder(),handleShare=async t=>{var a,i;let{email:o,comment:u,captcha:s}=t;m&&(n(Number(m),null!==(i=null===(a=h.status)||void 0===a?void 0:a.code)&&void 0!==i?i:""),await f({orderNumber:m,email:o,comment:u,captcha:s}),e((0,g.VG)(x.e.SHARE_ORDER.name)),e((0,g.VG)(x.e.ACTIONS_ORDER.name)),(0,l.Am)((0,r.jsx)(M.F,{isNeedCloseButton:!0,hasIcon:!1,text:"ÐиÑÑмо Ñ Ð¸Ð½ÑоÑмаÑией о заказе оÑпÑавлено"}),{className:"notification"}))},v=(0,a.useMemo)(()=>{var e;return{email:null!==(e=null==b?void 0:b.email)&&void 0!==e?e:"",comment:"",captcha:""}},[null==b?void 0:b.email]);return(0,r.jsx)(_.$,{title:"ÐоделиÑÑÑÑ Ð·Ð°ÐºÐ°Ð·Ð¾Ð¼",scrollable:!0,adaptive:!0,animated:!0,hasClose:!0,children:(0,r.jsx)(i.J9,{initialValues:v,validationSchema:L,onSubmit:handleShare,validateOnBlur:!0,validateOnChange:!1,children:e=>{let{errors:t,touched:n,setFieldValue:a,isSubmitting:l}=e;return(0,r.jsxs)(i.l0,{children:[(0,r.jsx)(d.ZT,{color:"gray70",children:"Ðа ÑказаннÑй e-mail пÑидÑÑ Ð¿Ð¸ÑÑмо Ñ Ð¸Ð½ÑоÑмаÑией о ваÑем заказе"}),(0,r.jsx)(A.EmailField,{children:(0,r.jsx)(u.Hq,{disabled:l,label:"Email",n
1ame:"email",type:"email"})}),(0,r.jsx)(A.Field,{children:(0,r.jsx)(o.x,{disabled:l,name:"comment",label:"ÐомменÑаÑий",maxLength:100})}),(0,r.jsxs)(A.Field,{children:[(0,r.jsx)(i.gN,{disabled:l,name:"captcha",children:()=>(0,r.jsx)(s.nb,{isError:!!t.captcha&&!!n.captcha,onChange:e=>{a("captcha",e,!1)}})}),!!t.captcha&&n.captcha&&(0,r.jsx)(S.k,{errorText:t.captcha})]}),(0,r.jsx)(T.zx,{isLoading:l,isStretched:!0,isCentred:!0,theme:"primary",type:"submit",children:"ÐоделиÑÑÑÑ Ð·Ð°ÐºÐ°Ð·Ð¾Ð¼"})]})}})})}},97434:function(e,t,n){n.d(t,{x:function(){return FormFieldArea}});var r=n(85893),a=n(67294),l=n(82580),i=n(94153),o=n(42896),u=n(89542),s=n(43726),c=n(2217),d=n(82729),h=n(52015),p=n(24119),m=n(86546);function _templateObject(){let e=(0,d._)(["\n ","\n top: ",";\n z-index: ",";\n left: 12px;\n position: absolute;\n transition: color, font-size ",";\n width: calc(100% - 20px);\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,d._)(["\n top: 12px !important;\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,d._)(["\n background-color: ",";\n border-color: transparent;\n "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,d._)(["\n &&& {\n height: unset;\n min-height: calc(","px - 20px);\n }\n "]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,d._)(["\n &&& {\n overflow: hidden;\n }\n "]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,d._)(["\n ","\n ","\n border: 1px solid ",";\n border-radius: 4px;\n height: calc(100% - 24px);\n left: 0;\n position: absolute;\n top: 0;\n transition: all ",";\n width: 100%;\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,d._)(["\n & ~ "," {\n border: 1px solid ",";\n\n ","\n ","\n }\n\n ~ "," {\n ","\n ","\n }\n\n &:focus {\n & ~ "," {\n border: 2px solid ",";\n }\n }\n "]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,d._)(["\n background: transparent;\n height: calc(80% - 4px);
1\n margin-top: 1px;\n "]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,d._)(["\n height: ","px;\n position: relative;\n width: 100%;\n "]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,d._)(["\n ","\n ","\n \n\n border: none;\n height: calc(100% - ",");\n margin: 32px 12px 12px 10px;\n position: relative;\n resize: none;\n width: calc(100% - 20px);\n z-index: 1;\n\n ","\n\n :focus {\n outline: none;\n\n & ~ "," {\n border: 2px solid ",";\n }\n\n & ~ "," {\n ","\n ","\n }\n }\n\n :disabled {\n background-color: transparent;\n color: ",";\n }\n\n ","\n ","\n ","\n "]);return _templateObject9=function(){return e},e}let b=(0,h.ZP)(u.ZT).withConfig({componentId:"sc-d7d2e21e-0"})(_templateObject(),(0,m.$$)(1),e=>{let{$isStretchable:t}=e;return t?"24px":"11px"},e=>{let{$isStretchable:t}=e;return t?"1":"0"},m.sF.ANIMATION),setMaxTopTextAreaLabel=()=>(0,h.iv)(_templateObject1()),f=h.ZP.div.withConfig({componentId:"sc-d7d2e21e-1"})(_templateObject5(),e=>{let{$isDisabled:t}=e;return t?(0,h.iv)(_templateObject2(),m.$_.additionalGrayBlue20):""},e=>{let{$isStretchable:t,$minHeight:n}=e;return t?(0,h.iv)(_templateObject3(),n):""},e=>{let{$isError:t}=e;return t?m.$_.statusError50:m.$_.defaultGray30},m.sF.ANIMATION),v={TextArea:h.ZP.label.withConfig({componentId:"sc-d7d2e21e-2"})(_templateObject8(),e=>{let{$height:t,$isStretchable:n,$minHeight:r}=e;return n?r:t}),TextAreaOriginal:h.ZP.textarea.withConfig({componentId:"sc-d7d2e21e-3"})(_templateObject9(),p.L.fP("lg"),m.kQ.scrollbar,m.kQ.HEADER_HEIGHT,e=>{let{$hasPaddingTop:t}=e;return t&&"padding-top: 12px;"},f,m.$_.primary30,b,p.L.fPMedium(),setMaxTopTextAreaLabel(),m.$_.defaultGray60,e=>{let{$isFilled:t,$isError:n,$isDisabled:r}=e;return t?(0,h.iv)(_templateObject6(),f,m.$_.primary30,n?"border: 1px solid ".concat(m.$_.statusError50,";"):"",r?"border-color: transparent;":"",b,p.L.fPMedium(),setMaxTopTextAreaLabel(),f,m.$_.primary30):""},e=>{let{$haveNotLabel:t}=e;return t?(0,h.iv)(_templateObject7()):""},e=>{let{$isStretchable:t}=e;return t?(0,h.iv)(_templateObject4()):""}),TextAreaFrame:f,TextAreaLabel:b},_=(0,a.forwardRef)((e,t)=>{var n,l;let{errorText:i,captionText:o,disabled:d,onChange:h,labelText:p,hasCounter:m,maxLength:b,height:f,$isStretchable:_,minHeight:x,...O}=e,[g,j]=(0,a.useState)(!!O.value),C=m&&b?b-(null!==(l=null===(n=O.value)||void 0===n?void 0:n.toString().length)&&void 0!==l?l:0):-1,y=(0,a.useCallback)(e=>{let t=e.target;j(!!t.value),h&&h(e)},[h]),E=(0,a.useCallback)(e=>e===b?"ÐакÑимÑм ".concat(e," ").concat((0,s.Ho)(e,["Ñимвол","Ñимвола","Ñимволов"])):"".concat((0,s.Ho)(e,["ÐÑÑалÑÑ","ÐÑÑалоÑÑ","ÐÑÑалоÑÑ"])," ").concat(e," ").concat((0,s.Ho)(e,["Ñимвол","Ñимвола","Ñимволов"])),[b]);return(0,r.jsxs)(v.TextArea,{$height:f,$minHeight:x,$isStretchable:_,children:[(0,r.jsx)(v.TextAreaOriginal,{$minHeight:x,$height:f,...O,$isFilled:g,$haveNotLabel:!p,$isError:!!i,$isDisabled:!!d,maxLength:b,disabled:d,onChange:y,$isStretchable:_,$hasPaddingTop:!p,ref:t}),(0,r.jsx)(v.TextAreaFrame,{$isError:!!i,$isDisabled:!!d,$isStretchable:_,$minHeight:x}),p&&(0,r.jsx)(v.TextAreaLabel,{color:"gray70",variant:"p",$isStretchable:_,children:p}),m&&C>=0&&!i&&!o&&(0,r.jsx)(u.ZT,{color:"gray70",variant:"p-medium",children:E(C)}),(0,r.jsx)(c.k,{captionText:o,disabled:d,errorText:i})]})}),FormFieldArea=e=>{let{hasCounter:t=!0,name:n,label:u,maxLength:s=i.U,placeholder:c,disabled:d,resizable:h=!1,maxHeight:p=246,minHeight:m=92,isStretchable:b,validateInput:f,focusOnVisible:v}=e,[x,O,g]=(0,l.U$)(n),[j,C]=(0,a.useState)(b?92:146),[y,E]=(0,a.useState)(24),[T,S]=(0,a.useState)(m),M=(0,a.useRef)(null),R=(0,a.useCallback)(()=>{if(h&&M.current){var e,t;C((null===(e=M.current)||void 0===e?void 0:e.scrollHeight)+68),(null===(t=M.current)||void 0===t?void 0:t.scrollHeight)+68>(p||146)?(M.current.style.overflowY="scroll",C(p||146)):M.current.style.overflowY="hidden"}},[p,h]),w=(0,a.useCallback)(e=>{let setTextAreaStretchableWithScroll=()=>{b&&M.current&&(E(192),S(260),M.current.style.overflowY="scroll")};if(b&&M.current){var t,n;let r=null===(t=M.current)||void 0===t?void 0:t.scrollHeight,a=r>216;if("deleteAll"===e&&(S(m),E(24)),"delete"===e){if(a)setTextAreaStretchableWithScroll();else{S(m),E(24),M.current.style.overflowY="scroll";let e=Math.abs(Math.floor(((null===(n=M.current)||void 0===n?void 0:n.scrollHeight)-24)/24));if(E(r),e>0){let t=m+24*e;S(Math.max(t,m))}else S(m);M.current.style.overflowY="hidden"}}else if(a)setTextAreaStretchableWithScroll();else if(r>=y+24){let e=Math.floor((r-y)/24);E(r),S(T+24*e),M.current.style.overflowY="hidden"}}},[b,m,T,y]);(0,a.useEffect)(()=>{M&&h&&R()},[R,h]);let $=(0,a.useCallback)(e=>{let{value:t}=e.target,n=(0,o.cH)(t),r=f&&!f(t);if(r||n)return;g.setError(void 0);let a=x.value;0===t.length&&b?w("deleteAll"):a>t&&b?w("delete"):w(),g.setValue(t),R()},[R,w,x.value,g,b,f]),A=(0,a.useCallback)(()=>{g.setTouched(!0)},[g]);return(0,a.useEffect)(()=>{v&&M.current&&(M.current.focus(),g.setTouched(!0),setTimeout(()=>{var e;null===(e=M.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},500))},[v,g,M]),(0,r.jsx)(_,{minHeight:T,height:j,autoComplete:"none",errorText:O.touched?O.error:"",labelText:u,name:x.name,value:x.value,hasCounter:t,maxLength:s,onChange:$,onBlur:A,placeholder:c,disabled:d,ref:M,$isStretchable:b})}},71015:function(e,t,n){n.d(t,{Hq:function(){return s}});var r=n(85893),a=n(67294),l=n(82580),i=n(42896),o=n(26102),u=n(82641);let isLastKeyDotOrComma=e=>"."===e||","===e,isEmptyValueCondition=e=>{let{formattedValue:t,lastKey:n,canBeFloat:r,disableAutoFormatting:a}=e;return!t&&r&&!a&&isLastKeyDotOrComma(n)},handleEmptyValue=e=>{let{formattedValue:t,prevValue:n}=e;return isEmptyValueCondition(e)?n?n||"":"0":t},handleLeadingZero=e=>{let{formattedValue:t,lastKey:n,canBeFloat:r,disableAutoFormatting:a}=e;return a||!(t.length>=2)||"0"!==t[0]||isLastKeyDotOrComma(n)?t:"".concat(r?parseFloat(t):parseInt(t,10))},handleStartingDot=e=>(null==e?void 0:e.startsWith("."))?"0".concat(e):e,formatValue=e=>{let{formattedValue:t}=e;return t=handleEmptyValue({...e,formattedValue:t}),t=handleStartingDot(t=handleLeadingZero({...e,formattedValue:t}))},capitalizeFirstLetter=e=>e.charAt(0).toUpperCase()+e.slice(1),handleNumberBlur=e=>{let{value:t,prevValue:n,lastKey:r,canBeFloat:a,disableAutoFormatting:l,setValue:i}=e,o=formatValue({formattedValue:t,prevValue:n,lastKey:r,canBeFloat:a,disableAutoFormatting:l});i(o,!1)},handleNameBlur=(e,t,n)=>{if(["author","surname","patronymic"].includes(t)){if(null===e)return;let t=capitalizeFirstLetter(e);n(t,!1)}},s=(0,a.forwardRef)((e,t)=>{let{name:n,label:s,type:c="text",validateInput:d,maxLength:h,hasCounter:p,handleAddBlur:m,disableAutoFormatting:b=!1,canBeFloat:f=!0,onChange:v,..._}=e,{isMobile:x}=(0,o.ZP)(),[O,g,j]=(0,l.U$)(n),C=(0,a.useRef)(null),y=(0,a.useRef)(null),E=(0,a.useCallback)(e=>{let{target:{value:t}}=e;C.current=O.value;let n=y.current;"Backspace"!==n&&("Delete"!==n||b||t||!C.current)||(C.current="");let r=(0,i.cH)(t),a=d&&!d(t);null==v||v(t),a||r||(j.setError(void 0),j.setValue(t,!1))},[O.value,b,d,j,v]),handleRemoveWheel=e=>{e.preventDefault()},T=(0,a.useCallback)(e=>{j.setTouched(!0),"number"===c&&handleNumberBlur({value:O.value,prevValue:C.current,lastKey:y.current,canBeFloat:f,disableAutoFormatting:b,setValue:j.setValue}),handleNameBlur(O.value,n,j.setValue),e.currentTarget.removeEventListener("wheel",handleRemoveWheel),null==m||m(e)},[j,c,m,O.value,f,b,n]);return(0,r.jsx)(u.I,{autoComplete:"none",errorText:g.touched?g.error:"",type:c,labelText:s,name:O.name,value:O.value,onChange:E,onBlur:T,onKeyDown:e=>{let t=e.key;return"Unidentified"===t&&x?y.current=".":y.current=t,!0},onFocus:e=>{"number"===c&&e.currentTarget.addEventListener("wheel",handleRemoveWheel,{passive:!1})},maxLength:h,hasCounter:p,pattern:"number"===c?"d*":void 0,canBeFloat:f,ref:t,onBeforeInput:e=>{"number"!==c||f||". "!==e.data&&", "!==e.data||e.preventDefault()},..._})})},94153:function(e,t,n){n.d(t,{U:function(){return r}});let r=2500},98029:function(e,t,n){n.d(t,{D:function(){return useMutation}});var r=n(67294),a=n(59289),l=n(27037),i=n(7506),o=n(24139),u=class extends i.l{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(t.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#l()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#a(){let e=this.#n?.state??(0,a.R)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){l.V.batch(()=>
1{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context;e?.type==="success"?(this.#r.onSuccess?.(e.data,t,n),this.#r.onSettled?.(e.data,null,t,n)):e?.type==="error"&&(this.#r.onError?.(e.error,t,n),this.#r.onSettled?.(void 0,e.error,t,n))}this.listeners.forEach(e=>{e(this.#t)})})}},s=n(30202),c=n(86290);function useMutation(e,t){let n=(0,s.NL)(t),[a]=r.useState(()=>new u(n,e));r.useEffect(()=>{a.setOptions(e)},[a,e]);let i=r.useSyncExternalStore(r.useCallback(e=>a.subscribe(l.V.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=r.useCallback((e,t)=>{a.mutate(e,t).catch(c.Z)},[a]);if(i.error&&(0,c.L)(a.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}},86290:function(e,t,n){function shouldThrowError(e,t){return"function"==typeof e?e(...t):!!e}function noop(){}n.d(t,{L:function(){return shouldThrowError},Z:function(){return noop}})}}]);
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.