(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[116],{1506:function(t,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/navigator/[[...slug]]",function(){return a(2658)}])},1342:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var a in e)Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}(e,{noSSR:function(){return s},default:function(){return n}});let l=a(8754),o=(a(7294),l._(a(4304)));function r(t){return{default:(null==t?void 0:t.default)||t}}function s(t,e){return delete e.webpack,delete e.modules,t(e)}function n(t,e){let a=o.default,l={loading:t=>{let{error:e,isLoading:a,pastDelay:l}=t;return null}};t instanceof Promise?l.loader=()=>t:"function"==typeof t?l.loader=t:"object"==typeof t&&(l={...l,...t}),l={...l,...e};let n=l.loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?a({...l,loader:()=>null!=n?n().then(r):Promise.resolve(r(()=>null))}):(delete l.webpack,delete l.modules,s(a,l))}("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},43:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"LoadableContext",{enumerable:!0,get:function(){return r}});let l=a(8754),o=l._(a(7294)),r=o.default.createContext(null)},4304:function(t,e,a){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return v}});let l=a(8754),o=l._(a(7294)),r=a(43),s=[],n=[],i=!1;function u(t){let e=t(),a={loading:!0,loaded:null,error:null};return a.promise=e.then(t=>(a.loading=!1,a.loaded=t,t)).catch(t=>{throw a.loading=!1,a.error=t,t}),a}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:t,_opts:e}=this;t.loading&&("number"==typeof e.delay&&(0===e.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},e.delay)),"number"==typeof e.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},e.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(t=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(t){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...t},this._callbacks.forEach(t=>t())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(t){return this._callbacks.add(t),()=>{this._callbacks.delete(t)}}constructor(t,e){this._loadFn=t,this._opts=e,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(t){return function(t,e){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},e),l=null;function s(){if(!l){let e=new d(t,a);l={getCurrentValue:e.getCurrentValue.bind(e),subscribe:e.subscribe.bind(e),retry:e.retry.bind(e),promise:e.promise.bind(e)}}return l.promise()}if(!i){let t=a.webpack?a.webpack():a.modules;t&&n.push(e=>{for(let a of t)if(e.includes(a))return s()})}function u(t,e){!function(){s();let t=o.default.useContext(r.LoadableContext);t&&Array.isArray(a.modules)&&a.modules.forEach(e=>{t(e)})}();let n=o.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return o.default.useImperativeHandle(e,()=>({retry:l.retry}),[]),o.default.useMemo(()=>{var e;return n.loading||n.error?o.default.createElement(a.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:l.retry}):n.loaded?o.default.createElement((e=n.loaded)&&e.default?e.default:e,t):null},[t,n])}return u.preload=()=>s(),u.displayName="LoadableComponent",o.default.forwardRef(u)}(u,t)}function _(t,e){let a=[];for(;t.length;){let l=t.pop();a.push(l(e))}return Promise.all(a).then(()=>{if(t.length)return _(t,e)})}c.preloadAll=()=>new Promise((t,e)=>{_(s).then(t,e)}),c.preloadReady=t=>(void 0===t&&(t=[]),new Promise(e=>{let a=()=>(i=!0,e());_(n,t).then(a,a)})),window.__NEXT_PRELOADREADY=c.preloadReady;let v=c},2538:function(t,e,a){"use strict";a.d(e,{c:function(){return o}});var l=a(8083);let o={async getLayoutData(t,e){let a=await (0,l.t)({env:t,url:"/api/v1/layout/".concat(e),options:{isHeadlessCMS:!0}});return a.data||null},async getPageData(t,e,a){let o=new URLSearchParams({scLayoutName:e,scPageUrl:a}).toString(),r=await (0,l.t)({env:t,url:"/api/v1/data/page-data?".concat(o),options:{isHeadlessCMS:!0}});return r.data||null},async getPage(t,e){let a=await (0,l.t)({env:t,url:"/api/v1/sc-page/".concat(e),options:{isHeadlessCMS:!0}});return a.data||null}}},8785:function(t,e,a){"use strict";a.d(e,{r:function(){return n}});var l=a(2538),o=a(8083);let r=async(t,e,a)=>{let l=a?new URLSearchParams(a).toString():null,r=await (0,o.t)({env:t,url:"/api/v1/blocks/".concat(e).concat(l?"?".concat(l):""),options:{isCommonBlocks:!0}});if(r.error)throw Error(r.error);return r.data||""},s=t=>(0,o.t)({env:t,url:"/api/v1/disclaimers/filtered?showSC=true",options:{isHeadlessCMS:!0}}),n=async t=>{let e=[],a="",o=null,n=null,i=!!t.NEXT_PUBLIC_REACT_HEADER,[u,d,c,_]=await Promise.allSettled([s(t),i?null:r(t,"header"),i?l.c.getPageData(t,"PageHeaderWidget","homepage"):null,l.c.getPageData(t,"PageFooter","homepage")]);return"fulfilled"===u.status&&u.value&&(e=Array.isArray(e=u.value.data||[])?e:[]),"fulfilled"===d.status&&d.value&&(a=d.value),"fulfilled"===c.status&&c.value&&(o=c.value.value||null),"fulfilled"===_.status&&_.value&&(n=_.value.value),{layout:{disclaimers:e,header:o,footer:n},commonBlocksData:{header:a}}}},2658:function(t,e,a){"use strict";a.r(e),a.d(e,{__N_SSP:function(){return m},default:function(){return b},getNavigatorServerSideProps:function(){return y}});var l=a(5893),o=a(5152),r=a.n(o),s=a(2538),n=a(4249),i=a(8785),u=a(2853),d=a(5646),c=a(4386);let _={stat_osago_kt:"/stat_osago_koefficienty","zastrahovat/stat_bazovaya_stavka_osago":"/osago/teg-calculator","zastrahovat/stat_realno_li_segodnya_kupit_kasko_bez_franshizy":"/kasko/teg-s-franshizoi","zastrahovat/stat_osago_na_mesyats":"/kasko/teg-na-mesyac","zastrahovat/stat_optimalnoe_kasko":"/kasko/teg-deshevo","zastrahovat/stat_mini_kasko":"/kasko/teg-mini","zastrahovat/stat_kasko_v_rassrochku":"/kasko/teg-v-rassrochku","zastrahovat/stat_kasko_dlya_spectehniki":"/kasko/teg-spectehnika","zastrahovat/stat_50_x_50":"/kasko/teg-50-na-50","zastrahovat/stat_stoimost_kasko_v_2019_2020_godah":"/kasko/teg-calc","zastrahovat/stat_stoimost_2014":"/kasko/teg-calc","zastrahovat/stat_raschet_v_internete":"/kasko/teg-calc","zastrahovat/stat_rasschitat":"/kasko/teg-calc","zastrahovat/stat_raschet_kasko_v_internete_2020":"/kasko/teg-calc","zastrahovat/stat_vyplaty_po_kasko_ot_ugona":"/kasko/teg-ot-ugona","zastrahovat/stat_tolko_ot_ugona":"/kasko/teg-ot-ugona","zastrahovat/stat_otkaz_po_ugonu":"/kasko/teg-ot-ugona","zastrahovat/stat_totalnaya_gibel_avtomobilya_pri_strahovanii_kasko":"/kasko/teg-ugon-i-total","zastrahovat/stat_tolko_usherb":"/kasko/teg-ugon-i-total","zastrahovat/stat_vyplata_po_kreditnomu_avto":"/kasko/teg-credit","zastrahovat/stat_kasko_na_kreditnyi_avtomobil":"/kasko/teg-credit","zastrahovat/stat_avtokredit":"/kasko/teg-credit","zastrahovat/stat_stoit_li_prodlevat_strahovku":"/kasko/teg-prolongation","zastrahovat/stat_prodlit_kasko":"/kasko/teg-prolongation","zastrahovat/stat_polis_kasko":"/kasko","zastrahovat/stat_nevygodnoe_kasko_v_avtosalone":"/kasko","zastrahovat/stat_nazyazyvanie_polisa_kasko":"/kasko","zastrahovat/stat_kak_vybrat_luchshuju_kompaniju_kasko":"/kasko","zastrahovat/stat_":"/kasko"};var v=a(2288);let f=async(t,e)=>{var a;let l=e.filter(t=>{let{url:e}=t;return e!==v.Vf}),o=l.map(t=>{let{url:e}=t;return e}).join(","),r=await (0,u.wg)(t,void 0,void 0,void 0,o,3),s=(null===(a=r.data)||void 0===a?void 0:a.articles)||{},n=Object.keys(s),i=n.reduce((t,a,l)=>{let o=e.find(t=>{let{id:e}=t;return e===Number(a)}),r=(s[a]||[]).slice(0,3);return o&&r.length&&t.push({id:o.id,name:o.name,key:o.url,title:o.title,posts_ids:r,description:"",position:l,url:"".concat(c._n,"/").concat(o.url)}),t},[]);return i};var h=a(8853);let Navigator=r()(()=>Promise.all([a.e(832),a.e(249),a.e(342),a.e(364),a.e(557),a.e(473),a.e(679),a.e(684),a.e(157)]).then(a.bind(a,7157)).then(t=>t.Navigator),{loadableGenerated:{webpack:()=>[7157]}}),k=r()(()=>Promise.all([a.e(832),a.e(249),a.e(342),a.e(364),a.e(194),a.e(386),a.e(60)]).then(a.bind(a,6460)).then(t=>t.Layout),{loadableGenerated:{webpack:()=>[6460]}}),p=r()(()=>Promise.all([a.e(832),a.e(249),a.e(342),a.e(364),a.e(194),a.e(557),a.e(638),a.e(473),a.e(305),a.e(995),a.e(433)]).then(a.bind(a,2995)).then(t=>t.NavigatorDetail),{loadableGenerated:{webpack:()=>[2995]}}),g=r()(()=>Promise.all([a.e(832),a.e(249),a.e(342),a.e(364),a.e(473),a.e(679),a.e(684),a.e(927)]).then(a.bind(a,2060)).then(t=>t.NavigatorTag),{loadableGenerated:{webpack:()=>[2060]}});var m=!0;let y=async t=>{var e,a,l,o,r,k,p,g,m,y,b,w,P,z,S;let j=String(null==t?void 0:null===(a=t.req)||void 0===a?void 0:null===(e=a.url)||void 0===e?void 0:e.split("?")[0].split("#")[0]).substring(1),C=!!(j.includes("/stat_")||t.isV2),E=j.includes("/str_"),O=j.endsWith("/app"),x=O?j.slice(0,-4):j;t.isV2&&(x=x.split("/").slice(-1)[0]);let D=String(null==t?void 0:null===(l=t.resolvedUrl)||void 0===l?void 0:l.split("?")[0].split("#")[0].split("/str_")[0]).substring(1),N=(0,h.d)(),T=(()=>{var e;let a=null==t?void 0:null===(e=t.resolvedUrl)||void 0===e?void 0:e.match(/\/str_(\d+)/);if(a&&a[1]){let t=parseInt(a[1],10);if(t>0)return t}return -1})();for(let e in _)if(t.resolvedUrl==="/navigator/".concat(e))return{redirect:{destination:"".concat(c._n).concat(_[e]),permanent:!0}};if(t.resolvedUrl.startsWith("/navigator/razvlecheniya"))return{redirect:{destination:"".concat(c._n,"/navigator"),permanent:!0}};let M=null,V=[],A="1",L=[],R=null,H=[],U=[],G=[],B=[],F=null,I=null,W=null,X=C?null:await (0,u.kr)(N);if(X&&(G=(null===(o=X.data)||void 0===o?void 0:o.ctgs)||[],H=((null===(r=X.data)||void 0===r?void 0:r.groups)||[]).sort((t,e)=>t.position-e.position),F=(U=(null===(k=X.data)||void 0===k?void 0:k.tags)||[]).find(t=>{let{url:e}=t;return e===D})||null),"navigator/all"===D&&(F={id:100,name:"Все статьи",title:"Все статьи - Журнал Финуслуги",description:"Актуальные статьи о финансах, инвестициях и банковских продуктах на Финуслуги.ру. Будьте в курсе всех событий.",modal_title:null,modal_description:null,modal_title_success:null,modal_description_success:null,h1:"Все статьи",url:"navigator/all"}),!C&&!F)return{notFound:!0};let Y=!!F&&(F.url!==v.Vf||T>1),q=T>1?v.FY:(null==F?void 0:F.url)!==v.Vf?v.hP:v.ek,J=T>1?(null==F?void 0:F.url)!==v.Vf?v.ew:v.vH:void 0,[K,Q,Z,$,tt]=await Promise.allSettled([(0,i.r)(N),C?null:(0,u.pW)(N,q,J,T,null==F?void 0:F.url),C||Y?null:(0,u.Jx)(N,18),C?(0,d.vM)(N,x):null,C?(0,d.vM)(N,x,v.yB):null]);"fulfilled"===K.status&&K.value&&(M=K.value);let te=await Promise.allSettled(H.map(t=>{let{key:e}=t;return(0,u.Ik)(N,e,24)})),ta=te.reduce((t,e)=>{var a;return"fulfilled"===e.status&&(null===(a=e.value)||void 0===a?void 0:a.data)&&t.push(e.value.data),t},[]);"fulfilled"===Q.status&&Q.value&&(V=(null===(p=Q.value.data)||void 0===p?void 0:p.articles)||[],A=(null===(g=Q.value.data)||void 0===g?void 0:g.total)||"1");let tl=Math.ceil((Number(A)-(J||0))/q);if(E&&(T<0||T>tl||0===V.length))return{redirect:{destination:"/".concat(D),permanent:!0}};if("fulfilled"===Z.status&&Z.value&&(L=(null===(m=Z.value.data)||void 0===m?void 0:m.items.slice(0,18))||[]),"fulfilled"===$.status&&$.value&&(R=(null===(y=$.value.data)||void 0===y?void 0:y.article)||null,U=(null===(b=$.value.data)||void 0===b?void 0:b.tags)||[],G=(null===(w=$.value.data)||void 0===w?void 0:w.ctgs)||[]),t.isV2){let t=await (0,d.AU)(N,x);R=t.data||null}if((null==R?void 0:R.redirect_url)&&R.redirect_url.length>0)return{redirect:{destination:"/".concat(R.redirect_url),permanent:!0}};if((null==R?void 0:R.url)&&R.url!==x)return{redirect:{destination:"/".concat(R.url),permanent:!0}};let to=await f(N,U);if("fulfilled"===tt.status&&tt.value&&(B=(null===(z=tt.value.data)||void 0===z?void 0:null===(P=z.others)||void 0===P?void 0:P.filter(t=>t.id!==(null==R?void 0:R.id)).slice(0,v.yB))||[]),C&&!(null==R?void 0:R.title)||!C&&!V.length)return{notFound:!0};if(C){let t=await s.c.getPageData(N,"BestOffers","homepage");if(W=t,t&&(null==R?void 0:R.best_offers)){let e=await (0,n.x)(N,t,R.best_offers);I=e}}return R&&(null===(S=R.content)||void 0===S||S.forEach(t=>{"read_more"===t.type&&Array.isArray(t.data)&&t.data.forEach(t=>{t.content=[]})})),{props:{env:N,...M,groupedPosts:ta,extraGroups:to,articles:V,news:L,post:R,tags:U,ctgs:G,description:"",otherPosts:B,isMobileApplication:O,isDetailPage:C,tag:F,str:T>1?T:null,pageCount:tl,bestOffersBlock:I,bestOffersBlockPageData:W}}};var b=t=>{let{env:e,layout:a,commonBlocksData:o,groupedPosts:r,extraGroups:s,articles:n,news:i,post:u,tags:d,ctgs:c,description:_,otherPosts:f,isMobileApplication:h,isDetailPage:m,tag:y,str:b,pageCount:w,bestOffersBlock:P,bestOffersBlockPageData:z}=t;if(m&&h)return(0,l.jsx)(p,{env:e,post:u,tags:d,ctgs:c,description:_,otherPosts:f,bestPosts:[],newPosts:[],isMobileApplication:h});let S=!!y&&(y.url!==v.Vf||!!b);return(0,l.jsxs)(k,{env:e,data:a,sections:o,children:[S&&(0,l.jsx)(g,{env:e,articles:n,news:i,ctgs:c,groupedPosts:r,description:_,tag:y,str:b,pageCount:w,tags:d}),!m&&!S&&(0,l.jsx)(Navigator,{env:e,articles:n,news:i,ctgs:c,tags:d,groupedPosts:r,extraGroups:s,description:_}),m&&(0,l.jsx)(p,{env:e,post:u,tags:d,ctgs:c,description:_,otherPosts:f,bestPosts:[],newPosts:[],isMobileApplication:h,bestOffersBlock:P,bestOffersBlockPageData:z})]})}},5152:function(t,e,a){t.exports=a(1342)}},function(t){t.O(0,[793,170,774,888,179],function(){return t(t.s=1506)}),_N_E=t.O()}]);