(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[605],{17795:function(t,e,n){Promise.resolve().then(n.bind(n,59006)),Promise.resolve().then(n.bind(n,59994)),Promise.resolve().then(n.bind(n,76988))},76988:function(t,e,n){"use strict";n.r(e),n.d(e,{PlatformFundDetailPostsClientPage:function(){return D}});var i=n(57437),r=n(21585),a=n(20207),o=n(20467),c=n(8465),l=n(22071),s=n.n(l);let u=(0,c.SJ)("NEXT_PUBLIC_MP_SC_INVESTMENT_API_URL"),d={fetchPosts:async t=>(0,o.Z)("/api/v1/funds/".concat(t.fundId,"/posts"),{baseURL:u,params:s()(t,"fundId")}),fetchPost:async t=>(0,o.Z)("/api/v1/funds/".concat(t.fundId,"/posts/").concat(t.postId),{baseURL:u})};var f=n(61810),p=n(2265),h=n(47907),m=n(30982),_=n(3714),g=n(9171),A=n.n(g),v=n(34818),E=n(53238),b=n(6731),x=n(24866),C=n(53818),L=n.n(C),S=n(32833),N=n(62793),I=n.n(N);function Y(){return(0,i.jsx)("ul",{className:I().container,children:[1,2,3].map(t=>(0,i.jsx)("li",{className:I().cardWrapper,children:(0,i.jsxs)(S.Zb,{className:I().card,children:[(0,i.jsx)(S.Od,{height:40}),(0,i.jsx)(S.Od,{height:180}),(0,i.jsx)(S.Od,{height:26}),(0,i.jsx)(S.Od,{height:60})]})},t))})}function T(t){let{isLoading:e,items:n}=t,{platformFundId:a}=(0,h.useParams)(),o=(0,h.useRouter)(),l=(0,c.SJ)("NEXT_PUBLIC_MARKETPLACE_LK_BASE_URL"),s="true"===(0,c.SJ)("NEXT_PUBLIC_FAKE_ESIA_ENABLED");if(e)return(0,i.jsx)(Y,{});function u(){let t=(0,b.If)().enableSkipLoginScreen().encode(),e=(0,x.jb)("".concat(l,"/investment/funds/").concat(a,"/purchase"),{context:t,...s&&{uat:!0}});o.replace(e)}return(0,i.jsx)(r.T,{className:L().container,tag:"ul",dataQa:{element:E.x.Block,name:"postList"},children:n.map(t=>(0,i.jsx)(r.T,{tag:"li",dataQa:{element:E.x.Block,name:"postCard"},className:L().card,onClick:()=>{t.isAccessible&&o.push("/".concat(a,"/posts/").concat(t.id))},children:(0,i.jsx)(v.y4,{item:t,onBuyClick:u})},t.id))})}var y=n(75504),R=n(22377),M=n.n(R);function P(){return(0,i.jsx)(r.T,{dataQa:{element:E.x.Block,name:"fundPosts"},children:(0,i.jsx)("div",{className:M().tabs,children:(0,i.jsx)(S.Od,{inline:!0,className:(0,y.Z)(M().skeleton)})})})}var w=n(20703),k=n(28980),O=n(41185),j=n.n(O);function B(t){let{title:e,text:n}=t;return(0,i.jsx)(S.Zb,{children:(0,i.jsxs)("div",{className:j().container,children:[(0,i.jsx)(w.default,{src:k.Z,alt:"",width:220,height:120}),(0,i.jsx)(S.xv,{size:"20",fontFamily:"primary",weight:"medium",children:e}),(0,i.jsx)(S.xv,{size:"14",className:j().text,children:n})]})})}function D(t){let{posts:e}=t,n=(0,m.useTranslations)(),{platformFundId:o}=(0,h.useParams)(),[c,l]=(0,p.useState)(_.ww[0].id),[s]=(0,p.useState)(!1),[u,g]=(0,p.useState)(0),[v,E]=(0,p.useState)(!1),[b,x]=(0,p.useState)(e),C=(0,p.useRef)(null);async function L(t){l(t),E(!0),g(0);try{let e=await d.fetchPosts({fundId:o,limit:_.h2,offset:0,participantsOnly:t===_.ww[1].id||void 0});x(e)}catch(t){console.error(t)}finally{E(!1)}}let S=(0,p.useCallback)(async()=>{if(!b||0===b.data.length||!(b.total>(u+1)*_.h2))return;let t=u+1;try{let e=await d.fetchPosts({fundId:o,limit:_.h2,offset:t,participantsOnly:c===_.ww[1].id}),n={...e,data:[...b.data,...e.data]};g(t),x(n)}catch(t){console.error(t)}},[c,o,u,b]);return((0,p.useEffect)(()=>{let t=new IntersectionObserver(t=>{!t[0].isIntersecting||s||v||S()},{threshold:.1}),e=C.current;return e&&t.observe(e),()=>{e&&t.unobserve(e)}},[s,v,S]),s||!b)?(0,i.jsx)(P,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.T,{dataQa:{element:a.xJ.Chips,name:"post"},children:(0,i.jsx)(f.cL,{className:A().chips,value:c,chips:_.ww,onChipClick:t=>L(Number(t)),size:"m",variant:"primary"})}),!s&&b&&0===b.data.length?(0,i.jsx)(B,{title:n("posts-list.no-content.title"),text:n("posts-list.no-content.text")}):(0,i.jsx)(T,{isLoading:v,items:b.data}),(0,i.jsx)("div",{ref:C})]})}},3714:function(t,e,n){"use strict";n.d(e,{HA:function(){return l},ew:function(){return o},h2:function(){return s},ju:function(){return r},pY:function(){return c},ww:function(){return a}});var i=n(20207);let r=[{id:1,label:"1 мес"},{id:3,label:"3 мес"},{id:6,label:"6 мес"},{id:12,label:"Год"},{id:36,label:"3 года"},{id:60,label:"5 лет"}],a=[{id:1,label:"Все публикации"},{id:2,label:"Для участников"}],o={1:"historicalYieldMonth",3:"historicalYieldQuarter",6:"historicalYieldHalfYear",12:"historicalYieldYear",36:"historicalYieldThreeYear",60:"historicalYieldFiveYear"},c={[i.gQ.Low]:"Низкий",[i.gQ.Medium]:"Средний",[i.gQ.High]:"Высокий"},l={MONTHLY:"Ежемесячно",QUARTERLY:"Ежеквартально",HALF_YEARLY:"Полугодие",YEARLY:"Ежегодно"},s=10},21585:function(t,e,n){"use strict";n.d(e,{T:function(){return a}});var i=n(57437),r=n(14307);let a=t=>{let{tag:e="div",children:n,dataQa:a,className:o,...c}=t,l=(0,r.J)()(a),s="string"==typeof e,u={...c,...s?{"data-qa":l}:{dataQa:l}};return(0,i.jsx)(e,{className:o,...u,children:n})}},14307:function(t,e,n){"use strict";n.d(e,{J:function(){return c}});var i=n(47907),r=n(8278),a=n.n(r),o=n(2265);function c(){let t=(0,i.useParams)(),e=(0,i.usePathname)();return(0,o.useCallback)(n=>{let{prefix:i,element:r,name:o,index:c}=n,l=e.split("/").filter(t=>t).map(e=>{var n;return null!==(n=Object.keys(t).find(n=>t[n]===e))&&void 0!==n?n:e});l.unshift("funds");let s=l.join("-"),u=a()(o),d=void 0!==c?"-".concat(function(t){if(Number.isNaN(t)||t<0)throw Error("Incorrect value '".concat(t,"' for the property 'index'. Must be a number and >= 0}"));return t}(c)):"";return"".concat(i?"".concat(i,"-"):"").concat(s,"-").concat(r,"-").concat(u).concat(d)},[t,e])}},21741:function(t,e,n){"use strict";n.d(e,{_:function(){return c}});var i=n(98955),r=n(60915);let a=i.Z.get("auth.gtm_customer_id"),o=t=>{(0,r.AB)(t)};function c(t,e,n){o({event:"data_event",customer_id:a,eventCategory:t,eventAction:e,eventLabel:null==n?void 0:n.eventLabel,eventValue:null==n?void 0:n.eventValue})}},20467:function(t,e,n){"use strict";var i=n(8465);let r=n(21763).Wg.create({baseURL:(0,i.SJ)("NEXT_PUBLIC_PL_LK_API_INVESTMENT_URL"),next:{revalidate:300}});e.Z=r},53238:function(t,e,n){"use strict";var i,r;n.d(e,{x:function(){return i}}),(r=i||(i={})).Form="form",r.Link="link",r.Header="header",r.Breadcrumbs="breadcrumbs",r.Image="image",r.Button="button",r.Dropdown="dropdown",r.Slider="slider",r.Switcher="switcher",r.Banner="banner",r.Checkbox="checkbox",r.Radiobutton="radiobutton",r.Text="text",r.List="list",r.Block="block",r.Collapse="collapse",r.Chart="chart",r.Modal="modal",r.Table="table",r.Icon="icon",r.Chips="chips",r.Tile="tile",r.Caption="caption",r.Input="input",r.Tabs="tabs",r.Tag="tag",r.Toggle="toggle",r.Drawer="drawer",r.Select="select",r.Hint="hint",r.Label="label",r.ProgressBar="progressbar"},20207:function(t,e,n){"use strict";n.d(e,{xJ:function(){return I.x},nC:function(){return E},al:function(){return b},K7:function(){return C},jV:function(){return v},sM:function(){return m},gQ:function(){return _},X_:function(){return g},xl:function(){return x},Cp:function(){return A}}),(h=m||(m={})).OneMonth="ONE_MONTH",h.ThreeMonths="THREE_MONTHS",h.SixMonth="SIX_MONTH",h.OneYear="ONE_YEAR",h.ThreeYears="THREE_YEARS",h.FiveYears="FIVE_YEARS";var i,r,a,o,c,l,s,u,d,f,p,h,m,_,g,A,v,E,b,x,C,L,S,N,I=n(53238);(i=_||(_={})).High="HIGH",i.Medium="MEDIUM",i.Low="LOW",(r=g||(g={})).Asc="ASC",r.Desc="DESC",(a=A||(A={})).YieldMonth="YIELD_MONTH",a.YieldQuarter="YIELD_QUARTER",a.YieldHalfYear="YIELD_HALF_YEAR",a.YieldYear="YIELD_YEAR",a.YieldThreeYear="YIELD_THREE_YEAR",a.YieldFiveYear="YIELD_FIVE_YEAR",a.YieldAll="YIELD_ALL",(o=v||(v={})).Sca="NET_ASSET_VALUE",o.MinimalPurchaseAmount="MINIMAL_PURCHASE_AMOUNT",(c=E||(E={}))[c.MinValue=100]="MinValue",c[c.IsAuthorFund=1]="IsAuthorFund",(l=b||(b={})).Mixed="MIXED",l.Bond="BOND",l.Stock="STOCK",l.Metal="METAL",l.Money="MONEY",l.Realty="REALTY",l.None="NONE",(s=x||(x={})).Extended="extended",s.Quick="quick",(u=C||(C={}))[u.Yield=0]="Yield",u[u.ManagementCompanies=1]="ManagementCompanies",u[u.Risks=2]="Risks",u[u.Category=3]="Category",(d=L||(L={})).View="view",d.Buy="buy",(f=S||(S={})).Rational="Оптимальный",f.Aggressive="Активный рост",f.Conservative="Минимальный риск",(p=N||(N={})).Archived="ARCHIVED",p.Demo="DEMO",p.Draft="DRAFT",p.Published="PUBLISHED"},10777:function(t,e,n){"use strict";n.d(e,{tC:function(){return r},pY:function(){return i}});let i="/invest/funds",r=45},8465:function(t,e,n){"use strict";n.d(e,{E0:function(){return N},p6:function(){return l},JC:function(){return r},NM:function(){return I},Rz:function(){return E},SJ:function(){return u},kj:function(){return Y},j0:function(){return b},ow:function(){return S},ld:function(){return x},lt:function(){return a}});var i=n(6731);function r(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{length:n}=String(Math.floor(t)),r=e?"\xa0₽":"";return n>7&&n<10?"".concat(String(+(t/1e6).toFixed(2)).replace(".",","),"\xa0млн").concat(r):n>=10&&n<13?"".concat(String(+(t/1e9).toFixed(2)).replace(".",","),"\xa0млрд").concat(r):n>=13?"".concat(String(+(t/1e12).toFixed(2)).replace(".",","),"\xa0трлн").concat(r):(0,i.lb)(t,{decimalCount:2,hasCurrencySymbol:e,decimalIsWithoutZeros:!0})}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return+t.toFixed(e)}var o=n(68947),c=n(50309);function l(t,e){let{format:n="dd.MM.yy"}=null!=e?e:{};try{if("string"==typeof t)return(0,o.Z)(new Date(t),n,{locale:c.Z});return(0,o.Z)(t,n,{locale:c.Z})}catch(e){return t}}var s=n(20564);function u(t){return(0,s.env)(t)}var d=n(21741),f=n(10777);let p=t=>/^https:\/\//gi.test(t),h=t=>["",...t.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),m=()=>window.location.host.indexOf("localhost")>=0,_=t=>('"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)),g=t=>encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),A=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[(]/g,"%28").replace(/[)]/g,"%29"),v=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,i=u("NEXT_PUBLIC_SHOWCASE_ORIGIN"),r=m()?"":"; domain=".concat(h(i)),a=new Date(new Date().getTime()+864e5*n).toUTCString();document.cookie="".concat(A(t),"=").concat(g("string"==typeof e?e:JSON.stringify(e)),"; SameSite=None").concat(p(i)?"; Secure":"").concat(r,"; expires=").concat(a,"; path=/;")},E=(t,e,n)=>{if(null==t?void 0:t.aggregator_id){let r={...t,...n&&{platformProductId:n},create_date:new Date().toISOString()},a={payload:[]};try{var i;a=JSON.parse((null===(i=function(){if("undefined"!=typeof document&&document.cookie)return Object.fromEntries(document.cookie.split("; ").map(t=>t.split("=")).map(t=>t.map(t=>_(t))))}())||void 0===i?void 0:i.cpa_click)||"{}")}catch(t){return}a.payload||(a.payload=[]),a.payload.push(r),e[t.aggregator_id]&&(v("cpa_click",a,f.tC),(0,d._)(t.aggregator_id,"CPA_click",{eventLabel:window.location.pathname,eventValue:t.utm_term||t.click_id,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium}))}};function b(t,e,n){if(t<1||!n.length)return null;let i=Math.min(t-1,n.length);return[...n.slice(0,i),e,...n.slice(i)]}function x(t){var e;return null!==(e=null==t?void 0:t.replace(/\sstyle=["\\]+[a-z0-9-:; !\s]*[\\"]+/gm,""))&&void 0!==e?e:""}var C=n(50492),L=n(94624);function S(t,e,n){let i="string"==typeof t?(0,C.Z)(t):t,r="string"==typeof e?(0,C.Z)(e):e,a="string"==typeof n?(0,C.Z)(n):n;return(0,L.Z)(i,{start:r,end:a})}function N(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"primary";return t.filter(t=>{var e;return null===(e=t.params)||void 0===e?void 0:e.visible}).map(t=>{var n,i;return{...t,params:{visible:t.params.visible,variant:null!==(n=t.params.variant)&&void 0!==n?n:e,priority:null!==(i=t.params.priority)&&void 0!==i?i:Number.MAX_SAFE_INTEGER}}}).toSorted((t,e)=>t.params.priority-e.params.priority).map(t=>({label:t.displayName,variant:t.params.variant,dataQa:t.code,hint:t.description}))}function I(t){if(null===t)return"—";if(0===t)return"0%";let e=t>0?"+":"";return"".concat(e).concat((0,i.lb)(t,{decimalCount:2,hasCurrencySymbol:!1}),"%")}function Y(t){let e=u("NEXT_PUBLIC_SHOWCASE_ORIGIN");return{title:"Журнал Финуслуги",description:"Рассказываем о финансах, разбираем новые законы и даем лайфхаки, как приумножить доход",chips:[{id:1,label:"Инвестиции",items:t.articles.map(t=>{let{title:n,url:i,img:r,public_date:a}=t;return{title:n,dt:a,url:"".concat(e,"/").concat(i),img:"".concat(e,"/img/posts/big/").concat(null==r?void 0:r.file)}})}],url:"".concat(e,"/navigator")}}},9171:function(t){t.exports={chips:"PlatformFundDetailPostsClientPage_chips__dhV3A"}},22377:function(t){t.exports={skeleton:"PlatformFundDetailPostsPageSkeleton_skeleton___pqvu"}},53818:function(t){t.exports={container:"PostList_container__e3wDv",card:"PostList_card__M9EK_"}},62793:function(t){t.exports={container:"PostListSkeleton_container__tNYar",cardWrapper:"PostListSkeleton_cardWrapper__AIi4T",card:"PostListSkeleton_card__tbV64"}},41185:function(t){t.exports={container:"PostListNoContent_container__hrRQO",text:"PostListNoContent_text__YavTG"}},28980:function(t,e){"use strict";e.Z={src:"/invest/funds/_next/static/media/cat.132f7876.png",height:240,width:440,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAANlBMVEVISEh7gnu6dkcREhWwbVIUFhknKy4jGR0pLCwKCgqJNhtTVVVRT01ycm2oc06Kj4gYGRxBPz1CPHzqAAAAEHRSTlMByVLLGnBTKT4MQZKB5cL17Iqe2QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAClJREFUeJxjYGBgZ2dnYwABHkFeAVYGBiY+bkZ+AWZ2BhYuThYODg5OAA2RANyemfWFAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4}}},function(t){t.O(0,[544,591,866,161,749,276,210,172,806,24,971,69,744],function(){return t(t.s=17795)}),_N_E=t.O()}]);