PageSourceSearch

https://www.jtbank.cz/_next/static/chunks/8663.6f28aafc6d0534a8.js

js jtbank.cz collected 2026-10-01 11:37:28 UTC 15,016 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8663],{48663:function(e,t,l){"use strict";l.r(t);var s=l(27573);l(25789);var a=l(47270),i=l(4875),r=l(19442),n=l(44553),o=l(39042),u=l(99876),c=l(48295),d=l(444),m=l(19646),v=l(81695),h=l(39049),p=l(93391),b=l(86939),_=l(46289),f=l(68279),x=l(78836),j=l(7653),N=l(3311),y=l.n(N),C=l(25048);t.default=()=>{var e,t,l,N;let w=(0,c.useTranslations)(),[g,k]=(0,j.useState)(1e6),{activeFundType:F,activeFundRatio:Z,setActiveFundRatio:S,fetchCombiFund:T,activeFund:E}=(0,C.Z)(),M=(0,v.usePathname)(),I=(0,c.useFormatter)(),{kontentClient:O}=(0,d.a)(),{appEnv:R}=(0,u.k)(),{DataLayer:K}=(0,h.p)(),{mutate:W}=(0,m.D)({mutationFn:async e=>{try{let{signal:t}=(0,o.SP)(),{fundKontent:l,fundData:s}=await T({signal:t,isin:e,params:{depth:3},kontentClient:O});l&&s||y().error({component:"CalculatorCombi",actions:"deposits/fetchCombiFund",slug:M,error:"Failed to fetch combi data."})}catch(e){y().error({component:"CalculatorCombi",actions:"deposits/fetchCombiFund",slug:M,error:"Failed to fetch combi data."})}}}),D=null===(e=E())||void 0===e?void 0:e.product.elements,L=()=>{var e,t,l;if(!D)return[];let[s]=null!==(l=null===(t=E())||void 0===t?void 0:null===(e=t[Z].performance)||void 0===e?void 0:e.slice(-2))&&void 0!==l?l:[];return[E().product.elements.deposit.linkedItems[0].elements[Z].value,100*s.vykonnost]},P=(null===(t=E())||void 0===t?void 0:t.product.elements.deposit.linkedItems[0].elements.years.value)||0,U=(()=>{if(!g)return[0,0];switch(Z){case"term30":return[.3*g,g-.3*g];case"term":return[.5*g,g-.5*g];default:return[0,0]}})(),A=e=>{var t,l;let[s,a]=U.map((e,t)=>{var l;return(0,i.Y1)(e,null===(l=L())||void 0===l?void 0:l[t],P)});switch(e){case 0:return[{label:w("calculators.combi.results.interest"),value:I.number(null===(t=L())||void 0===t?void 0:t[0],"decimal")+"% p.a."},{label:w("calculators.combi.results.yield"),value:I.number(s,"currency")}];case 1:return[{label:w("calculators.combi.results.efficiency"),value:"".concat(I.number((null===(l=L())||void 0===l?void 0:l[1])/100,"percent"))+" p.a."},{label:w("calculators.combi.results.yield"),value:I.number(a,"currency")}];case 2:return[{label:" ",value:I.number(s+a,"currency")}];default:return[{label:w("calculators.combi.results.unavailable"),value:"0"}]}},V=(0,r.Z)(()=>{K.push({event:"calculator_result",product_data:{product_type:f.Z.FUND,fund_ratio:Z,fund_selection:F,investment:g,interest_deposit:A(0)[0].value,revenue_deposit:A(0)[1].value,interest_investment:A(1)[0].value,revenue_investment:A(1)[1].value,revenue_total:A(2)[0].value,environment:R}})},750);(0,p.Z)(()=>{V()},[g,Z,F]);let Y=!!(null===(l=E())||void 0===l?void 0:l.term)&&!!(null===(N=E())||void 0===N?void 0:N.term30);return(0,s.jsxs)("div",{children:[Y?(0,s.jsxs)("div",{className:"combi__container",children:[(0,s.jsxs)("div",{className:"combi__controls",children:[(0,s.jsxs)("div",{className:"combi__radios-wrapper",children:[(0,s.jsx)(x.Z,{idName:"combi__radios--ratio",defaultValue:Z,onChange:e=>{S(e)},options:[{label:"50/50",value:"term"},{label:"30/70",value:"term30"}],label:w("calculators.combi.ratioHeading"),className:"radios combi__radios combi__radios--ratio"}),(0,s.jsx)(x.Z,{idName:"combi__radios--fund",defaultValue:F,onChange:W,options:n.Z,label:w("calculators.combi.fundHeading"),className:"radios combi__radios combi__radios--fund"})]}),(0,s.jsx)("hr",{className:"combi__separator separator separator--accent"}),D&&D.minTotal.value&&D.maxTotal.value&&(0,s.jsx)(b.Z,{vModelProxy:g,onChange:k,min:D.minTotal.value,max:D.maxTotal.value,step:1e5,label:w("calculators.combi.sliderLabel"),className:"combi__slider"})]}),Z&&F&&(0,s.jsxs)("div",{className:"combi__result-wrapper",children:[(0,s.jsxs)("div",{className:"combi__result-block",children:[(0,s.jsx)(_.Z,{item:{label:w("calculators.combi.results.deposit")},slotIcon:(0,s.jsx)(a.QC,{})}),A(0).map((e,t)=>(0,s.jsx)(_.Z,{item:e},t))]}),(0,s.jsxs)("div",{className:"combi__result-block",children:[(0,s.jsx)(_.Z,{item:{label:w("calculators.combi.results.investment")},slotIcon:(0,s.jsx)(a.rq,{})}),A(1).map((e,t)=>(0,s.jsx)(_.Z,{item:e,fundType:F},t))]}),(0,s.jsxs)("div",{className:"combi__result-block",children:[(0,s.jsx)(_.Z,{item:{label:w("calculators.combi.results.totalYield")},slotIcon:(0,s.jsx)(a.Sq,{})}),A(2).map((e,t)=>(0,s.jsx)(_.Z,{item:e,fundType:F,className:"combi__result--last"},t))]})]})]}):(0,s.jsx)("h3",{className:"typo--h5",children:w("deposits.investing.table.unavailable")}),(0,s.jsx)("hr",{className:"combi__separator--bottom separator separator--accent"})]})}},46289:function(e,t,l){"use strict";var s=l(27573);l(36901),l(7653);var a=l(73892);t.Z=(0,a.Z)(function(e){var t;let{props:{item:l,fundType:a,slotIcon:i,hasDivider:r,underlined:n},classes:o}=e;return(0,s.jsxs)("div",{className:o("result"),children:[(0,s.jsxs)("div",{className:"result__label-wrapper",children:[i&&(0,s.jsx)("span",{className:"result__label-icon-wrapper",children:i}),l.label&&(0,s.jsxs)("span",{className:"result__label-text",children:[l.label,":"]}
1),l.value&&(0,s.jsxs)("div",{className:"result__label-value",children:[(t=l.value,"rentier"===a&&t.includes("Kč")?"N/A":t),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"result__label-underline"}),(0,s.jsx)("div",{className:"result__label-underline"})]})]})]}),r&&(0,s.jsx)("div",{className:"result__divider"})]})})},86939:function(e,t,l){"use strict";l.d(t,{Z:function(){return _}});var s=l(27573);l(80707);var a=l(47270),i=l(4875),r=l(96067),n=l(82305),o=Math.floor,u=Math.min,c=function(e,t,l,s){var a=0,i=null==e?0:e.length;if(0===i)return 0;for(var r=(t=l(t))!=t,c=null===t,d=(0,n.Z)(t),m=void 0===t;a<i;){var v=o((a+i)/2),h=l(e[v]),p=void 0!==h,b=null===h,_=h==h,f=(0,n.Z)(h);if(r)var x=s||_;else x=m?_&&(s||p):c?_&&p&&(s||!b):d?_&&p&&!b&&(s||!f):!b&&!f&&(s?h<=t:h<t);x?a=v+1:i=v}return u(i,4294967294)},d=l(63258),m=l(48295),v=l(7653),h=l(73892),p=l(45254),b=l.n(p),_=(0,h.Z)(function(e){var t,l;let{props:{label:i,tooltip:n,step:o,min:u,max:h,customSteps:p,months:_,vModelProxy:x,onChange:j},classes:N}=e,[y,C]=(0,v.useState)(!1),w=(0,v.useRef)(null),g=(0,d.G)(),k=(0,m.useFormatter)(),F=(0,m.useTranslations)(),Z=null!==(l=null==p?void 0:p.find(e=>e.value===parseInt(x)))&&void 0!==l?l:null,S=e=>{if(p){var t,l;let s=(t={...Z,value:parseInt(e)},l="value",c(p,t,(0,r.Z)(l,2)));j(p[s].value)}else j(parseInt(e))},T=_&&(null==Z?void 0:null===(t=Z.month)||void 0===t?void 0:t.slice(1))||"0",E=_?F("plural.months",{count:parseInt(T)}):"Kč",M=_?T:k.number(x,"decimal");return(0,v.useEffect)(()=>{w.current&&(w.current.style.backgroundSize="".concat((x-u)*100/(h-u),"% 100%"))},[x,u,h]),(0,s.jsxs)("div",{className:N("slider",{"slider--labelled":p}),children:[(0,s.jsxs)("label",{className:"slider__info-wrapper",htmlFor:"calculator-slider",children:[(0,s.jsxs)("div",{className:"slider__label-wrapper",children:[(0,s.jsx)("span",{id:"calculator-slider-label",className:"slider__label","aria-label":i,children:i}),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),onClick:()=>C(!y),children:(0,s.jsx)(a.BS,{className:"slider__label-icon"})}),(0,s.jsx)("div",{className:b()("slider__popup",{"slider__popup--opened":y}),children:F("calculators.slider.tooltip")})]})]}),(0,s.jsxs)("div",{className:"slider__label-wrapper--right",children:[(0,s.jsx)("span",{className:"slider__label-value",children:M})," ",E]})]}),(0,s.jsx)("div",{className:"slider__input-wrapper",children:(0,s.jsx)("input",{id:"calculator-slider",className:"slider__input",type:"range",step:o,min:u,max:h,value:x,onChange:e=>S(e.target.value),"aria-labelledby":"calculator-slider-label"})}),(0,s.jsx)("div",{className:"slider__decoration",children:(0,s.jsxs)("div",{className:"slider__decoration-inner",children:[(0,s.jsx)("div",{className:"separator separator--accent"}),(0,s.jsx)("div",{ref:w,className:"slider__track-filled"}),(0,s.jsx)("div",{children:p&&g.small.up?p.map((e,t)=>(0,s.jsx)(f,{max:h,min:u,setInputValue:S,value:e},t)):(0,s.jsx)(s.Fragment,{children:Array.from({length:3}).map((e,t)=>(0,s.jsx)("div",{className:"slider__month-label-wrapper slider__month-label-wrapper--dummy",children:(0,s.jsx)("div",{className:"slider__month-divider"})},t))})})]})})]})});let f=e=>{let{value:t,setInputValue:l,max:a,min:r}=e,n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current&&(n.current.style.left="".concat((t.value-r)*100/(a-r),"%"))},[t,r,a]),(0,s.jsxs)("div",{ref:n,className:"slider__month-label-wrapper",children:[(0,s.jsx)("div",{className:"slider__month-divider"}),(0,s.jsx)("button",{className:"slider__month-label",onClick:()=>l(t.value),children:(0,i.bh)(t.month)})]})}},78836:function(e,t,l){"use strict";var s=l(27573);l(38978);var a=l(60806),i=l(7653),r=l(73892);t.Z=(0,r.Z)(function(e){let{props:{options:t,label:l,register:r,onChange:n,defaultValue:o,idName:u="revenueKey"},classes:c,ref:d}=e,m=(0,a.e)(),[v,h]=(0,i.useState)(o),[p,b]=(0,i.useState)(!1);return(0,s.jsx)("div",{ref:d,"data-classification":"group","data-type":"radio",className:c("radios"),children:(0,s.jsxs)("fieldset",{className:"formulate-input-wrapper","aria-labelledby":"formulate--produkty-fondy-5_label",onFocus:()=>{"keyboard"===m.current&&b(!0)},onBlur:()=>b(!1),children:[(0,s.jsx)("legend",{id:"formulate--produkty-fondy-5_label",className:"formulate-input-label formulate-input-label--before",children:l}),(0,s.jsx)("div",{className:"formulate-input-element formulate-input-element--group formulate-input-group",children:t.map((e,t)=>(0,s.jsx)("div",{"data-classification":"box","data-type":"radio","data-has-value":v===e.value?"true":"false",children:(0,s.jsxs)("div",{className:"formulate-input-wrapper ".concat(p&&v===e.value?"formulate-input-element-focus":""),children:[(0,s.jsxs)("div",{"data-type":"radio",className:"formulate-input-elements formulate-input-element--radio",children:[(0,s.jsx)("input",{type:"radio",...null==r?void 0:r(u),onChange:e=>{n(e.target.value),h(e.target.value)}
1,checked:e.value===v,value:e.value,id:"".concat(u).concat(t)}),(0,s.jsx)("span",{className:"formulate-input-element-decorator"})]}),(0,s.jsx)("label",{htmlFor:"".concat(u).concat(t),className:"formulate-input-label formulate-input-label--after",children:e.label})]})},t))})]})})})},44553:function(e,t,l){"use strict";l.d(t,{W:function(){return s},Z:function(){return a}});let s={ratio:"term",type:"jtbcm"},a=[{label:"J&T MONEY",value:"jtbcm"},{label:"J&T BOND",value:"jtbcb"},{label:"J&T RENTIER",value:"jtbcr"}]},25048:function(e,t,l){"use strict";var s=l(62052),a=l(44553);let i=(0,s.Ue)((e,t)=>({funds:{},activeFundType:a.W.type,activeFundRatio:a.W.ratio,setFund:(t,l)=>e(e=>({funds:{...e.funds,[t]:l}})),setActiveFundType:t=>e({activeFundType:t}),setActiveFundRatio:t=>e({activeFundRatio:t}),fetchCombiFund:async e=>{let{signal:l,isin:s,params:a,kontentClient:i}=e,r=await i.fetchCombiFund(l,s,a),n=await i.fetchCombiCalculatorFund(l,s.toUpperCase(),a);if(r&&n){var o,u;let e={product:null===(u=r.kontent)||void 0===u?void 0:null===(o=u.item.elements.investingDeposit)||void 0===o?void 0:o.linkedItems[0],...n};t().setFund(s,e),t().setActiveFundType(s)}return{fundKontent:r,fundData:n}},activeFund:()=>{let{funds:e,activeFundType:l}=t();return e[l]}}));t.Z=i},68279:function(e,t){"use strict";var l,s;(s=l||(l={})).FUND="fund",s.DEPOSIT="tv",t.Z=l},444:function(e,t,l){"use strict";l.d(t,{a:function(){return i}});var s=l(7653),a=l(60778);function i(){let e=(0,s.useContext)(a.P);if(null===e)throw Error("useKontentClient hook must be used within KontentClientProvider");return{kontentClient:e.kontentClient,newsCenterClient:(null==e?void 0:e.newsCenterClient)||null}}},25789:function(){},36901:function(){},80707:function(){},38978:function(){},19646:function(e,t,l){"use strict";l.d(t,{D:function(){return w}});var s,a,i,r,n,o,u=l(7653),c=l(78986),d=l(70618),m=l(30170),v=l(10917),h=l(50646),p=l(64855),b=l(2906),_=l(24559),f=l(50803),x=(s=new WeakMap,a=new WeakMap,i=new WeakMap,r=new WeakMap,n=new WeakSet,o=new WeakSet,class extends _.l{bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let l=this.options;this.options=(0,c._)(this,s).defaultMutationOptions(e),(0,f.VS)(this.options,l)||(0,c._)(this,s).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,c._)(this,i),observer:this}),(null==l?void 0:l.mutationKey)&&this.options.mutationKey&&(0,f.Ym)(l.mutationKey)!==(0,f.Ym)(this.options.mutationKey)?this.reset():(null===(t=(0,c._)(this,i))||void 0===t?void 0:t.state.status)==="pending"&&(0,c._)(this,i).setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null===(e=(0,c._)(this,i))||void 0===e||e.removeObserver(this)}}onMutationUpdate(e){(0,v._)(this,n,j).call(this),(0,v._)(this,o,N).call(this,e)}getCurrentResult(){return(0,c._)(this,a)}reset(){var e;null===(e=(0,c._)(this,i))||void 0===e||e.removeObserver(this),(0,m._)(this,i,void 0),(0,v._)(this,n,j).call(this),(0,v._)(this,o,N).call(this)}mutate(e,t){var l;return(0,m._)(this,r,t),null===(l=(0,c._)(this,i))||void 0===l||l.removeObserver(this),(0,m._)(this,i,(0,c._)(this,s).getMutationCache().build((0,c._)(this,s),this.options)),(0,c._)(this,i).addObserver(this),(0,c._)(this,i).execute(e)}constructor(e,t){super(),(0,h._)(this,n),(0,h._)(this,o),(0,d._)(this,s,{writable:!0,value:void 0}),(0,d._)(this,a,{writable:!0,value:void 0}),(0,d._)(this,i,{writable:!0,value:void 0}),(0,d._)(this,r,{writable:!0,value:void 0}),(0,m._)(this,a,void 0),(0,m._)(this,s,e),this.setOptions(t),this.bindMethods(),(0,v._)(this,n,j).call(this)}});function j(){var e,t;let l=null!==(t=null===(e=(0,c._)(this,i))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,p.R)();(0,m._)(this,a,{...l,isPending:"pending"===l.status,isSuccess:"success"===l.status,isError:"error"===l.status,isIdle:"idle"===l.status,mutate:this.mutate,reset:this.reset})}function N(e){b.V.batch(()=>{if((0,c._)(this,r)&&this.hasListeners()){var t,l,s,i,n,o,u,d;let m=(0,c._)(this,a).variables,v=(0,c._)(this,a).context;(null==e?void 0:e.type)==="success"?(null===(t=(l=(0,c._)(this,r)).onSuccess)||void 0===t||t.call(l,e.data,m,v),null===(s=(i=(0,c._)(this,r)).onSettled)||void 0===s||s.call(i,e.data,null,m,v)):(null==e?void 0:e.type)==="error"&&(null===(n=(o=(0,c._)(this,r)).onError)||void 0===n||n.call(o,e.error,m,v),null===(u=(d=(0,c._)(this,r)).onSettled)||void 0===u||u.call(d,void 0,e.error,m,v))}
1this.listeners.forEach(e=>{e((0,c._)(this,a))})})}var y=l(77930),C=l(4385);function w(e,t){let l=(0,y.NL)(t),[s]=u.useState(()=>new x(l,e));u.useEffect(()=>{s.setOptions(e)},[s,e]);let a=u.useSyncExternalStore(u.useCallback(e=>s.subscribe(b.V.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i=u.useCallback((e,t)=>{s.mutate(e,t).catch(C.Z)},[s]);if(a.error&&(0,C.L)(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}},4385:function(e,t,l){"use strict";function s(e,t){return"function"==typeof e?e(...t):!!e}function a(){}l.d(t,{L:function(){return s},Z:function(){return a}})}}]);

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.