(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{276:function(t,e,a){a(457),t.exports=a(725)},277:function(t,e,a){var s={"./af":89,"./af.js":89,"./ar":90,"./ar-dz":91,"./ar-dz.js":91,"./ar-kw":92,"./ar-kw.js":92,"./ar-ly":93,"./ar-ly.js":93,"./ar-ma":94,"./ar-ma.js":94,"./ar-sa":95,"./ar-sa.js":95,"./ar-tn":96,"./ar-tn.js":96,"./ar.js":90,"./az":97,"./az.js":97,"./be":98,"./be.js":98,"./bg":99,"./bg.js":99,"./bm":100,"./bm.js":100,"./bn":101,"./bn-bd":102,"./bn-bd.js":102,"./bn.js":101,"./bo":103,"./bo.js":103,"./br":104,"./br.js":104,"./bs":105,"./bs.js":105,"./ca":106,"./ca.js":106,"./cs":107,"./cs.js":107,"./cv":108,"./cv.js":108,"./cy":109,"./cy.js":109,"./da":110,"./da.js":110,"./de":111,"./de-at":112,"./de-at.js":112,"./de-ch":113,"./de-ch.js":113,"./de.js":111,"./dv":114,"./dv.js":114,"./el":115,"./el.js":115,"./en-au":116,"./en-au.js":116,"./en-ca":117,"./en-ca.js":117,"./en-gb":118,"./en-gb.js":118,"./en-ie":119,"./en-ie.js":119,"./en-il":120,"./en-il.js":120,"./en-in":121,"./en-in.js":121,"./en-nz":122,"./en-nz.js":122,"./en-sg":123,"./en-sg.js":123,"./eo":124,"./eo.js":124,"./es":125,"./es-do":126,"./es-do.js":126,"./es-mx":127,"./es-mx.js":127,"./es-us":128,"./es-us.js":128,"./es.js":125,"./et":129,"./et.js":129,"./eu":130,"./eu.js":130,"./fa":131,"./fa.js":131,"./fi":132,"./fi.js":132,"./fil":133,"./fil.js":133,"./fo":134,"./fo.js":134,"./fr":135,"./fr-ca":136,"./fr-ca.js":136,"./fr-ch":137,"./fr-ch.js":137,"./fr.js":135,"./fy":138,"./fy.js":138,"./ga":139,"./ga.js":139,"./gd":140,"./gd.js":140,"./gl":141,"./gl.js":141,"./gom-deva":142,"./gom-deva.js":142,"./gom-latn":143,"./gom-latn.js":143,"./gu":144,"./gu.js":144,"./he":145,"./he.js":145,"./hi":146,"./hi.js":146,"./hr":147,"./hr.js":147,"./hu":148,"./hu.js":148,"./hy-am":149,"./hy-am.js":149,"./id":150,"./id.js":150,"./is":151,"./is.js":151,"./it":152,"./it-ch":153,"./it-ch.js":153,"./it.js":152,"./ja":154,"./ja.js":154,"./jv":155,"./jv.js":155,"./ka":156,"./ka.js":156,"./kk":157,"./kk.js":157,"./km":158,"./km.js":158,"./kn":159,"./kn.js":159,"./ko":160,"./ko.js":160,"./ku":161,"./ku.js":161,"./ky":162,"./ky.js":162,"./lb":163,"./lb.js":163,"./lo":164,"./lo.js":164,"./lt":165,"./lt.js":165,"./lv":166,"./lv.js":166,"./me":167,"./me.js":167,"./mi":168,"./mi.js":168,"./mk":169,"./mk.js":169,"./ml":170,"./ml.js":170,"./mn":171,"./mn.js":171,"./mr":172,"./mr.js":172,"./ms":173,"./ms-my":174,"./ms-my.js":174,"./ms.js":173,"./mt":175,"./mt.js":175,"./my":176,"./my.js":176,"./nb":177,"./nb.js":177,"./ne":178,"./ne.js":178,"./nl":179,"./nl-be":180,"./nl-be.js":180,"./nl.js":179,"./nn":181,"./nn.js":181,"./oc-lnc":182,"./oc-lnc.js":182,"./pa-in":183,"./pa-in.js":183,"./pl":184,"./pl.js":184,"./pt":185,"./pt-br":186,"./pt-br.js":186,"./pt.js":185,"./ro":187,"./ro.js":187,"./ru":188,"./ru.js":188,"./sd":189,"./sd.js":189,"./se":190,"./se.js":190,"./si":191,"./si.js":191,"./sk":192,"./sk.js":192,"./sl":193,"./sl.js":193,"./sq":194,"./sq.js":194,"./sr":195,"./sr-cyrl":196,"./sr-cyrl.js":196,"./sr.js":195,"./ss":197,"./ss.js":197,"./sv":198,"./sv.js":198,"./sw":199,"./sw.js":199,"./ta":200,"./ta.js":200,"./te":201,"./te.js":201,"./tet":202,"./tet.js":202,"./tg":203,"./tg.js":203,"./th":204,"./th.js":204,"./tk":205,"./tk.js":205,"./tl-ph":206,"./tl-ph.js":206,"./tlh":207,"./tlh.js":207,"./tr":208,"./tr.js":208,"./tzl":209,"./tzl.js":209,"./tzm":210,"./tzm-latn":211,"./tzm-latn.js":211,"./tzm.js":210,"./ug-cn":212,"./ug-cn.js":212,"./uk":213,"./uk.js":213,"./ur":214,"./ur.js":214,"./uz":215,"./uz-latn":216,"./uz-latn.js":216,"./uz.js":215,"./vi":217,"./vi.js":217,"./x-pseudo":218,"./x-pseudo.js":218,"./yo":219,"./yo.js":219,"./zh-cn":220,"./zh-cn.js":220,"./zh-hk":221,"./zh-hk.js":221,"./zh-mo":222,"./zh-mo.js":222,"./zh-tw":223,"./zh-tw.js":223};function r(t){var e=n(t);return a(e)}function n(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}r.keys=function(){return Object.keys(s)},r.resolve=n,t.exports=r,r.id=277},457:function(t,e,a){"use strict";a.r(e);var s={name:"Dashboard"},r=a(4),n=Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("top-boxes"),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-account")],1)]),t._v(" "),a("main-account-list"),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-budget-list")],1)]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-category-list")],1)]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-debit-list")],1),t._v(" "),a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-credit-list")],1)]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-piggy-list")],1),t._v(" "),a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-bills-list")],1)])],1)}),[],!1,null,null,null).exports,i=a(14);function c(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function o(t){for(var e=1;e0){var i=r+" "+t;if(!(i.length>e))return n===s.length-1?void a.push(i):void(r=i);a.push(r),r=""}n!==s.length-1&&t.length2}},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[a("a",{attrs:{href:e.url}},[t._v(t._s(e.title))])]),t._v(" "),a("div",{staticClass:"card-tools"},[a("span",{class:parseFloat(e.current_balance)<0?"text-danger":"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(parseFloat(e.current_balance)))+"\n ")])])]),t._v(" "),a("div",{staticClass:"card-body table-responsive p-0"},[a("div",[1===t.accounts.length?a("transaction-list-large",{attrs:{account_id:e.id,transactions:e.transactions}}):t._e(),t._v(" "),2===t.accounts.length?a("transaction-list-medium",{attrs:{account_id:e.id,transactions:e.transactions}}):t._e(),t._v(" "),t.accounts.length>2?a("transaction-list-small",{attrs:{account_id:e.id,transactions:e.transactions}}):t._e()],1)])])])})),0)])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"col"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"col"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])])])])}],!1,null,"5d6bb842",null).exports;function N(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function T(t){for(var e=1;e'+a+""},loadBills:function(t){for(var e in t)if(t.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var a=t[e],s=a.attributes.active;a.attributes.pay_dates.length>0&&s&&this.bills.push(a)}this.error=!1,this.loading=!1}}}),G=Object(r.a)(z,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.bills")))])]),t._v(" "),t.loading&&!t.error?a("div",{staticClass:"card-body"},[t._m(0)]):t._e(),t._v(" "),t.error?a("div",{staticClass:"card-body"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.error?t._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-striped"},[a("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.bills")))]),t._v(" "),a("thead",[a("tr",[a("th",{staticStyle:{width:"35%"},attrs:{scope:"col"}},[t._v(t._s(t.$t("list.name")))]),t._v(" "),a("th",{staticStyle:{width:"25%"},attrs:{scope:"col"}},[t._v(t._s(t.$t("list.next_expected_match")))])])]),t._v(" "),a("tbody",t._l(this.bills,(function(e){return a("tr",[a("td",[a("a",{attrs:{href:"./bills/show/"+e.id,title:e.attributes.name}},[t._v(t._s(e.attributes.name))]),t._v("\n (~ "),a("span",{staticClass:"text-danger"},[t._v(t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.attributes.currency_code}).format((parseFloat(e.attributes.amount_min)+parseFloat(e.attributes.amount_max))/-2)))]),t._v(")\n "),e.attributes.object_group_title?a("small",{staticClass:"text-muted"},[a("br"),t._v("\n "+t._s(e.attributes.object_group_title)+"\n ")]):t._e()]),t._v(" "),a("td",[t._l(e.attributes.paid_dates,(function(e){return a("span",[a("span",{domProps:{innerHTML:t._s(t.renderPaidDate(e))}}),a("br")])})),t._v(" "),t._l(e.attributes.pay_dates,(function(s){return 0===e.attributes.paid_dates.length?a("span",[t._v("\n "+t._s(new Intl.DateTimeFormat(t.locale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(s)))),a("br")]):t._e()}))],2)])})),0)])]),t._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./bills"}},[a("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_bills")))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports,M={name:"BudgetLimitRow",created:function(){var t;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US"},data:function(){return{locale:"en-US"}},props:{budgetLimit:{type:Object,default:function(){return{}}},budget:{type:Object,default:function(){return{}}}}},W=Object(r.a)(M,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("tr",[a("td",{staticStyle:{width:"25%"}},[a("a",{attrs:{href:"./budgets/show/"+t.budgetLimit.budget_id}},[t._v(t._s(t.budgetLimit.budget_name))])]),t._v(" "),a("td",{staticStyle:{"vertical-align":"middle"}},[a("div",{staticClass:"progress progress active"},[a("div",{staticClass:"progress-bar bg-success progress-bar-striped",style:"width: "+t.budgetLimit.pctGreen+"%;",attrs:{"aria-valuenow":t.budgetLimit.pctGreen,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.budgetLimit.pctGreen>35?a("span",[t._v("\n "+t._s(t.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.spent),total:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.amount)}))+"\n ")]):t._e()]),t._v(" "),a("div",{staticClass:"progress-bar bg-warning progress-bar-striped",style:"width: "+t.budgetLimit.pctOrange+"%;",attrs:{"aria-valuenow":t.budgetLimit.pctOrange,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.budgetLimit.pctRed<=50&&t.budgetLimit.pctOrange>35?a("span",[t._v("\n "+t._s(t.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.spent),total:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.amount)}))+"\n ")]):t._e()]),t._v(" "),a("div",{staticClass:"progress-bar bg-danger progress-bar-striped",style:"width: "+t.budgetLimit.pctRed+"%;",attrs:{"aria-valuenow":t.budgetLimit.pctRed,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.budgetLimit.pctOrange<=50&&t.budgetLimit.pctRed>35?a("span",{staticClass:"text-muted"},[t._v("\n "+t._s(t.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.spent),total:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.amount)}))+"\n ")]):t._e()]),t._v(" "),t.budgetLimit.pctGreen<=35&&0===t.budgetLimit.pctOrange&&0===t.budgetLimit.pctRed&&0!==t.budgetLimit.pctGreen?a("span",{staticStyle:{"line-height":"16px"}},[t._v("\n   "+t._s(t.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.spent),total:Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(t.budgetLimit.amount)}))+"\n ")]):t._e()]),t._v(" "),a("small",{staticClass:"d-none d-lg-block"},[t._v("\n "+t._s(new Intl.DateTimeFormat(t.locale,{year:"numeric",month:"long",day:"numeric"}).format(t.budgetLimit.start))+"\n →\n "+t._s(new Intl.DateTimeFormat(t.locale,{year:"numeric",month:"long",day:"numeric"}).format(t.budgetLimit.end))+"\n ")])]),t._v(" "),a("td",{staticClass:"align-middle d-none d-lg-table-cell",staticStyle:{width:"10%"}},[parseFloat(t.budgetLimit.amount)+parseFloat(t.budgetLimit.spent)>0?a("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(parseFloat(t.budgetLimit.amount)+parseFloat(t.budgetLimit.spent)))+"\n ")]):t._e(),t._v(" "),0===parseFloat(t.budgetLimit.amount)+parseFloat(t.budgetLimit.spent)?a("span",{staticClass:"text-muted"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(0))+"\n ")]):t._e(),t._v(" "),parseFloat(t.budgetLimit.amount)+parseFloat(t.budgetLimit.spent)<0?a("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:t.budgetLimit.currency_code}).format(parseFloat(t.budgetLimit.amount)+parseFloat(t.budgetLimit.spent)))+"\n ")]):t._e()])])}),[],!1,null,"7988ecb6",null).exports,q={name:"BudgetRow",created:function(){var t;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US"},data:function(){return{locale:"en-US"}},props:{budget:{type:Object,default:{}}}},K={name:"BudgetListGroup",components:{BudgetLimitRow:W,BudgetRow:Object(r.a)(q,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("tr",[a("td",{staticStyle:{width:"25%"}},[a("a",{attrs:{href:"./budgets/show/"+t.budget.id}},[t._v(t._s(t.budget.name))])]),t._v(" "),a("td",{staticClass:"align-middle text-right"},[a("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:t.budget.currency_code}).format(parseFloat(t.budget.spent)))+"\n ")])])])}),[],!1,null,"2fc8f640",null).exports},props:{title:String,budgetLimits:Array,budgets:Array}},J=Object(r.a)(K,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[t._v(t._s(t.title))])]),t._v(" "),a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("tbody",[t._l(t.budgetLimits,(function(t,e){return a("BudgetLimitRow",{key:e,attrs:{budgetLimit:t}})})),t._v(" "),t._l(t.budgets,(function(t,e){return a("BudgetRow",{key:e,attrs:{budget:t}})}))],2)])]),t._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./budgets"}},[a("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_budgets")))])])])}),[],!1,null,"658dd996",null).exports;function H(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function Z(t){for(var e=1;ed&&(b=100-(_=d/(-1*u)*100));var h={id:c,amount:i.attributes.amount,budget_id:o,budget_name:this.budgets[i.attributes.budget_id].name,currency_id:l,currency_code:i.attributes.currency_code,period:i.attributes.period,start:new Date(i.attributes.start),end:new Date(i.attributes.end),spent:i.attributes.spent,pctGreen:f,pctOrange:_,pctRed:b};this.budgetLimits[p].push(h)}},filterBudgets:function(t,e){for(var a in this.rawBudgets)this.rawBudgets.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&this.rawBudgets[a].currency_id===e&&this.rawBudgets[a].id===t&&(console.log("Budget "+this.rawBudgets[a].name+" with currency "+this.rawBudgets[a].currency_code+" will be removed in favor of a budget limit."),this.rawBudgets.splice(parseInt(a),1))}}}),tt=Object(r.a)(Y,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.loading?t._e():a("div",{staticClass:"row"},[t.budgetLimits.daily.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.daily,title:t.$t("firefly.daily_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.weekly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.weekly,title:t.$t("firefly.weekly_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.monthly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.monthly,title:t.$t("firefly.monthly_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.quarterly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.quarterly,title:t.$t("firefly.quarterly_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.half_year.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.half_year,title:t.$t("firefly.half_year_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.yearly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.yearly,title:t.$t("firefly.yearly_budgets")}})],1):t._e(),t._v(" "),t.budgetLimits.other.length>0||t.rawBudgets.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:t.budgetLimits.other,budgets:t.rawBudgets,title:t.$t("firefly.other_budgets")}})],1):t._e()]),t._v(" "),t.loading&&!t.error?a("div",{staticClass:"row"},[t._m(0)]):t._e()])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"col"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])])])])}],!1,null,"5d7e4c93",null).exports;function et(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function at(t){for(var e=1;e0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:e.pct+"%"},attrs:{"aria-valuenow":e.pct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.pct>20?a("span",[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.difference_float))+"\n ")]):t._e()]),t._v(" "),e.pct<=20?a("span",{staticStyle:{"line-height":"16px"}},[t._v(" \n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.difference_float))+"\n ")]):t._e()]):t._e()])])})),0)])]),t._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/deposit"}},[a("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_deposits")))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports;function ot(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function lt(t){for(var e=1;e0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-danger",style:{width:e.pct+"%"},attrs:{"aria-valuenow":e.pct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.pct>20?a("span",[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.difference_float))+"\n ")]):t._e()]),t._v(" "),e.pct<=20?a("span",{staticStyle:{"line-height":"16px"}},[t._v(" \n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.difference_float))+"\n ")]):t._e()]):t._e()])])})),0)])]),t._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/withdrawal"}},[a("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_withdrawals")))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports,bt={name:"MainPiggyList",data:function(){return{piggy_banks:[],loading:!0,error:!1,locale:"en-US"}},created:function(){var t,e=this;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US",axios.get("./api/v1/piggy_banks").then((function(t){e.loadPiggyBanks(t.data.data),e.loading=!1})).catch((function(t){e.error=!0}))},methods:{loadPiggyBanks:function(t){for(var e in t)if(t.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var a=t[e];0!==parseFloat(a.attributes.left_to_save)&&(a.attributes.pct=parseFloat(a.attributes.current_amount)/parseFloat(a.attributes.target_amount)*100,this.piggy_banks.push(a))}this.piggy_banks.sort((function(t,e){return e.attributes.pct-t.attributes.pct}))}}},ht=Object(r.a)(bt,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.piggy_banks")))])]),t._v(" "),t.loading&&!t.error?a("div",{staticClass:"card-body"},[t._m(0)]):t._e(),t._v(" "),t.error?a("div",{staticClass:"card-body"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.error?t._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-striped"},[a("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.piggy_banks")))]),t._v(" "),a("thead",[a("tr",[a("th",{staticStyle:{width:"35%"},attrs:{scope:"col"}},[t._v(t._s(t.$t("list.piggy_bank")))]),t._v(" "),a("th",{staticStyle:{width:"40%"},attrs:{scope:"col"}},[t._v(t._s(t.$t("list.percentage"))+" "),a("small",[t._v("/ "+t._s(t.$t("list.amount")))])])])]),t._v(" "),a("tbody",t._l(this.piggy_banks,(function(e){return a("tr",[a("td",[a("a",{attrs:{href:"./piggy-banks/show/"+e.id,title:e.attributes.name}},[t._v(t._s(e.attributes.name))]),t._v(" "),e.attributes.object_group_title?a("small",{staticClass:"text-muted"},[a("br"),t._v("\n "+t._s(e.attributes.object_group_title)+"\n ")]):t._e()]),t._v(" "),a("td",[a("div",{staticClass:"progress-group"},[a("div",{staticClass:"progress progress-sm"},[e.attributes.pct<100?a("div",{staticClass:"progress-bar progress-bar-striped primary",style:{width:e.attributes.pct+"%"}}):t._e(),t._v(" "),100===e.attributes.pct?a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:e.attributes.pct+"%"}}):t._e()])]),t._v(" "),a("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.attributes.currency_code}).format(e.attributes.current_amount))+"\n ")]),t._v("\n of\n "),a("span",{staticClass:"text-success"},[t._v(t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.attributes.currency_code}).format(e.attributes.target_amount)))])])])})),0)])]),t._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./piggy-banks"}},[a("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_piggies")))])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,"c17c9a5a",null).exports,mt={name:"TransactionListLarge",data:function(){return{locale:"en-US"}},created:function(){var t;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US"},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},gt=Object(r.a)(mt,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.opposing_account")))]),t._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.amount")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.category")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.budget")))])])]),t._v(" "),a("tbody",t._l(this.transactions,(function(e){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+e.id,title:e.date}},[e.attributes.transactions.length>1?a("span",[t._v(t._s(e.attributes.group_title))]):t._e(),t._v(" "),1===e.attributes.transactions.length?a("span",[t._v(t._s(e.attributes.transactions[0].description))]):t._e()])]),t._v(" "),a("td",t._l(e.attributes.transactions,(function(e){return a("span",["withdrawal"===e.type?a("a",{attrs:{href:"accounts/show/"+e.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"deposit"===e.type?a("a",{attrs:{href:"accounts/show/"+e.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.source_id)===t.account_id?a("a",{attrs:{href:"accounts/show/"+e.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.destination_id)===t.account_id?a("a",{attrs:{href:"accounts/show/"+e.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),a("br")])})),0),t._v(" "),a("td",{staticStyle:{"text-align":"right"}},t._l(e.attributes.transactions,(function(e){return a("span",["withdrawal"===e.type?a("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"deposit"===e.type?a("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.source_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.destination_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e()])})),0),t._v(" "),a("td",t._l(e.attributes.transactions,(function(e){return a("span",[0!==e.category_id?a("a",{attrs:{href:"categories/show/"+e.category_id}},[t._v(t._s(e.category_name))]):t._e(),a("br")])})),0),t._v(" "),a("td",t._l(e.attributes.transactions,(function(e){return a("span",[0!==e.budget_id?a("a",{attrs:{href:"budgets/show/"+e.budget_id}},[t._v(t._s(e.budget_name))]):t._e(),a("br")])})),0)])})),0)])}),[],!1,null,"6e420753",null).exports,vt={name:"TransactionListMedium",data:function(){return{locale:"en-US"}},created:function(){var t;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US"},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},yt=Object(r.a)(vt,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.opposing_account")))]),t._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.amount")))])])]),t._v(" "),a("tbody",t._l(this.transactions,(function(e){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+e.id,title:e.date}},[e.attributes.transactions.length>1?a("span",[t._v(t._s(e.attributes.group_title))]):t._e(),t._v(" "),1===e.attributes.transactions.length?a("span",[t._v(t._s(e.attributes.transactions[0].description))]):t._e()])]),t._v(" "),a("td",t._l(e.attributes.transactions,(function(e){return a("span",["withdrawal"===e.type?a("a",{attrs:{href:"accounts/show/"+e.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"deposit"===e.type?a("a",{attrs:{href:"accounts/show/"+e.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.source_id)===t.account_id?a("a",{attrs:{href:"accounts/show/"+e.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.destination_id)===t.account_id?a("a",{attrs:{href:"accounts/show/"+e.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),a("br")])})),0),t._v(" "),a("td",{staticStyle:{"text-align":"right"}},t._l(e.attributes.transactions,(function(e){return a("span",["withdrawal"===e.type?a("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"deposit"===e.type?a("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.source_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.destination_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e()])})),0)])})),0)])}),[],!1,null,"0d4f7042",null).exports,Ct={name:"TransactionListSmall",data:function(){return{locale:"en-US"}},created:function(){var t;this.locale=null!==(t=localStorage.locale)&&void 0!==t?t:"en-US"},methods:{},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},jt=Object(r.a)(Ct,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.amount")))])])]),t._v(" "),a("tbody",t._l(this.transactions,(function(e){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+e.id,title:new Intl.DateTimeFormat(t.locale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(e.attributes.transactions[0].date))}},[e.attributes.transactions.length>1?a("span",[t._v(t._s(e.attributes.group_title))]):t._e(),t._v(" "),1===e.attributes.transactions.length?a("span",[t._v(t._s(e.attributes.transactions[0].description))]):t._e()])]),t._v(" "),a("td",{staticStyle:{"text-align":"right"}},t._l(e.attributes.transactions,(function(e){return a("span",["withdrawal"===e.type?a("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"deposit"===e.type?a("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.source_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(-1*e.amount))),a("br")]):t._e(),t._v(" "),"transfer"===e.type&&parseInt(e.destination_id)===t.account_id?a("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.amount))),a("br")]):t._e()])})),0)])})),0)])}),[],!1,null,"4cd7a656",null).exports,wt=a(67);function Ot(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function xt(t){for(var e=1;ethis.earned?parseFloat(u.sum):this.earned}}this.sortCategories()},sortCategories:function(){var t=[];for(var e in this.categories)this.categories.hasOwnProperty(e)&&t.push(this.categories[e]);for(var a in t.sort((function(t,e){return t.spent+t.earned-(e.spent+e.earned)})),t)if(t.hasOwnProperty(a)){var s=t[a];s.spentPct=s.spent/this.spent*100,s.earnedPct=s.earned/this.earned*100,this.sortedList.push(s)}}}}),It=Object(r.a)($t,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.categories")))])]),t._v(" "),t.loading&&!t.error?a("div",{staticClass:"card-body"},[t._m(0)]):t._e(),t._v(" "),t.error?a("div",{staticClass:"card-body"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.error?t._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("tbody",t._l(t.sortedList,(function(e){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./categories/show/"+e.id}},[t._v(t._s(e.name))])]),t._v(" "),a("td",{staticClass:"align-middle"},[e.spentPct>0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-danger",style:{width:e.spentPct+"%"},attrs:{"aria-valuenow":e.spentPct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.spentPct>20?a("span",[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.spent))+"\n ")]):t._e()]),t._v(" "),e.spentPct<=20?a("span",{staticClass:"progress-label",staticStyle:{"line-height":"16px"}},[t._v(" \n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.spent))+"\n ")]):t._e()]):t._e(),t._v(" "),e.earnedPct>0?a("div",{staticClass:"progress justify-content-end",attrs:{title:"hello2"}},[e.earnedPct<=20?a("span",{staticStyle:{"line-height":"16px"}},[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.earned))+"\n  ")]):t._e(),t._v(" "),a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:e.earnedPct+"%"},attrs:{"aria-valuenow":e.earnedPct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar",title:"hello"}},[e.earnedPct>20?a("span",[t._v("\n "+t._s(Intl.NumberFormat(t.locale,{style:"currency",currency:e.currency_code}).format(e.earned))+"\n ")]):t._e()])]):t._e()])])})),0)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"text-center"},[e("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,"098366f9",null).exports,Dt=a(8),Et=a.n(Dt),Ft=a(30);a(41),a(85),Et.a.component("transaction-list-large",gt),Et.a.component("transaction-list-medium",yt),Et.a.component("transaction-list-small",jt),Et.a.component("dashboard",n),Et.a.component("top-boxes",f),Et.a.component("main-account",L),Et.a.component("main-account-list",B),Et.a.component("main-bills-list",G),Et.a.component("main-budget-list",tt),Et.a.component("main-category-list",It),Et.a.component("main-debit-list",_t),Et.a.component("main-credit-list",ct),Et.a.component("main-piggy-list",ht),Et.a.use(i.c);var kt=a(43),Bt={};new Et.a({i18n:kt,store:Ft.a,el:"#dashboard",render:function(t){return t(n,{props:Bt})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference"),this.$store.dispatch("root/initialiseStore"),this.$store.dispatch("dashboard/index/initialiseStore")}}),new Et.a({i18n:kt,store:Ft.a,el:"#calendar",render:function(t){return t(wt.a,{props:Bt})}})},725:function(t,e){}},[[276,0,1]]]); //# sourceMappingURL=dashboard.js.map