(self.webpackChunk=self.webpackChunk||[]).push([[663],{232:(t,e,a)=>{"use strict";a.r(e);var n=a(7760),s=a.n(n),r=a(7152),o=a(4605);window.$=window.jQuery=a(9755),window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var i=document.head.querySelector('meta[name="csrf-token"]');i?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=i.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token");var c=document.head.querySelector('meta[name="locale"]');localStorage.locale=c?c.content:"en_US",a(6891),a(3734),a(7632),a(5432),window.vuei18n=r.Z,window.uiv=o,s().use(vuei18n),s().use(o),window.Vue=s()},8923:(t,e,a)=>{"use strict";function n(){return{description:[],amount:[],source:[],destination:[],currency:[],foreign_currency:[],foreign_amount:[],date:[],custom_dates:[],budget:[],category:[],bill:[],tags:[],piggy_bank:[],internal_reference:[],external_url:[],notes:[],location:[]}}function s(){return{description:"",transaction_journal_id:0,source_account_id:null,source_account_name:null,source_account_type:null,source_account_currency_id:null,source_account_currency_code:null,source_account_currency_symbol:null,destination_account_id:null,destination_account_name:null,destination_account_type:null,destination_account_currency_id:null,destination_account_currency_code:null,destination_account_currency_symbol:null,source_account:{id:0,name:"",name_with_balance:"",type:"",currency_id:0,currency_name:"",currency_code:"",currency_decimal_places:2},destination_account:{id:0,name:"",type:"",currency_id:0,currency_name:"",currency_code:"",currency_decimal_places:2},amount:"",currency_id:0,foreign_amount:"",foreign_currency_id:0,category:null,budget_id:0,bill_id:0,piggy_bank_id:0,tags:[],interest_date:null,book_date:null,process_date:null,due_date:null,payment_date:null,invoice_date:null,internal_reference:null,external_url:null,external_id:null,notes:null,links:[],attachments:[],zoom_level:null,longitude:null,latitude:null,errors:{}}}function r(t){var e=t.getFullYear(),a=t.getMonth();++a<10&&(a="0"+a);var n=t.getDate();n<10&&(n="0"+n);var s=t.getHours();s<10&&(s="0"+s);var r=t.getMinutes();r<10&&(r="0"+r);var o=t.getSeconds();o<10&&(o="0"+o);var i=-t.getTimezoneOffset(),c=Math.abs(Math.floor(i/60)),l=Math.abs(i)-60*c;c<10&&(c="0"+c),l<10&&(l="0"+l);var u="+";return i<0&&(u="-"),e+"-"+a+"-"+n+"T"+s+":"+r+":"+o+u+c+":"+l}a.d(e,{kQ:()=>n,f$:()=>s,u6:()=>r})},9899:(t,e,a)=>{"use strict";a.d(e,{Z:()=>p});var n=a(7760),s=a.n(n),r=a(629),o=a(8923),i=a(3465);const c={namespaced:!0,state:function(){return{transactionType:"any",groupTitle:"",transactions:[],customDateFields:{interest_date:!1,book_date:!1,process_date:!1,due_date:!1,payment_date:!1,invoice_date:!1},defaultTransaction:(0,o.f$)(),defaultErrors:(0,o.kQ)()}},getters:{transactions:function(t){return t.transactions},groupTitle:function(t){return t.groupTitle},transactionType:function(t){return t.transactionType},accountToTransaction:function(t){return t.accountToTransaction},defaultTransaction:function(t){return t.defaultTransaction},sourceAllowedTypes:function(t){return t.sourceAllowedTypes},destinationAllowedTypes:function(t){return t.destinationAllowedTypes},allowedOpposingTypes:function(t){return t.allowedOpposingTypes},customDateFields:function(t){return t.customDateFields}},actions:{},mutations:{addTransaction:function(t){var e=i(t.defaultTransaction);e.errors=i(t.defaultErrors),t.transactions.push(e)},resetErrors:function(t,e){t.transactions[e.index].errors=i(t.defaultErrors)},resetTransactions:function(t){t.transactions=[]},setGroupTitle:function(t,e){t.groupTitle=e.groupTitle},setCustomDateFields:function(t,e){t.customDateFields=e},deleteTransaction:function(t,e){t.transactions.splice(e.index,1),t.transactions.length},setTransactionType:function(t,e){t.transactionType=e},setAllowedOpposingTypes:function(t,e){t.allowedOpposingTypes=e},setAccountToTransaction:function(t,e){t.accountToTransaction=e},updateField:function(t,e){t.transactions[e.index][e.field]=e.value},setTransactionError:function(t,e){t.transactions[e.index].errors[e.field]=e.errors},setDestinationAllowedTypes:function(t,e){t.destinationAllowedTypes=e},setSourceAllowedTypes:function(t,e){t.sourceAllowedTypes=e}}},l={namespaced:!0,state:function(){return{viewRange:"default",start:null,end:null,defaultStart:null,defaultEnd:null}},getters:{start:function(t){return t.start},end:function(t){return t.end},defaultStart:function(t){return t.defaultStart},defaultEnd:function(t){return t.defaultEnd},viewRange:function(t){return t.viewRange}},actions:{initialiseStore:function(t){"default"===t.state.viewRange&&axios.get("./api/v1/preferences/viewRange").then((function(e){var a=e.data.data.attributes.data;t.commit("setViewRange",a),t.dispatch("setDatesFromViewRange")})).catch((function(e){t.commit("setViewRange","1M"),t.dispatch("setDatesFromViewRange")}))},setDatesFromViewRange:function(t){if(localStorage.viewRangeStart&&t.commit("setStart",new Date(localStorage.viewRangeStart)),localStorage.viewRangeEnd&&t.commit("setEnd",new Date(localStorage.viewRangeEnd)),localStorage.viewRangeDefaultStart&&t.commit("setDefaultStart",new Date(localStorage.viewRangeDefaultStart)),localStorage.viewRangeDefaultEnd&&t.commit("setDefaultEnd",new Date(localStorage.viewRangeDefaultEnd)),null===t.getters.end||null===t.getters.start){var e,a;switch(t.getters.viewRange){case"1D":e=new Date,a=new Date(e.getTime()),e.setHours(0,0,0,0),a.setHours(23,59,59,999);break;case"1W":e=new Date,a=new Date(e.getTime());var n=e.getDate()-e.getDay()+(0===e.getDay()?-6:1);e.setDate(n),e.setHours(0,0,0,0);var s=a.getDate()-(a.getDay()-1)+6;a.setDate(s),a.setHours(23,59,59,999);break;case"1M":e=new Date,(e=new Date(e.getFullYear(),e.getMonth(),1)).setHours(0,0,0,0),(a=new Date(e.getFullYear(),e.getMonth()+1,0)).setHours(23,59,59,999);break;case"3M":e=new Date,a=new Date;var r=Math.floor((e.getMonth()+3)/3)-1;(e=new Date(e.getFullYear(),[0,3,6,9][r],1)).setHours(0,0,0,0),a=new Date(a.getFullYear(),[2,5,8,11][r],1),(a=new Date(a.getFullYear(),a.getMonth()+1,0)).setHours(23,59,59,999);break;case"6M":e=new Date,a=new Date;var o=e.getMonth()<=5?0:1;(e=new Date(e.getFullYear(),[0,6][o],1)).setHours(0,0,0,0),a=new Date(a.getFullYear(),[5,11][o],1),(a=new Date(a.getFullYear(),a.getMonth()+1,0)).setHours(23,59,59,999);break;case"1Y":e=new Date,a=new Date,e=new Date(e.getFullYear(),0,1),a=new Date(a.getFullYear(),11,31),e.setHours(0,0,0,0),a.setHours(23,59,59,999)}t.commit("setStart",e),t.commit("setEnd",a),t.commit("setDefaultStart",e),t.commit("setDefaultEnd",a)}}},mutations:{setStart:function(t,e){t.start=e,window.localStorage.setItem("viewRangeStart",e)},setEnd:function(t,e){t.end=e,window.localStorage.setItem("viewRangeEnd",e)},setDefaultStart:function(t,e){t.defaultStart=e,window.localStorage.setItem("viewRangeDefaultStart",e)},setDefaultEnd:function(t,e){t.defaultEnd=e,window.localStorage.setItem("viewRangeDefaultEnd",e)},setViewRange:function(t,e){t.viewRange=e}}};var u=function(){return{listPageSize:33}},d={initialiseStore:function(t){localStorage.listPageSize&&(u.listPageSize=localStorage.listPageSize,t.commit("setListPageSize",{length:localStorage.listPageSize})),localStorage.listPageSize||axios.get("./api/v1/preferences/listPageSize").then((function(e){t.commit("setListPageSize",{length:parseInt(e.data.data.attributes.data)})}))}};const _={namespaced:!0,state:u,getters:{listPageSize:function(t){return t.listPageSize}},actions:d,mutations:{setListPageSize:function(t,e){var a=parseInt(e.length);0!==a&&(t.listPageSize=a)}}};s().use(r.ZP);const p=new r.ZP.Store({namespaced:!0,modules:{root:_,transactions:{namespaced:!0,modules:{create:c,edit:{namespaced:!0,state:function(){return{}},getters:{},actions:{},mutations:{}}}},accounts:{namespaced:!0,modules:{index:{namespaced:!0,state:function(){return{orderMode:!1,activeFilter:1}},getters:{orderMode:function(t){return t.orderMode},activeFilter:function(t){return t.activeFilter}},actions:{},mutations:{setOrderMode:function(t,e){t.orderMode=e},setActiveFilter:function(t,e){t.activeFilter=e}}}}},dashboard:{namespaced:!0,modules:{index:l}}},strict:!1,plugins:[],state:{currencyPreference:{},locale:"en-US",listPageSize:50},mutations:{setCurrencyPreference:function(t,e){t.currencyPreference=e.payload},initialiseStore:function(t){if(localStorage.locale)t.locale=localStorage.locale;else{var e=document.head.querySelector('meta[name="locale"]');e&&(t.locale=e.content,localStorage.locale=e.content)}}},getters:{currencyCode:function(t){return t.currencyPreference.code},currencyPreference:function(t){return t.currencyPreference},currencyId:function(t){return t.currencyPreference.id},locale:function(t){return t.locale}},actions:{updateCurrencyPreference:function(t){localStorage.currencyPreference?t.commit("setCurrencyPreference",{payload:JSON.parse(localStorage.currencyPreference)}):axios.get("./api/v1/currencies/default").then((function(e){var a={id:parseInt(e.data.data.id),name:e.data.data.attributes.name,symbol:e.data.data.attributes.symbol,code:e.data.data.attributes.code,decimal_places:parseInt(e.data.data.attributes.decimal_places)};localStorage.currencyPreference=JSON.stringify(a),t.commit("setCurrencyPreference",{payload:a})})).catch((function(e){console.error(e),t.commit("setCurrencyPreference",{payload:{id:1,name:"Euro",symbol:"€",code:"EUR",decimal_places:2}})}))}}})},157:(t,e,a)=>{t.exports=new vuei18n({locale:document.documentElement.lang,fallbackLocale:"en",messages:{bg:a(7154),cs:a(6407),de:a(4726),en:a(3340),"en-us":a(3340),"en-gb":a(6318),es:a(5394),el:a(3636),fr:a(2551),hu:a(995),it:a(9112),nl:a(4671),nb:a(9085),pl:a(6238),fi:a(7868),"pt-br":a(6586),"pt-pt":a(8664),ro:a(1102),ru:a(753),"zh-tw":a(1715),"zh-cn":a(4556),sk:a(7049),sv:a(7921),vi:a(1497)}})},3015:(t,e,a)=>{"use strict";var n=a(1900);const s=(0,n.Z)({name:"Dashboard"},(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;var r=a(629);function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function i(t){for(var e=1;e0){var o=s+" "+t;if(!(o.length>e))return r===n.length-1?void a.push(o):void(s=o);a.push(s),s=""}r!==n.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,"3b8050c6",null).exports;function L(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function R(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],n=a.attributes.active;a.attributes.pay_dates.length>0&&n&&this.bills.push(a)}this.error=!1,this.loading=!1}}},$=(0,n.Z)(M,(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(n){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(n)))+"\n "),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,U={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{}}}}},G=(0,n.Z)(U,(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,V={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:{}}}},W={name:"BudgetListGroup",components:{BudgetLimitRow:G,BudgetRow:(0,n.Z)(V,(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}},K=(0,n.Z)(W,(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("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.title))]),t._v(" "),a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.budget")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.spent")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("firefly.left")))])])]),t._v(" "),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,"2b21deef",null).exports;function Z(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function q(t){for(var e=1;e_&&(m=100-(h=d/_*100));var f={id:i,amount:o.attributes.amount,budget_id:c,budget_name:this.budgets[o.attributes.budget_id].name,currency_id:l,currency_code:o.attributes.currency_code,period:o.attributes.period,start:new Date(o.attributes.start),end:new Date(o.attributes.end),spent:o.attributes.spent,pctGreen:g,pctOrange:h,pctRed:m};this.budgetLimits[p].push(f)}},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))}}},X=(0,n.Z)(Q,(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,"66a7692f",null).exports;function tt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function et(t){for(var e=1;ethis.max?a.difference_float:this.max,this.income.push(a)}for(var n in 0===this.max&&(this.max=1),this.income)if(this.income.hasOwnProperty(n)){var s=this.income[n];s.pct=s.difference_float/this.max*100,this.income[n]=s}this.income.sort((function(t,e){return t.pct>e.pct?-1:e.pct>t.pct?1:0}))}}},ot=(0,n.Z)(rt,(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.revenue_accounts")))])]),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("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.revenue_accounts")))]),t._v(" "),a("thead",[a("tr",[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.spent")))])])]),t._v(" "),a("tbody",t._l(t.income,(function(e){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./accounts/show/"+e.id}},[t._v(t._s(e.name))])]),t._v(" "),a("td",{staticClass:"align-middle"},[e.pct>0?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 it(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function ct(t){for(var e=1;ee.pct?-1:e.pct>t.pct?1:0}))}}},pt=(0,n.Z)(_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.expense_accounts")))])]),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("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.expense_accounts")))]),t._v(" "),a("thead",[a("tr",[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.spent")))])])]),t._v(" "),a("tbody",t._l(t.expenses,(function(e){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./accounts/show/"+e.id}},[t._v(t._s(e.name))])]),t._v(" "),a("td",{staticClass:"align-middle"},[e.pct>0?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,gt={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=(0,n.Z)(gt,(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}}}},ft=(0,n.Z)(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,bt={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=(0,n.Z)(bt,(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,vt={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}}}},wt=(0,n.Z)(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",{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;var kt=a(9879);function Dt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function Ct(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 n=t[a];n.spentPct=n.spent/this.spent*100,n.earnedPct=n.earned/this.earned*100,this.sortedList.push(n)}}}},zt=(0,n.Z)(It,(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("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.categories")))]),t._v(" "),a("thead",[a("tr",[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.spent")))])])]),t._v(" "),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,"7ea958c9",null).exports;var At=a(7760),Pt=a.n(At),Tt=a(9899);a(232),a(7757),Pt().component("transaction-list-large",ft),Pt().component("transaction-list-medium",yt),Pt().component("transaction-list-small",wt),Pt().component("dashboard",s),Pt().component("top-boxes",_),Pt().component("main-account",j),Pt().component("main-account-list",B),Pt().component("main-bills-list",$),Pt().component("main-budget-list",X),Pt().component("main-category-list",zt),Pt().component("main-debit-list",pt),Pt().component("main-credit-list",ot),Pt().component("main-piggy-list",ht),Pt().use(r.ZP);var Ot=a(157),Bt={};new(Pt())({i18n:Ot,store:Tt.Z,el:"#dashboard",render:function(t){return t(s,{props:Bt})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference"),this.$store.dispatch("root/initialiseStore"),this.$store.dispatch("dashboard/index/initialiseStore")}}),new(Pt())({i18n:Ot,store:Tt.Z,el:"#calendar",render:function(t){return t(kt.Z,{props:Bt})}})},4547:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var n=a(4015),s=a.n(n),r=a(3645),o=a.n(r)()(s());o.push([t.id,".dropdown-item[data-v-12891edc],.dropdown-item[data-v-12891edc]:hover{color:#212529}","",{version:3,sources:["webpack://./src/components/dashboard/Calendar.vue"],names:[],mappings:"AA0OA,sEACA,aACA",sourcesContent:['\x3c!--\n - Calendar.vue\n - Copyright (c) 2020 james@firefly-iii.org\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see .\n --\x3e\n\n\n\n