(self.webpackChunk=self.webpackChunk||[]).push([[847],{9489:(e,t,a)=>{"use strict";a.r(t);var n=a(7760),o=a.n(n),i=a(7152),r=a(4605);window.$=window.jQuery=a(9755),window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var s=document.head.querySelector('meta[name="csrf-token"]');s?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=s.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=i.Z,window.uiv=r,o().use(vuei18n),o().use(r),window.Vue=o()},6149:(e,t,a)=>{"use strict";a.d(t,{Z:()=>x});var n=a(7760),o=a.n(n),i=a(629),r=a(6348),s=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,r.f$)(),defaultErrors:(0,r.kQ)()}},getters:{transactions:function(e){return e.transactions},defaultErrors:function(e){return e.defaultErrors},groupTitle:function(e){return e.groupTitle},transactionType:function(e){return e.transactionType},accountToTransaction:function(e){return e.accountToTransaction},defaultTransaction:function(e){return e.defaultTransaction},sourceAllowedTypes:function(e){return e.sourceAllowedTypes},destinationAllowedTypes:function(e){return e.destinationAllowedTypes},allowedOpposingTypes:function(e){return e.allowedOpposingTypes},customDateFields:function(e){return e.customDateFields}},actions:{},mutations:{addTransaction:function(e){var t=s(e.defaultTransaction);t.errors=s(e.defaultErrors),e.transactions.push(t)},resetErrors:function(e,t){e.transactions[t.index].errors=s(e.defaultErrors)},resetTransactions:function(e){e.transactions=[]},setGroupTitle:function(e,t){e.groupTitle=t.groupTitle},setCustomDateFields:function(e,t){e.customDateFields=t},deleteTransaction:function(e,t){e.transactions.splice(t.index,1),e.transactions.length},setTransactionType:function(e,t){e.transactionType=t},setAllowedOpposingTypes:function(e,t){e.allowedOpposingTypes=t},setAccountToTransaction:function(e,t){e.accountToTransaction=t},updateField:function(e,t){e.transactions[t.index][t.field]=t.value},setTransactionError:function(e,t){e.transactions[t.index].errors[t.field]=t.errors},setDestinationAllowedTypes:function(e,t){e.destinationAllowedTypes=t},setSourceAllowedTypes:function(e,t){e.sourceAllowedTypes=t}}};const l={namespaced:!0,state:function(){return{}},getters:{},actions:{},mutations:{}};var d=a(9119),u=a(3894),_=a(584),p=a(7090),g=a(4431),m=a(8358),y=a(4135),h=a(3703);const b={namespaced:!0,state:function(){return{viewRange:"default",start:null,end:null,defaultStart:null,defaultEnd:null}},getters:{start:function(e){return e.start},end:function(e){return e.end},defaultStart:function(e){return e.defaultStart},defaultEnd:function(e){return e.defaultEnd},viewRange:function(e){return e.viewRange}},actions:{initialiseStore:function(e){e.dispatch("restoreViewRange"),axios.get("./api/v1/preferences/viewRange").then((function(t){var a=t.data.data.attributes.data,n=e.getters.viewRange;e.commit("setViewRange",a),a!==n&&e.dispatch("setDatesFromViewRange"),a===n&&e.dispatch("restoreViewRangeDates")})).catch((function(){e.commit("setViewRange","1M"),e.dispatch("setDatesFromViewRange")}))},restoreViewRangeDates:function(e){localStorage.viewRangeStart&&e.commit("setStart",new Date(localStorage.viewRangeStart)),localStorage.viewRangeEnd&&e.commit("setEnd",new Date(localStorage.viewRangeEnd)),localStorage.viewRangeDefaultStart&&e.commit("setDefaultStart",new Date(localStorage.viewRangeDefaultStart)),localStorage.viewRangeDefaultEnd&&e.commit("setDefaultEnd",new Date(localStorage.viewRangeDefaultEnd))},restoreViewRange:function(e){var t=localStorage.getItem("viewRange");null!==t&&e.commit("setViewRange",t)},setDatesFromViewRange:function(e){var t,a,n=e.getters.viewRange,o=new Date;switch(n){case"1D":t=(0,d.Z)(o),a=(0,u.Z)(o);break;case"1W":t=(0,d.Z)((0,_.Z)(o,{weekStartsOn:1})),a=(0,u.Z)((0,p.Z)(o,{weekStartsOn:1}));break;case"1M":t=(0,d.Z)((0,h.Z)(o)),a=(0,u.Z)((0,y.Z)(o));break;case"3M":t=(0,d.Z)((0,g.Z)(o)),a=(0,u.Z)((0,m.Z)(o));break;case"6M":o.getMonth()<=5&&((t=new Date(o)).setMonth(0),t.setDate(1),t=(0,d.Z)(t),(a=new Date(o)).setMonth(5),a.setDate(30),a=(0,u.Z)(t)),o.getMonth()>5&&((t=new Date(o)).setMonth(6),t.setDate(1),t=(0,d.Z)(t),(a=new Date(o)).setMonth(11),a.setDate(31),a=(0,u.Z)(t));break;case"1Y":(t=new Date(o)).setMonth(0),t.setDate(1),t=(0,d.Z)(t),(a=new Date(o)).setMonth(11),a.setDate(31),a=(0,u.Z)(a)}e.commit("setStart",t),e.commit("setEnd",a),e.commit("setDefaultStart",t),e.commit("setDefaultEnd",a)}},mutations:{setStart:function(e,t){e.start=t,window.localStorage.setItem("viewRangeStart",t)},setEnd:function(e,t){e.end=t,window.localStorage.setItem("viewRangeEnd",t)},setDefaultStart:function(e,t){e.defaultStart=t,window.localStorage.setItem("viewRangeDefaultStart",t)},setDefaultEnd:function(e,t){e.defaultEnd=t,window.localStorage.setItem("viewRangeDefaultEnd",t)},setViewRange:function(e,t){e.viewRange=t,window.localStorage.setItem("viewRange",t)}}};var f=function(){return{listPageSize:33,timezone:"",cacheKey:{age:0,value:"empty"}}},v={initialiseStore:function(e){if(localStorage.cacheKey){var t=JSON.parse(localStorage.cacheKey);Date.now()-t.age>864e5?e.commit("refreshCacheKey"):e.commit("setCacheKey",t)}else e.commit("refreshCacheKey");localStorage.listPageSize&&(f.listPageSize=localStorage.listPageSize,e.commit("setListPageSize",{length:localStorage.listPageSize})),localStorage.listPageSize||axios.get("./api/v1/preferences/listPageSize").then((function(t){e.commit("setListPageSize",{length:parseInt(t.data.data.attributes.data)})})),localStorage.timezone&&(f.timezone=localStorage.timezone,e.commit("setTimezone",{timezone:localStorage.timezone})),localStorage.timezone||axios.get("./api/v1/configuration/app.timezone").then((function(t){e.commit("setTimezone",{timezone:t.data.data.value})}))}};const k={namespaced:!0,state:f,getters:{listPageSize:function(e){return e.listPageSize},timezone:function(e){return e.timezone},cacheKey:function(e){return e.cacheKey.value}},actions:v,mutations:{refreshCacheKey:function(e){var t=Date.now(),a=Array(9).join((Math.random().toString(36)+"00000000000000000").slice(2,18)).slice(0,8),n={age:t,value:a};localStorage.cacheKey=JSON.stringify(n),e.cacheKey={age:t,value:a}},setCacheKey:function(e,t){localStorage.cacheKey=JSON.stringify(t),e.cacheKey=t},setListPageSize:function(e,t){var a=parseInt(t.length);0!==a&&(e.listPageSize=a,localStorage.listPageSize=a)},setTimezone:function(e,t){""!==t.timezone&&(e.timezone=t.timezone,localStorage.timezone=t.timezone)}}};const w={namespaced:!0,state:function(){return{orderMode:!1,activeFilter:1}},getters:{orderMode:function(e){return e.orderMode},activeFilter:function(e){return e.activeFilter}},actions:{},mutations:{setOrderMode:function(e,t){e.orderMode=t},setActiveFilter:function(e,t){e.activeFilter=t}}};o().use(i.ZP);const x=new i.ZP.Store({namespaced:!0,modules:{root:k,transactions:{namespaced:!0,modules:{create:c,edit:l}},accounts:{namespaced:!0,modules:{index:w}},dashboard:{namespaced:!0,modules:{index:b}}},strict:false,plugins:[],state:{currencyPreference:{},locale:"en-US",listPageSize:50},mutations:{setCurrencyPreference:function(e,t){e.currencyPreference=t.payload},initialiseStore:function(e){if(localStorage.locale)e.locale=localStorage.locale;else{var t=document.head.querySelector('meta[name="locale"]');t&&(e.locale=t.content,localStorage.locale=t.content)}}},getters:{currencyCode:function(e){return e.currencyPreference.code},currencyPreference:function(e){return e.currencyPreference},currencyId:function(e){return e.currencyPreference.id},locale:function(e){return e.locale}},actions:{updateCurrencyPreference:function(e){localStorage.currencyPreference?e.commit("setCurrencyPreference",{payload:JSON.parse(localStorage.currencyPreference)}):axios.get("./api/v1/currencies/default").then((function(t){var a={id:parseInt(t.data.data.id),name:t.data.data.attributes.name,symbol:t.data.data.attributes.symbol,code:t.data.data.attributes.code,decimal_places:parseInt(t.data.data.attributes.decimal_places)};localStorage.currencyPreference=JSON.stringify(a),e.commit("setCurrencyPreference",{payload:a})})).catch((function(t){console.error(t),e.commit("setCurrencyPreference",{payload:{id:1,name:"Euro",symbol:"€",code:"EUR",decimal_places:2}})}))}}})},7236:(e,t,a)=>{e.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)}})},1508:(e,t,a)=>{"use strict";var n=a(6149),o=a(7760),i=a.n(o),r={class:"tab-content"},s={class:"row"},c={class:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},l={key:0,class:"card"},d={class:"card-body"},u={class:"row"},_={class:"col"},p={class:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},g={class:"card"},m={class:"card-body"},y={class:"row"},h={class:"col"},b=(0,o.createVNode)("div",{class:"text-xs d-none d-lg-block d-xl-block"},"   ",-1),f=(0,o.createVNode)("span",{class:"far fa-clone"},null,-1),v={class:"col"},k=(0,o.createVNode)("div",{class:"text-xs d-none d-lg-block d-xl-block"},"   ",-1),w={key:0},x=(0,o.createVNode)("span",{class:"far fa-save"},null,-1),D={key:1},T=(0,o.createVNode)("span",{class:"fas fa-spinner fa-spin"},null,-1),N={class:"row"},S=(0,o.createVNode)("div",{class:"col"},"   ",-1),A={class:"col"},I={class:"form-check"},C={class:"form-check-label",for:"stayHere"},z={class:"small"};var B=a(629),V=a(3289),j=a(4173),P=a(9124),L=a(5219),M=a(6348);function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function R(e){for(var t=1;t1&&void 0===t.group_title&&(null===this.originalGroupTitle||""===this.originalGroupTitle)&&(t.group_title=this.transactions[0].description,a=!0),this.transactions)if(this.transactions.hasOwnProperty(r)&&/^0$|^[1-9]\d*$/.test(r)&&r<=4294967294){var s=this.transactions[r],c=this.originalTransactions.hasOwnProperty(r)?this.originalTransactions[r]:{},l={},d=["description","source_account_id","source_account_name","destination_account_id","destination_account_name","amount","foreign_amount","foreign_currency_id","category_name","budget_id","bill_id","interest_date","book_date","due_date","payment_date","invoice_date","external_url","internal_reference","external_id","notes","zoom_level","longitude","latitude"];for(var u in r>0&&(l.type=this.transactionType.toLowerCase(),"deposit"!==this.transactionType.toLowerCase()&&"transfer"!==this.transactionType.toLowerCase()||(s.destination_account_name=this.transactions[0].destination_account_name,s.destination_account_id=this.transactions[0].destination_account_id),"withdrawal"!==this.transactionType.toLowerCase()&&"transfer"!==this.transactionType.toLowerCase()||(s.source_account_name=this.transactions[0].source_account_name,s.source_account_id=this.transactions[0].source_account_id)),d)if(d.hasOwnProperty(u)&&/^0$|^[1-9]\d*$/.test(u)&&u<=4294967294){var _=d[u],p=_;if(null===s[_]&&void 0===c[_])continue;if(s[_]!==c[_]||!0===this.forceTransactionSubmission){if("foreign_amount"===p&&""===s[_])continue;if("foreign_currency_id"===p&&0===s[_])continue;if("foreign_currency_id"===p&&"0"===s[_])continue;"source_account_id"===p&&(p="source_id"),"source_account_name"===p&&(p="source_name"),"destination_account_id"===p&&(p="destination_id"),"destination_account_name"===p&&(p="destination_name"),l[p]=s[_],a=!0}}if(JSON.stringify(s.tags)!==JSON.stringify(c.tags)){if(l.tags=[],0!==s.tags.length)for(var g in s.tags)if(s.tags.hasOwnProperty(g)&&/^0$|^[1-9]\d*$/.test(g)&&g<=4294967294){var m=s.tags[g];"object"===F(m)&&null!==m&&l.tags.push(m.text),"string"==typeof m&&l.tags.push(m)}a=!0}if(this.compareLinks(s.links)!==this.compareLinks(c.links)&&(n=!0),void 0!==s.selectedAttachments&&!0===s.selectedAttachments&&(o=!0),!0===a&&(l.date=this.date),this.date!==this.originalDate&&(a=!0,l.date=this.date),0===Object.keys(l).length&&i>1)l.transaction_journal_id=c.transaction_journal_id,t.transactions.push(U(l)),a=!0;else if(0!==Object.keys(l).length){var y;l.transaction_journal_id=null!==(y=c.transaction_journal_id)&&void 0!==y?y:0,t.transactions.push(U(l)),a=!0}}this.submitUpdate(t,a,n,o)},submitData:function(e,t){if(!e)return Promise.resolve({});var a="./api/v1/transactions/"+this.groupId;return axios.put(a,t)},handleSubmissionResponse:function(e){this.submittedTransaction=!0;var t=[];if(void 0!==e.data){var a;this.returnedGroupId=null!==(a=parseInt(e.data.data.id))&&void 0!==a?a:null,this.returnedGroupTitle=null===e.data.data.attributes.group_title?e.data.data.attributes.transactions[0].description:e.data.data.attributes.group_title;var n=e.data.data.attributes.transactions;for(var o in n)n.hasOwnProperty(o)&&/^0$|^[1-9]\d*$/.test(o)&&o<=4294967294&&t.push(parseInt(n[o].transaction_journal_id))}else for(var i in this.transactions)this.transactions.hasOwnProperty(i)&&/^0$|^[1-9]\d*$/.test(i)&&i<=4294967294&&t.push(this.transactions[i].transaction_journal_id);return t=t.reverse(),Promise.resolve({journals:t})},submitLinks:function(e){var t=this;return e?this.deleteAllOriginalLinks().then((function(){return t.submitNewLinks()})):Promise.resolve({})},submitAttachments:function(e,t){if(!e)return this.submittedAttachments=1,Promise.resolve({});var a=!1;for(var n in this.transactions)if(this.transactions.hasOwnProperty(n)&&/^0$|^[1-9]\d*$/.test(n)&&n<=4294967294){var o=this.transactions[n],i=o.transaction_journal_id;void 0!==t&&(i=t.journals[n]);var r=o.selectedAttachments;this.transactions[n].transaction_journal_id=i,this.transactions[n].uploadTrigger=!0,r&&(a=!0)}!0===a&&(this.submittedAttachments=0)},finaliseSubmission:function(){if(0!==this.submittedAttachments){var e;if(!0===this.stayHere&&!1===this.inError&&(this.errorMessage="",this.warningMessage="",this.successMessage=this.$t("firefly.transaction_updated_link",{ID:this.groupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError)window.location.href=(null!==(e=window.previousURL)&&void 0!==e?e:"/")+"?transaction_group_id="+this.groupId+"&message=updated";for(var t in this.enableSubmit=!0,this.submittedAttachments=-1,this.inError=!1,this.transactions)this.transactions.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294&&this.transactions.hasOwnProperty(t)&&(this.transactions[t].clearTrigger=!0)}},submitUpdate:function(e,t,a,n){var o=this;this.inError=!1,this.submitData(t,e).then(this.handleSubmissionResponse).then((function(e){return Promise.all([o.submitLinks(a,e),o.submitAttachments(n,e)])})).then(this.finaliseSubmission).catch(this.handleSubmissionError)},compareLinks:function(e){var t=[];for(var a in e)e.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&t.push({amount:e[a].amount,currency_code:e[a].currency_code,description:e[a].description,link_type_id:e[a].link_type_id,transaction_group_id:e[a].transaction_group_id,type:e[a].type});return JSON.stringify(t)},parseErrors:function(e){for(var t in this.transactions)this.transactions.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294&&this.resetErrors({index:t});var a,n,o;for(var i in this.successMessage="",this.errorMessage=this.$t("firefly.errors_submission"),void 0===e.errors&&(this.successMessage="",this.errorMessage=e.message),e.errors)if(e.errors.hasOwnProperty(i)){if("group_title"===i){this.groupTitleErrors=e.errors[i];continue}if("group_title"!==i)switch(n=parseInt(i.split(".")[1]),o=i.split(".")[2]){case"amount":case"description":case"date":case"tags":a={index:n,field:o,errors:e.errors[i]},this.setTransactionError(a);break;case"budget_id":a={index:n,field:"budget",errors:e.errors[i]},this.setTransactionError(a);break;case"bill_id":a={index:n,field:"bill",errors:e.errors[i]},this.setTransactionError(a);break;case"piggy_bank_id":a={index:n,field:"piggy_bank",errors:e.errors[i]},this.setTransactionError(a);break;case"category_name":a={index:n,field:"category",errors:e.errors[i]},this.setTransactionError(a);break;case"source_name":case"source_id":a={index:n,field:"source",errors:e.errors[i]},this.setTransactionError(a);break;case"destination_name":case"destination_id":a={index:n,field:"destination",errors:e.errors[i]},this.setTransactionError(a);break;case"foreign_amount":case"foreign_currency":a={index:n,field:"foreign_amount",errors:e.errors[i]},this.setTransactionError(a)}this.transactions[n]}},setTransactionError:function(e){this.transactions[e.index].errors[e.field]=e.errors},resetErrors:function(e){this.transactions[e.index].errors=U((0,M.kQ)())},deleteOriginalLinks:function(e){var t=[];for(var a in e.links)if(e.links.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var n="/api/v1/transaction_links/"+e.links[a].id;t.push(axios.delete(n))}return Promise.all(t)},deleteAllOriginalLinks:function(){var e=[];for(var t in this.transactions)if(this.transactions.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294){var a=this.transactions[t],n=this.originalTransactions.hasOwnProperty(t)?this.originalTransactions[t]:{},o=this.compareLinks(a.links),i=this.compareLinks(n.links);o!==i?"[]"!==i&&e.push(this.deleteOriginalLinks(n)):e.push(Promise.resolve({}))}return Promise.all(e)},submitNewLinks:function(){var e=[];for(var t in this.transactions)if(this.transactions.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294){var a=this.transactions[t];for(var n in a.links)if(a.links.hasOwnProperty(n)&&/^0$|^[1-9]\d*$/.test(n)&&n<=4294967294){var o=a.links[n],i={inward_id:a.transaction_journal_id,outward_id:a.transaction_journal_id,link_type_id:"something"},r=o.link_type_id.split("-");i.link_type_id=r[0],"inward"===r[1]&&(i.inward_id=o.transaction_journal_id),"outward"===r[1]&&(i.outward_id=o.transaction_journal_id),e.push(axios.post("./api/v1/transaction_links",i))}}return Promise.all(e)},submitTransactionLinksX:function(){},finalizeSubmitX:function(){if(this.submittedTransaction&&this.submittedAttachments&&this.submittedLinks){var e,t;if(!0===this.stayHere&&!1===this.inError&&0===this.returnedGroupId&&(this.errorMessage="",this.successMessage="",this.warningMessage=this.$t("firefly.transaction_updated_no_changes",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0===this.returnedGroupId)window.location.href=(null!==(e=window.previousURL)&&void 0!==e?e:"/")+"?transaction_group_id="+this.groupId+"&message=no_change";if(!0===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId&&(this.errorMessage="",this.warningMessage="",this.successMessage=this.$t("firefly.transaction_updated_link",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId)window.location.href=(null!==(t=window.previousURL)&&void 0!==t?t:"/")+"?transaction_group_id="+this.groupId+"&message=updated";for(var a in this.enableSubmit=!0,this.submittedTransaction=!1,this.submittedLinks=!1,this.submittedAttachments=!1,this.inError=!1,this.transactions)this.transactions.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&this.transactions.hasOwnProperty(a)}}}),render:function(e,t,a,n,i,B){var V=this,j=(0,o.resolveComponent)("Alert"),P=(0,o.resolveComponent)("SplitPills"),L=(0,o.resolveComponent)("SplitForm"),M=(0,o.resolveComponent)("TransactionGroupTitle");return(0,o.openBlock)(),(0,o.createBlock)("div",null,[(0,o.createVNode)(j,{message:i.errorMessage,type:"danger"},null,8,["message"]),(0,o.createVNode)(j,{message:i.successMessage,type:"success"},null,8,["message"]),(0,o.createVNode)(j,{message:i.warningMessage,type:"warning"},null,8,["message"]),(0,o.createVNode)("form",{onSubmit:t[13]||(t[13]=function(){return B.submitTransaction&&B.submitTransaction.apply(B,arguments)}),autocomplete:"off"},[(0,o.createVNode)(P,{transactions:i.transactions,count:i.transactions.length},null,8,["transactions","count"]),(0,o.createVNode)("div",r,[((0,o.openBlock)(!0),(0,o.createBlock)(o.Fragment,null,(0,o.renderList)(this.transactions,(function(e,a){return(0,o.openBlock)(),(0,o.createBlock)(L,{index:a,key:e.transaction_journal_id,transaction:e,date:i.date,count:i.transactions.length,"transaction-type":i.transactionType,"source-allowed-types":i.sourceAllowedTypes,"allowed-opposing-types":i.allowedOpposingTypes,"custom-fields":i.customFields,"destination-allowed-types":i.destinationAllowedTypes,"allow-switch":!1,onUploadedAttachments:t[1]||(t[1]=function(e){return B.uploadedAttachment(e)}),onSetMarkerLocation:t[2]||(t[2]=function(e){return B.storeLocation(e)}),onSetAccount:t[3]||(t[3]=function(e){return B.storeAccountValue(e)}),onSetDate:t[4]||(t[4]=function(e){return B.storeDate(e)}),onSetField:t[5]||(t[5]=function(e){return B.storeField(e)}),onRemoveTransaction:t[6]||(t[6]=function(e){return B.removeTransaction(e)}),onSelectedAttachments:t[7]||(t[7]=function(e){return B.selectedAttachments(e)})},null,8,["index","transaction","date","count","transaction-type","source-allowed-types","allowed-opposing-types","custom-fields","destination-allowed-types"])})),128))]),(0,o.createVNode)("div",s,[(0,o.createVNode)("div",c,[i.transactions.length>1?((0,o.openBlock)(),(0,o.createBlock)("div",l,[(0,o.createVNode)("div",d,[(0,o.createVNode)("div",u,[(0,o.createVNode)("div",_,[(0,o.createVNode)(M,{modelValue:this.groupTitle,"onUpdate:modelValue":t[8]||(t[8]=function(e){return V.groupTitle=e}),errors:this.groupTitleErrors,onSetGroupTitle:t[9]||(t[9]=function(e){return B.storeGroupTitle(e)})},null,8,["modelValue","errors"])])])])])):(0,o.createCommentVNode)("",!0)]),(0,o.createVNode)("div",p,[(0,o.createVNode)("div",g,[(0,o.createVNode)("div",m,[(0,o.createVNode)("div",y,[(0,o.createVNode)("div",h,[b,(0,o.createVNode)("button",{type:"button",class:"btn btn-outline-primary btn-block",onClick:t[10]||(t[10]=function(){return B.addTransaction&&B.addTransaction.apply(B,arguments)})},[f,(0,o.createTextVNode)(" "+(0,o.toDisplayString)(e.$t("firefly.add_another_split")),1)])]),(0,o.createVNode)("div",v,[k,(0,o.createVNode)("button",{disabled:!i.enableSubmit,class:"btn btn-info btn-block",onClick:t[11]||(t[11]=function(){return B.submitTransaction&&B.submitTransaction.apply(B,arguments)})},[i.enableSubmit?((0,o.openBlock)(),(0,o.createBlock)("span",w,[x,(0,o.createTextVNode)(" "+(0,o.toDisplayString)(e.$t("firefly.update_transaction")),1)])):(0,o.createCommentVNode)("",!0),i.enableSubmit?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)("span",D,[T]))],8,["disabled"])])]),(0,o.createVNode)("div",N,[S,(0,o.createVNode)("div",A,[(0,o.createVNode)("div",I,[(0,o.withDirectives)((0,o.createVNode)("input",{id:"stayHere","onUpdate:modelValue":t[12]||(t[12]=function(e){return i.stayHere=e}),class:"form-check-input",type:"checkbox"},null,512),[[o.vModelCheckbox,i.stayHere]]),(0,o.createVNode)("label",C,[(0,o.createVNode)("span",z,(0,o.toDisplayString)(e.$t("firefly.after_update_create_another")),1)])])])])])])])])],32)])}},K=q;a(9489),i().config.productionTip=!1;var G=a(7236),Z={};new(i())({i18n:G,store:n.Z,render:function(e){return e(K,{props:Z})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference")}}).$mount("#transactions_edit")},6348:(e,t,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 o(){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,attachments:!1,selectedAttachments:!1,uploadTrigger:!1,clearTrigger:!1,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:[],zoom_level:null,longitude:null,latitude:null,errors:{}}}a.d(t,{kQ:()=>n,f$:()=>o})},7784:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(4015),o=a.n(n),i=a(3645),r=a.n(i)()(o());r.push([e.id,".vue-tags-input{display:block;max-width:100%!important}.ti-input,.vue-tags-input{border-radius:.25rem;width:100%}.ti-input{max-width:100%}.ti-new-tag-input{font-size:1rem}","",{version:3,sources:["webpack://./src/components/transactions/TransactionTags.vue"],names:[],mappings:"AAsHA,gBAGE,aAAc,CADd,wBAGF,CAEA,0BAHE,oBAAsB,CAHtB,UAUF,CAJA,UAEE,cAEF,CAEA,kBACE,cACF",sourcesContent:['\x3c!--\n - TransactionTags.vue\n - Copyright (c) 2021 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