PageSourceSearch

https://askbina.ai/assets/CompareCalculator-Bwc4D3Mv.js

js askbina.ai collected 2026-10-05 13:01:02 UTC 8,618 bytes, 1 lines download raw bytes

1import{e as u,r as o,j as e,L as f,g as N,i as y}from"./index-CcMLSBG6.js";import{L as p}from"./label-6YVF-Fk-.js";import{S as j}from"./slider-lQ-qzISm.js";import{T as v,a as w,b as C,c as S}from"./tabs-3XcCUx4u.js";import{G as L}from"./git-compare-CTPoRA_x.js";import{R as M,T,B as g}from"./generateCategoricalChart-c9XS0TT-.js";import{B as I}from"./BarChart-GQNp9mB6.js";import{C as k}from"./CartesianGrid-C7yAXQ8H.js";import{X as E,Y as A}from"./YAxis-D0cg4vhk.js";import"./isEqual-0YNy-Bd2.js";const i=n=>new Intl.NumberFormat("he-IL",{style:"currency",currency:"ILS",minimumFractionDigits:0,maximumFractionDigits:0}).format(n||0),h=[{name:"תמהיל שמרני",components:[{name:"קבועה צמודה",percentage:60,rate:3.5},{name:"פריים",percentage:40,rate:.6}]},{name:"תמהיל מאוזן",components:[{name:"קבועה צמודה",percentage:33,rate:3.5},{name:"קבועה לא צמודה",percentage:33,rate:4},{name:"פריים",percentage:34,rate:.6}]},{name:"מוטה פריים",components:[{name:"פריים",percentage:60,rate:.6},{name:"קבועה צמודה",percentage:40,rate:3.5}]}];function B(n,x,l){let m=0,r=0;return n.components.forEach(d=>{const a=x*d.percentage/100,s=d.rate/100/12,t=l*12,c=s===0?a/t:a*(s*Math.pow(1+s,t))/(Math.pow(1+s,t)-1);m+=c,r+=c*t-a}),{monthly:m,interest:r,total:m*l*12}}function $(){u({title:"השוואת תמהילי משכנתא — שמרני, מאוזן ומוטה פריים | בינה",description:"השוו שלושה תמהילי משכנתא קלאסיים בו-זמנית: החזר חודשי, סך ריבית וסך תשלום — ובחרו את התמהיל שמתאים לכם.",canonicalPath:"/CompareCalculator"});const[n,x]=o.useState(1e6),[l,m]=o.useState(25),r=o.useMemo(()=>h.map(s=>({name:s.name,components:s.components,...B(s,n,l)})),[n,l]),d=r.map(s=>({name:s.name,"החזר חודשי":Math.round(s.monthly),'סה"כ ריבית (אלפי ₪)':Math.round(s.interest/1e3)})),a=r.reduce((s,t)=>s.interest<t.interest?s:t);return e.jsx("div",{className:"min-h-screen bg-gray-50 py-8 px-4",dir:"rtl",children:e.jsxs("div",{className:"max-w-5xl mx-auto",children:[e.jsxs("div",{className:"mb-8 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-indigo-100 mb-3",children:e.jsx(L,{className:"h-6 w-6 text-indigo-600"})}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"השוואת תמהילי משכנתא"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"השוו שלושה תמהילים קלאסיים — החישוב מתעדכן בזמן אמת"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-5",children:[e.jsxs("div",{className:"bg-white rounded-xl border p-5 space-y-5",children:[e.jsx("h2",{className:"font-semibold text-gray-800 text-sm border-b pb-2",children:"פרמטרים"}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(p,{className:"text-sm",children:"סכום המשכנתא"}),e.jsx("span",{className:"text-sm font-semibold text-blue-700",children:i(n)})]}),e.jsx(j,{value:[n],min:2e5,max:4e6,step:5e4,onValueChange:([s])=>x(s)}),e.jsxs("div",{className:"flex justify-between text-xs text-gray-400",children:[e.jsx("span",{children:"200K"}),e.jsx("span",{children:"4M"})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(p,{className:"text-sm",children:"תקופה"}),e.jsxs("span",{className:"text-sm font-semibold text-blue-700",children:[l," שנים"]})]}),e.jsx(j,{value:[l],min:5,max:30,step:1,onValueChange:([s])=>m(s)}),e.jsxs("div",{className:"flex justify-between text-xs text-gray-400",children:[e.jsx("span",{children:"5 שנים"}),e.jsx("span",{children:"30 שנים"})]})]})]}),e.jsxs("div",{className:"bg-white rounded-xl border p-5",children:[e.jsx("h2",{className:"font-semibold text-gray-800 text-sm border-b pb-2 mb-3",children:"הרכב התמהילים"}),e.jsxs(v,{defaultValue:"0",children:[e.jsx(w,{className:"w-full mb-3 flex flex-wrap gap-1 h-auto bg-gray-100 p-1 rounded-lg",children:h.map((s,t)=>e.jsx(C,{value:String(t),className:"text-xs flex-1",children:s.name},t))}),h.map((s,t)=>e.jsx(S,{value:String(t),children:e.jsx("div",{className:"space-y-2",children:s.components.map((c,b)=>e.jsxs("div",{className:"flex justify-between items-center py-1.5 border-b last:border-0 text-sm",children:[e.jsx("span",{className:"text-gray-700",children:c.name}),e.jsxs("div",{className:"text-left",children:[e.jsxs("span",{className:"font-semibold text-gray-900",children:[c.percentage,"%"]}),e.jsxs("span",{className:"text-gray-400 mr-2",children:["| ",c.rate,"%"]})]})]},b))})},t))]})]})]}),e.jsxs("div",{className:"lg:col-span-3 space-y-5",children:[e.jsxs("div",{className:"bg-gradient-to-br from-indigo-600 to-blue-700 rounded-xl p-6 text-white shadow-lg",children:[e.jsx("div",{className:"text-sm opacity-80 mb-1",children:"💡 תמהיל עם הריבית הנמוכה ביותר"}),e.jsx("div",{className:"text-2xl font-bold",children:a.name}),e.jsxs("div",{className:"text-sm opacity-70 mt-1",children:['סה"כ ריבית: ',i(a.interest)]}),e.jsx("div",{className:"border-t border-white/20 mt-4 pt-4 flex justify-between flex-wrap gap-2",children:r.map((s,t)=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs opacity-70",children:s.name}),e.jsxs("div",{className:"font-semibold text-sm",children:[i(s.monthly),"/חודש"]})]},t))})]}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:r.map((s,t)=>e.jsxs("div",{className:`rounded-xl border p-3 ${s.name===a.name?"bg-green-50 border-green-200":"bg-white"}`,children:[e.jsx("div",{className:"text-xs text-gray-500 mb-1",children:s.name}),e.jsx("div",{className:"text-lg font-bold text-gray-900",children:i(s.monthly)}),e.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:"לחודש"}),s.name===a.name&&e.jsx("div",{className:"text-xs text-green-600 font-medium mt
1-1",children:"✅ מומלץ"})]},t))}),e.jsxs("div",{className:"bg-white rounded-xl border divide-y overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-4 px-4 py-2 bg-gray-50 text-xs font-semibold text-gray-500",children:[e.jsx("span",{children:"תמהיל"}),e.jsx("span",{className:"text-center",children:"החזר חודשי"}),e.jsx("span",{className:"text-center",children:"סך ריבית"}),e.jsx("span",{className:"text-center",children:"סך תשלום"})]}),r.map((s,t)=>e.jsxs("div",{className:`grid grid-cols-4 px-4 py-3 text-sm ${s.name===a.name?"bg-green-50":""}`,children:[e.jsx("span",{className:"font-medium text-gray-800",children:s.name}),e.jsx("span",{className:"text-center text-blue-700 font-semibold",children:i(s.monthly)}),e.jsx("span",{className:"text-center text-gray-700",children:i(s.interest)}),e.jsx("span",{className:"text-center text-gray-700",children:i(s.total)})]},t))]}),e.jsxs("div",{className:"bg-white rounded-xl border p-4",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"השוואה חזותית"}),e.jsx(M,{width:"100%",height:200,children:e.jsxs(I,{data:d,margin:{top:5,right:10,left:10,bottom:5},children:[e.jsx(k,{strokeDasharray:"3 3"}),e.jsx(E,{dataKey:"name",tick:{fontSize:11}}),e.jsx(A,{tick:{fontSize:11}}),e.jsx(T,{formatter:s=>s.toLocaleString("he-IL")}),e.jsx(g,{dataKey:"החזר חודשי",fill:"#3b82f6",radius:[4,4,0,0]}),e.jsx(g,{dataKey:'סה"כ ריבית (אלפי ₪)',fill:"#6366f1",radius:[4,4,0,0]})]})})]}),e.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-sm text-blue-900",children:"רוצים תמהיל מותאם אישית?"}),e.jsx("div",{className:"text-xs text-blue-700 mt-0.5",children:"בינה תבנה תמהיל לפי המצב הספציפי שלכם"})]}),e.jsx(f,{to:N("Chat"),className:"flex-shrink-0",children:e.jsxs("button",{className:"flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors",children:[e.jsx(y,{className:"h-4 w-4"}),"דברו עם בינה"]})})]}),e.jsx("p",{className:"text-xs text-gray-400 text-center px-2",children:"החישובים מבוססים על ריביות קבועות לצורך השוואה בלבד. בפועל, ריביות פריים ומשתנות מושפעות ממדד ומפריים."})]})]})]})})}export{$ as default};

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.