1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9315],{25368:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/store",function(){return i(30082)}])},39608:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var s=i(96540);let l=e=>{let t=(0,s.useRef)(new Map),i=(0,s.useRef)(new Map),l=(0,s.useRef)(null);return(s,r)=>{r?(i.current.has(s.id)||t.current.set(s.id,s),i.current.set(s.id,s)):(t.current.delete(s.id),i.current.delete(s.id)),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{t.current.size>0&&(e(Array.from(t.current.values()).sort((e,t)=>e.position-t.position)),t.current=new Map)},2e3)}}},47633:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>o,I3:()=>a,IK:()=>r,IN:()=>l,u5:()=>n});var s=i(47819);function l(e){return{type:"FETCH_EST_ACCESS",payload:e}}function r(e){return{type:"FETCH_EST_PURCHASES",payload:e}}function o(e){return{type:"FETCH_EST_SHOP",payload:e}}function a(e){return{type:"FETCH_EST_TARIFF",payload:e}}function n(e,t,i){let a=i&&(null==i?void 0:i.virtual)===!1,n="".concat(e).concat(s.PI.estAccess).concat(t),c="".concat(e).concat(s.PI.estPurchases).concat(t),d="".concat(e).concat(s.PI.estShop).concat(t);return e=>{let t=[];return t.push(fetch(n,{credentials:"include"}).then(e=>e.json()).then(t=>e(l(t))).catch(t=>e(l(t)))),a&&t.push(fetch(c,{credentials:"include"}).then(e=>e.json()).then(t=>e(r(t))).catch(t=>e(r(t)))),t.push(fetch(d,{credentials:"include"}).then(e=>e.json()).then(t=>e(o(t))).catch(t=>e(o(t)))),Promise.all(t)}}},30082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>H});var s=i(74848),l=i(96540),r=i(74368),o=i(9523),a=i.n(o),n=i(46942),c=i.n(n),d=i(31083),_=i(2318),u=i(35296),v=i(41364),h=i(29965),m=i.n(h),p=i(47819),S=i(47633),b=i(91106),g=i.n(b),j=i(86715),x=i.n(j),E=i(30291),f=i(97461),y=i(40094),C=i(39608);let N=[{value:"ALL",label:"ÐÑе",bai:"store"},{value:"MOVIES",label:"ФилÑмÑ",bai:"store_movies"},{value:"SERIES",label:"СеÑиалÑ",bai:"store_series"}],P=Array.from(Array(8).keys()),A=e=>{var t,i,l;let{visibilityRef:r,data:o,index:n,apiUrl:d,purchased:_,deviceSize:v,access:h,authData:p}=e,S=!(null==p?void 0:p.profile_for_child)&&(null==p?void 0:p.current_country_code)==="RU"&&(null==o?void 0:null===(t=o.badges)||void 0===t?void 0:t.find(e=>"est"===e.type)),b=null==_?void 0:null===(i=_.items)||void 0===i?void 0:i.find(e=>e.id===o.id),j="desktop_web"===v,x="tablet_web"===v,E=(0,u.RE)(o,h).getCheckEstAvailable();return(0,s.jsxs)(g(),{href:"/watch/".concat(o.alias),className:a().card,ref:r,children:[(0,s.jsxs)("div",{className:a().poster,children:[(0,s.jsx)(m(),{loader:u.R2,src:"".concat(d).concat(j?o.horizontal:o.vertical),alt:"poster",width:j?312:x?126:104,height:j?176:x?240:156,placeholder:"blur",blurDataURL:j?"/static/images/store/horizontal.svg":"/static/images/store/vertical.svg"}),o.rating_start?(0,s.jsx)("div",{className:c()(a().rating,{[a().high]:o.rating_start>=7}),children:(0,u.bH)(o.rating_start)}):null,E&&!b&&(null==S?void 0:S.text)&&(null==S?void 0:S.background_color)?(0,s.jsx)("div",{className:a().price,style:{color:null==S?void 0:S.text_color,backgroundColor:null==S?void 0:S.background_color},children:null==S?void 0:S.text}):null]}),(0,s.jsx)("div",{className:a().title,children:o.title}),(0,s.jsx)("div",{className:a().genres,children:null==o?void 0:null===(l=o.genres)||void 0===l?void 0:l.slice(0,2).map(e=>e.title).join(", ")})]},"".concat(o.id,"_").concat(n))},R=()=>(0,s.jsxs)("div",{className:a().stab,children:[(0,s.jsx)("div",{className:a().stab__image}),(0,s.jsx)("div",{className:a().stab__title}),(0,s.jsx)("div",{className:a().stab__genre})]}),I=e=>{let{tab:t}=e,i="";switch(t){case"MOVIES":i="ФилÑÐ¼Ñ Ð¿Ð¾ÑвÑÑÑÑ ÑовÑем ÑкоÑо";break;case"SERIES":i="СеÑÐ¸Ð°Ð»Ñ Ð¿Ð¾ÑвÑÑÑÑ ÑовÑем ÑкоÑо";break;default:i="ФилÑÐ¼Ñ Ð¸\xa0ÑеÑÐ¸Ð°Ð»Ñ Ð¿Ð¾ÑвÑÑÑÑ ÑовÑем ÑкоÑо"}return(0,s.jsxs)("div",{className:a().error,children:[(0,s.jsx)("img",{src:"/static/images/store/not_found.png",alt:"not_fond",className:a().error__not}),(0,s.jsx)("div",{className:a().error__title,children:"Ðока ниÑего неÑ"}),(0,s.jsx)("div",{className:a().error__description,dangerouslySetInnerHTML:{__html:i}})]})},k=e=>{var t,i,o,n,u,h,m,b,g,j;let{shop:k,error:w}
1=e,H=(0,v.rD)(),U=(0,v.RP)(),O=(0,r.wA)(),L=(0,v.jo)(),T=(0,r.d4)(e=>e.est.access),M=(0,r.d4)(e=>e.est.estPurchased),z=(0,r.d4)(e=>e.registration.authData),G=(0,r.d4)(e=>e.systemInformation.deviceSize),[F,D]=(0,l.useState)("ALL"),[V,Y]=(0,l.useState)(N),[W,X]=(0,l.useState)(M),[$,J]=(0,l.useState)(k),[K,q]=(0,l.useState)(!1),[B,Q]=(0,l.useState)(w),[Z,ee]=(0,l.useState)(!1),et=[{title:"Ðагазин",name:"Ðагазин"}];(0,l.useEffect)(()=>{z&&((null==z?void 0:z.profile_for_child)||(null==z?void 0:z.current_country_code)!=="RU")&&x().push("/"),M||!z||(null==z?void 0:z.virtual)?V.find(e=>"PURCHASES"===e.value)&&Y(N):fetch("".concat(H).concat(p.PI.estPurchases).concat(U),{credentials:"include"}).then(e=>e.json()).then(e=>{var t;O((0,S.IK)(e)),X(e),!V.find(e=>"PURCHASES"===e.value)&&(null==e?void 0:null===(t=e.items)||void 0===t?void 0:t.length)&&Y([...V,{value:"PURCHASES",label:"ÐокÑпки",bai:"store_purchases"}])})},[M,z]);let ei=()=>{if("PURCHASES"!==F){let e="MOVIES"===F?"movie":"SERIES"===F?"series":null;fetch("".concat(H).concat(p.PI.estShop).concat(U,"&type=est").concat(e?"&product_cls=".concat(e):""),{credentials:"include",method:"GET"}).then(e=>{e.status<400?e.json().then(e=>{J(e),ee(!1)}):(Q(!0),ee(!1))});return}"PURCHASES"===F&&B&&Q(!1),ee(!1)},es=(0,C.$)(e=>{let t=V.find(e=>e.value===F);L({action_id:"collection_view",action_result:e.map(e=>e.position),action_attributes_str:e.map(e=>e.content.id),action_attributes_num:1,screen_type:"category",screen_attributes_id:"store",block_type:"collection",block_attributes_id:null==t?void 0:t.bai})});return(0,l.useEffect)(()=>{ee(!0),ei()},[F]),(0,s.jsxs)("div",{className:a().shop,children:[(0,s.jsx)(E.A,{title:"ÐагаÐ
1·Ð¸Ð½",breadCrumbs:et}),(0,s.jsx)("div",{className:a().shop__breadcrumbs,children:(0,s.jsx)(d.A,{breadcrumbs:et})}),(0,s.jsx)("h1",{children:"Ðагазин"}),"mobile_web"!==G?(0,s.jsx)("div",{className:a().subtitle,children:"ÐокÑпайÑе ÑилÑÐ¼Ñ Ð¸\xa0ÑеÑиалÑ, коÑоÑÑе оÑÑанÑÑÑÑ Ñ\xa0ваÑ\xa0навÑегда"}):null,(0,s.jsx)(_.I,{items:V,value:F,onChange:e=>{let t=V.find(t=>t.value===e);t&&(D(e),L({action_id:"click",screen_type:"category",screen_attributes_id:"store",element_type:"tab",element_attributes_id:t.value.toLowerCase(),element_attributes_text:t.label}))},size:"large",view:"brand"}),("PURCHASES"!==F||(null==W?void 0:null===(t=W.items)||void 0===t?void 0:t.length))&&("PURCHASES"===F||(null==$?void 0:null===(i=$.items)||void 0===i?void 0:i.length))&&!B?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:c()(a().content,{[a().empty]:("MOVIES"===F||"SERIES"===F)&&!(null===(o=$.items)||void 0===o?void 0:o.length)||"PURCHASES"===F&&!(null==W?void 0:null===(n=W.items)||void 0===n?void 0:n.length)}),children:["PURCHASES"!==F&&(null===(u=$.items)||void 0===u?void 0:u.length)&&!Z&&(null===(h=$.items)||void 0===h?void 0:h.map((e,t)=>(0,s.jsx)(y.pL,{threshold:1,triggerOnce:!1,onChange:i=>{es({id:"store:".concat(e.id),content:e,position:t+1},i)},children:i=>{let{ref:l}=i;return(0,s.jsx)(A,{visibilityRef:l,data:e,index:t,apiUrl:H,purchased:W,deviceSize:G,access:T,authData:z})}},"store-".concat(F,"-").concat(t)))),"PURCHASES"===F&&(null==W?void 0:null===(m=W.items)||void 0===m?void 0:m.length)&&(null==W?void 0:null===(b=W.items)||void 0===b?void 0:b.map((e,t)=>(0,s.jsx)(y.pL,{threshold:1,triggerOnce:!1,onChange:i=>{es({id:"store:".concat(e.id),content:e,position:t+1},i)},children:i=>{let{ref:l}=i;return(0,s.jsx)(A,{visibilityRef:l,data:e,index:t,apiUrl:H,purchased:W,deviceSize:G,access:T,authData:z})}},"store-".concat(F,"-").concat(t)))),Z?P.map((e,t)=>(0,s.jsx)(R,{})):null]}),(null==$?void 0:null===(g=$.items)||void 0===g?void 0:g.length)<(null==$?void 0:$.items_total)&&"PURCHASES"!==F||(null==W?void 0:null===(j=W.items)||void 0===j?void 0:j.length)<(null==W?void 0:W.items_total)&&"PURCHASES"===F?(0,s.jsx)("div",{className:a().more,children:(0,s.jsx)(f.$n,{className:a()["videoCatalog-button"],variant:f.Vt.MONO,size:f.GO.SMALL,title:"ÐоказаÑÑ ÐµÑе",onClick:()=>{var e,t;if(q(!0),"PURCHASES"===F)fetch("".concat(H).concat(p.PI.estPurchases).concat(U,"&skip=").concat(null==W?void 0:null===(e=W.items)||void 0===e?void 0:e.length,"&limit=").concat(40),{credentials:"include"}).then(e=>e.json()).then(e=>{X({items:[...W.items,...null==e?void 0:e.items],items_total:e.items_total})}).finally(()=>{q(!1)});else{let e="MOVIES"===F?"movie":"SERIES"===F?"series":null;fetch("".concat(H).concat(p.PI.estShop).concat(U).concat(e?"&product_cls=".concat(e):"","&skip=").concat(null==$?void 0:null===(t=$.items)||void 0===t?void 0:t.length,"&limit=").concat(40),{credentials:"include",method:"GET"}).then(e=>{e.status<400&&e.json().then(e=>{J({items:[...$.items,...null==e?void 0:e.items],items_total:e.items_total})})}).finally(()=>{q(!1)})}},isLoading:K})}):null]}):B?(0,s.jsxs)("div",{className:a().error,children:[(0,s.jsx)("img",{src:"/static/images/store/error.png",alt:"error",className:a().error__image}),(0,s.jsx)("div",{className:a().error__title,children:"ЧÑоâÑо поÑло не\xa0Ñак"}),(0,s.jsx)("div",{className:a().error__description,children:"СкоÑо вÑÑ\xa0поÑиним. ÐопÑобÑйÑе еÑÑ\xa0Ñаз"}),(0,s.jsx)(f.$n,{className:a().button_link,onClick:()=>{Q(!1),ei()},size:f.GO.REGULAR,title:"ÐбновиÑÑ",variant:f.Vt.SECONDARY,fullWidth:"mobile_web"===G})]}):(0,s.jsx)(I,{tab:F})]})};var w=i(27116);class H extends l.Component{static async getInitialProps(e){var t,i,s,l;let r=(null===(i=e.reduxStore.getState())||void 0===i?void 0:null===(t=i.systemInformation)||void 0===t?void 0:t.API_URL)||w.H$,o=(null===(l=e.reduxStore.getState())||void 0===l?void 0:null===(s=l.systemInformation)||void 0===s?void 0:s.API_KEY)||w.Lq,a="".concat(r).concat(p.PI.estShop).concat(o,"&type=est"),n=await fetch(a,{credentials:"include",method:"GET"}),c=!n.ok;return{data:await n.json(),error:c}}render(){let{data:e,error:t}=this.props;return(0,s.jsx)(k,{shop:e,error:t})}}},2318:(e,t,i)=>{"use strict";i.d(t,{I:()=>c});var s=i(74848),l=i(46942),r=i.n(l),o=i(2117),a=i.n(o);let n=e=>{let{label:t,active:i=!1,size:l="medium",view:o="default",disabled:n=!1,className:c,classes:d={},style:_,onClick:u}=e;return(0,s.jsx)("button",{type:"button",disabled:n,style:_,className:r()(a().root,a()[l],a()[o],{[a().active]:i,[a().disabled]:n},c,d.root),onClick:u,children:(0,s.jsx)("span",{className:r()(a().label,d.label),children:t})})},c=e=>{let{items:t,value:i,onChange:l,size:o,view:c,className:d,classes:_={},style:u}=e;return(0,s.jsx)("div",{className:r()(a().group,d,_.root),style:u,children:t.map(e=>(0,s.jsx)(n,{label:e.label,size:o,view:c,active:Array.isArray(i)?i.includes(e.value):i===e.value,onClick:()=>l(e.value),className:_.chip,classes:_.chipClasses},e.value))})}},9523:e=>{e.exports={"storybook-root":"Store_storybook-root__bO_i7",shop:"Store_shop__wEGRH",subtitle:"Store_subtitle__C6WgG",content:"Store_content__y9fSj",empty:"Store_empty__gZjzO",card:"Store_card___BXH2",poster:"Store_poster__UilZx",title:"Store_title__jNPnA",genres:"Store_genres__WJeC5",rating:"Store_rating__ElQYo",high:"Store_high__p_XpO",max:"Store_max__J10oN",price:"Store_price__py5YJ",error:"Store_error__8q1PI",error__not:"Store_error__not__Dw_W8",error__image:"Store_error__image__E9O5m",error__title:"Store_error__title__WDLG1",error__description:"Store_error__description__9h9Iy",more:"Store_more__BB_Sd",stab__image:"Store_stab__image__0eVyg",stab__title:"Store_stab__title__Gjak4",stab__genre:"Store_stab__genre__94LY2"}},2117:e=>{e.exports={"storybook-root":"Chip_storybook-root__ryqXu",root:"Chip_root___Fcok",label:"Chip_label__PhoC8",medium:"Chip_medium__FpHpl",large:"Chip_large__P3yuP",default:"Chip_default__dS2YS",active:"Chip_active__7ANUs",brand:"Chip_brand__OdgJc",disabled:"Chip_disabled__KCeuM",group:"Chip_group___tvdQ"}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(25368)),_N_E=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.