1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86],{2485:(e,s,r)=>{r.d(s,{Body1MediumUi:()=>u,Body1RegularUi:()=>m,H1Ui:()=>a,H2Ui:()=>l,H3:()=>n.H3,H4:()=>n.H4,S:()=>p,dd:()=>o,e1:()=>i,jL:()=>c,pB:()=>d,vZ:()=>x,wx:()=>h,z4:()=>g});var t=r(54568),n=r(52237);function a({children:e,className:s,as:r}){return(0,t.jsx)(n.H1,{className:s,children:e})}function l({children:e,className:s,as:r}){return(0,t.jsx)(n.H2,{as:r,className:s,children:e})}function i({children:e,className:s,as:r}){return(0,t.jsx)(n.H3,{as:r,className:s,children:e})}function o({children:e,className:s,as:r}){return(0,t.jsx)(n.H4,{as:r,className:s,children:e})}function c({children:e,className:s,as:r}){return(0,t.jsx)(n.RN,{as:r,className:s,children:e})}function d({children:e,className:s,as:r}){return(0,t.jsx)(n.dQ,{as:r,className:s,children:e})}function m({children:e,className:s,as:r}){return(0,t.jsx)(n.Om,{as:r,className:s,children:e})}function x({children:e,className:s,as:r}){return(0,t.jsx)(n.i$,{as:r,className:s,children:e})}function u({children:e,className:s,as:r}){return(0,t.jsx)(n.zy,{as:r,className:s,children:e})}function h({children:e,className:s,as:r}){return(0,t.jsx)(n.oE,{as:r,className:s,children:e})}function p({children:e,className:s,as:r}){return(0,t.jsx)(n.C3,{as:r,className:s,children:e})}function g({children:e,className:s,as:r}){return(0,t.jsx)(n.JU,{as:r,className:s,children:e})}},5574:(e,s,r)=>{r.d(s,{G:()=>a,U:()=>n});var t=r(86362);async function n(e){return(await t.A.post("/reviews/public",e)).data}async function a(e){return(await t.A.get("/reviews",{params:e})).data}},30092:(e,s,r)=>{r.d(s,{Fn:()=>t,OT:()=>a,ds:()=>n});let t=new(r(24737)).i({modals:[]}),n=e=>{t.setState(s=>({...s,modals:[...s.modals,e]}))},a=()=>{t.setState(e=>({...e,modals:e.modals.slice(0,e.modals.length-1)}))}},86362:(e,s,r)=>{r.d(s,{A:()=>x});var t=r(96056),n=r(21153);r(15917);var a=r(62090);r(63680).env.JWTRERFRESHTOKENKEY,(0,a.A)({name:"Credentials",credentials:{email:{label:"email",type:"text",placeholder:"jsmith"},password:{label:"Password",type:"password"},accessToken:{type:"text"},refreshToken:{type:"text"}},async authorize(e,s){if(e?.accessToken&&e?.refreshToken){console.log("Ð¡Ð¾Ñ Ð²Ñ
од ÑеÑез accessToken + refreshToken");let s=await fetch("https://frizar.ru/bff/api/user",{headers:{Authorization:`Bearer ${e.accessToken}`}});if(!s.ok)return null;let r=await s.json();return console.log("USER Yandex",r),{user:r,backendTokens:{accessToken:e.accessToken,refreshToken:e.refreshToken}}}if(!e?.email||!e?.password)return null;let{email:r,password:t}=e,n=await fetch("https://frizar.ru/bff/api/auth/login",{method:"POST",body:JSON.stringify({email:r,password:t}),headers:{"Content-Type":"application/json"}});return 404==n.status||401==n.status?(console.log(n.statusText),null):await n.json()}});let l=t.A.create({baseURL:"https://frizar.ru/bff/api"});async function i(){try{let e=await (0,n.getSession)();return e?.backendTokens??null}catch(e){return console.error("Error getting session tokens:",e),null}}l.interceptors.request.use(async e=>{let s=await i(),r=s?.accessToken;return r&&(e.headers.Authorization=`Bearer ${r}`),e});let o=null;async function c(e){return o||(o=(async()=>{try{let s=await fetch("https://frizar.ru/bff/api/auth/refresh",{method:"POST",headers:{authorization:`Refresh ${e}`}});if(!s.ok)return null;let r=await s.json();return r?.accessToken??null}catch(e){return console.error("axios refresh error:",e),null}finally{setTimeout(()=>{o=null},0)}})())}let d=!1;function m(){if(d)return;d=!0;let e=window.location.pathname+window.location.search,s=e.startsWith("/signin")||e.startsWith("/auth-social");(0,n.signOut)({callbackUrl:s?"/":`/signin?callbackUrl=${encodeURIComponent(e)}`})}l.interceptors.response.use(e=>e,async e=>{let s=e?.config;if(401!==e?.response?.status||!s||s._retry)return Promise.reject(e);let r=await i(),t=r?.refreshToken;if(!t)return m(),Promise.reject(e);let n=await c(t);return n?(s._retry=!0,s.headers={...s.headers??{},Authorization:`Bearer ${n}`},l(s)):(m(),Promise.reject(e))});let x=l},90086:(e,s,r)=>{r.d(s,{Mr:()=>_,l$:()=>J,ve:()=>D,ab:()=>C,Gc:()=>R,Ey:()=>H,Zk:()=>E});var t=r(54568),n=r(30092),a=r(31340),l=r(26398),i=r(13106),o=r(20040),c=r(55549),d=r(4921),m=r(69507),x=r(81842),u=r(42584),h=r(81627),p=r(50063),g=r(57372),j=r.n(g),f=r(19053),b=r(86362);async function v(e){return b.A.post("/webhooks/bx-create-lead-v1",e)}var N=r(21153),y=r(7620);r(34558);let w=h.Ikc({title:h.YjP().optional(),type:h.YjP().optional(),info:h.Ikc({page:h.YjP().optional(),product:h.YjP().optional()}).optional(),name:h.YjP().min(2,"ÐведиÑе имÑ"),phone:h.YjP().min(10,"ÐведиÑе коÑÑекÑнÑй ÑелеÑон"),email:h.YjP().email("ÐведиÑе коÑÑекÑнÑй email"),message:h.YjP().min(1,"ÐÑÑавÑÑе комменÑаÑий"),consent:h.zMY().refine(e=>e,{message:"ÐеобÑ
одимо ÑоглаÑие"})}),k=async e=>{try{return(await v(e)).data}catch(e){throw(0,o.$U)({color:"danger",title:"ЧÑо-Ñо поÑло Ð
1½Ðµ Ñак"}),e}};function T({prevMessage:e,title:s="ФоÑма обÑаÑной ÑвÑзи",info:r,onSuccess:a,onError:l}){let{data:i}=(0,N.useSession)(),[h,g]=(0,y.useState)(!1),b=(0,y.useRef)(null),{register:v,handleSubmit:T,setValue:C,watch:O,formState:{errors:z}}=(0,u.mN)({resolver:(0,p.u)(w),defaultValues:{title:s,type:"feedback",info:r,name:i?.user?.firstName??"",phone:i?.user?.telephone??"",email:i?.user?.email??"",message:e||"",consent:!1}}),$=(0,f.n)({mutationFn:k,onSuccess:()=>{(0,o.$U)({color:"success",title:"ФоÑма оÑпÑавлена!"}),a&&a(),(0,n.OT)()},onError:e=>{l&&l(e)}}),F={inputWrapper:"bg-white border-1 border-default-200 data-[hover=true]:border-default-400 rounded-xl focus-within:border-[#3C569F] focus-within:ring-1 focus-within:ring-[#3C569F]",label:"text-foreground",input:"text-text-black placeholder:text-text-gray focus:text-text-black",errorMessage:"text-danger text-sm"};return(0,t.jsxs)("form",{onSubmit:T(e=>{$.mutate(e)}),className:"p-4 flex flex-col gap-4",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-text-black",children:s}),(0,t.jsx)(c.r,{label:"ÐмÑ",...v("name"),isInvalid:!!z.name,errorMessage:z.name?.message,color:z.name?"danger":"default",variant:"bordered",classNames:F}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("div",{ref:b,className:`react-tel-input ${z.phone?"has-error":""} ${h?"focused":""}`,children:(0,t.jsx)(j(),{country:"ru",value:O("phone"),onChange:e=>C("phone",e),onFocus:()=>{g(!0)},onBlur:()=>{g(!1)},inputClass:"!w-full !h-11 !pl-12 !text-base border-1 border-default-200 !hover:border-default-400 !text-text-black !placeholder:text-text-gray !rounded-xl focus:!border-[#3C569F] focus:!ring-1 focus:!ring-[#3C569F]"})}),z.phone&&(0,t.jsx)("p",{className:"text-danger text-sm mt-1",children:z.phone.message})]}),(0,t.jsx)(c.r,{label:"Email",...v("email"),isInvalid:!!z.email,errorMessage:z.email?.message,color:z.email?"danger":"default",variant:"bordered",classNames:F}),(0,t.jsx)(d.P,{label:"ÐÑÑавÑÑе комменÑаÑий",...v("message"),isInvalid:!!z.message,errorMessage:z.message?.message,color:z.message?"danger":"default",minRows:3,variant:"bordered",classNames:{inputWrapper:"bg-white border-1 border-default-200 data-[hover=true]:border-default-400 rounded-xl focus-within:border-[#3C569F] focus-within:ring-1 focus-within:ring-[#3C569F]",label:"text-foreground",input:"text-text-black placeholder:text-text-gray focus:text-text-black"}}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)(m.A,{tabIndex:-1,...v("consent"),isInvalid:!!z.consent,color:z.consent?"danger":"default",classNames:{base:"items-start",wrapper:"mt-0.5 border-1 border-default-200 bg-white rounded",label:"text-foreground text-sm cursor-pointer select-none",icon:"rounded-none"},children:["ÐÐ°Ñ ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ Ð² ÑооÑвеÑÑÑвии Ñ"," ",(0,t.jsx)("a",{href:"https://frizar.ru/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline hover:opacity-80",onClick:e=>e.stopPropagation(),children:"ÐолиÑикой конÑиденÑиалÑноÑÑи"})," ","(152-ФРРФ)"]}),z.consent&&(0,t.jsx)("p",{className:"text-danger text-sm mt-1 ml-7",children:z.consent.message})]}),(0,t.jsx)(x.T,{type:"submit",color:"primary",isLoading:$.isPending,className:"w-full py-4 font-medium rounded-xl md:hover:bg-[#051645] transition-colors duration-300",children:"ÐÑпÑавиÑÑ"})]})}function C(){(0,n.ds)((0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(T,{title:"ФоÑма обÑаÑной ÑвÑзи",info:{page:""}})})})})})}))}var O=r(80827),z=r.n(O),$=r(20591),F=r(77851),P=r(2485);let S=({rating:e,onRatingChange:s,size:r="md"})=>{let n={sm:"w-6 h-6",md:"w-8 h-8"};return(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[[1,2,3,4,5].map(a=>(0,t.jsx)("button",{type:"button",onClick:()=>s(a),className:z()(n[r],"rounded-sm transition-colors hover:scale-110",a<=e?"text-yellow-400":"bg-gray-200 hover:bg-gray-300"),children:(0,t.jsx)($.I,{name:a<=e?"star-active":"star",className:"w-6 h-6"})},a)),(0,t.jsxs)("span",{className:"ml-3 text-lg font-semibold text-text-primary",children:[e," из 5"]})]})},U=({isOpen:e,onClose:s,onSubmit:r,productName:n="",className:a})=>{let[l,i]=(0,y.useState)({rating:0,text:"",pros:"",cons:"",name:"",email:"",consent:!1}),[o,u]=(0,y.useState)({}),h=(e,s)=>{i(r=>({...r,[e]:s})),void 0!==o[e]&&u(s=>({...s,[e]:void 0}))};return e?(0,t.jsx)("div",{className:a,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-6 pl-0 border-b border-gray-200",children:(0,t.jsx)(P.e1,{children:"ÐÑзÑв"})}),(0,t.jsxs)("form",{onSubmit:e=>{let t;e.preventDefault(),t={},l.rating||(t.rating=0),l.text.trim()||(t.text=""),l.name.trim()||(t.name=""),l.email.trim()||(t.email=""),l.consent||(t.consent=!0),u(t),0===Object.keys(t).length&&(r(l),i({rating:0,text:"",pros:"",cons:"",name:"",email:"",consent:!1}),u({}),s())},className:"mt-6",children:[n&&(0,t.jsxs)("div",{children:[(0,t.jsx)(P.z4,{className:"block mb-2",children:"ТоваÑ"}),(0,t.jsx)(P.Body1RegularUi,{className:"text-text-primary",children:(0,F.jT)(n)})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(P.z4,{className:"block mb-3",children:"ÐаÑа оÑенка"}),(0,t.jsx)(S,{rating:l.rating,onRatingChange:e=>h("rating",e),size:"md"}),void 0!==o.rating&&(0,t.jsx)("p",{className:"text-red-500 text-sm mt-1",children:"ÐожалÑйÑÑа, поÑÑавÑÑе оÑенкÑ"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(P.z4,{className:"block mb-2",children:["ÐÑзÑв ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)(d.P,{value:l.text,onChange:e=>h("text",e.target.value),minRows:5,placeholder:"РаÑÑкажиÑе о ваÑем опÑÑе иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ ÑоваÑа...",isInvalid:void 0!==o.text,errorMessage:void 0!==o.text?"ÐожалÑйÑÑа, напиÑиÑе оÑзÑв":void 0,className:"w-full"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(P.z4,{className:"block mb-2",children:"ÐоÑÑоинÑÑва"}),(0,t.jsx)(c.r,{type:"text",value:l.pros,onChange:e=>h("pros",e.target.value),placeholder:"ЧÑо вам понÑавилоÑÑ Ð² ÑоваÑе?"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(P.z4,{className:"block mb-2",children:"ÐедоÑÑаÑки"}),(0,t.jsx)(c.r,{type:"text",value:l.cons,onChange:e=>h("cons",e.target.value),placeholder:"ЧÑо можно ÑлÑÑÑиÑÑ?"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(P.z4,{className:"block mb-2",children:["ÐÐ¼Ñ ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)(c.r,{type:"text",value:l.name,onChange:e=>h("name",e.target.value),placeholder:"ÐаÑе имÑ",isInvalid:void 0!==o.name,errorMessage:void 0!==o.name?"ÐожалÑйÑÑа, ÑкажиÑе имÑ":void 0})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(P.z4,{className:"block mb-2",children:["Email ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)(c.r,{type:"email",value:l.email,onChange:e=>h("email",e.target.value),placeholder:"[email protected]",isInvalid:void 0!==o.email,errorMessage:void 0!==o.email?"ÐожалÑйÑÑа, ÑкажиÑе email":void 0})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)(m.A,{isSelected:!!l.consent,onValueChange:e=>h("consent",e),isInvalid:void 0!==o.consent,color:o.consent?"danger":"default",classNames:{base:"items-start",wrapper:"mt-0.5 border-1 border-default-200 bg-white",label:"text-foreground text-sm cursor-pointer select-none"},children:["ÐÐ°Ñ ÑоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ Ð² ÑооÑвеÑÑÑвии Ñ"," ",(0,t.jsx)("a",{href:"https://frizar.ru/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline hover:opacity-80",onClick:e=>e.stopPropagation(),children:"ÐолиÑикой конÑиденÑиалÑноÑÑи"})," ","(152-ФРРФ)"]}),void 0!==o.consent&&(0,t.jsx)("p",{className:"text-red-500 text-sm mt-1 ml-7",children:"ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑоглаÑие"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsx)(x.T,{type:"submit",color:"primary",className:"w-full",children:(0,t.jsx)(P.S,{children:"ÐÑпÑавиÑÑ Ð¾ÑзÑв"})}),(0,t.jsx)(x.T,{type:"button",onPress:s,color:"danger",children:(0,t.jsx)(P.S,{children:"ÐÑмена"})})]})]})]})}):null};var Y=r(5574),I=r(63680);function E({product:e}){(0,n.ds)((0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:s=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(T,{prevMessage:`ХоÑÑ Ð´ÐµÑевле ${(0,F.jT)(e.name)} - ${e.prices.adjustedPrice} ÑÑб 2СÑÑлка на ÑоваÑ: `,title:"ХоÑÑ Ð´ÐµÑевле",info:{page:`${I.env.NEXT_PUBLIC_SITE_URL}/product/${e.code}`,product:(0,F.jT)(e.name)}})})})})})})),(0,n.ds)((0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:e=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)("span",{className:"text-base font-semibold",children:"УкажиÑе ÑÑÑÐ»ÐºÑ Ð½Ð° ÑоваÑ, в коÑоÑом вам пÑедлагаÑÑ Ð±Ð¾Ð»ÐµÐµ низкÑÑ ÑенÑ"})})})})})}))}function _({product:e}){(0,n.ds)((0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:s=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(T,{prevMessage:`ÐÑÑÑÑÑй заказ ${(0,F.jT)(e.name)}`,title:"ÐаказаÑÑ Ð² 1 клик",info:{page:`${I.env.NEXT_PUBLIC_SITE_URL}/product/${e.code}`,product:(0,F.jT)(e.name)}})})})})})}))}function R({product:e,onSubmit:s}){(0,n.ds)((0,t.jsx)(a.Y,{size:"lg",scrollBehavior:"inside",placement:"center",classNames:{base:"max-h-[90vh]",
2wrapper:"overflow-hidden"},isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:r=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(U,{isOpen:!0,onClose:()=>(0,n.OT)(),onSubmit:async r=>{try{await (0,Y.U)({item_key:e.item_key||e._id,rating:r.rating,text:r.text,pros:r.pros,cons:r.cons,name:r.name,email:r.email}),(0,o.$U)({description:"ÐÑзÑв оÑпÑавлен на модеÑаÑиÑ",color:"success"})}catch{(0,o.$U)({description:"Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ Ð¾ÑзÑв. ÐопÑобÑйÑе позже",color:"danger"})}s&&await s(r)},productName:(0,F.jT)(e.name)})})})})}))}var M=r(53518),A=r(65587),B=r.n(A);function H(e){(0,n.ds)((0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,size:"xl",onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:(0,t.jsx)(i.h,{children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 items-center justify-center bg-white rounded h-[400px] px-6",children:[(0,t.jsx)(M.WDg,{className:"bg-green-600 rounded-full",size:80,color:"white"}),(0,t.jsx)("div",{className:"flex flex-col justify-center items-center mt-3",children:(0,t.jsxs)("span",{className:"text-[26px] font-bold text-green-600 text-center",children:["ÐÐ°Ñ Ð·Ð°ÐºÐ°Ð· â",e.orderNumber," ÑÑпеÑно оÑоÑмлен"]})}),(0,t.jsxs)("p",{className:"text-[14px] text-text-gray text-center leading-relaxed",children:["ЧÑо Ð±Ñ ÑкаÑаÑÑ ÑÑÑÑ Ð½Ð° оплаÑÑ Ð¸Ð»Ð¸ поÑмоÑÑеÑÑ Ð¿Ð¾Ð´ÑобноÑÑи Ñделки пеÑейдиÑе в"," ",(0,t.jsx)(B(),{href:`/personal/orders/${e.orderId}`,className:"text-text-black font-medium hover:text-secondary-main transition-colors duration-200",onClick:()=>(0,n.OT)(),children:"деÑали заказа"}),"."]})]})})})})}))}function L({product:e}){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:s=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(T,{prevMessage:`УÑоÑнение ÑÐµÐ½Ñ ${e.name}`,title:"УÑоÑнение ÑенÑ",info:{page:`https://frizar.ru/product/${e.code}`,product:(0,F.jT)(e.name)}})})})})})})}function W({product:e}){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.Y,{isOpen:!0,onClose:()=>(0,n.OT)(),children:(0,t.jsx)(l.g,{children:s=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(i.h,{children:(0,t.jsx)(T,{prevMessage:`УÑоÑнение колиÑеÑÑва ${e.name}`,title:"УÑоÑнение колиÑеÑÑва",info:{page:`https://frizar.ru/product/${e.code}`,product:e.name}})})})})})})}function J({product:e}){(0,n.ds)((0,t.jsx)(L,{product:e}))}function D({product:e}){(0,n.ds)((0,t.jsx)(W,{product:e}))}}}]);
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.