FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
ameliabooking
/
public
/
js
/
chunks
Edit File: amelia-booking-finance-0d421e0e1e2bdd88e543.js
wpJsonpAmeliaBookingPlugin([16],{1357:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(693),n=s.n(a),i=s(680),o=s.n(i),r=s(705),l=s(91),c=s(673),u=s(654),d=s(336),m=s(905),p=s(1358),g=s.n(p),h=s(1360),v=s.n(h),f=s(823),b=s.n(f),y=s(802),C=s.n(y),k=s(658),x=s(659),$=s(684),w=s(948),P=s.n(w),T=s(657),S=s(737),D=s.n(S),E=s(655),F=s(704),I=s(0),N=(s.n(I),s(792));t.default={mixins:[r.a,l.a,c.a,$.a,x.a,u.a,d.a,m.a,k.a,T.a,E.a,F.a,N.a],data:function(){return{customersNoShowCount:[],bookingFetched:!1,paymentsFilteredCount:0,paymentsTotalCount:0,taxFetched:!1,taxesFilteredCount:0,taxesTotalCount:0,couponFetched:!1,couponsFilteredCount:0,couponsTotalCount:0,invoicesFilteredCount:0,invoicesTotalCount:0,paymentsFiltering:!1,taxesFiltering:!1,couponsFiltering:!1,invoicesFiltering:!1,fetchedFilteredPayments:!1,fetchedFilteredTaxes:!1,fetchedFilteredCoupons:!1,fetchedFilteredInvoices:!1,addNewTaxBtnDisplay:!1,addNewCouponBtnDisplay:!1,dialogTax:!1,dialogCoupon:!1,dialogPayment:!1,invoiceInDialog:!1,tax:null,coupon:null,form:new o.a,checkPaymentData:{toaster:!1,allChecked:!1},checkTaxData:{toaster:!1,allChecked:!1},checkCouponData:{toaster:!1,allChecked:!1},options:{entities:{events:[],services:[],packages:[],extras:[],employees:[],customers:[]},fetched:!1},dialogPaymentsExport:!1,dialogCouponsExport:!1,paymentsParams:{page:1,show:this.$root.settings.general.itemsPerPageBackEnd,dates:this.getDatePickerInitRange(),status:"",services:[],events:[],providerId:"",customerId:""},exportParamsPayments:{fields:[{label:this.$root.labels.service+"/"+this.$root.labels.event,value:"service",checked:!0},{label:this.$root.labels.booking_start,value:"bookingStart",checked:!0},{label:this.$root.labels.customer,value:"customer",checked:!0},{label:this.$root.labels.customer_email,value:"customerEmail",checked:!0},{label:this.$root.labels.employee,value:"employee",checked:!0},{label:this.$root.labels.employee_email,value:"employeeEmail",checked:!0},{label:this.$root.labels.location,value:"location",checked:!0},{label:this.$root.labels.amount,value:"amount",checked:!0},{label:this.$root.labels.method,value:"type",checked:!0},{label:this.$root.labels.status,value:"status",checked:!0},{label:this.$root.labels.payment_date,value:"paymentDate",checked:!0},{label:this.$root.labels.coupon_code,value:"couponCode",checked:!0},{label:this.$root.labels.payment_created,value:"paymentCreated",checked:!0}]},exportPaymentsAction:"",taxesParams:{page:1,status:"",services:[],extras:[],events:[],packages:[],search:""},couponsParams:{page:1,status:"",services:[],events:[],search:""},exportParamsCoupons:{fields:[{label:this.$root.labels.code,value:"code",checked:!0},{label:this.$root.labels.discount,value:"discount",checked:!0},{label:this.$root.labels.deduction,value:"deduction",checked:!0},{label:this.$root.labels.services,value:"services",checked:!0},{label:this.$root.labels.events,value:"events",checked:!0},{label:this.$root.labels.limit,value:"limit",checked:!0},{label:this.$root.labels.used,value:"used",checked:!0}]},exportCouponsAction:"",invoiceParams:{page:1,show:this.$root.settings.general.itemsPerPageBackEnd,dates:this.getDatePickerInitRange(),services:[],events:[],packages:[],providerId:"",customerId:"",invoices:!0},statuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending},{value:"partiallyPaid",label:this.$root.labels.partially_paid}],selectedPaymentModalData:{paymentId:null,bookingStart:null,bookings:null,service:null,providers:null,customer:null},filterPaymentsFields:!0,filterTaxesFields:!0,searchTaxesPlaceholder:this.$root.labels.finance_taxes_search_placeholder,filterCouponsFields:!0,searchCouponsPlaceholder:this.$root.labels.finance_coupons_search_placeholder,filterInvoicesFields:!0,financeTabs:"payments",payments:[],taxes:[],coupons:[],invoices:[],timer:null,cancelSource:null}},created:function(){o.a.defaults.axios=this.$http,this.$root.licence.isBasic||this.$root.licence.isStarter||this.$root.licence.isLite||this.statuses.push({value:"refunded",label:this.$root.labels.refunded});var e=this.getUrlQueryParams(window.location.href);this.paymentsParams.dates="dateFrom"in e&&"dateTo"in e?{start:this.$moment(e.dateFrom).toDate(),end:this.$moment(e.dateTo).toDate()}:this.getDatePickerInitRange(),e.status&&(this.paymentsParams.status=e.status),this.getPayments(),this.$root.settings.payments.taxes.enabled&&this.getTaxes(),this.$root.settings.payments.coupons&&this.getCoupons(),this.getInvoices(),this.handleResize(),this.getFinanceOptions()},mounted:function(){this.inlineSVG(),this.$root.settings.payments.wc&&this.$root.settings.payments.wc.enabled&&this.exportParamsPayments.fields.push({label:this.$root.labels.wc_order_id,value:"wcOrderId",checked:!0})},methods:{getExportData:function(){return this.paymentsParams.dates||(this.paymentsParams.dates={start:"",end:""}),Object.assign(this.paymentsParams,this.exportParamsPayments)},clearDateFilter:function(){this.paymentsParams.dates=null,this.paymentsParams.page=1,this.filterPayments()},clearInvoiceDateFilter:function(){this.invoiceParams.dates=null,this.invoiceParams.page=1,this.filterInvoices()},getBookableName:function(e){return e.secondaryPayments&&Object.values(e.secondaryPayments).length>0?e.name===Object.values(e.secondaryPayments)[0].name?e.name:e.name+" +"+Object.values(e.secondaryPayments).length:e.name},getPaymentsStatusAndTotal:function(e){var t=[e].concat(e.secondaryPayments?Object.values(e.secondaryPayments):[]),s={};t.forEach(function(t){var a=e.type+"_"+(t.packageCustomerId?t.packageCustomerId:t.customerBookingId);a in s?s[a].booking.payments.push(t):s[a]={booking:{price:t.bookedPrice,aggregatedPrice:t.aggregatedPrice,persons:t.persons,extras:t.extras,coupon:t.coupon,tax:t.bookedTax,payments:[t]}}});var a=this.getPaymentAmountData(Object.values(s),e.type),n=a.total;if(t.every(function(e){return"refunded"===e.status}))return{status:"refunded",total:n};var i=a.paid;return Math.round(100*i)/100>=Math.round(100*n)/100?{status:"paid",total:n}:i>0?{status:"partiallyPaid",total:n}:{status:"pending",total:n}},savedTax:function(){this.updateStashEntities({}),this.getTaxes()},savedCoupon:function(){this.updateStashEntities({}),this.getCoupons()},formatForFetch:function(e){var t=[];return e.dates&&(e.dates.start&&t.push(this.$moment(e.dates.start).format("YYYY-MM-DD")),e.dates.end&&t.push(this.$moment(e.dates.end).format("YYYY-MM-DD")),e.dates=t),Object.keys(e).forEach(function(t){return!e[t]&&0!==e[t]&&delete e[t]}),e},getPayments:function(){var e=this;this.paymentsFiltering=!0,this.fetchedFilteredPayments=!1,this.cancelSource&&this.cancelSource.cancel();var t=JSON.parse(JSON.stringify(this.paymentsParams));t=this.formatForFetch(t),this.cancelSource=this.$http.CancelToken.source(),this.$http.get(this.$root.getAjaxUrl+"/payments",{params:this.getAppropriateUrlParams(t),cancelToken:this.cancelSource.token}).then(function(t){var s=e.options.entities.customers.map(function(e){return e.id}),a=e.options.entities.customers,n=e;t.data.data.payments.forEach(function(e){e.checked=!1;var t=n.getPaymentsStatusAndTotal(e);e.fullStatus=t.status,-1===s.indexOf(e.customerId)&&a.push({id:e.customerId,firstName:e.customerFirstName,lastName:e.customerLastName,email:e.customerEmail})}),e.options.entities.customers=Object.values(a),e.payments=t.data.data.payments,e.paymentsFilteredCount=t.data.data.filteredCount,e.paymentsTotalCount=t.data.data.totalCount,e.cancelSource=null,e.paymentsFiltering=!1,e.fetchedFilteredPayments=!0}).catch(function(t){console.log(t.message),e.$http.isCancel(t)||(e.paymentsFiltering=!1,e.fetchedFilteredPayments=!0)})},getInvoices:function(){var e=this;if(this.$root.licence.isLite||this.$root.licence.isStarter)return this.invoicesFiltering=!1,void(this.fetchedFilteredInvoices=!1);this.invoicesFiltering=!0,this.fetchedFilteredInvoices=!1;var t=JSON.parse(JSON.stringify(this.invoiceParams));t=this.formatForFetch(t),this.$http.get(this.$root.getAjaxUrl+"/payments",{params:this.getAppropriateUrlParams(t)}).then(function(t){var s=e;t.data.data.payments.forEach(function(e){var t=s.getPaymentsStatusAndTotal(e);e.fullStatus=t.status,e.total=t.total}),e.invoices=t.data.data.payments,e.invoicesFilteredCount=t.data.data.filteredCount,e.invoicesTotalCount=t.data.data.totalCount,e.invoicesFiltering=!1,e.fetchedFilteredInvoices=!0}).catch(function(t){console.log(t.message),e.invoicesFiltering=!1,e.fetchedFilteredInvoices=!0})},getTotal:function(){switch(this.financeTabs){case"payments":return this.paymentsFilteredCount;case"coupons":return this.couponsFilteredCount;case"taxes":return this.taxesFilteredCount;case"invoices":return this.invoicesFilteredCount}},getFinanceOptions:function(){var e=this;this.options.fetched=!1,this.searchCustomers("",function(){var t=e.options.entities.customers.map(function(e){return parseInt(e.id)}),s=e.options.entities.customers;e.searchedCustomers.forEach(function(a){-1===t.indexOf(parseInt(a.id))&&(t.push(a.id),s.push(a)),e.customersNoShowCount.push({customerId:a.id,noShowCount:a.noShowCount})}),e.options.entities.customers=Object.values(s)}),this.$http.get(this.$root.getAjaxUrl+"/entities",{params:this.getAppropriateUrlParams({types:["categories","employees","events","packages"]})}).then(function(t){e.options.entities=t.data.data,e.options.entities.services=e.getServicesFromCategories(e.options.entities.categories);var s=[];e.options.entities.services.forEach(function(e){s=s.concat(e.extras)}),e.options.entities.extras=s,e.setEntitiesToTaxes(),e.options.fetched=!0,e.searchedEvents=e.options.entities.events}).catch(function(t){console.log(t.message),e.options.fetched=!0})},setEntitiesToTaxes:function(){var e=this;this.taxes.forEach(function(t,s){["service","extra","event","package"].forEach(function(a){t[a+"List"].forEach(function(t,n){var i=e.options.entities[a+"s"].find(function(e){return e.id===t.id});void 0!==i&&i&&(e.taxes[s][a+"List"][n]=i)})})})},getTaxes:function(){var e=this;if(this.$root.licence.isLite||this.$root.licence.isStarter)return this.taxesFiltering=!1,void(this.fetchedFilteredTaxes=!1);this.taxesFiltering=!0,this.fetchedFilteredTaxes=!1;var t=JSON.parse(JSON.stringify(this.taxesParams));Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/taxes",{params:t}).then(function(t){t.data.data.taxes.forEach(function(e){e.checked=!1}),e.taxes=t.data.data.taxes,e.taxesFilteredCount=t.data.data.filteredCount,e.taxesTotalCount=t.data.data.totalCount,e.setEntitiesToTaxes(),e.taxesFiltering=!1,e.fetchedFilteredTaxes=!0}).catch(function(t){console.log(t.message),e.taxesFiltering=!1,e.fetchedFilteredTaxes=!0})},getCoupons:function(){var e=this;if(this.$root.licence.isLite)return this.couponsFiltering=!1,void(this.fetchedFilteredCoupons=!1);this.couponsFiltering=!0,this.fetchedFilteredCoupons=!1;var t=JSON.parse(JSON.stringify(this.couponsParams));Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/coupons",{params:t}).then(function(t){t.data.data.coupons.forEach(function(e){e.checked=!1}),e.coupons=t.data.data.coupons,e.couponsFilteredCount=t.data.data.filteredCount,e.couponsTotalCount=t.data.data.totalCount,e.couponsFiltering=!1,e.fetchedFilteredCoupons=!0}).catch(function(t){console.log(t.message),e.couponsFiltering=!1,e.fetchedFilteredCoupons=!0})},getPaymentAppointment:function(e,t){var s=this;this.$http.get(this.$root.getAjaxUrl+"/appointments/"+e.appointmentId,{params:{customerId:e.customerId}}).then(function(a){s.selectedPaymentModalData=s.getPaymentData(e,a.data.data.appointment,null,null,t?a.data.data.recurring:[]),s.selectedPaymentModalData.recurring=a.data.data.recurring,s.bookingFetched=!0}).catch(function(e){console.log(e.message)})},getEvent:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/events/"+e.eventId).then(function(s){t.selectedPaymentModalData=t.getPaymentData(e,null,s.data.data.event,null),t.bookingFetched=!0}).catch(function(e){console.log(e.message)})},getPackage:function(e){var t={package:{name:e.name},booking:{price:e.bookedPrice,payments:[e].concat(e.secondaryPayments?Object.values(e.secondaryPayments):[]),extras:[],tax:e.bookedTax?JSON.parse(e.bookedTax):null}};this.selectedPaymentModalData=this.getPaymentData(e,null,null,t),this.bookingFetched=!0},getTax:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/taxes/"+e).then(function(e){var s=e.data.data.tax,a=t.options.entities.services.map(function(e){return e.id});s.serviceList=s.serviceList.filter(function(e){return-1!==a.indexOf(e.id)});var n=[];t.options.entities.services.forEach(function(e){n=n.concat(e.extras.map(function(e){return e.id}))}),s.extraList=s.extraList.filter(function(e){return-1!==n.indexOf(e.id)});var i=t.options.entities.packages.map(function(e){return e.id});s.packageList=s.packageList.filter(function(e){return-1!==i.indexOf(e.id)}),t.tax=s,t.taxFetched=!0}).catch(function(e){console.log(e.message)})},getCoupon:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/coupons/"+e).then(function(e){var s=e.data.data.coupon;s.expirationDate=s.expirationDate?t.getDate(s.expirationDate):null;var a=t.options.entities.packages.map(function(e){return e.id});s.packageList=s.packageList.filter(function(e){return-1!==a.indexOf(e.id)}),t.coupon=s,t.couponFetched=!0}).catch(function(e){console.log(e.message)})},paymentGroupDeleteCallback:function(){this.checkPaymentData.allChecked=!1,this.checkPaymentData.toaster=!1,this.getPayments()},taxGroupDeleteCallback:function(){this.checkTaxData.allChecked=!1,this.checkTaxData.toaster=!1,this.updateStashEntities({}),this.getTaxes()},couponGroupDeleteCallback:function(){this.checkCouponData.allChecked=!1,this.checkCouponData.toaster=!1,this.updateStashEntities({}),this.getCoupons()},changeRange:function(){this.setDatePickerSelectedDaysCount(this.paymentsParams.dates.start,this.paymentsParams.dates.end),this.filterPayments()},changeRangeInvoices:function(){this.setDatePickerSelectedDaysCount(this.invoiceParams.dates.start,this.invoiceParams.dates.end),this.invoiceParams.page=1,this.filterInvoices()},filterPayments:function(){this.getPayments()},filterTaxes:function(){this.getTaxes()},filterCoupons:function(){this.getCoupons()},filterInvoices:function(){this.getInvoices()},updatePaymentCallback:function(){this.dialogPayment=!1,this.getPayments()},duplicateTaxCallback:function(e){var t=this;setTimeout(function(){t.$set(t,"tax",e),t.$set(t.tax,"id",0),t.dialogTax=!0},300)},duplicateCouponCallback:function(e){var t=this;setTimeout(function(){t.$set(t,"coupon",e),t.$set(t.coupon,"id",0),t.dialogCoupon=!0},300)},handleResize:function(){this.filterPaymentsFields=window.innerWidth>=992,this.filterTaxesFields=window.innerWidth>=992,this.filterCouponsFields=window.innerWidth>=992},showDialogNewTax:function(){this.tax=this.getInitTaxObject(),this.dialogTax=!0},showDialogNewCoupon:function(){this.coupon=this.getInitCouponObject(),this.dialogCoupon=!0},showDialogEditTax:function(e){this.dialogTax=!0,this.getTax(e)},showDialogEditCoupon:function(e){this.dialogCoupon=!0,this.getCoupon(e)},showDialogEditPayment:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.dialogPayment=!0,this.invoiceInDialog=t,e.appointmentId&&this.getPaymentAppointment(e,t),e.eventId&&this.getEvent(e),e.packageId&&this.getPackage(e)},handleTabClick:function(e){"coupons"===e.name?(this.addNewTaxBtnDisplay=!1,this.addNewCouponBtnDisplay=!0):"taxes"===e.name?(this.addNewTaxBtnDisplay=!0,this.addNewCouponBtnDisplay=!1):"invoices"===e.name?(this.addNewCouponBtnDisplay=!1,this.addNewTaxBtnDisplay=!1):(this.addNewTaxBtnDisplay=!1,this.addNewCouponBtnDisplay=!1)},selectAllInCategoryFinance:function(e){var t=this.getCategoryServices(e).map(function(e){return e.id});_.isEqual(_.intersection(t,this.paymentsParams.services),t)?this.paymentsParams.services=_.difference(this.paymentsParams.services,t):this.paymentsParams.services=_.uniq(this.paymentsParams.services.concat(t)),this.filterPayments()},selectAllInCategoryTaxes:function(e){var t=this.getCategoryServices(e).map(function(e){return e.id});_.isEqual(_.intersection(t,this.taxesParams.services),t)?this.taxesParams.services=_.difference(this.taxesParams.services,t):this.taxesParams.services=_.uniq(this.taxesParams.services.concat(t)),this.filterTaxes()},selectAllInServiceTaxes:function(e){var t=this.getServiceById(e).extras.map(function(e){return e.id});_.isEqual(_.intersection(t,this.taxesParams.extras),t)?this.taxesParams.extras=_.difference(this.taxesParams.extras,t):this.taxesParams.extras=_.uniq(this.taxesParams.extras.concat(t)),this.filterTaxes()},selectAllInCategoryCoupons:function(e){var t=this.getCategoryServices(e).map(function(e){return e.id});_.isEqual(_.intersection(t,this.couponsParams.services),t)?this.couponsParams.services=_.difference(this.couponsParams.services,t):this.couponsParams.services=_.uniq(this.couponsParams.services.concat(t)),this.filterCoupons()},getInitTaxObject:function(){return{id:0,name:"",amount:0,type:"percentage",status:"visible",serviceList:[],extraList:[],eventList:[],packageList:[]}},getInitCouponObject:function(){return{id:0,code:"",discount:0,deduction:0,limit:0,customerLimit:0,status:"visible",notificationInterval:0,notificationRecurring:!1,serviceList:[],eventList:[],packageList:[]}},closeDialogPayment:function(){this.dialogPayment=!1,this.bookingFetched=!1},closeDialogTax:function(){this.tax=null,this.dialogTax=!1,this.taxFetched=!1},closeDialogCoupon:function(){this.coupon=null,this.dialogCoupon=!1,this.couponFetched=!1}},watch:{"taxesParams.search":function(){clearTimeout(this.timer),this.timer=setTimeout(this.filterTaxes,500)},"couponsParams.search":function(){clearTimeout(this.timer),this.timer=setTimeout(this.filterCoupons,500)},dialogPayment:function(){!1===this.dialogPayment&&(this.bookingFetched=!1)},dialogTax:function(){!1===this.dialogTax&&(this.taxFetched=!1,this.tax=null)},dialogCoupon:function(){!1===this.dialogCoupon&&(this.couponFetched=!1,this.coupon=null)}},computed:{hasPayments:function(){return 0!==this.paymentsTotalCount},hasPaymentsFiltered:function(){return 0!==this.payments.length},hasInvoices:function(){return 0!==this.invoicesTotalCount},hasInvoicesFiltered:function(){return 0!==this.invoices.length},isPaymentsFiltering:function(){return this.paymentsFiltering&&"payments"===this.financeTabs},isInvoicesFiltering:function(){return this.invoicesFiltering&&"invoices"===this.financeTabs},hasTaxes:function(){return 0!==this.taxesTotalCount},hasTaxesFiltered:function(){return 0!==this.taxes.length},isTaxesFiltering:function(){return this.taxesFiltering&&"taxes"===this.financeTabs},hasCoupons:function(){return 0!==this.couponsTotalCount},hasCouponsFiltered:function(){return 0!==this.coupons.length},isCouponsFiltering:function(){return this.couponsFiltering&&"coupons"===this.financeTabs}},components:{PageHeader:n.a,DialogTax:g.a,DialogCoupon:v.a,DialogPayment:b.a,DialogExport:C.a,GroupDelete:P.a,PaginationBlock:D.a}}},1358:function(e,t,s){var a=s(90)(null,s(1359),!1,null,null,null);e.exports=a.exports},1359:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1360:function(e,t,s){var a=s(90)(null,s(1361),!1,null,null,null);e.exports=a.exports},1361:function(e,t){e.exports={render:function(){var e=this.$createElement;return(this._self._c||e)("div")},staticRenderFns:[]}},1362:function(e,t){e.exports={render:function(){var e=this,t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"am-wrap"},[a("div",{staticClass:"am-body",attrs:{id:"am-finance"}},[a("page-header",{attrs:{financeTotal:t.options.fetched?t.getTotal():0,addNewTaxBtnDisplay:!!t.options.fetched&&t.addNewTaxBtnDisplay,addNewCouponBtnDisplay:!!t.options.fetched&&t.addNewCouponBtnDisplay},on:{newTaxBtnClicked:function(e){return t.showDialogNewTax()},newCouponBtnClicked:function(e){return t.showDialogNewCoupon()}}}),t._v(" "),a("div",{staticClass:"am-finances am-section"},[a("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.financeTabs,callback:function(e){t.financeTabs=e},expression:"financeTabs"}},[a("el-tab-pane",{attrs:{label:t.$root.labels.payments,name:"payments"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&t.options.fetched,expression:"hasPayments && options.fetched"}],staticClass:"am-finance-filter"},[a("el-form",{attrs:{action:t.exportPaymentsAction,method:"POST"}},[a("el-row",{attrs:{gutter:16}},[a("el-col",{staticClass:"v-calendar-column",attrs:{md:24,lg:5}},[a("el-form-item",{staticClass:"calc-width-mobile"},[a("v-date-picker",{attrs:{"is-double-paned":!0,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",placeholder:t.$root.labels.pick_a_date,formats:t.vCalendarFormats},on:{input:t.changeRange},model:{value:t.paymentsParams.dates,callback:function(e){t.$set(t.paymentsParams,"dates",e)},expression:"paymentsParams.dates"}}),t._v(" "),t.paymentsParams.dates?a("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:t.clearDateFilter}},[a("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):t._e()],1)],1),t._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.filterPaymentsFields,expression:"filterPaymentsFields"}],staticClass:"am-filter-fields"},[a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.customer,remote:"","remote-method":t.searchCustomers,loading:t.loadingCustomers},on:{change:t.filterPayments},model:{value:t.paymentsParams.customerId,callback:function(e){t.$set(t.paymentsParams,"customerId",e)},expression:"paymentsParams.customerId"}},t._l(t.searchedCustomers.length?t.searchedCustomers:t.options.entities.customers,function(e,t){return a("el-option",{key:t,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.employee},on:{change:t.filterPayments},model:{value:t.paymentsParams.providerId,callback:function(e){t.$set(t.paymentsParams,"providerId",e)},expression:"paymentsParams.providerId"}},t._l(t.visibleEmployees,function(e){return a("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.services,"collapse-tags":""},on:{change:t.filterPayments},model:{value:t.paymentsParams.services,callback:function(e){t.$set(t.paymentsParams,"services",e)},expression:"paymentsParams.services"}},t._l(t.options.entities.categories,function(e){return a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(s){return t.selectAllInCategoryFinance(e.id)}}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",clearable:"",filterable:"","remote-method":function(e){return t.searchEvents(e,!1,t.options.entities.events)},loading:t.loadingEvents,remote:t.options.entities.events.length===t.$root.settings.general.eventsFilterLimit,placeholder:t.$root.labels.events},on:{change:t.filterPayments},model:{value:t.paymentsParams.events,callback:function(e){t.$set(t.paymentsParams,"events",e)},expression:"paymentsParams.events"}},t._l(t.searchedEvents,function(e){return a("el-option",{key:e.id,attrs:{label:e.name+(e.periods&&e.periods.length?" ("+t.getFrontedFormattedDate(e.periods[0].periodStart.split(" ")[0])+")":""),value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:3}},[a("el-form-item",[a("el-select",{staticClass:"calc-width",attrs:{clearable:"",placeholder:t.$root.labels.status},on:{change:t.filterPayments},model:{value:t.paymentsParams.status,callback:function(e){t.$set(t.paymentsParams,"status",e)},expression:"paymentsParams.status"}},t._l(t.statuses,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}},[a("span",[t._v(t._s(e.label))])])}),1)],1)],1)],1)]),t._v(" "),a("div",{},[a("el-button",{staticClass:"button-filter-toggle am-button-icon",attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterPaymentsFields=!t.filterPaymentsFields}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})]),t._v(" "),a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_payments)},slot:"content"}),t._v(" "),a("el-button",{staticClass:"button-export am-button-icon",on:{click:function(e){t.dialogPaymentsExport=!0}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Export",src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1)],1),t._v(" "),a("transition",{attrs:{name:"slide"}},[t.dialogPaymentsExport?a("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{"close-on-click-modal":!1,visible:t.dialogPaymentsExport,"show-close":!1},on:{"update:visible":function(e){t.dialogPaymentsExport=e}}},[a("dialog-export",{attrs:{data:t.getExportData(),action:t.$root.getAjaxUrl+"/report/payments"},on:{updateAction:function(t){e.exportPaymentsAction=t},closeDialogExport:function(e){t.dialogPaymentsExport=!1}}})],1):t._e()],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isPaymentsFiltering||!t.options.fetched,expression:"isPaymentsFiltering || !options.fetched"}],staticClass:"am-spinner am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),a("EmptyState",{attrs:{visible:!t.hasPayments&&!t.isPaymentsFiltering&&t.options.fetched,title:t.$root.labels.no_payments_yet}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering&&t.options.fetched,expression:"hasPayments && hasPaymentsFiltered && !isPaymentsFiltering && options.fetched"}],staticClass:"am-finance-list-head"},[a("el-row",[a("el-col",{attrs:{lg:14}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2}},[a("p",[a("el-checkbox",{style:{display:"none"},on:{change:function(e){t.checkPaymentData=t.handleCheckAll(t.payments,t.checkPaymentData)}},model:{value:t.checkPaymentData.allChecked,callback:function(e){t.$set(t.checkPaymentData,"allChecked",e)},expression:"checkPaymentData.allChecked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:6}},[a("p",[t._v(t._s(t.$root.labels.payment_date)+":")])]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.customer)+":")])]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.employee)+":")])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:10}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),a("el-col",{attrs:{lg:12}},[a("p",[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")])]),t._v(" "),a("el-col",{attrs:{lg:12}},[a("p",[t._v(t._s(t.$root.labels.status)+":")])])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering&&t.options.fetched,expression:"hasPayments && hasPaymentsFiltered && !isPaymentsFiltering && options.fetched"}],staticClass:"am-finance-list"},[a("el-collapse",t._l(t.payments,function(e,s){return a("el-collapse-item",{key:e.id,staticClass:"am-finance",attrs:{name:e.id}},[a("template",{slot:"title"},[a("div",{staticClass:"am-finance-data"},[0===e.appointmentId?a("span",{staticClass:"am-entity-color am-event-color"}):a("span",{staticClass:"am-entity-color am-appointment-color"}),t._v(" "),a("el-row",[a("el-col",{attrs:{lg:14}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2,sm:1}},[a("span",{on:{click:function(e){e.stopPropagation()}}},[a("el-checkbox",{style:{display:"none"},on:{change:function(e){t.checkPaymentData=t.handleCheckSingle(t.payments,t.checkPaymentData)}},model:{value:e.checked,callback:function(s){t.$set(e,"checked",s)},expression:"payment.checked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:6,sm:6}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.payment_date)+":")]),t._v(" "),a("h4",[t._v(t._s(t.getFrontedFormattedDate(e.dateTime)))])]),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),a("h3",{class:t.getNoShowClass(e.customerId,null,null,e.customerStatus)},[t._v("\n "+t._s(e.customerFirstName+" "+e.customerLastName)+"\n ")]),t._v(" "),a("span",[t._v(t._s(e.customerEmail))])]),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.employee)+":")]),t._v(" "),1===e.providers.length?a("div",{staticClass:"am-assigned"},[a("img",{attrs:{src:t.pictureLoad(t.getProviderById(e.providers[0].id),!0)},on:{error:function(s){t.imageLoadError(t.getProviderById(e.providers[0].id),!0)}}}),t._v(" "),a("h4",[t._v(t._s(null!==(t.user=t.getProviderById(e.providers[0].id))?t.user.firstName+" "+t.user.lastName:""))])]):t._e(),t._v(" "),e.providers.length>1?a("el-tooltip",{attrs:{placement:"top-start"}},[a("div",{staticClass:"am-all-event-employees",attrs:{slot:"content"},slot:"content"},t._l(e.providers,function(e){return a("div",{key:e.id},[t._v("\n "+t._s(null!==(t.user=t.getProviderById(e.id))?t.user.firstName+" "+t.user.lastName:"")+"\n ")])}),0),t._v(" "),a("div",{staticClass:"am-assigned am-multiple-employees"},[t._l(e.providers,function(e,s){return s<=4?a("img",{key:e.id,attrs:{src:t.pictureLoad(t.getProviderById(e.id),!0)},on:{error:function(s){t.imageLoadError(t.getProviderById(e.id),!0)}}}):t._e()}),t._v(" "),s>4&&e.providers.length-5>0?a("h4",[t._v(" + "+t._s(e.providers.length-5))]):t._e()],2)]):t._e()],1)],1)],1),t._v(" "),a("el-col",{attrs:{lg:10}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),a("el-col",{staticClass:"am-payment-service",attrs:{lg:12,sm:14}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")]),t._v(" "),e.packageId?a("img",{attrs:{src:t.$root.getUrl+"public/img/am-package-black.svg"}}):t._e(),t._v(" "),a("h4",[t._v(t._s(e.name))])]),t._v(" "),a("el-col",{staticClass:"am-finance-payment-status",attrs:{lg:6,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status)+":")]),t._v(" "),a("div",{staticClass:"am-payment-status"},[a("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+e.fullStatus}),t._v(" "),a("h4",[t._v("\n "+t._s(t.getPaymentStatusNiceName(e.fullStatus))+"\n ")])])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{lg:6,sm:4}},[a("div",{on:{click:function(e){e.stopPropagation()}}},[a("el-button",{on:{click:function(s){return t.showDialogEditPayment(e)}}},[t._v("\n "+t._s(t.$root.labels.details)+"\n ")])],1)])],1)],1)],1)],1)]),t._v(" "),a("div",{staticClass:"am-finance-details"},[a("el-row",[a("el-col",{attrs:{lg:14}},[a("el-row",{staticClass:"am-finance-flex-row-top-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:2,sm:1}}),t._v(" "),a("el-col",{attrs:{lg:22,sm:23}},[a("p",{staticClass:"am-data"},[t._v("\n "+t._s(e.packageId?t.$root.labels.package_purchased:e.appointmentId?t.$root.labels.appointment_date:t.$root.labels.event_date)+":\n ")]),t._v(" "),a("p",{staticClass:"am-value"},[t._v("\n "+t._s(t.getFrontedFormattedDateTime(e.packageId?e.dateTime:e.bookingStart))+"\n ")])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:10}},[a("el-row",{staticClass:"am-finance-flex-row-top-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),a("el-col",{staticClass:"am-finance-payment-gateway",attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.method)+":")]),t._v(" "),a("div",{staticStyle:{"margin-bottom":"8px"}},[a("img",{style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+t.getPaymentIconName(e)}}),t._v(" "),t.longNamePayments(e.gateway)?t._e():a("p",{staticClass:"am-value"},[t._v(t._s(t.getPaymentGatewayNiceName(e)))])]),t._v(" "),t._l(e.secondaryPayments.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}),function(e){return a("div",{staticStyle:{"margin-bottom":"8px"}},[a("img",{style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+t.getPaymentIconName(e)}}),t._v(" "),t.longNamePayments(e.gateway)?t._e():a("p",{staticClass:"am-value"},[t._v(t._s(t.getPaymentGatewayNiceName(e)))])])})],2),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.amount)+":")]),t._v(" "),a("p",{staticClass:"am-value"},[t._v(t._s(t.getFormattedPrice("paid"===e.status||"partiallyPaid"===e.status?e.amount:0)))]),t._v(" "),t._l(e.secondaryPayments.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}),function(s){return a("div",[a("p",{staticClass:"am-value"},[t._v(t._s(t.getFormattedPrice("paid"===e.status||"partiallyPaid"===e.status?s.amount:0)))])])})],2),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.id)+":")]),t._v(" "),a("p",{staticClass:"am-value"},[t._v(t._s(e.id))]),t._v(" "),t._l(e.secondaryPayments.filter(function(e){return"pending"!==e.status&&"refunded"!==e.status}),function(e){return a("div",[a("p",{staticClass:"am-value"},[t._v(t._s(e.id))])])})],2)],1)],1)],1)],1)],2)}),1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&!t.hasPaymentsFiltered&&!t.isPaymentsFiltering&&t.options.fetched,expression:"hasPayments && !hasPaymentsFiltered && !isPaymentsFiltering && options.fetched"}],staticClass:"am-empty-state am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),a("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),a("pagination-block",{attrs:{params:t.paymentsParams,count:t.paymentsFilteredCount,show:t.paymentsParams.show,label:t.$root.labels.payments_lower,visible:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering&&t.options.fetched},on:{change:t.filterPayments}})],1),t._v(" "),!t.$root.settings.payments.coupons||t.notInLicence("starter")&&!t.licenceVisible()?t._e():a("el-tab-pane",{attrs:{label:t.$root.labels.coupons,name:"coupons"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&t.options.fetched,expression:"hasCoupons && options.fetched"}],staticClass:"am-finance-filter"},[a("el-form",{attrs:{action:t.exportCouponsAction,method:"POST"}},[a("el-row",{attrs:{gutter:16}},[a("el-col",{attrs:{md:24,lg:8}},[a("div",{staticClass:"am-search"},[a("el-form-item",[a("el-input",{staticClass:"calc-width-mobile",attrs:{placeholder:t.searchCouponsPlaceholder},model:{value:t.couponsParams.search,callback:function(e){t.$set(t.couponsParams,"search",e)},expression:"couponsParams.search"}})],1)],1)]),t._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.filterCouponsFields,expression:"filterCouponsFields"}],staticClass:"am-filter-fields"},[a("el-col",{attrs:{md:24,lg:8}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.services,"collapse-tags":""},on:{change:t.filterCoupons},model:{value:t.couponsParams.services,callback:function(e){t.$set(t.couponsParams,"services",e)},expression:"couponsParams.services"}},t._l(t.options.entities.categories,function(e){return a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(s){return t.selectAllInCategoryCoupons(e.id)}}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),a("el-col",{attrs:{md:24,lg:7}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.events,"collapse-tags":""},on:{change:t.filterCoupons},model:{value:t.couponsParams.events,callback:function(e){t.$set(t.couponsParams,"events",e)},expression:"couponsParams.events"}},t._l(t.options.entities.events,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name+(e.periods&&e.periods.length?" ("+t.getFrontedFormattedDate(e.periods[0].periodStart.split(" ")[0])+")":""),value:e.id}})}),1)],1)],1)],1)]),t._v(" "),a("div",{},[a("el-button",{staticClass:"button-filter-toggle am-button-icon",attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterCouponsFields=!t.filterCouponsFields}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})]),t._v(" "),a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_coupons)},slot:"content"}),t._v(" "),a("el-button",{staticClass:"button-export am-button-icon",on:{click:function(e){t.dialogCouponsExport=!0}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Export",src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1)],1),t._v(" "),a("transition",{attrs:{name:"slide"}},[t.dialogCouponsExport?a("el-dialog",{staticClass:"am-side-dialog am-dialog-export",attrs:{"close-on-click-modal":!1,visible:t.dialogCouponsExport,"show-close":!1},on:{"update:visible":function(e){t.dialogCouponsExport=e}}},[a("dialog-export",{attrs:{data:Object.assign(t.couponsParams,t.exportParamsCoupons),action:t.$root.getAjaxUrl+"/report/coupons"},on:{updateAction:function(t){e.exportCouponsAction=t},closeDialogExport:function(e){t.dialogCouponsExport=!1}}})],1):t._e()],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isCouponsFiltering||!t.options.fetched,expression:"isCouponsFiltering || !options.fetched"}],staticClass:"am-spinner am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),a("EmptyState",{attrs:{visible:!t.hasCoupons&&!t.isCouponsFiltering,licence:"starter",title:t.$root.labels.no_coupons_yet}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering&&t.options.fetched,expression:"hasCoupons && hasCouponsFiltered && !isCouponsFiltering && options.fetched"}],staticClass:"am-finance-list-head"},[a("el-row",[a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?7:8}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2}},[a("p",[a("el-checkbox",{on:{change:function(e){t.checkCouponData=t.handleCheckAll(t.coupons,t.checkCouponData)}},model:{value:t.checkCouponData.allChecked,callback:function(e){t.$set(t.checkCouponData,"allChecked",e)},expression:"checkCouponData.allChecked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:6}},[a("p",[t._v(t._s(t.$root.labels.code)+":")])]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.discount)+":")])]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.deduction)+":")])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?17:16}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6}},[a("p",[t._v(t._s(t.$root.labels.service)+":")])]),t._v(" "),t.$root.licence.isPro||t.$root.licence.isDeveloper?a("el-col",{attrs:{lg:4}},[a("p",[t._v(t._s(t.$root.labels.package)+":")])]):t._e(),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6}},[a("p",[t._v(t._s(t.$root.labels.event)+":")])]),t._v(" "),a("el-col",{attrs:{lg:3}},[a("p",[t._v(t._s(t.$root.labels.usage_limit)+":")])]),t._v(" "),a("el-col",{attrs:{lg:3}},[a("p",[t._v(t._s(t.$root.labels.times_used)+":")])]),t._v(" "),a("el-col",{attrs:{lg:3}},[a("p",[t._v(t._s(t.$root.labels.expiration_date)+":")])])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering&&t.options.fetched,expression:"hasCoupons && hasCouponsFiltered && !isCouponsFiltering && options.fetched"}],staticClass:"am-finance-list"},t._l(t.coupons,function(e){return a("div",{class:{"am-coupon-row am-hidden-entity":"hidden"===e.status,"am-coupon-row":"visible"===e.status}},[a("el-row",[a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?7:8}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2,sm:1}},[a("span",{on:{click:function(e){e.stopPropagation()}}},[a("el-checkbox",{on:{change:function(e){t.checkCouponData=t.handleCheckSingle(t.coupons,t.checkCouponData)}},model:{value:e.checked,callback:function(s){t.$set(e,"checked",s)},expression:"coupon.checked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:6,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.code)+":")]),t._v(" "),a("h4",[t._v(t._s(e.code))])]),t._v(" "),a("el-col",{attrs:{lg:8,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.discount)+":")]),t._v(" "),a("h4",[t._v(t._s(e.discount))])]),t._v(" "),a("el-col",{attrs:{lg:8,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.deduction)+":")]),t._v(" "),a("h4",[t._v(t._s(t.getFormattedPrice(e.deduction)))])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?17:16}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+":")]),t._v(" "),e.allServices?a("h4",[t._v(t._s(t.$root.labels.all_services))]):a("h4",[t._v("\n "+t._s(e.serviceList.length>0?e.serviceList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.serviceList.length>1?2===e.serviceList.length?"+"+(e.serviceList.length-1)+" "+t.$root.labels.service:"+"+(e.serviceList.length-1)+" "+t.$root.labels.services:"")+"\n ")])])]),t._v(" "),t.$root.licence.isPro||t.$root.licence.isDeveloper?a("el-col",{attrs:{lg:4,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package)+":")]),t._v(" "),e.allPackages?a("h4",[t._v(t._s(t.$root.labels.all_packages))]):a("h4",[t._v("\n "+t._s(e.packageList.length>0?e.packageList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.packageList.length>1?2===e.packageList.length?"+"+(e.packageList.length-1)+" "+t.$root.labels.package:"+"+(e.packageList.length-1)+" "+t.$root.labels.packages:"")+"\n ")])])]):t._e(),t._v(" "),a("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event)+":")]),t._v(" "),e.allEvents?a("h4",[t._v(t._s(t.$root.labels.all_events))]):a("h4",[t._v("\n "+t._s(e.eventList.length>0?e.eventList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.eventList.length>1?2===e.eventList.length?"+"+(e.eventList.length-1)+" "+t.$root.labels.event:"+"+(e.eventList.length-1)+" "+t.$root.labels.events:"")+"\n ")])])]),t._v(" "),a("el-col",{attrs:{lg:3,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.usage_limit)+":")]),t._v(" "),a("h4",[t._v(t._s(e.limit))])]),t._v(" "),a("el-col",{attrs:{lg:3,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.times_used)+":")]),t._v(" "),a("h4",[t._v(t._s(e.used))])]),t._v(" "),a("el-col",{attrs:{lg:3,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.expiration_date)+":")]),t._v(" "),a("h4",[t._v(t._s(e.expirationDate?t.getFrontedFormattedDate(e.expirationDate):"/"))])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{lg:3,sm:4}},[a("div",{on:{click:function(e){e.stopPropagation()}}},[a("el-button",{on:{click:function(s){return t.showDialogEditCoupon(e.id)}}},[t._v(t._s(t.$root.labels.edit))])],1)])],1)],1)],1)],1)}),0),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&!t.hasCouponsFiltered&&!t.isCouponsFiltering&&t.options.fetched,expression:"hasCoupons && !hasCouponsFiltered && !isCouponsFiltering && options.fetched"}],staticClass:"am-empty-state am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),a("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),a("pagination-block",{attrs:{params:t.couponsParams,count:t.couponsFilteredCount,label:t.$root.labels.coupons_lower,visible:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering&&t.options.fetched},on:{change:t.filterCoupons}})],1),t._v(" "),!t.$root.settings.payments.taxes.enabled||t.notInLicence()&&!t.licenceVisible()?t._e():a("el-tab-pane",{attrs:{label:t.$root.labels.taxes,name:"taxes"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasTaxes&&t.options.fetched,expression:"hasTaxes && options.fetched"}],staticClass:"am-finance-filter"},[a("el-form",{},[a("el-row",{attrs:{gutter:16}},[a("el-col",{attrs:{md:24,lg:4}},[a("div",{staticClass:"am-search"},[a("el-form-item",[a("el-input",{staticClass:"calc-width-mobile-tax",attrs:{placeholder:t.searchTaxesPlaceholder},model:{value:t.taxesParams.search,callback:function(e){t.$set(t.taxesParams,"search",e)},expression:"taxesParams.search"}})],1)],1)]),t._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.filterTaxesFields,expression:"filterTaxesFields"}],staticClass:"am-filter-fields"},[a("el-col",{attrs:{md:24,lg:5}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.services,"collapse-tags":""},on:{change:t.filterTaxes},model:{value:t.taxesParams.services,callback:function(e){t.$set(t.taxesParams,"services",e)},expression:"taxesParams.services"}},t._l(t.options.entities.categories,function(e){return a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(s){return t.selectAllInCategoryTaxes(e.id)}}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),a("el-col",{attrs:{md:24,lg:5}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.extras,"collapse-tags":""},on:{change:t.filterTaxes},model:{value:t.taxesParams.extras,callback:function(e){t.$set(t.taxesParams,"extras",e)},expression:"taxesParams.extras"}},t._l(t.options.entities.services,function(e){return e.extras.length?a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(s){return t.selectAllInServiceTaxes(e.id)}}},[a("span",[t._v(t._s(e.name)+" ("+t._s(t.getCategoryById(e.categoryId).name)+")")])]),t._v(" "),t._l(e.extras,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2):t._e()}),0)],1)],1),t._v(" "),a("el-col",{attrs:{md:24,lg:5}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.packages,"collapse-tags":""},on:{change:t.filterTaxes},model:{value:t.taxesParams.packages,callback:function(e){t.$set(t.taxesParams,"packages",e)},expression:"taxesParams.packages"}},t._l(t.options.entities.packages,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:24,lg:5}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.events,"collapse-tags":""},on:{change:t.filterTaxes},model:{value:t.taxesParams.events,callback:function(e){t.$set(t.taxesParams,"events",e)},expression:"taxesParams.events"}},t._l(t.options.entities.events,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name+(e.periods&&e.periods.length?" ("+t.getFrontedFormattedDate(e.periods[0].periodStart.split(" ")[0])+")":""),value:e.id}})}),1)],1)],1)],1)]),t._v(" "),a("div",{},[a("el-button",{staticClass:"button-filter-toggle am-button-icon",staticStyle:{right:"8px"},attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterTaxesFields=!t.filterTaxesFields}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isTaxesFiltering||!t.options.fetched,expression:"isTaxesFiltering || !options.fetched"}],staticClass:"am-spinner am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),a("EmptyState",{attrs:{visible:!t.hasTaxes&&!t.isTaxesFiltering,licence:"basic",title:t.$root.labels.no_taxes_yet}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasTaxes&&t.hasTaxesFiltered&&!t.isTaxesFiltering&&t.options.fetched,expression:"hasTaxes && hasTaxesFiltered && !isTaxesFiltering && options.fetched"}],staticClass:"am-finance-list-head"},[a("el-row",[a("el-col",{attrs:{lg:7}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2}},[a("p",[a("el-checkbox",{on:{change:function(e){t.checkTaxData=t.handleCheckAll(t.coupons,t.checkTaxData)}},model:{value:t.checkTaxData.allChecked,callback:function(e){t.$set(t.checkTaxData,"allChecked",e)},expression:"checkTaxData.allChecked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:11}},[a("p",[t._v(t._s(t.$root.labels.name)+":")])]),t._v(" "),a("el-col",{attrs:{lg:11}},[a("p",[t._v(t._s(t.$root.labels.rate)+":")])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:17}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),a("el-col",{attrs:{lg:5}},[a("p",[t._v(t._s(t.$root.labels.service)+":")])]),t._v(" "),a("el-col",{attrs:{lg:5}},[a("p",[t._v(t._s(t.$root.labels.extra)+":")])]),t._v(" "),a("el-col",{attrs:{lg:5}},[a("p",[t._v(t._s(t.$root.labels.package)+":")])]),t._v(" "),a("el-col",{attrs:{lg:5}},[a("p",[t._v(t._s(t.$root.labels.event)+":")])])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasTaxes&&t.hasTaxesFiltered&&!t.isTaxesFiltering&&t.options.fetched,expression:"hasTaxes && hasTaxesFiltered && !isTaxesFiltering && options.fetched"}],staticClass:"am-finance-list"},t._l(t.taxes,function(e){return a("div",{class:{"am-coupon-row am-hidden-entity":"hidden"===e.status,"am-coupon-row":"visible"===e.status}},[a("el-row",[a("el-col",{attrs:{lg:7}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?a("el-col",{attrs:{lg:2,sm:1}},[a("span",{on:{click:function(e){e.stopPropagation()}}},[a("el-checkbox",{on:{change:function(e){t.checkTaxData=t.handleCheckSingle(t.taxes,t.checkTaxData)}},model:{value:e.checked,callback:function(s){t.$set(e,"checked",s)},expression:"tax.checked"}})],1)]):t._e(),t._v(" "),a("el-col",{attrs:{lg:11,sm:11}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.name)+":")]),t._v(" "),a("h4",[t._v(t._s(e.name))])]),t._v(" "),a("el-col",{attrs:{lg:11,sm:11}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.rate)+":")]),t._v(" "),a("h4",[t._v(t._s("percentage"===e.type?e.amount+"%":t.getFormattedPrice(e.amount)))])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:17}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),a("el-col",{attrs:{lg:5,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+":")]),t._v(" "),e.allServices?a("h4",[t._v(t._s(t.$root.labels.all_services))]):a("h4",[t._v("\n "+t._s(e.serviceList.length>0?e.serviceList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.serviceList.length>1?2===e.serviceList.length?"+"+(e.serviceList.length-1)+" "+t.$root.labels.service:"+"+(e.serviceList.length-1)+" "+t.$root.labels.services:"")+"\n ")])])]),t._v(" "),a("el-col",{attrs:{lg:5,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.extra)+":")]),t._v(" "),e.allExtras?a("h4",[t._v(t._s(t.$root.labels.all_extras))]):a("h4",[t._v("\n "+t._s(e.extraList.length>0?e.extraList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.extraList.length>1?2===e.extraList.length?"+"+(e.extraList.length-1)+" "+t.$root.labels.extra:"+"+(e.extraList.length-1)+" "+t.$root.labels.extras:"")+"\n ")])])]),t._v(" "),a("el-col",{attrs:{lg:5,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package)+":")]),t._v(" "),e.allPackages?a("h4",[t._v(t._s(t.$root.labels.all_packages))]):a("h4",[t._v("\n "+t._s(e.packageList.length>0?e.packageList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.packageList.length>1?2===e.packageList.length?"+"+(e.packageList.length-1)+" "+t.$root.labels.package:"+"+(e.packageList.length-1)+" "+t.$root.labels.packages:"")+"\n ")])])]),t._v(" "),a("el-col",{attrs:{lg:5,sm:9}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event)+":")]),t._v(" "),e.allEvents?a("h4",[t._v(t._s(t.$root.labels.all_events))]):a("h4",[t._v("\n "+t._s(e.eventList.length>0?e.eventList[0].name:"")+"\n "),a("br"),t._v(" "),a("span",[t._v("\n "+t._s(e.eventList.length>1?2===e.eventList.length?"+"+(e.eventList.length-1)+" "+t.$root.labels.event:"+"+(e.eventList.length-1)+" "+t.$root.labels.events:"")+"\n ")])])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{lg:4,sm:4}},[a("div",{on:{click:function(e){e.stopPropagation()}}},[a("el-button",{on:{click:function(s){return t.showDialogEditTax(e.id)}}},[t._v(t._s(t.$root.labels.edit))])],1)])],1)],1)],1)],1)}),0),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasTaxes&&!t.hasTaxesFiltered&&!t.isTaxesFiltering&&t.options.fetched,expression:"hasTaxes && !hasTaxesFiltered && !isTaxesFiltering && options.fetched"}],staticClass:"am-empty-state am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),a("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),a("pagination-block",{attrs:{params:t.taxesParams,count:t.taxesFilteredCount,label:t.$root.labels.taxes_lower,visible:t.hasTaxes&&t.hasTaxesFiltered&&!t.isTaxesFiltering&&t.options.fetched},on:{change:t.filterTaxes}})],1),t._v(" "),!t.notInLicence()||t.licenceVisible()?a("el-tab-pane",{attrs:{label:t.$root.labels.invoices,name:"invoices"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.hasInvoices&&t.options.fetched,expression:"hasInvoices && options.fetched"}],staticClass:"am-finance-filter"},[a("el-form",{},[a("el-row",{attrs:{gutter:16}},[a("el-col",{staticClass:"v-calendar-column",attrs:{md:24,lg:6}},[a("el-form-item",{staticClass:"calc-width-mobile-invoice"},[a("v-date-picker",{attrs:{"is-double-paned":!0,mode:"range","popover-visibility":"focus","popover-direction":"bottom","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",placeholder:t.$root.labels.pick_a_date,formats:t.vCalendarFormats},on:{input:t.changeRangeInvoices},model:{value:t.invoiceParams.dates,callback:function(e){t.$set(t.invoiceParams,"dates",e)},expression:"invoiceParams.dates"}}),t._v(" "),t.invoiceParams.dates?a("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",on:{click:function(e){return t.clearInvoiceDateFilter()}}},[a("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):t._e()],1)],1),t._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.filterInvoicesFields,expression:"filterInvoicesFields"}],staticClass:"am-filter-fields"},[a("el-col",{attrs:{md:6,lg:3}},[a("el-form-item",[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.customer,remote:"","remote-method":t.searchCustomers,loading:t.loadingCustomers},on:{change:t.filterInvoices},model:{value:t.invoiceParams.customerId,callback:function(e){t.$set(t.invoiceParams,"customerId",e)},expression:"invoiceParams.customerId"}},t._l(t.searchedCustomers.length?t.searchedCustomers:t.options.entities.customers,function(e,t){return a("el-option",{key:t,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:3}},[a("el-form-item",[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.employee},on:{change:t.filterInvoices},model:{value:t.invoiceParams.providerId,callback:function(e){t.$set(t.invoiceParams,"providerId",e)},expression:"invoiceParams.providerId"}},t._l(t.visibleEmployees,function(e){return a("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.services,"collapse-tags":""},on:{change:t.filterInvoices},model:{value:t.invoiceParams.services,callback:function(e){t.$set(t.invoiceParams,"services",e)},expression:"invoiceParams.services"}},t._l(t.options.entities.categories,function(e){return a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(s){return t.selectAllInCategoryFinance(e.id)}}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return a("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",clearable:"",placeholder:t.$root.labels.events},on:{change:t.filterInvoices},model:{value:t.invoiceParams.events,callback:function(e){t.$set(t.invoiceParams,"events",e)},expression:"invoiceParams.events"}},t._l(t.options.entities.events,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),t._v(" "),a("el-col",{attrs:{md:6,lg:4}},[a("el-form-item",[a("el-select",{attrs:{multiple:"",clearable:"",placeholder:t.$root.labels.packages},on:{change:t.filterInvoices},model:{value:t.invoiceParams.packages,callback:function(e){t.$set(t.invoiceParams,"packages",e)},expression:"invoiceParams.packages"}},t._l(t.options.entities.packages,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1)],1)]),t._v(" "),a("div",{},[a("el-button",{staticClass:"button-filter-toggle button-filter-toggle-invoice am-button-icon",attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterInvoicesFields=!t.filterInvoicesFields}}},[a("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isInvoicesFiltering,expression:"isInvoicesFiltering"}],staticClass:"am-spinner am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),a("EmptyState",{attrs:{visible:0===t.invoicesTotalCount&&!t.isInvoicesFiltering,licence:"basic",title:t.$root.labels.no_payments_yet}}),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.invoicesTotalCount&&0!==t.invoices.length&&!t.isInvoicesFiltering,expression:"invoicesTotalCount !== 0 && invoices.length !== 0 && !isInvoicesFiltering"}],staticClass:"am-finance-list-head"},[a("el-row",[a("el-col",{attrs:{lg:14}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{attrs:{lg:1}},[a("p")]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.issue_date)+":")])]),t._v(" "),a("el-col",{attrs:{lg:3}},[a("p",[t._v(t._s(t.$root.labels.invoice)+":")])]),t._v(" "),a("el-col",{attrs:{lg:4}},[a("p",[t._v(t._s(t.$root.labels.total)+":")])]),t._v(" "),a("el-col",{attrs:{lg:8}},[a("p",[t._v(t._s(t.$root.labels.customer)+":")])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:10}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),a("el-col",{attrs:{lg:12}},[a("p",[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")])]),t._v(" "),a("el-col",{attrs:{lg:12}},[a("p",[t._v(t._s(t.$root.labels.status)+":")])])],1)],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.invoicesTotalCount&&0!==t.invoices.length&&!t.isInvoicesFiltering,expression:"invoicesTotalCount !== 0 && invoices.length !== 0 && !isInvoicesFiltering"}],staticClass:"am-finance-list"},t._l(t.invoices,function(e,s){return a("div",{key:e.id,staticClass:"am-finance",attrs:{name:e.id}},[a("div",{staticClass:"am-finance-data am-finance-data-invoices"},[0===e.appointmentId?a("span",{staticClass:"am-entity-color am-event-color"}):a("span",{staticClass:"am-entity-color am-appointment-color"}),t._v(" "),a("el-row",[a("el-col",{attrs:{lg:14}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{attrs:{lg:1,sm:1}},[a("span")]),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.issue_date)+":")]),t._v(" "),a("h4",[t._v(t._s(t.getFrontedFormattedDate(e.created)))])]),t._v(" "),a("el-col",{attrs:{lg:3,sm:3}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.invoice)+":")]),t._v(" "),a("h4",[t._v(t._s(e.invoiceNumber?"#"+e.invoiceNumber:""))])]),t._v(" "),a("el-col",{attrs:{lg:4,sm:4}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.total)+":")]),t._v(" "),a("h4",[t._v(t._s(t.getFormattedPrice(e.total)))])]),t._v(" "),a("el-col",{attrs:{lg:8,sm:8}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),a("h3",{class:t.getNoShowClass(e.customerId)},[t._v("\n "+t._s(e.customerFirstName+" "+e.customerLastName)+"\n ")]),t._v(" "),a("span",[t._v(t._s(e.customerEmail))])])],1)],1),t._v(" "),a("el-col",{attrs:{lg:10}},[a("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[a("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),a("el-col",{staticClass:"am-payment-service",attrs:{lg:12,sm:14}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")]),t._v(" "),e.packageId?a("img",{attrs:{src:t.$root.getUrl+"public/img/am-package-black.svg"}}):t._e(),t._v(" "),a("h4",[t._v(t._s(t.getBookableName(e)))])]),t._v(" "),a("el-col",{staticClass:"am-finance-payment-status",attrs:{lg:6,sm:5}},[a("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status)+":")]),t._v(" "),a("div",{staticClass:"am-payment-status"},[a("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+e.fullStatus}),t._v(" "),a("h4",[t._v("\n "+t._s(t.getPaymentStatusNiceName(e.fullStatus))+"\n ")])])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{lg:6,sm:4}},[a("div",{on:{click:function(e){e.stopPropagation()}}},[a("el-button",{on:{click:function(s){return t.showDialogEditPayment(e,!0)}}},[t._v("\n "+t._s(t.$root.labels.details)+"\n ")])],1)])],1)],1)],1)],1)])}),0),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.invoicesTotalCount&&0===t.invoices.length&&!t.isInvoicesFiltering,expression:"invoicesTotalCount !== 0 && invoices.length === 0 && !isInvoicesFiltering"}],staticClass:"am-empty-state am-section"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),a("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),a("pagination-block",{attrs:{params:t.invoiceParams,count:t.invoicesFilteredCount,show:t.invoiceParams.show,label:t.$root.labels.payments_lower,visible:0!==t.invoicesTotalCount&&0!==t.invoices.length&&!t.isInvoicesFiltering},on:{change:t.filterInvoices}})],1):t._e()],1)],1),t._v(" "),a("group-delete",{attrs:{name:"payments",entities:t.payments,checkGroupData:t.checkPaymentData,confirmDeleteMessage:t.$root.labels.confirm_delete_payment,successMessage:{single:t.$root.labels.payment_deleted,multiple:t.$root.labels.payments_deleted},errorMessage:{single:t.$root.labels.payment_not_deleted,multiple:t.$root.labels.payments_not_deleted}},on:{groupDeleteCallback:t.paymentGroupDeleteCallback}}),t._v(" "),a("group-delete",{attrs:{name:"taxes",entities:t.taxes,checkGroupData:t.checkTaxData,confirmDeleteMessage:t.$root.labels.confirm_delete_tax,successMessage:{single:t.$root.labels.tax_deleted,multiple:t.$root.labels.taxes_deleted},errorMessage:{single:t.$root.labels.tax_not_deleted,multiple:t.$root.labels.taxes_not_deleted}},on:{groupDeleteCallback:t.taxGroupDeleteCallback}}),t._v(" "),a("group-delete",{attrs:{name:"coupons",entities:t.coupons,checkGroupData:t.checkCouponData,confirmDeleteMessage:t.$root.labels.confirm_delete_coupon,successMessage:{single:t.$root.labels.coupon_deleted,multiple:t.$root.labels.coupons_deleted},errorMessage:{single:t.$root.labels.coupon_not_deleted,multiple:t.$root.labels.coupons_not_deleted}},on:{groupDeleteCallback:t.couponGroupDeleteCallback}}),t._v(" "),t.$root.settings.payments.taxes.enabled?a("transition",{attrs:{name:"slide"}},[t.dialogTax?a("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{"close-on-click-modal":!1,visible:t.dialogTax,"show-close":!1},on:{"update:visible":function(e){t.dialogTax=e}}},[a("dialog-tax",{attrs:{tax:t.tax,taxes:t.taxes,services:t.options.entities.services,extras:t.options.entities.extras,events:t.options.entities.events,packages:t.options.entities.packages,taxFetched:t.taxFetched},on:{closeDialog:function(e){return t.closeDialogTax()},saveCallback:t.savedTax,duplicateCallback:t.duplicateTaxCallback}})],1):t._e()],1):t._e(),t._v(" "),t.$root.settings.payments.coupons?a("transition",{attrs:{name:"slide"}},[t.dialogCoupon?a("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{"close-on-click-modal":!1,visible:t.dialogCoupon,"show-close":!1},on:{"update:visible":function(e){t.dialogCoupon=e}}},[a("dialog-coupon",{attrs:{coupon:t.coupon,services:t.options.entities.services,events:t.options.entities.events,packages:t.options.entities.packages,couponFetched:t.couponFetched},on:{closeDialog:function(e){return t.closeDialogCoupon()},saveCallback:t.savedCoupon,duplicateCallback:t.duplicateCouponCallback}})],1):t._e()],1):t._e(),t._v(" "),a("transition",{attrs:{name:"slide"}},[t.dialogPayment?a("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{"close-on-click-modal":!1,visible:t.dialogPayment,"show-close":!1},on:{"update:visible":function(e){t.dialogPayment=e}}},[a("dialog-payment",{attrs:{modalData:t.selectedPaymentModalData,bookingFetched:t.bookingFetched,customersNoShowCount:t.customersNoShowCount,"invoice-in-dialog":t.invoiceInDialog},on:{updatePaymentCallback:t.updatePaymentCallback,deletePaymentCallback:t.updatePaymentCallback,closeDialogPayment:function(e){return t.closeDialogPayment()}}})],1):t._e()],1),t._v(" "),a("el-col",{attrs:{md:6}},[a("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/admin-finances/",target:"_blank",rel:"nofollow"}},[a("i",{staticClass:"el-icon-question"}),t._v(" "+t._s(t.$root.labels.need_help)+"?\n ")])])],1)])},staticRenderFns:[]}},1618:function(e,t,s){var a=s(90)(s(1357),s(1362),!1,null,null,null);e.exports=a.exports},654:function(e,t,s){"use strict";t.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{deleteImage:function(e){e.pictureThumbPath="",e.pictureFullPath=""},getAppropriateUrlParams:function(e){if("disableUrlParams"in this.$root.settings.activation&&!this.$root.settings.activation.disableUrlParams)return e;var t=JSON.parse(JSON.stringify(e));return["categories","services","packages","employees","providers","providerIds","extras","locations","events","types","dates"].forEach(function(e){if("extras"===e&&e in t){t.extras=JSON.parse(t.extras);var s=[];t.extras.forEach(function(e){s.push(e.id+"-"+e.quantity)}),t.extras=s.length?s:null}e in t&&Array.isArray(t[e])&&t[e].length&&(t[e]=t[e].join(","))}),t},inlineSVG:function(){var e=s(662);e.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){s(662).init({svgSelector:"img.svg-cabinet",initClass:"js-inlinesvg"})},100)},imageFromText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.getNameInitials(e),n=Math.floor(Math.random()*this.colors.length),i=this.colors[n];if(this.usedColors.push(this.colors[n]),this.colors.splice(n,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),s)return t.firstName?this.$root.getUrl+"public/img/default-employee.svg":t.latitude?this.$root.getUrl+"public/img/default-location.svg":this.$root.getUrl+"public/img/default-service.svg";var o=document.createElement("canvas");o.width=100,o.height=100;var r=o.getContext("2d");return r.fillStyle=i.startsWith("#")?i:"#"+i,r.fillRect(0,0,o.width,o.height),r.font="40px Arial",r.fillStyle="#ffffff",r.textAlign="center",r.textBaseline="middle",r.fillText(a,o.width/2,o.height/2),o.toDataURL("image/png")},pictureLoad:function(e,t){if(null!==e){var s=!0===t?e.firstName+" "+e.lastName:e.name;if(void 0!==s)return e.pictureThumbPath=e.pictureThumbPath||this.imageFromText(s),e.pictureThumbPath}},imageLoadError:function(e,t){var s=!0===t?e.firstName+" "+e.lastName:e.name;void 0!==s&&(e.pictureThumbPath=this.imageFromText(s,e,!0))},getNameInitials:function(e){return e.split(" ").map(function(e){return e.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},655:function(e,t,s){"use strict";var a="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};t.a={data:function(){return{}},methods:{replaceExistingObjectProperties:function(e,t){var s=this;Object.keys(e).forEach(function(n){null!==e[n]&&"object"===a(e[n])&&n in t?s.replaceExistingObjectProperties(e[n],t[n]):n in t&&(e[n]=t[n])})},addMissingObjectProperties:function(e,t){var s=this;Object.keys(t).forEach(function(n){var i=!1;n in e||("object"===a(t[n])?(e[n]={},i=!0):(e[n]=null,i=!0)),null===t[n]||"object"!==a(t[n])?i&&(e[n]=t[n]):s.addMissingObjectProperties(e[n],t[n])})},scrollView:function(e,t,s){"undefined"!=typeof jQuery&&(void 0!==s&&s||jQuery(window).width()<=600)&&setTimeout(function(){var s=document.getElementById(e);void 0!==s&&null!==s&&s.scrollIntoView({behavior:"smooth",block:t,inline:"end"})},200)},scrollViewInModal:function(e){this.$nextTick(function(){var t=document.getElementById(e),s=document.querySelectorAll(".am-dialog-scrollable");if(t&&s&&s.length){var a=t,n=t.offsetTop;do{n+=(a=a.offsetParent).offsetTop}while(a===s[0]);s[0].scrollTop=n}})},getUrlQueryParams:function(e){var t=e.indexOf("#")>0?e.substring(0,e.indexOf("#")).split("?")[1]:e.split("?")[1];if(t){var s=[],a={};return t.split("&").forEach(function(e){s=e.split("="),a[s[0]]=decodeURIComponent(s[1]).replace(/\+/g," ")}),a}},getUrlParams:function(e){var t={};if(-1!==e.indexOf("?")){var s=[];e.split("?")[1].split("&").forEach(function(e){s=e.split("="),t[s[0]]=decodeURIComponent(s[1]).replace(/\+/g," ")})}return t},removeURLParameter:function(e,t){var s=e.split("?");if(s.length>=2){for(var a=encodeURIComponent(t)+"=",n=s[1].split(/[&;]/g),i=n.length;i-- >0;)-1!==n[i].lastIndexOf(a,0)&&n.splice(i,1);return e=s[0]+(n.length>0?"?"+n.join("&"):"")}return e},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},trimProperty:function(e,t){e[t]=e[t].trim()}}}},656:function(e,t,s){"use strict";var a=s(686),n=s(344),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function r(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||o(e)||(e=[e]),o(e))for(var s=0,a=e.length;s<a;s++)t.call(null,e[s],s,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:n,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:r,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return r(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function s(s,a){"object"==typeof t[a]&&"object"==typeof s?t[a]=e(t[a],s):t[a]=s}for(var a=0,n=arguments.length;a<n;a++)c(arguments[a],s);return t},extend:function(e,t,s){return c(t,function(t,n){e[n]=s&&"function"==typeof t?a(t,s):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},657:function(e,t,s){"use strict";t.a={data:function(){return{currencies:[{symbol:"$",name:"US Dollar",symbol_native:"$",code:"USD",iso:"us"},{symbol:"€",name:"Euro",symbol_native:"€",code:"EUR",iso:"eu"},{symbol:"£",name:"British Pound Sterling",symbol_native:"£",code:"GBP",iso:"gb"},{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",code:"CAD",iso:"ca"},{symbol:"FCFP",name:"CFP Franc",symbol_native:"FCFP",code:"XPF",iso:"fr"},{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",code:"CHF",iso:"ch"},{symbol:"RUB",name:"Russian Ruble",symbol_native:"руб.",code:"RUB",iso:"ru"},{symbol:"¥",name:"Japanese Yen",symbol_native:"¥",code:"JPY",iso:"jp"},{symbol:"Af",name:"Afghan Afghani",symbol_native:"؋",code:"AFN",iso:"af"},{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",code:"ALL",iso:"al"},{symbol:"DA",name:"Algerian Dinar",symbol_native:"د.ج.",code:"DZD",iso:"dz"},{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",code:"ARS",iso:"ar"},{symbol:"AMD",name:"Armenian Dram",symbol_native:"դր.",code:"AMD",iso:"am"},{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",code:"AUD",iso:"au"},{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"ман.",code:"AZN",iso:"az"},{symbol:"BD",name:"Bahraini Dinar",symbol_native:"د.ب.",code:"BHD",iso:"bh"},{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"৳",code:"BDT",iso:"bd"},{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",code:"BYR",iso:"by"},{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",code:"BZD",iso:"bz"},{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",code:"BOB",iso:"bo"},{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",code:"BAM",iso:"ba"},{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",code:"BWP",iso:"bw"},{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",code:"BRL",iso:"br"},{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",code:"BND",iso:"bn"},{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"лв.",code:"BGN",iso:"bg"},{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",code:"BIF",iso:"bi"},{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",code:"XOF",iso:"auto"},{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",code:"XAF",iso:"auto"},{symbol:"KHR",name:"Cambodian Riel",symbol_native:"៛",code:"KHR",iso:"kh"},{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",code:"CVE",iso:"cv"},{symbol:"CLP",name:"Chilean Peso",symbol_native:"$",code:"CLP",iso:"cl"},{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",code:"CNY",iso:"cn"},{symbol:"COP",name:"Colombian Peso",symbol_native:"$",code:"COP",iso:"co"},{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",code:"KMF",iso:"km"},{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",code:"CDF",iso:"cd"},{symbol:"₡",name:"Costa Rican Colón",symbol_native:"₡",code:"CRC",iso:"cr"},{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",code:"HRK",iso:"hr"},{symbol:"Kč",name:"Czech Republic Koruna",symbol_native:"Kč",code:"CZK",iso:"cz"},{symbol:"Dkk",name:"Danish Krone",symbol_native:"kr",code:"DKK",iso:"dk"},{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",code:"DJF",iso:"dj"},{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",code:"DOP",iso:"do"},{symbol:"EGP",name:"Egyptian Pound",symbol_native:"ج.م.",code:"EGP",iso:"eg"},{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",code:"ERN",iso:"er"},{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",code:"EEK",iso:"ee"},{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",code:"ETB",iso:"et"},{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",code:"GEL",iso:"ge"},{symbol:"GH₵",name:"Ghanaian Cedi",symbol_native:"GH₵",code:"GHS",iso:"gh"},{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",code:"GTQ",iso:"gt"},{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",code:"GNF",iso:"gn"},{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",code:"HNL",iso:"hn"},{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",code:"HKD",iso:"hk"},{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",code:"HUF",iso:"hu"},{symbol:"kr",name:"Icelandic Króna",symbol_native:"kr",code:"ISK",iso:"is"},{symbol:"INR",name:"Indian Rupee",symbol_native:"টকা",code:"INR",iso:"in"},{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",code:"IDR",iso:"id"},{symbol:"IRR",name:"Iranian Rial",symbol_native:"﷼",code:"IRR",iso:"ir"},{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"د.ع.",code:"IQD",iso:"iq"},{symbol:"₪",name:"Israeli New Sheqel",symbol_native:"₪",code:"ILS",iso:"il"},{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",code:"JMD",iso:"jm"},{symbol:"JD",name:"Jordanian Dinar",symbol_native:"د.أ.",code:"JOD",iso:"jo"},{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"тңг.",code:"KZT",iso:"kz"},{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",code:"KES",iso:"ke"},{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"د.ك.",code:"KWD",iso:"kw"},{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",code:"LVL",iso:"lv"},{symbol:"LB£",name:"Lebanese Pound",symbol_native:"ل.ل.",code:"LBP",iso:"lb"},{symbol:"LD",name:"Libyan Dinar",symbol_native:"د.ل.",code:"LYD",iso:"ly"},{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",code:"LTL",iso:"lt"},{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",code:"MOP",iso:"mo"},{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",code:"MKD",iso:"mk"},{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",code:"MGA",iso:"mg"},{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",code:"MYR",iso:"my"},{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",code:"MUR",iso:"mu"},{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",code:"MXN",iso:"mx"},{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",code:"MDL",iso:"md"},{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"د.م.",code:"MAD",iso:"ma"},{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",code:"MZN",iso:"mz"},{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",code:"MMK",iso:"mm"},{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",code:"NAD",iso:"na"},{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"नेरू",code:"NPR",iso:"np"},{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",code:"TWD",iso:"tw"},{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",code:"NZD",iso:"nz"},{symbol:"C$",name:"Nicaraguan Córdoba",symbol_native:"C$",code:"NIO",iso:"ni"},{symbol:"₦",name:"Nigerian Naira",symbol_native:"₦",code:"NGN",iso:"ng"},{symbol:"kr",name:"Norwegian Krone",symbol_native:"kr",code:"NOK",iso:"no"},{symbol:"OMR",name:"Omani Rial",symbol_native:"ر.ع.",code:"OMR",iso:"om"},{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"₨",code:"PKR",iso:"pk"},{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",code:"PAB",iso:"pa"},{symbol:"₲",name:"Paraguayan Guarani",symbol_native:"₲",code:"PYG",iso:"py"},{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",code:"PEN",iso:"pe"},{symbol:"₱",name:"Philippine Peso",symbol_native:"₱",code:"PHP",iso:"ph"},{symbol:"zł",name:"Polish Zloty",symbol_native:"zł",code:"PLN",iso:"pl"},{symbol:"QR",name:"Qatari Rial",symbol_native:"ر.ق.",code:"QAR",iso:"qa"},{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",code:"RON",iso:"ro"},{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",code:"RWF",iso:"rw"},{symbol:"SR",name:"Saudi Riyal",symbol_native:"ر.س.",code:"SAR",iso:"sa"},{symbol:"rsd.",name:"Serbian Dinar",symbol_native:"дин.",code:"RSD",iso:"rs"},{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",code:"SGD",iso:"sg"},{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",code:"SOS",iso:"so"},{symbol:"R",name:"South African Rand",symbol_native:"R",code:"ZAR",iso:"za"},{symbol:"₩",name:"South Korean Won",symbol_native:"₩",code:"KRW",iso:"kr"},{symbol:"₭",name:"Lao kip",symbol_native:"₭",code:"LAK",iso:"la"},{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",code:"LKR",iso:"lk"},{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",code:"SDG",iso:"sd"},{symbol:"kr",name:"Swedish Krona",symbol_native:"kr",code:"SEK",iso:"se"},{symbol:"SY£",name:"Syrian Pound",symbol_native:"ل.س.",code:"SYP",iso:"sy"},{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",code:"TZS",iso:"tz"},{symbol:"฿",name:"Thai Baht",symbol_native:"฿",code:"THB",iso:"th"},{symbol:"T$",name:"Tongan Paʻanga",symbol_native:"T$",code:"TOP",iso:"to"},{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",code:"TTD",iso:"tt"},{symbol:"DT",name:"Tunisian Dinar",symbol_native:"د.ت.",code:"TND",iso:"tn"},{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",code:"TRY",iso:"tr"},{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",code:"UGX",iso:"ug"},{symbol:"₴",name:"Ukrainian Hryvnia",symbol_native:"₴",code:"UAH",iso:"ua"},{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"د.إ.",code:"AED",iso:"ae"},{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",code:"UYU",iso:"uy"},{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",code:"UZS",iso:"uz"},{symbol:"Bs.S.",name:"Venezuelan Bolívar",symbol_native:"Bs.S.",code:"VES",iso:"ve"},{symbol:"₫",name:"Vietnamese Dong",symbol_native:"₫",code:"VND",iso:"vn"},{symbol:"YR",name:"Yemeni Rial",symbol_native:"ر.ي.",code:"YER",iso:"ye"},{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",code:"ZMK",iso:"zm"}],thousandSeparatorMap:{1:",",2:".",3:" ",4:" "},decimalSeparatorMap:{1:".",2:",",3:".",4:","}}},methods:{getCurrencySymbol:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=this.currencies.find(function(t){return t.code===e.$root.settings.payments.currencyCode});return s&&t&&"INR"!==s.code?s.symbol_native:t&&"INR"===s.code?s.code:this.$root.settings.payments.currency},getPriceThousandSeparator:function(){return this.thousandSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceDecimalSeparator:function(){return this.decimalSeparatorMap[this.$root.settings.payments.priceSeparator]},getPriceNumberOfDecimalPlaces:function(){return this.$root.settings.payments.priceNumberOfDecimals},getPricePrefix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"after"===this.$root.settings.payments.priceSymbolPosition||"afterWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"before"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):this.getCurrencySymbol(e)+" "},getPriceSuffix:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"before"===this.$root.settings.payments.priceSymbolPosition||"beforeWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"after"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol(e):" "+this.getCurrencySymbol(e)},getFormattedPrice:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.getPriceNumberOfDecimalPlaces(),a=this.getPriceThousandSeparator(),n=this.getPriceDecimalSeparator(),i=this.getPricePrefix(),o=this.getPriceSuffix(),r=parseInt(e=Math.abs(+e||0).toFixed(s))+"",l=r.length>3?r.length%3:0;return(t?i:"")+(l?r.substr(0,l)+a:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+a)+(s?n+Math.abs(e-r).toFixed(s).slice(2):"")+(t?o:"")},getPercentage:function(e,t){return e*t/100}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},658:function(e,t,s){"use strict";t.a={methods:{notify:function(e,t,s,a,n){var i=this;void 0===a&&(a=""),setTimeout(function(){var o={customClass:a,title:e,message:t,type:s,offset:50};void 0!==n&&(o.duration=n),i.$notify(o)},700)}}}},659:function(e,t,s){"use strict";var a=s(679),n=s(672),i="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};t.a={mixins:[a.a,n.a],data:function(){return{}},methods:{getLocationById:function(e){return this.options.entities.locations.find(function(t){return t.id===e})||null},getCustomerById:function(e){return this.options.entities.customers.find(function(t){return t.id===e})||null},getProviderById:function(e){return this.options.entities.employees.find(function(t){return t.id===e})||null},getServiceById:function(e){return this.options.entities.services.find(function(t){return t.id===e})||null},getCategoryById:function(e){return this.options.entities.categories.find(function(t){return t.id===e})||null},getPackageById:function(e){return this.options.entities.packages.find(function(t){return t.id===e})||null},getProviderService:function(e,t){var s=this.getProviderById(e).serviceList.find(function(e){return e.id===parseInt(t)});return s?Object.assign(JSON.parse(JSON.stringify(this.getServiceById(t))),s):null},getProviderBadge:function(e,t){var s=this.$root.settings.roles.providerBadges.badges.map(function(e){return e.id}),a=null;if(!e.badgeId||!s.includes(e.badgeId))return null;switch(a=this.$root.settings.roles.providerBadges.badges.find(function(t){return t.id===e.badgeId}),t){case"":return!0;case"color":return a.color;case"content":return a.content;default:return!0}},getServiceProviders:function(e,t){var s=this;return void 0!==t&&t?this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}):this.options.entities.employees.filter(function(t){return-1!==t.serviceList.filter(function(e){return s.isEmployeeService(t.id,e.id)}).map(function(e){return e.id}).indexOf(e)})},getServiceLocations:function(e,t){var s=this,a=[];return this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}).forEach(function(e){a=s.getProviderLocations(e.id,t).map(function(e){return e.id}).concat(a)}),this.options.entities.locations.filter(function(e){return-1!==a.indexOf(e.id)})},getProviderLocations:function(e,t){var s=this,a=[this.getProviderById(e).locationId];if(e in this.options.entitiesRelations)for(var n in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(n)&&(a=a.concat(this.options.entitiesRelations[e][n]));return a=a.filter(function(e,t,s){return s.indexOf(e)===t}),(void 0!==t&&t?this.options.entities.locations:this.options.entities.locations.filter(function(t){return s.isEmployeeLocation(e,t.id)})).filter(function(e){return-1!==a.indexOf(e.id)})},getLocationProviders:function(e,t){var s=this,a=[];return this.options.entities.employees.forEach(function(n){-1!==(void 0!==t&&t?s.getProviderLocations(n.id).filter(function(e){return s.isEmployeeLocation(n.id,e.id)}):s.getProviderLocations(n.id)).map(function(e){return e.id}).indexOf(e)&&a.push(n.id)}),a=a.filter(function(e,t,s){return s.indexOf(e)===t}),this.options.entities.employees.filter(function(e){return-1!==a.indexOf(e.id)})},getServicesFromCategories:function(e){var t=[];return e.map(function(e){return e.serviceList}).forEach(function(e){t=t.concat(e)}),t.sort(this.sortWithNull)},getCategoryServices:function(e){return this.options.entities.categories.find(function(t){return t.id===e}).serviceList},getCustomerInfo:function(e){var t=null;return"info"in e&&e.info?Object.assign({id:"customer"in e?e.customer.id:null},JSON.parse(e.info)):("customerId"in e?t=this.getCustomerById(e.customerId):"customer"in e&&(t=this.getCustomerById(e.customer.id)),null!==t?t:"customer"in e?e.customer:null)},isEmployeeServiceLocation:function(e,t,s){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]&&-1!==this.options.entitiesRelations[e][t].indexOf(s)},isEmployeeService:function(e,t){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]},isEmployeeLocation:function(e,t){var s=!1;if(e in this.options.entitiesRelations)for(var a in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(a)&&-1!==this.options.entitiesRelations[e][a].indexOf(t)&&(s=!0);return s},getAvailableEntitiesIds:function(e,t){var s=this,a=[],n=[],i=[],o=null!==t.categoryId?e.categories.find(function(e){return e.id===t.categoryId}):null,r=o?o.serviceList.map(function(e){return e.id}):[];if(null!==t.categoryId&&0===r.length||null!==t.serviceId&&null!==t.employeeId&&!this.isEmployeeService(t.employeeId,t.serviceId)||null!==t.serviceId&&null!==t.employeeId&&null!==t.locationId&&!this.isEmployeeServiceLocation(t.employeeId,t.serviceId,t.locationId))return{services:[],locations:[],employees:[],categories:[]};var l=function(e){if(!s.options.entitiesRelations.hasOwnProperty(e))return"continue";var o=parseInt(e);if(null!==t.employeeId&&t.employeeId!==o||null!==t.locationId&&!s.isEmployeeLocation(o,t.locationId)||null!==t.serviceId&&!s.isEmployeeService(o,t.serviceId)||null!==t.categoryId&&0===r.filter(function(e){return s.isEmployeeService(o,e)}).length||null!==t.categoryId&&null!==t.locationId&&0===r.filter(function(e){return s.isEmployeeServiceLocation(o,e,t.locationId)}).length||null!==t.serviceId&&null!==t.locationId&&!s.isEmployeeServiceLocation(o,t.serviceId,t.locationId))return"continue";for(var l in-1===n.indexOf(o)&&n.push(o),s.options.entitiesRelations[o])if(s.options.entitiesRelations[o].hasOwnProperty(l)){var c=parseInt(l);null!==t.serviceId&&t.serviceId!==c||null!==t.categoryId&&-1===r.indexOf(c)||null!==t.locationId&&!s.isEmployeeServiceLocation(o,c,t.locationId)||(-1===a.indexOf(c)&&a.push(c),s.options.entitiesRelations[o][c].length&&s.options.entitiesRelations[o][c].forEach(function(e){null!==t.locationId&&t.locationId!==e||-1===i.indexOf(e)&&i.push(e)}))}};for(var c in this.options.entitiesRelations)l(c);return{services:a,locations:i,employees:n,categories:e.categories.filter(function(e){return e.serviceList.map(function(e){return e.id}).filter(function(e){return-1!==a.indexOf(e)}).length>0}).map(function(e){return e.id})}},getParsedCustomPricing:function(e){return null===e.customPricing?e.customPricing={enabled:null,durations:[],persons:[],periods:{default:[],custom:[]}}:"object"!==i(e.customPricing)&&(e.customPricing=this.getArrayCustomPricing(e)),e.customPricing},filterEntities:function(e,t){var s=this,a=this.getAvailableEntitiesIds(e,t);this.options.entities.employees=e.employees.filter(function(e){return-1!==a.employees.indexOf(e.id)&&e.serviceList.filter(function(e){return-1!==a.services.indexOf(e.id)}).length>0}),this.options.entities.employees.forEach(function(e){e.fullName=e.firstName+" "+e.lastName,e.serviceList.forEach(function(e){e.customPricing=s.getParsedCustomPricing(e)})}),this.options.entities.categories=e.categories,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories).filter(function(e){return e.show&&-1!==a.services.indexOf(e.id)}),this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id}),e.customPricing=s.getParsedCustomPricing(e)}),this.options.entities.locations=e.locations.filter(function(e){return-1!==a.locations.indexOf(e.id)}),this.options.entities.customFields=e.customFields;var n=this.options.entities.services.map(function(e){return e.id});if("packages"in e&&(!("show"in t)||"services"!==t.show)){e.packages.forEach(function(e){"bookableIds"in e||(e.bookableIds=e.bookable.map(function(e){return e.service.id}))});var i=e.packages.filter(function(e){return"visible"===e.status}).filter(function(e){return e.bookableIds.filter(function(e){return-1!==n.indexOf(e)}).length}),o=this.options.entities.locations.map(function(e){return e.id}),r=this.options.entities.employees.map(function(e){return e.id}),l=[];if(i.forEach(function(t){var a=!1;"availableBookableInfo"in t||(t.availableBookableInfo=[]),t.bookable.forEach(function(n){var i=!1;(0===n.minimumScheduled&&n.maximumScheduled>0||n.minimumScheduled>0&&0===n.maximumScheduled||n.minimumScheduled>0&&n.maximumScheduled>0)&&(a=!0,i=!0),n.hasSlots=i;var c=n.providers.length;if(!e.locations.length||s.options.entities.locations.length){var u=n.locations.length;!c||(n.providers=n.providers.filter(function(e){return-1!==r.indexOf(e.id)&&u?n.locations.filter(function(t){return s.isEmployeeServiceLocation(e.id,n.service.id,t.id)}).length:!s.options.entities.locations.length||s.options.entities.locations.filter(function(t){return s.isEmployeeServiceLocation(e.id,n.service.id,t.id)}).length}),n.providers.length)?(u&&(n.locations=n.locations.filter(function(e){return-1!==o.indexOf(e.id)&&(c?n.providers.filter(function(t){return s.isEmployeeServiceLocation(t.id,n.service.id,e.id)}).length:s.options.entities.employees.filter(function(t){return s.isEmployeeServiceLocation(t.id,n.service.id,e.id)}).length)}),n.locations.length||l.push(t.id)),-1===t.availableBookableInfo.map(function(e){return e.serviceId}).indexOf(n.service.id)&&t.availableBookableInfo.push({serviceId:n.service.id,serviceName:s.getNameTranslated(n.service),serviceQuantity:n.quantity,providersCount:n.providers.length})):l.push(t.id)}else l.push(t.id)}),t.bookable=t.bookable.filter(function(e){return e.hasSlots}),t.hasSlots=a}),this.options.entities.packages=i.filter(function(e){return-1===l.indexOf(e.id)}),"show"in t&&"packages"===t.show){var c=[];this.options.entities.packages.forEach(function(e){e.bookable.forEach(function(e){c.push(e.service.categoryId)})}),this.options.entities.categories=this.options.entities.categories.filter(function(e){return-1!==c.indexOf(e.id)})}this.options.entities.taxes=e.taxes}},processEntities:function(e){var t=this;this.options.entitiesRelations=e.entitiesRelations,this.options.isFrontEnd?("packages"in e&&e.packages.length&&(this.responseEntities.employees=e.employees,this.responseEntities.categories=e.categories,this.responseEntities.locations=e.locations,this.responseEntities.customFields=e.customFields,this.responseEntities.services=this.getServicesFromCategories(this.responseEntities.categories),this.responseEntities.packages=e.packages?e.packages.filter(function(e){return e.available}):[],this.responseEntities.daysOff=e.settings?e.settings.daysOff:[],this.responseEntities.taxes=e.taxes?e.taxes:[],e.packages=e.packages.filter(function(e){return e.available}),this.params&&this.params.sort||(e.packages=e.packages.sort(function(e,t){return e.position-t.position}))),this.filterEntities(e,this.getShortCodeEntityIds())):(this.options.entities.employees=e.employees,this.options.entities.categories=e.categories,this.options.entities.locations=e.locations,"customers"in e&&e.customers.length&&(this.options.entities.customers=e.customers),this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories),this.options.entities.resources=e.resources,this.options.entities.packages=e.packages,this.options.entities.customFields=e.customFields,this.options.entities.coupons=e.coupons,this.options.entities.spaces=e.spaces,this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id})}),this.options.availableEntitiesIds=this.getAvailableEntitiesIds(e,{categoryId:null,serviceId:null,employeeId:null,locationId:null})),this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)})}),this.options.entities.services.forEach(function(e){e.customPricing=t.getParsedCustomPricing(e)}),"settings"in e&&(this.options.entities.settings=e.settings),this.options.entities.tags="tags"in e?e.tags:[],this.options.entities.taxes="taxes"in e?e.taxes:[]},getShortCodeEntityIds:function(){return this.$root.shortcodeData.booking?{categoryId:"category"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.category:null,serviceId:"service"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.service:null,employeeId:"employee"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.employee:null,locationId:"location"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.location:null,show:"show"in this.$root.shortcodeData.booking?this.$root.shortcodeData.booking.show:null}:{categoryId:null,serviceId:null,employeeId:null,locationId:null,show:null}},entitiesLoaded:function(){return"ameliaAppointmentEntities"in window||"ameliaEntities"in window},fillCachedEntities:function(e){var t=this.getServicesFromCategories(e.categories);e.employees.forEach(function(e){e.serviceList.forEach(function(e){Object.assign(e,t.find(function(t){return t.id===e.id}),{price:e.price,customPricing:e.customPricing,minCapacity:e.minCapacity,maxCapacity:e.maxCapacity})})}),"packages"in e&&e.packages.forEach(function(e){e.bookable.forEach(function(e){var s=t.find(function(t){return t.id===e.service.id});s&&(e.service=JSON.parse(JSON.stringify(s)))})})},fetchEntities:function(e,t){var s=this,a={params:this.getAppropriateUrlParams({lite:!0,types:t.types,dates:t.dates})};if(t.page?a.params.page=t.page:"isFrontEnd"in t&&t.isFrontEnd&&(a.params.page="booking"),void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(a=Object.assign(a,this.getAuthorizationHeaderObject()),Object.assign(a.params,{source:"cabinet-"+this.$store.state.cabinet.cabinetType})),t.isPanel||"calendar"===a.params.page||this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",a).then(function(a){s.options.isFrontEnd=t.isFrontEnd,window.ameliaAppointmentEntities=a.data.data;var n=JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));s.fillCachedEntities(n),s.processEntities(n),s.$root.useTranslations&&s.translateEntities(n);e(!0)}).catch(function(t){console.log(t);e(!1)});else var n=setInterval(function(){if(s.entitiesLoaded()){clearInterval(n),s.options.isFrontEnd=t.isFrontEnd;var a="ameliaEntities"in window?JSON.parse(JSON.stringify(window.ameliaEntities)):JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));s.fillCachedEntities(a),s.processEntities(a),s.$root.useTranslations&&s.translateEntities(a);e(!0)}},1e3)},setMissingServices:function(e){var t=this,s=this.options.entities.services.map(function(e){return parseInt(e.id)});Object.keys(e).forEach(function(a){e[a].appointments.forEach(function(e){e.service&&-1===s.indexOf(parseInt(e.serviceId))&&(t.options.entities.services.push(e.service),s.push(parseInt(e.serviceId)))})})},getFilteredEntities:function(e,t,s){var a=this,n=this.appointment&&this.appointment.id&&this.appointment[s]?this.appointment[s]:null;return this.options.entities[t].forEach(function(t){t.disabled=-1===e.indexOf(t.id)}),this.options.entities[t].filter(function(e){return-1!==a.options.availableEntitiesIds[t].indexOf(e.id)||null!==n&&n===e.id})}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(e){return"visible"===e.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(e){return"visible"===e.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(e){return"visible"===e.status})},visibleServices:function(){return this.options.entities.services.filter(function(e){return"visible"===e.status}).sort(this.sortWithNull)},employeesFiltered:function(){var e=this,t=void 0!==this.appointment&&"bookings"in this.appointment&&this.appointment.bookings.length?this.appointment.bookings[0].persons:null,s=this.$root.settings.roles.providerBadges.badges.map(function(e){return e.id});this.visibleEmployees.forEach(function(t){t.badgeId&&s.includes(t.badgeId)?t.badge=e.$root.settings.roles.providerBadges.badges.find(function(e){return e.id===t.badgeId}):t.badge=null});var a=this.visibleEmployees.filter(function(s){return s.serviceList.filter(function(a){return"visible"===a.status&&(null===t||a.maxCapacity>=t)&&(!e.appointment.serviceId||e.isEmployeeService(s.id,a.id)&&a.id===e.appointment.serviceId)&&(!e.appointment.locationId||e.isEmployeeServiceLocation(s.id,a.id,e.appointment.locationId))&&(!e.appointment.categoryId||s.serviceList.filter(function(t){return"visible"===t.status&&t.categoryId===e.appointment.categoryId}).length>0)}).length>0});return this.options.isFrontEnd?a:this.getFilteredEntities(a.map(function(e){return e.id}),"employees","providerId").sort(function(e,t){return e.disabled-t.disabled})},servicesFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var s=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==s?s.serviceList.filter(function(e){return"visible"===e.status}).map(function(e){return e.id}):[]}var a=this.visibleServices.filter(function(s){return!(e.appointment.providerId&&-1===t.indexOf(s.id)||e.appointment.locationId&&!(e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,s.id,e.appointment.locationId)}).length>0)||e.appointment.categoryId&&s.categoryId!==e.appointment.categoryId)});return this.options.isFrontEnd?a:this.getFilteredEntities(a.map(function(e){return e.id}),"services","serviceId")},sortWithNull:function(){return function(e,t){return e.position===t.position?0:null===e.position?1:null===t.position?-1:e.position<t.position?-1:1}},sortNotifications:function(){return function(e,t){return e.customName===t.customName?0:null===e.customName?1:null===t.customName?-1:e.id>t.id?-1:1}},locationsFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var s=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==s?s.serviceList.filter(function(e){return"visible"===e.status}):[]}var a=null;this.appointment.categoryId&&(a=this.categoriesFiltered.find(function(t){return t.id===e.appointment.categoryId}));var n=this.visibleLocations.filter(function(s){return(!e.appointment.providerId||t.filter(function(t){return e.isEmployeeServiceLocation(e.appointment.providerId,t.id,s.id)}).length>0)&&(!e.appointment.serviceId||e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,e.appointment.serviceId,s.id)}).length>0)&&(!e.appointment.categoryId||void 0!==a&&e.employeesFiltered.filter(function(t){return t.serviceList.filter(function(n){return"visible"===n.status&&n.categoryId===a.id&&e.isEmployeeServiceLocation(t.id,n.id,s.id)}).length>0}).length>0)});return this.options.isFrontEnd?n:this.getFilteredEntities(n.map(function(e){return e.id}),"locations","locationId").sort(function(e,t){return e.disabled-t.disabled})},couponsFilteredService:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.serviceList.length>0}),this.appointment.serviceId)?t.filter(function(t){return t.serviceList.find(function(t){return t.id===e.appointment.serviceId})}):t},couponsFilteredEvent:function(){var e=this,t=[];return this.options.entities.coupons&&(t=this.options.entities.coupons.filter(function(e){return e.eventList.length>0}),this.eventId)?t.filter(function(t){return t.eventList.find(function(t){return t.id===e.eventId})}):t},categoriesFiltered:function(){var e=this,t=null;this.appointment.providerId&&(t=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId}));var s=null;this.appointment.serviceId&&(s=this.servicesFiltered.find(function(t){return t.id===e.appointment.serviceId}));var a=this.options.entities.categories.filter(function(a){return(!e.appointment.serviceId||void 0!==s&&s.categoryId===a.id)&&(!e.appointment.locationId||a.serviceList.filter(function(t){return"visible"===t.status&&e.employeesFiltered.filter(function(s){return e.isEmployeeServiceLocation(s.id,t.id,e.appointment.locationId)}).length>0}).length>0)&&(!e.appointment.providerId||void 0!==t&&-1!==t.serviceList.filter(function(t){return"visible"===t.status&&e.isEmployeeService(e.appointment.providerId,t.id)}).map(function(e){return e.categoryId}).indexOf(a.id))});return this.options.isFrontEnd?a:this.getFilteredEntities(a.map(function(e){return e.id}),"categories","categoryId").sort(function(e,t){return e.disabled-t.disabled})}}}},661:function(e,t,s){"use strict";var a=s(657);t.a={mixins:[a.a],methods:{isDurationPricingEnabled:function(e){return null!==e&&("duration"===e.enabled||!0===e.enabled)&&"durations"in e},isPersonPricingEnabled:function(e){return null!==e&&"person"===e.enabled&&"persons"in e},isPeriodPricingEnabled:function(e){return null!==e&&"period"===e.enabled&&"periods"in e&&!this.$root.licence.isLite&&!this.$root.licence.isStarter&&!this.$root.licence.isBasic},getBookingServicePrice:function(e,t,s,a,n){return this.isDurationPricingEnabled(e.customPricing)?this.getBookingDurationPrice(e,t):this.isPersonPricingEnabled(e.customPricing)?this.getBookingPersonPrice(e,s):this.isPeriodPricingEnabled(e.customPricing)&&a&&n?this.getBookingPeriodPrice(e,parseInt(a),n):e.price},getBookingDurationPrice:function(e,t){return t&&e.customPricing.durations.filter(function(e){return e.duration===t}).length?e.customPricing.durations.find(function(e){return e.duration===t}).price:e.price},getBookingPersonPrice:function(e,t){var s=e.customPricing.persons.map(function(e){return e.range}).sort(function(e,t){return t.range-e.range});if(t&&s.length){var a=s.filter(function(e){return e>=t}),n=0===a.length?s[s.length-1]:a[0];return e.customPricing.persons.find(function(e){return e.range===n}).price}return e.price},getBookingPeriodPrice:function(e,t,s){var a=s.split(" ");if(a[0]in this.pricedCalendarTimeSlots&&a[1].substr(0,5)in this.pricedCalendarTimeSlots[a[0]]){var n=this.pricedCalendarTimeSlots[a[0]][a[1].substr(0,5)].filter(function(e){return e.e===t});return n.length?n[0].p:e.price}return e.price}}}},662:function(e,t,s){(function(s){var a,n,i,o;o=void 0!==s?s:this.window||this.global,n=[],a=function(e){var t,s={},a=!!document.querySelector&&!!e.addEventListener,n={initClass:"js-inlinesvg",svgSelector:"img.svg"},i=function(){var e={},t=!1,s=0,a=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],s++);for(var n=function(s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(t&&"[object Object]"===Object.prototype.toString.call(s[a])?e[a]=i(!0,e[a],s[a]):e[a]=s[a])};a>s;s++){n(arguments[s])}return e},o=function(e){var s=document.querySelectorAll(t.svgSelector),a=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}}(s.length,e);Array.prototype.forEach.call(s,function(e,s){var n=e.src||e.getAttribute("data-src"),i=e.attributes,o=new XMLHttpRequest;o.open("GET",n,!0),o.onload=function(){if(o.status>=200&&o.status<400){var s=(new DOMParser).parseFromString(o.responseText,"text/xml").getElementsByTagName("svg")[0];if(s.removeAttribute("xmlns:a"),s.removeAttribute("width"),s.removeAttribute("height"),s.removeAttribute("x"),s.removeAttribute("y"),s.removeAttribute("enable-background"),s.removeAttribute("xmlns:xlink"),s.removeAttribute("xml:space"),s.removeAttribute("version"),Array.prototype.slice.call(i).forEach(function(e){"src"!==e.name&&"alt"!==e.name&&s.setAttribute(e.name,e.value)}),s.classList?s.classList.add("inlined-svg"):s.className+=" inlined-svg",s.setAttribute("role","img"),i.longdesc){var n=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(i.longdesc.value);n.appendChild(r),s.insertBefore(n,s.firstChild)}if(i.alt){s.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(i.alt.value);l.appendChild(c),s.insertBefore(l,s.firstChild)}e.parentNode.replaceChild(s,e),a(t.svgSelector)}else console.error("There was an error retrieving the source of the SVG.")},o.onerror=function(){console.error("There was an error connecting to the origin server.")},o.send()})};return s.init=function(e,s){a&&(t=i(n,e||{}),o(s||function(){}),document.documentElement.className+=" "+t.initClass)},s}(o),void 0===(i="function"==typeof a?a.apply(t,n):a)||(e.exports=i)}).call(t,s(37))},666:function(e,t,s){"use strict";t.a={methods:{getEntityTax:function(e,t){var s=[];"taxes"in this&&this.taxes&&this.taxes.length?s=this.taxes:"options"in this&&"entities"in this.options&&"taxes"in this.options.entities&&this.options.entities.taxes&&this.options.entities.taxes.length&&(s=this.options.entities.taxes);var a=s.find(function(s){return s[t+"List"].find(function(t){return t.id===e})});return!a||void 0===a||"status"in a&&"visible"!==a.status?null:a},getEntityTaxAmount:function(e,t){switch(e.type){case"percentage":return this.getPercentage(t,e.amount);case"fixed":return e.amount}},getAmountData:function(e,t,s){e&&!e.excluded&&(t=this.getBaseAmount(t,e));var a=s?t/100*s.discount+s.deduction:0,n=0;return e&&(n=this.getEntityTaxAmount(e,t-a)),{total:t,discount:a,tax:n}},getEventBookingPriceAmount:function(e){var t=0;return e.ticketsData&&e.ticketsData.length?e.ticketsData.forEach(function(s){t+=s.price*(e.aggregatedPrice?s.persons:1)}):t=e.price*(e.aggregatedPrice?e.persons:1),this.getAmountData(e.tax&&e.tax.length?e.tax[0]:null,t,e.coupon)},getAppointmentPriceAmount:function(e,t,s,a,n){var i=this,o=null,r=this.$root.settings.payments.taxes.excluded,l=this.$root.settings.payments.taxes.enabled;"tax"in e?(r=(o=e.tax&&e.tax.length?e.tax[0]:null)?o.excluded:r,l=null!==o):l&&(o=this.getEntityTax(e.id,"service"));var c=(e.aggregatedPrice?s:1)*e.price,u=0,d=0,m=0,p=0;if(a){u=c,d=c,l&&o&&!r&&(c=this.getBaseAmount(c,o));var g=a.discount?this.getPercentage(c,a.discount):0,h=c-g;c=h;var v=a.deduction,f=0;if(h>0&&v>0&&(c=h-(f=h>=v?v:h),v=h>=v?0:v-h),l&&o&&r)p=this.getEntityTaxAmount(o,c);else if(l&&o&&!r){c=this.getBaseAmount((e.aggregatedPrice?s:1)*e.price,o);var b=this.getEntityTaxAmount(o,c-g-f);n?u=c+b:(u=c,d=c,p=b)}m=g+f,t.forEach(function(t){var o=null,r=i.$root.settings.payments.taxes.excluded,l=i.$root.settings.payments.taxes.enabled;"tax"in t?(t.tax&&!Array.isArray(t.tax)&&(t.tax=JSON.parse(t.tax)),r=(o=t.tax&&t.tax.length?t.tax[0]:null)?o.excluded:r,l=null!==o):l&&(o=i.getEntityTax(t.extraId,"extra"));var c=null===t.aggregatedPrice?e.aggregatedPrice:t.aggregatedPrice,d=t.price*t.quantity*(c?s:1),g=d;l&&o&&!r&&(d=i.getBaseAmount(d,o));var h=a.discount?i.getPercentage(d,a.discount):0,f=d-h;d=f;var b=0;if(f>0&&v>0&&(d=f-(b=f>=v?v:f),v=f>=v?0:v-f),l&&o&&r)p+=i.getEntityTaxAmount(o,d);else if(l&&o&&!r){d=i.getBaseAmount(t.price*t.quantity*(c?s:1),o);var y=i.getEntityTaxAmount(o,d-h-b);n?g=d+y:(g=d,p+=y)}else!l||o||r||(g=t.price*t.quantity*(c?s:1));u+=g,m+=h+b})}else l&&o&&r?p=this.getEntityTaxAmount(o,c):l&&o&&!r&&!n&&(c=this.getBaseAmount((e.aggregatedPrice?s:1)*e.price,o),p=this.getEntityTaxAmount(o,c)),u=c,d=c,t.forEach(function(t){var a=null===t.aggregatedPrice?e.aggregatedPrice:t.aggregatedPrice,o=t.price*t.quantity*(a?s:1),r=null,l=i.$root.settings.payments.taxes.excluded,c=i.$root.settings.payments.taxes.enabled;"tax"in t?(t.tax&&!Array.isArray(t.tax)&&(t.tax=JSON.parse(t.tax)),l=(r=t.tax&&t.tax.length?t.tax[0]:null)?r.excluded:l,c=null!==r):c&&(r=i.getEntityTax(t.extraId,"extra")),c&&r&&l?p+=i.getEntityTaxAmount(r,o):c&&r&&!l&&!n&&(o=i.getBaseAmount(t.price*t.quantity*(a?s:1),r),p+=i.getEntityTaxAmount(r,o)),u+=o});return{total:u,totalBookable:d,discount:m,tax:p}},getBaseAmount:function(e,t){switch(t.type){case"percentage":return e/(1+t.amount/100);case"fixed":return e-t.amount}},getPercentage:function(e,t){return e*t/100},getRound:function(e){return Math.round(100*e)/100}}}},668:function(e,t,s){"use strict";var a=s(0),n=s.n(a);t.a={data:function(){return{payBtnLoader:null,timeZone:"",statusesCabinet:[{value:"approved",label:this.$root.labels.approved},{value:"pending",label:this.$root.labels.pending},{value:"canceled",label:this.$root.labels.canceled},{value:"rejected",label:this.$root.labels.rejected},{value:"no-show",label:this.$root.labels["no-show"]},{value:"waiting",label:this.$root.labels.waiting_list}]}},methods:{isPanelActive:function(e){return!this.$root.shortcodeData.cabinet||!(this.$root.shortcodeData.cabinet.appointments||this.$root.shortcodeData.cabinet.events||this.$root.shortcodeData.cabinet.profile)||(!("appointments"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.appointments)||(!("events"!==e||!this.$root.shortcodeData.cabinet||!this.$root.shortcodeData.cabinet.events)||"profile"===e&&this.$root.shortcodeData.cabinet&&this.$root.shortcodeData.cabinet.profile))},changeRange:function(e){this.$store.commit("cabinet/setParams",{dates:e}),this.setDatePickerSelectedDaysCount(this.$store.state.cabinet.params.dates.start,this.$store.state.cabinet.params.dates.end),this.$emit("refreshReservations")},isBookingCancelable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.cancelable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},isBookingReschedulable:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.reschedulable&&!("canceled"===e.bookings[t].status||"rejected"===e.bookings[t].status||"no-show"===e.bookings[t].status)},disableAuthorizationHeader:function(){return"ameliaBooking"in window&&"cabinet"in window.ameliaBooking&&"disableAuthorizationHeader"in window.ameliaBooking.cabinet&&window.ameliaBooking.cabinet.disableAuthorizationHeader},getAuthorizationHeaderObject:function(){return this.$store.state.cabinet.ameliaToken&&!this.disableAuthorizationHeader()?{headers:{Authorization:"Bearer "+this.$store.state.cabinet.ameliaToken}}:{}},getPaymentLink:function(e,t){var s=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.payBtnLoader=t.bookings?t.bookings[0].id:t.id;var n=JSON.parse(JSON.stringify(t));n[n.type]=t;var i=JSON.parse(JSON.stringify(this.$store.state.cabinet.profile));if(i.birthday=null,n.customer=i,"package"===n.type){var o=a||Object.keys(n.payments)[0],r=n.payments[o].payments.sort(function(e,t){return e.id>t.id?1:-1});n.paymentId=r[0].id,n.packageCustomerId=o,n.packageReservations=[],n.bookable.forEach(function(e){n.packageReservations=n.packageReservations.concat(e.service.bookedAppointments.filter(function(e){return e.bookings[0].packageCustomerService.packageCustomer.id===parseInt(o)}))}),n.booking=n.packageReservations&&n.packageReservations.length>0?n.packageReservations[0].bookings[0]:null}else n.booking=t.bookings[0],n.paymentId=t.bookings[0].payments[0].id;this.$http.post(this.$root.getAjaxUrl+"/payments/link",{data:n,paymentMethod:e}).then(function(e){s.payBtnLoader=null,!e.data.data.error&&e.data.data.paymentLink?window.location.href=e.data.data.paymentLink:s.notify(s.$root.labels.error,s.$root.labels.payment_link_error,"error")}).catch(function(e){s.payBtnLoader=null,s.notify(s.$root.labels.error,e.message,"error"),console.log(e)})},paymentFromCustomerPanel:function(e,t){if("package"!==e.type&&(!e.bookings||0===e.bookings.length))return!1;var s=this.$root.settings;t&&t.payments&&t.payments.paymentLinks&&(s=JSON.parse(t));var a=s.payments.paymentLinks,i="package"===e.type?Object.values(e.purchases).filter(function(e){return"approved"===e.status}).length>0:"approved"===e.bookings[0].status||"pending"===e.bookings[0].status,o="package"===e.type?e.price:e.bookings[0].price,r=!1;switch(e.type){case"package":r=!e.expireDateString||n()(e.expireDateString,"YYYY-MM-DD HH:mm:ss").isAfter(n()());break;case"appointment":r=n()(e.bookingStart,"YYYY-MM-DD HH:mm:ss").isAfter(n()())&&e.bookings[0].payments.length>0;break;case"event":r=n()(e.periods[e.periods.length-1].periodEnd,"YYYY-MM-DD HH:mm:ss").isAfter(n()())&&e.bookings[0].payments.length>0}return this.paymentMethods(s).length&&a&&a.enabled&&i&&o>0&&r},paymentMethods:function(e){"string"==typeof e&&(e=JSON.parse(e));var t=[];return e=e.payments,this.$root.settings.payments.wc.enabled?t.push({value:"wc",label:this.$root.labels.wc}):!this.$root.settings.payments.mollie.enabled||"mollie"in e&&!e.mollie.enabled?!this.$root.settings.payments.square.enabled||"square"in e&&!e.square.enabled?(!this.$root.settings.payments.payPal.enabled||"payPal"in e&&!e.payPal.enabled||t.push({value:"payPal",label:this.$root.labels.pay_pal}),!this.$root.settings.payments.stripe.enabled||"stripe"in e&&!e.stripe.enabled||t.push({value:"stripe",label:this.$root.labels.credit_card}),!this.$root.settings.payments.razorpay.enabled||"razorpay"in e&&!e.razorpay.enabled||t.push({value:"razorpay",label:this.$root.labels.razorpay})):t.push({value:"square",label:this.$root.labels.on_line}):t.push({value:"mollie",label:this.$root.labels.on_line}),t}}}},669:function(e,t,s){"use strict";(function(t){var a=s(656),n=s(716),i={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=s(687):void 0!==t&&(r=s(687)),r),transformRequest:[function(e,t){return n(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)?e:a.isArrayBufferView(e)?e.buffer:a.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):a.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},a.forEach(["delete","get","head"],function(e){l.headers[e]={}}),a.forEach(["post","put","patch"],function(e){l.headers[e]=a.merge(i)}),e.exports=l}).call(t,s(142))},672:function(e,t,s){"use strict";var a=s(661),n=s(0),i=s.n(n),o="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};t.a={mixins:[a.a],methods:{getArrayCustomPricing:function(e){var t=e.customPricing,s=null;if(void 0===t||null===t||""===t)s={enabled:null,durations:{},persons:{},periods:{default:[],custom:[]}};else if("object"===(void 0===t?"undefined":o(t))){if(Array.isArray(t.durations))return"persons"in t||(t.persons=[]),"periods"in t||(t.periods={default:[],custom:[]}),!0===t.enabled&&(t.enabled="duration"),t;s=JSON.parse(JSON.stringify(t))}else s=JSON.parse(t);!0===s.enabled&&(s.enabled="duration"),s.persons="persons"in s?s.persons:[],s.periods="periods"in s?s.periods:{default:[],custom:[]};var a=[];Object.keys(s.persons).length&&(a.push({start:1,range:Object.keys(s.persons)[0]-1,price:e.price,rules:[]}),Object.keys(s.persons).forEach(function(t,n){a.push({start:parseInt(t),range:n!==Object.keys(s.persons).length-1?Object.keys(s.persons)[n+1]-1:e.maxCapacity,price:s.persons[t].price,rules:s.persons[t].rules})}));var n=[];return Object.keys(s.durations).forEach(function(e){n.push({duration:parseInt(e),price:s.durations[e].price,rules:s.durations[e].rules})}),s.periods.custom.forEach(function(e){e.dates.start=i()(e.dates.start).toDate(),e.dates.end=i()(e.dates.end).toDate()}),{enabled:s.enabled,durations:n,persons:a,periods:s.periods}},getJsonCustomPricing:function(e){var t={},s=e.customPricing;s&&s.durations.filter(function(e){return e.duration}).length>0&&s.durations.forEach(function(e){t[e.duration]={price:e.price,rules:e.rules}});var a={};s&&s.persons.length&&s.persons.forEach(function(e,t){0!==t&&(a[s.persons[t-1].range+1]={price:e.price,rules:e.rules})});var n=[];s.periods.default.filter(function(e){return e.days.length}).forEach(function(e){e.ranges.forEach(function(e){null===e.from&&(e.from="00:00"),null===e.to&&(e.to="24:00")}),n.push(e)});var o=[];s.periods.custom.filter(function(e){return e.dates.start&&e.dates.end}).forEach(function(e){e.ranges.forEach(function(e){null===e.from&&(e.from="00:00"),null===e.to&&(e.to="24:00")}),e.dates.start=i()(e.dates.start).format("YYYY-MM-DD"),e.dates.end=i()(e.dates.end).format("YYYY-MM-DD"),o.push(e)});var r=null;return s&&this.isDurationPricingEnabled(s)?r="duration":s&&this.isPersonPricingEnabled(s)?r="person":s&&this.isPeriodPricingEnabled(s)&&(n.length||o.length)&&(r="period"),JSON.stringify({enabled:r,durations:t,persons:a,periods:{default:n,custom:o}})}}}},673:function(e,t,s){"use strict";t.a={data:function(){return{searchCounter:0,loadingCustomers:!1,searchCustomersTimer:null,searchedCustomers:[],dialogCustomer:!1}},methods:{setCustomerFromUrl:function(e){var t=null;this.options.entities.customers.length&&(t=this.options.entities.customers.find(function(t){return t.id==e})),t&&(this.params.customerId=t.id)},getInitCustomerObject:function(){return{id:0,firstName:"",lastName:"",externalId:"",phone:"",countryPhoneIso:null,email:"",gender:"",birthday:null,note:"",status:"visible",type:"customer",countPendingAppointments:0}},setInitialCustomers:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};"customer"!==this.$root.settings.role&&this.searchCustomers("",function(){var s=e.options&&"entities"in e.options&&"customers"in e.options.entities?e.options.entities.customers:[],a=s.map(function(e){return parseInt(e.id)}),n=s;e.searchedCustomers.forEach(function(e){-1===a.indexOf(parseInt(e.id))&&(a.push(e.id),n.push(e))}),e.$nextTick(function(){e.options.entities.customers=Object.values(n.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),e.params&&e.params.customerId&&e.setCustomerFromUrl(e.params.customerId),t()})})},searchCustomers:function(e,t){var s=this;clearTimeout(this.searchCustomersTimer),this.loadingCustomers=!0,this.searchCounter++,this.searchCustomersTimer=setTimeout(function(){var a=s.searchCounter,n={search:e,page:1,limit:s.$root.settings.general.customersFilterLimit,skipCount:1};s.params&&s.params.customerId&&(n.customers=[s.params.customerId]),s.$http.get(s.$root.getAjaxUrl+"/users/customers",{params:n}).then(function(e){a>=s.searchCounter&&(s.searchedCustomers=e.data.data.users.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),s.loadingCustomers=!1,t()}).catch(function(e){s.loadingCustomers=!1})},500)},getNoShowClass:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(a&&"blocked"===a)return"am-customer-name am-customer-blocked";if(!this.$root.settings.roles.enableNoShowTag)return"";var n=null,i=this.searchedCustomers.map(function(e){return e.id}),o=this.options&&this.options.entities?this.options.entities.customers.map(function(e){return e.id}):[];if(s)n=s.noShowCount;else if(null!==t&&0!==t.length&&null!==e){var r=t.find(function(t){return t.id===e});n=r?r.count:0}else i.includes(e)&&this.searchedCustomers.length&&0!==e?n=this.searchedCustomers.find(function(t){return t.id===e}).noShowCount:o.includes(e)&&this.options.entities.customers&&0!==e&&(n=this.options.entities.customers.find(function(t){return t.id===e}).noShowCount);var l="";if(n)switch(l="am-customer-name",!0){case 1===n:l+=" am-no-show-gray";break;case 2===n:l+=" am-no-show-yellow";break;case n>=3:l+=" am-no-show-red"}return l},getOptionClass:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=e.customer?e.customer:e,n=this.getNoShowClass(a.id,t,a.noShowCount?a:null,s)||"";return n+=a.email?" am-drop-item-name":""}}}},678:function(e,t,s){"use strict";var a=s(655);t.a={mixins:[a.a],data:function(){return{}},methods:{getInitEntitySettings:function(e){var t={payments:{paymentLinks:{enabled:this.$root.settings.payments.paymentLinks.enabled,changeBookingStatus:this.$root.settings.payments.paymentLinks.changeBookingStatus,redirectUrl:null},onSite:this.$root.settings.payments.onSite,wc:{enabled:this.$root.settings.payments.wc.enabled,productId:this.$root.settings.payments.wc.productId},payPal:{enabled:this.$root.settings.payments.payPal.enabled},stripe:{enabled:this.$root.settings.payments.stripe.enabled},mollie:{enabled:this.$root.settings.payments.mollie.enabled},square:{enabled:this.$root.settings.payments.square.enabled},razorpay:{enabled:this.$root.settings.payments.razorpay.enabled}}};switch(e){case"service":t.general={minimumTimeRequirementPriorToCanceling:null,minimumTimeRequirementPriorToRescheduling:null,redirectUrlAfterAppointment:null},t.general.defaultAppointmentStatus=null,t.general.numberOfDaysAvailableForBooking=0,t.general.minimumTimeRequirementPriorToBooking=null,t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},t.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},t.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled};break;case"event":t.general={minimumTimeRequirementPriorToCanceling:null,redirectUrlAfterAppointment:null},t.zoom={enabled:this.$root.settings.zoom.enabled},t.lessonSpace={enabled:this.$root.settings.lessonSpace.enabled},t.googleMeet={enabled:this.$root.settings.googleCalendar.enabled&&this.$root.settings.googleCalendar.googleMeetEnabled},t.microsoftTeams={enabled:this.$root.settings.outlookCalendar.enabled&&this.$root.settings.outlookCalendar.microsoftTeamsEnabled},t.waitingList={enabled:!1,addingMethod:this.$root.settings.appointments.waitingListEvents.addingMethod,maxCapacity:1,maxExtraPeopleEnabled:!1,maxExtraPeople:0};break;case"package":t.general={redirectUrlAfterAppointment:null}}return t},setEntitySettings:function(e,t){e.settings=null!==e.settings?JSON.parse(e.settings):this.getInitEntitySettings(t),this.addMissingObjectProperties(e.settings,this.getInitEntitySettings(t))},updateSettings:function(e){var t=this;if(!this.$root.clonedSettings.payments.onSite||this.$root.clonedSettings.payments.stripe.enabled||this.$root.clonedSettings.payments.payPal.enabled||this.$root.clonedSettings.payments.wc.enabled||this.$root.clonedSettings.payments.mollie.enabled||this.$root.clonedSettings.payments.square.enabled||this.$root.clonedSettings.payments.razorpay.enabled){if(!1===this.$root.clonedSettings.payments.wc.enabled&&!1===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var s=JSON.parse(e);"payments"in s||(s.payments={}),["onSite","stripe","payPal","wc","mollie","razorpay","square"].forEach(function(e){e in s.payments||(s.payments[e]=t.$root.clonedSettings.payments[e])}),s.payments.wc=this.$root.clonedSettings.payments.wc,s.payments.mollie=this.$root.clonedSettings.payments.mollie,this.$root.clonedSettings.payments.onSite||(s.payments.onSite=this.$root.clonedSettings.payments.onSite),this.$root.clonedSettings.payments.square||(s.payments.square=this.$root.clonedSettings.payments.square),this.$root.clonedSettings.payments.payPal.enabled||(s.payments.payPal=this.$root.clonedSettings.payments.payPal),this.$root.clonedSettings.payments.stripe.enabled||(s.payments.stripe=this.$root.clonedSettings.payments.stripe),this.$root.clonedSettings.payments.razorpay.enabled&&s.payments.razorpay||(s.payments.razorpay=this.$root.clonedSettings.payments.razorpay),("onSite"in s.payments?s.payments.onSite&&this.$root.clonedSettings.payments.onSite:this.$root.clonedSettings.payments.onSite)&&("payPal"in s.payments?s.payments.payPal.enabled&&this.$root.clonedSettings.payments.payPal.enabled:this.$root.clonedSettings.payments.payPal.enabled)&&("stripe"in s.payments?s.payments.stripe.enabled&&this.$root.clonedSettings.payments.stripe.enabled:this.$root.clonedSettings.payments.stripe.enabled)&&("mollie"in s.payments?s.payments.mollie.enabled&&this.$root.clonedSettings.payments.mollie.enabled:this.$root.clonedSettings.payments.mollie.enabled)&&("razorpay"in s.payments?s.payments.razorpay.enabled&&this.$root.clonedSettings.payments.razorpay.enabled:this.$root.clonedSettings.payments.razorpay.enabled)&&("square"in s.payments?s.payments.square.enabled&&this.$root.clonedSettings.payments.square.enabled:this.$root.clonedSettings.payments.square.enabled)&&(s.payments=this.$root.clonedSettings.payments),e=JSON.stringify(s)}if(!0===this.$root.clonedSettings.payments.wc.enabled&&null!==e){var a=JSON.parse(e);"payments"in a||(a.payments={}),a.payments.onSite=this.$root.clonedSettings.payments.onSite,a.payments.stripe=this.$root.clonedSettings.payments.stripe,a.payments.payPal=this.$root.clonedSettings.payments.payPal,a.payments.mollie=this.$root.clonedSettings.payments.mollie,a.payments.square=this.$root.clonedSettings.payments.square,a.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(a)}if(!0===this.$root.clonedSettings.payments.mollie.enabled&&null!==e){var n=JSON.parse(e);"payments"in n||(n.payments={}),this.$root.clonedSettings.payments.onSite||(n.payments.onSite=this.$root.clonedSettings.payments.onSite,n.payments.mollie=this.$root.clonedSettings.payments.mollie),n.payments.stripe=this.$root.clonedSettings.payments.stripe,n.payments.payPal=this.$root.clonedSettings.payments.payPal,n.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(n)}if(!0===this.$root.clonedSettings.payments.square.enabled&&null!==e){var i=JSON.parse(e);"payments"in i||(i.payments={}),this.$root.clonedSettings.payments.onSite||(i.payments.onSite=this.$root.clonedSettings.payments.onSite,i.payments.square=this.$root.clonedSettings.payments.square),i.payments.stripe=this.$root.clonedSettings.payments.stripe,i.payments.payPal=this.$root.clonedSettings.payments.payPal,i.payments.razorpay=this.$root.clonedSettings.payments.razorpay,e=JSON.stringify(i)}"oliverPos"in this.$root.shortcodeData&&this.$root.shortcodeData.oliverPos&&((e=JSON.parse(e)).payments.onSite=!0,e.payments.stripe.enabled=!1,e.payments.payPal.enabled=!1,e.payments.razorpay.enabled=!1,e=JSON.stringify(e)),this.replaceExistingObjectProperties(this.$root.settings,null!==e?JSON.parse(e):this.$root.clonedSettings)}},prepareBookableEntityPaymentsForSave:function(e){var t=this,s={};return e&&"payments"in e&&("onSite"in e.payments&&e.payments.onSite!==this.$root.settings.payments.onSite&&(s.onSite=e.payments.onSite),["stripe","payPal","razorpay","mollie","square"].forEach(function(a){a in e.payments&&e.payments[a].enabled!==t.$root.settings.payments[a].enabled&&(s[a]=e.payments[a])}),"wc"in e.payments&&(e.payments.wc.enabled!==this.$root.settings.payments.wc.enabled||"productId"in e.payments.wc&&e.payments.wc.productId!==this.$root.settings.payments.wc.productId)&&(s.wc=e.payments.wc),s.paymentLinks=e.payments.paymentLinks),e.payments=s,e},prepareServiceSettingsForSave:function(e){var t=JSON.parse(JSON.stringify(e.settings));return"general"in t&&(t.general.redirectUrlAfterAppointment||delete t.general.redirectUrlAfterAppointment,t.general.defaultAppointmentStatus||delete t.general.defaultAppointmentStatus,(t.general.minimumTimeRequirementPriorToBooking||this.$root.settings.general.minimumTimeRequirementPriorToBooking)&&""!==t.general.minimumTimeRequirementPriorToBooking||delete t.general.minimumTimeRequirementPriorToBooking,(t.general.minimumTimeRequirementPriorToCanceling||this.$root.settings.general.minimumTimeRequirementPriorToCanceling)&&""!==t.general.minimumTimeRequirementPriorToCanceling||delete t.general.minimumTimeRequirementPriorToCanceling,(t.general.minimumTimeRequirementPriorToRescheduling||this.$root.settings.general.minimumTimeRequirementPriorToRescheduling)&&""!==t.general.minimumTimeRequirementPriorToRescheduling||delete t.general.minimumTimeRequirementPriorToRescheduling,t.general.numberOfDaysAvailableForBooking||delete t.general.numberOfDaysAvailableForBooking,0===Object.keys(t.general).length&&delete t.general),0===Object.keys(t).length&&(t=null),t}},computed:{}}},679:function(e,t,s){"use strict";t.a={data:function(){return{}},methods:{checkTranslations:function(e,t){var s=""!==t?JSON.parse(e.translations)[t]:JSON.parse(e.translations);if(window.localeLanguage[0]in s)return s[window.localeLanguage[0]];for(var a=Object.keys(s),n=Object.keys(s).map(function(e){return e.length>2?e.slice(0,2):e}),i=window.localeLanguage[0].length>2?window.localeLanguage[0].slice(0,2):window.localeLanguage[0],o="",r=0;r<n.length;r++)if(n[r]===i){o=s[a[r]];break}return o},getTranslated:function(e,t){return e.translations&&JSON.parse(e.translations)[t]&&this.checkTranslations(e,t)?this.checkTranslations(e,t):e[t]},getNameTranslated:function(e){return e.translations&&JSON.parse(e.translations).name&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.name},getTicketTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.name},getCfLabelTranslated:function(e){return e.translations&&this.checkTranslations(e,"name")?this.checkTranslations(e,"name"):e.label},getCfOptionTranslated:function(e){return e.translations&&this.checkTranslations(e,"")?this.checkTranslations(e,""):e.label},getDescriptionTranslated:function(e){return e.translations&&JSON.parse(e.translations).description&&this.checkTranslations(e,"description")?this.checkTranslations(e,"description"):e.description},translateEntities:function(e){var t=this;e.services&&e.services.length&&e.services.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.locations&&e.locations.length&&e.locations.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)}),e.packages&&e.packages.length&&e.packages.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.bookable.forEach(function(e){e.service.name=t.getNameTranslated(e.service),e.service.description=t.getDescriptionTranslated(e.service),"extras"in e.service&&e.service.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.categories&&e.categories.length&&e.categories.forEach(function(e){e.name=t.getNameTranslated(e),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})}),e.events&&e.events.length&&e.events.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})}),e.customFields&&e.customFields.length&&e.customFields.forEach(function(e){e.label=t.getCfLabelTranslated(e),e.options.forEach(function(e){e.label=t.getCfOptionTranslated(e)})}),e.employees&&e.employees.length&&e.employees.forEach(function(e){e.firstName=t.getTranslated(e,"firstName"),e.lastName=t.getTranslated(e,"lastName"),e.serviceList.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e),e.extras.forEach(function(e){e.name=t.getNameTranslated(e),e.description=t.getDescriptionTranslated(e)})})})}},computed:{}}},680:function(e,t,s){"use strict";var a=function(){function e(e,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,s,a){return s&&e(t.prototype,s),a&&e(t,a),t}}(),n=r(s(713)),i=r(s(731)),o=r(s(732));function r(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.progress=0,this.isPending=!1,this.errors=new i.default,["post","patch","put","delete"].forEach(function(e){t[e]=function(s,a){return t.submit(e,s,a)}})}return a(e,[{key:"submit",value:function(t,s){var a=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.toLowerCase(),this.hasFiles(n)&&(n=(0,o.default)(n),"post"!==t&&(n.append("_method",t.toUpperCase()),t="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(i,o){e.defaults.axios[t](s,n,a.config()).then(function(e){i(e.data)}).catch(function(e){a.handleError(e),o(e)}).then(function(){return a.isPending=!1})})}},{key:"hasFiles",value:function(e){for(var t in e)if(this.fileIsPresent(e[t]))return!0;return!1}},{key:"fileIsPresent",value:function(e){return e instanceof File||e instanceof Array&&e.some(function(e){return e instanceof File})}},{key:"save",value:function(e,t){var s="post";return t.hasOwnProperty("id")&&(s="patch",e=this.urlToPatchResource(e,t)),this[s](e,t)}},{key:"urlToPatchResource",value:function(e,t){return e.replace(/\/+$/,"")+"/"+t.id}},{key:"config",value:function(){var e=this;return{onUploadProgress:function(t){e.progress=Math.round(100*t.loaded/t.total)}}}},{key:"handleError",value:function(e){if(e.response&&422===e.response.status){var t=e.response.data.hasOwnProperty("errors")?e.response.data.errors:e.response.data;this.errors.set(t)}}}]),e}();l.defaults={axios:n.default},e.exports=l},684:function(e,t,s){"use strict";var a=s(666);t.a={mixins:[a.a],data:function(){return{}},methods:{getPaymentType:function(e){return e.gateway&&"onSite"!==e.gateway?"partiallyPaid"===e.status?"deposit":"online":"onsite"},longNamePayments:function(e){return["mollie","razorpay","square"].includes(e)},getPaymentData:function(e,t,s,a){var n=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o={};if(o.paymentId=e.id,t){o.bookableType="appointment";var r=this.getProviderById(t.providerId);r.fullName=r.firstName+" "+r.lastName,o.appointment=[{bookable:this.getServiceById(t.serviceId),bookingStart:t.bookingStart,providers:[r]}],t.bookings.forEach(function(t){t.payments.forEach(function(s){s.id===e.id&&(o.appointment[0].booking=t)})}),i.forEach(function(e){var t=n.getProviderById(e.providerId);t.fullName=t.firstName+" "+t.lastName,o.appointment.push({bookable:n.getServiceById(e.serviceId),bookingStart:e.bookingStart,providers:[t],booking:e.bookings[0]})})}return s&&(o.bookableType="event",o.event=[{bookable:s,bookingStart:s.periods[0].periodStart,providers:s.providers}],s.bookings.forEach(function(t){t.payments.forEach(function(s){s.id===e.id&&(o.event[0].booking=t)})})),a&&(o.bookableType="package",o.package=[{bookable:a.package,bookingStart:null,providers:[],booking:a.booking}]),o.customer={email:e.customerEmail,firstName:e.customerFirstName,lastName:e.customerLastName,id:e.customerId},o},getPaymentStatusNiceName:function(e){switch(e){case"paid":return this.$root.labels.paid;case"pending":return this.$root.labels.pending;case"partiallyPaid":return this.$root.labels.partially_paid;case"refunded":return this.$root.labels.refunded}},getPaymentClassName:function(e){var t=e.gateway;return"oliver"===e.gatewayTitle&&(t="oliver"),"am-appointment-payment am-appointment-payment-"+t},getPaymentIconName:function(e){return"onSite"!==e.gateway&&"stripe"!==e.gateway||"oliver"!==e.gatewayTitle?e.gateway+".svg":"oliver.png"},getPaymentGatewayNiceName:function(e){return"stripe"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_line:"onSite"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_site:"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0},getPaymentIconWidth:function(e){switch(e){case"razorpay":return"76px";case"square":return"70px";case"mollie":return"38px";default:return"16px"}},getPaymentAmountData:function(e,t){var s={bookablePriceTotal:0,extrasPriceTotal:0,tax:0,wcTax:0,discountTotal:0,paidDeposit:0,paidRemaining:0,paid:0,refunded:0,subtotal:0,total:0,due:0},a=this;return e.forEach(function(e){var n=e.booking;switch(n.tax&&!Array.isArray(n.tax)&&(n.tax=JSON.parse(n.tax)),t){case"appointment":var i=a.getAppointmentPriceAmount({price:n.price,aggregatedPrice:n.aggregatedPrice,tax:n.tax,id:null},n.extras,n.persons,n.coupon,!1);s.bookablePriceTotal+=i.totalBookable,s.extrasPriceTotal+=i.total-i.totalBookable,s.tax+=i.tax,s.discountTotal+=i.discount;break;case"event":var o=a.getEventBookingPriceAmount(n);s.bookablePriceTotal+=o.total,s.extrasPriceTotal+=0,s.tax+=o.tax,s.discountTotal+=o.discount;break;case"package":var r=null;n.payments.forEach(function(e){r=e.coupon?e.coupon:r});var l=n.price*(n.aggregatedPrice?n.persons:1),c=a.getAmountData(n.tax&&n.tax.length?n.tax[0]:null,l,r);s.bookablePriceTotal+=c.total,s.extrasPriceTotal+=0,s.tax+=c.tax,s.discountTotal+=c.discount}var u=0,d=0;n.payments.forEach(function(e){s.discountTotal+=e.wcOrderId?e.wcItemCouponValue:0,"paid"===e.status?d+=e.amount:"partiallyPaid"===e.status&&(u+=e.amount),e.wcOrderId&&e.wcItemTaxValue&&(s.wcTax+=e.wcItemTaxValue)}),s.paidDeposit+=u,s.paidRemaining+=d,s.refunded+=n.payments.filter(function(e){return"refunded"===e.status}).reduce(function(e,t){return e+t.amount},0)}),s.subTotal=s.bookablePriceTotal+s.extrasPriceTotal,s.total=s.subTotal+s.tax+s.wcTax,s.total-=s.discountTotal,s.paid=s.paidDeposit+s.paidRemaining,s.total=s.total>=0?s.total:0,s.due=s.total-s.paid>0?s.total-s.paid:0,s}}}},686:function(e,t,s){"use strict";e.exports=function(e,t){return function(){for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];return e.apply(t,s)}}},687:function(e,t,s){"use strict";var a=s(656),n=s(717),i=s(719),o=s(720),r=s(721),l=s(688),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||s(722);e.exports=function(e){return new Promise(function(t,u){var d=e.data,m=e.headers;a.isFormData(d)&&delete m["Content-Type"];var p=new XMLHttpRequest,g="onreadystatechange",h=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||r(e.url)||(p=new window.XDomainRequest,g="onload",h=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var v=e.auth.username||"",f=e.auth.password||"";m.Authorization="Basic "+c(v+":"+f)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[g]=function(){if(p&&(4===p.readyState||h)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var s="getAllResponseHeaders"in p?o(p.getAllResponseHeaders()):null,a={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:s,config:e,request:p};n(t,u,a),p=null}},p.onerror=function(){u(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){u(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},a.isStandardBrowserEnv()){var b=s(723),y=(e.withCredentials||r(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;y&&(m[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&a.forEach(m,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete m[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),u(e),p=null)}),void 0===d&&(d=null),p.send(d)})}},688:function(e,t,s){"use strict";var a=s(718);e.exports=function(e,t,s,n,i){var o=new Error(e);return a(o,t,s,n,i)}},689:function(e,t,s){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},690:function(e,t,s){"use strict";function a(e){this.message=e}a.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},a.prototype.__CANCEL__=!0,e.exports=a},693:function(e,t,s){var a=s(90)(s(694),s(695),!1,null,null,null);e.exports=a.exports},694:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(91),n=s(336),i=s(654);t.default={mixins:[a.a,n.a,i.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","addNewTaxBtnDisplay","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","bookableType","params","fetched"],methods:{showMainCustomize:function(){this.$emit("showMainCustomize",null)},showDialogCustomer:function(){this.$emit("newCustomerBtnClicked",null)},showDialogAppointment:function(){this.$emit("newAppointmentBtnClicked",null)},showDialogEvent:function(){this.$emit("newEventBtnClicked",null)},showDialogEmployee:function(){this.$emit("newEmployeeBtnClicked")},showDialogLocation:function(){this.$emit("newLocationBtnClicked")},showDialogService:function(){this.$emit("newServiceBtnClicked")},showDialogPackage:function(){this.$emit("newPackageBtnClicked")},showDialogPackageBooking:function(){this.$emit("newPackageBookingBtnClicked")},showDialogResource:function(){this.$emit("newResourceBtnClicked")},showDialogTax:function(){this.$emit("newTaxBtnClicked")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(e){this.$emit("selectAllInCategory",e)},changeFilter:function(){this.$emit("changeFilter")}}}},695:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"am-page-header am-section"},[s("el-row",{attrs:{type:"wpamelia-calendar"===e.$router.currentRoute.name?"":"flex",align:"middle"}},[s("el-col",{attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?6:18}},[s("div",{staticClass:"am-logo"},[s("img",{staticClass:"logo-big",attrs:{width:"92",src:e.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),e._v(" "),s("img",{staticClass:"logo-small",attrs:{width:"28",src:e.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),e._v(" "),s("h1",{staticClass:"am-page-title"},[e._v("\n "+e._s(e.bookableType?e.$root.labels[e.bookableType]:e.$router.currentRoute.meta.title)+"\n\n "),e._v(" "),e.appointmentsApproved>=0?s("span",{staticClass:"am-appointments-number approved"},[e._v("\n "+e._s(e.appointmentsApproved)+"\n ")]):e._e(),e._v(" "),e.appointmentsPending>=0?s("span",{staticClass:"am-appointments-number pending"},[e._v("\n "+e._s(e.appointmentsPending)+"\n ")]):e._e(),e._v(" "),e.employeesTotal>=0&&!0===e.$root.settings.capabilities.canReadOthers?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.employeesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.customersTotal>=0?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.customersTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.locationsTotal>=0?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.locationsTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.servicesTotal>=0&&"services"===e.bookableType?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.servicesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.packagesTotal>=0&&"packages"===e.bookableType?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.packagesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.resourcesTotal>=0&&"resources"===e.bookableType?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.resourcesTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e(),e._v(" "),e.financeTotal>=0?s("span",[s("span",{staticClass:"total-number"},[e._v(e._s(e.financeTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e()])]),e._v(" "),s("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?18:6}},["wpamelia-appointments"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e(),e._v(" "),"wpamelia-events"===e.$router.currentRoute.name&&(!0===e.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEvent}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_event))])]):e._e(),e._v(" "),"wpamelia-employees"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&!0===e.$root.settings.capabilities.canWriteOthers?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEmployee}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_employee))])]):e._e(),e._v(" "),"wpamelia-customers"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomer}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_customer))])]):e._e(),e._v(" "),"wpamelia-locations"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?s("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled(),attrs:{type:"primary",disabled:e.notInLicence()},on:{click:e.showDialogLocation}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_location))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.categoriesTotal>0&&!0===e.$root.settings.capabilities.canWrite&&"services"===e.bookableType?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogService}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_service))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"packages"===e.bookableType?s("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:e.notInLicence("pro")},on:{click:function(t){e.packagesTotal>=0?e.showDialogPackage():e.showDialogPackageBooking()}}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.packagesTotal>=0?e.$root.labels.add_package:e.$root.labels.book_package))])]):e._e(),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"resources"===e.bookableType?s("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("pro"),attrs:{type:"primary",disabled:e.notInLicence("pro")},on:{click:function(t){return e.showDialogResource()}}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_resource))])]):e._e(),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewTaxBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?s("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled(),attrs:{type:"primary",disabled:e.notInLicence()},on:{click:e.showDialogTax}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_tax))])]):e._e(),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewCouponBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?s("el-button",{staticClass:"am-dialog-create",class:e.licenceClassDisabled("starter"),attrs:{type:"primary",disabled:e.notInLicence("starter")},on:{click:e.showDialogCoupon}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_coupon))])]):e._e(),e._v(" "),s("transition",{attrs:{name:"fade"}},["wpamelia-cf"===e.$router.currentRoute.name&&e.addNewCustomFieldBtnDisplay?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomFields}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_custom_field))])]):e._e()],1),e._v(" "),"wpamelia-dashboard"===e.$router.currentRoute.name?s("div",{staticClass:"v-calendar-column"},[s("div",{staticClass:"el-form-item__content"},[s("v-date-picker",{attrs:{mode:"range","popover-visibility":"focus","popover-direction":"bottom","popover-align":"right","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"is-required":!0,"input-class":"el-input__inner",formats:e.vCalendarFormats,"is-double-paned":!0},on:{input:e.changeFilter},model:{value:e.params.dates,callback:function(t){e.$set(e.params,"dates",t)},expression:"params.dates"}})],1)]):e._e(),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name?s("div",{staticClass:"am-calendar-header-filters"},[s("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[s("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[s("el-select",{attrs:{multiple:"",filterable:"","collapse-tags":"",loading:!e.fetched,placeholder:e.$root.labels.all_services},on:{change:e.changeFilter},model:{value:e.params.services,callback:function(t){e.$set(e.params,"services",t)},expression:"params.services"}},e._l(e.categories,function(t){return s("div",{key:t.id},[s("div",{staticClass:"am-drop-parent",on:{click:function(s){return e.selectAllInCategory(t.id)}}},[s("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return s("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1),e._v(" "),s("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.locations.length,expression:"locations.length"}],attrs:{label:e.$root.labels.locations+":"}},[s("el-select",{attrs:{multiple:"",clearable:"","collapse-tags":"",placeholder:e.$root.labels.all_locations,loading:!e.fetched},on:{change:e.changeFilter},model:{value:e.params.locations,callback:function(t){e.$set(e.params,"locations",t)},expression:"params.locations"}},e._l(e.locations,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),"wpamelia-calendar"===e.$router.currentRoute.name&&("admin"===e.$root.settings.role||"manager"===e.$root.settings.role||"provider"===e.$root.settings.role&&e.$root.settings.roles.allowWriteAppointments)?s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[s("i",{staticClass:"el-icon-plus"}),e._v(" "),s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_appointment))])]):e._e()],1):e._e(),e._v(" "),e.oldCustomize&&"wpamelia-customize"===e.$router.currentRoute.name?s("div",{staticClass:"am-calendar-header-filters"},[s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showMainCustomize}},[s("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.go_back))])])],1):e._e()],1)],1)],1)},staticRenderFns:[]}},699:function(e,t,s){var a;a=function(){return function(e){function t(a){if(s[a])return s[a].exports;var n=s[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var s={};return t.m=e,t.c=s,t.i=function(e){return e},t.d=function(e,s,a){t.o(e,s)||Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(s,"a",s),s},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=9)}([function(e,t,s){"use strict";t.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(e,t,s){"use strict";var a=s(2),n=s(5),i=s(0);t.a=function(e,t){if(t.value){var o=s.i(n.a)(i.a,t.value);if("INPUT"!==e.tagName.toLocaleUpperCase()){var r=e.getElementsByTagName("input");1!==r.length||(e=r[0])}e.oninput=function(){var t=e.value.length-e.selectionEnd;e.value=s.i(a.a)(e.value,o),t=Math.max(t,o.suffix.length),t=e.value.length-t,t=Math.max(t,o.prefix.length+1),s.i(a.b)(e,t),e.dispatchEvent(s.i(a.c)("change"))},e.onfocus=function(){s.i(a.b)(e,e.value.length-o.suffix.length)},e.oninput(),e.dispatchEvent(s.i(a.c)("input"))}}},function(e,t,s){"use strict";function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a;"number"==typeof e&&(e=e.toFixed(o(t.precision)));var s=e.indexOf("-")>=0?"-":"",a=l(r(i(e),t.precision)).split("."),n=a[0],c=a[1];return n=function(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}(n,t.thousands),t.prefix+s+function(e,t,s){return t?e+s+t:e}(n,c,t.decimal)+t.suffix}function n(e,t){var s=e.indexOf("-")>=0?-1:1,a=r(i(e),t);return parseFloat(a)*s}function i(e){return l(e).replace(/\D+/g,"")||"0"}function o(e){return function(e,t,s){return Math.max(e,Math.min(t,s))}(0,e,20)}function r(e,t){var s=Math.pow(10,t);return(parseFloat(e)/s).toFixed(o(t))}function l(e){return e?e.toString():""}function c(e,t){var s=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(s(),setTimeout(s,1))}function u(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var d=s(0);s.d(t,"a",function(){return a}),s.d(t,"d",function(){return n}),s.d(t,"b",function(){return c}),s.d(t,"c",function(){return u})},function(e,t,s){"use strict";function a(e,t){t&&Object.keys(t).map(function(e){r.a[e]=t[e]}),e.directive("money",o.a),e.component("money",i.a)}Object.defineProperty(t,"__esModule",{value:!0});var n=s(6),i=s.n(n),o=s(1),r=s(0);s.d(t,"Money",function(){return i.a}),s.d(t,"VMoney",function(){return o.a}),s.d(t,"options",function(){return r.a}),s.d(t,"VERSION",function(){return l});var l="0.8.1";t.default=a,"undefined"!=typeof window&&window.Vue&&window.Vue.use(a)},function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(1),n=s(0),i=s(2);t.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return n.a.precision}},decimal:{type:String,default:function(){return n.a.decimal}},thousands:{type:String,default:function(){return n.a.thousands}},prefix:{type:String,default:function(){return n.a.prefix}},suffix:{type:String,default:function(){return n.a.suffix}}},directives:{money:a.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var a=s.i(i.a)(e,this.$props);a!==this.formattedValue&&(this.formattedValue=a)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:s.i(i.d)(e.target.value,this.precision))}}}},function(e,t,s){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(s,a){return s[a]=void 0===t[a]?e[a]:t[a],s},{})}},function(e,t,s){var a=s(7)(s(4),s(8),null,null);e.exports=a.exports},function(e,t){e.exports=function(e,t,s,a){var n,i=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(n=e,i=e.default);var r="function"==typeof i?i.options:i;if(t&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns),s&&(r._scopeId=s),a){var l=r.computed||(r.computed={});Object.keys(a).forEach(function(e){var t=a[e];l[e]=function(){return t}})}return{esModule:n,exports:i,options:r}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:e.precision,decimal:e.decimal,thousands:e.thousands,prefix:e.prefix,suffix:e.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:e.formattedValue},on:{change:e.change}})},staticRenderFns:[]}},function(e,t,s){e.exports=s(3)}])},e.exports=a()},704:function(e,t,s){"use strict";var a=s(666),n=s(661);t.a={mixins:[n.a,a.a],data:function(){return{}},methods:{getAppointmentService:function(e){return this.getProviderById(e.providerId).serviceList.find(function(t){return t.id===e.serviceId})||this.getServiceById(e.serviceId)},getAppointmentPrice:function(e,t){var s=this,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=0;return t.filter(function(e){return null===e.packageCustomerService}).forEach(function(t){["approved","pending"].includes(t.status)&&(n+=s.getBookingPrice(t,!1,t.price,t.aggregatedPrice,e.id))}),a?this.getFormattedPrice(n>=0?n:0,!this.$root.settings.payments.hideCurrencySymbolFrontend):n>=0?n:0},getBookingPrice:function(e,t,s,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i={price:t?s:e.price,aggregatedPrice:a,id:t?null:n};t||(i.tax=e.tax);var o=this.getAppointmentPriceAmount(i,e.extras.filter(function(e){return!("selected"in e)||e.selected}),e.persons,e.coupon,!1);return o.discount>o.total?0:o.total-o.discount+o.tax},getPackagePrice:function(e,t){var s=e.bookings[t].packageCustomerService.packageCustomer.coupon,a=e.bookings[t].packageCustomerService.packageCustomer.price,n=a/100*(s?s.discount:0)+(s?s.deduction:0);return n>a?0:a-n}}}},705:function(e,t,s){"use strict";t.a={data:function(){return{}},methods:{updateStashEntities:function(e){this.$root.settings.activation.stash&&this.$http.post(this.$root.getAjaxUrl+"/stash",e).then(function(e){})}}}},713:function(e,t,s){e.exports=s(714)},714:function(e,t,s){"use strict";var a=s(656),n=s(686),i=s(715),o=s(669);function r(e){var t=new i(e),s=n(i.prototype.request,t);return a.extend(s,i.prototype,t),a.extend(s,t),s}var l=r(o);l.Axios=i,l.create=function(e){return r(a.merge(o,e))},l.Cancel=s(690),l.CancelToken=s(729),l.isCancel=s(689),l.all=function(e){return Promise.all(e)},l.spread=s(730),e.exports=l,e.exports.default=l},715:function(e,t,s){"use strict";var a=s(669),n=s(656),i=s(724),o=s(725),r=s(727),l=s(728);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(a,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!r(e.url)&&(e.url=l(e.baseURL,e.url));var t=[o,void 0],s=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)s=s.then(t.shift(),t.shift());return s},n.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,s){return this.request(n.merge(s||{},{method:e,url:t}))}}),n.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,s,a){return this.request(n.merge(a||{},{method:e,url:t,data:s}))}}),e.exports=c},716:function(e,t,s){"use strict";var a=s(656);e.exports=function(e,t){a.forEach(e,function(s,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=s,delete e[a])})}},717:function(e,t,s){"use strict";var a=s(688);e.exports=function(e,t,s){var n=s.config.validateStatus;s.status&&n&&!n(s.status)?t(a("Request failed with status code "+s.status,s.config,null,s.request,s)):e(s)}},718:function(e,t,s){"use strict";e.exports=function(e,t,s,a,n){return e.config=t,s&&(e.code=s),e.request=a,e.response=n,e}},719:function(e,t,s){"use strict";var a=s(656);function n(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,s){if(!t)return e;var i;if(s)i=s(t);else if(a.isURLSearchParams(t))i=t.toString();else{var o=[];a.forEach(t,function(e,t){null!==e&&void 0!==e&&(a.isArray(e)&&(t+="[]"),a.isArray(e)||(e=[e]),a.forEach(e,function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),o.push(n(t)+"="+n(e))}))}),i=o.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},720:function(e,t,s){"use strict";var a=s(656);e.exports=function(e){var t,s,n,i={};return e?(a.forEach(e.split("\n"),function(e){n=e.indexOf(":"),t=a.trim(e.substr(0,n)).toLowerCase(),s=a.trim(e.substr(n+1)),t&&(i[t]=i[t]?i[t]+", "+s:s)}),i):i}},721:function(e,t,s){"use strict";var a=s(656);e.exports=a.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a");function n(e){var a=e;return t&&(s.setAttribute("href",a),a=s.href),s.setAttribute("href",a),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:"/"===s.pathname.charAt(0)?s.pathname:"/"+s.pathname}}return e=n(window.location.href),function(t){var s=a.isString(t)?n(t):t;return s.protocol===e.protocol&&s.host===e.host}}():function(){return!0}},722:function(e,t,s){"use strict";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function n(){this.message="String contains an invalid character"}n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,s,i=String(e),o="",r=0,l=a;i.charAt(0|r)||(l="=",r%1);o+=l.charAt(63&t>>8-r%1*8)){if((s=i.charCodeAt(r+=.75))>255)throw new n;t=t<<8|s}return o}},723:function(e,t,s){"use strict";var a=s(656);e.exports=a.isStandardBrowserEnv()?{write:function(e,t,s,n,i,o){var r=[];r.push(e+"="+encodeURIComponent(t)),a.isNumber(s)&&r.push("expires="+new Date(s).toGMTString()),a.isString(n)&&r.push("path="+n),a.isString(i)&&r.push("domain="+i),!0===o&&r.push("secure"),document.cookie=r.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},724:function(e,t,s){"use strict";var a=s(656);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){a.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=n},725:function(e,t,s){"use strict";var a=s(656),n=s(726),i=s(689),o=s(669);function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=a.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),a.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return r(e),t.data=n(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},726:function(e,t,s){"use strict";var a=s(656);e.exports=function(e,t,s){return a.forEach(s,function(s){e=s(e,t)}),e}},727:function(e,t,s){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},728:function(e,t,s){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},729:function(e,t,s){"use strict";var a=s(690);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var s=this;e(function(e){s.reason||(s.reason=new a(e),t(s.reason))})}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n(function(t){e=t}),cancel:e}},e.exports=n},730:function(e,t,s){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},731:function(e,t,s){"use strict";var a,n=function(){function e(e,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,s,a){return s&&e(t.prototype,s),a&&e(t,a),t}}(),i=s(11),o=(a=i)&&a.__esModule?a:{default:a};e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors={}}return n(e,[{key:"set",value:function(e){this.errors=e}},{key:"has",value:function(e){return this.errors.hasOwnProperty(e)}},{key:"get",value:function(e){if(this.has(e))return this.errors[e][0]}},{key:"getAll",value:function(e){if(this.has(e))return this.errors[e]}},{key:"clear",value:function(e){e?o.default.delete(this.errors,e):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),e}()},732:function(e,t,s){"use strict";function a(e){return void 0===e}function n(e){return Array.isArray(e)}function i(e){return e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice}e.exports=function e(t,s,o,r){if(s instanceof FormData&&(r=o,o=s,s=null),(s=s||{}).indices=!a(s.indices)&&s.indices,s.nulls=!!a(s.nulls)||s.nulls,o=o||new FormData,a(t))return o;if(function(e){return null===e}(t))s.nulls&&o.append(r,"");else if(n(t))if(t.length)t.forEach(function(t,a){var n=r+"["+(s.indices?a:"")+"]";e(t,s,o,n)});else{var l=r+"[]";o.append(l,"")}else!function(e){return e instanceof Date}(t)?!function(e){return e===Object(e)}(t)||function(e){return i(e)&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified)&&"string"==typeof e.name}(t)||i(t)?o.append(r,t):Object.keys(t).forEach(function(a){var i=t[a];if(n(i))for(;a.length>2&&a.lastIndexOf("[]")===a.length-2;)a=a.substring(0,a.length-2);e(i,s,o,r?r+"["+a+"]":a)}):o.append(r,t.toISOString());return o}},737:function(e,t,s){var a=s(90)(s(741),s(742),!1,null,null,null);e.exports=a.exports},741:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={mixins:[],props:{params:null,visible:!1,label:"",count:0,show:null},data:function(){return{currentPage:null}},methods:{change:function(){this.$emit("change")}},computed:{paginationMessage:function(){return this.$root.labels.showing+" "+(this.params.page*this.getItemsPerPage-this.getItemsPerPage+1)+" "+this.$root.labels.to+" "+(this.params.page*this.getItemsPerPage>this.count?this.count:this.params.page*this.getItemsPerPage)+" "+this.$root.labels.of+" "+this.count+" "+this.label},getItemsPerPage:function(){return void 0===this.show||null===this.show?this.$root.settings.general.itemsPerPage:this.show}}}},742:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[s("el-row",[s("el-col",{attrs:{sm:8}},[s("p",[e._v(e._s(e.paginationMessage))])]),e._v(" "),s("el-col",{attrs:{sm:16}},[s("el-pagination",{attrs:{layout:"prev, pager, next","page-size":e.getItemsPerPage,total:e.count,"current-page":e.params.page},on:{"update:currentPage":function(t){return e.$set(e.params,"page",t)},"update:current-page":function(t){return e.$set(e.params,"page",t)},"current-change":e.change}})],1)],1)],1)},staticRenderFns:[]}},792:function(e,t,s){"use strict";var a=s(668),n=s(0),i=s.n(n),o=s(678),r=s(336);t.a={mixins:[o.a,a.a,r.a],data:function(){return{event:null,bookingCreatedCount:0,attributes:[{highlight:{backgroundColor:"#ddd"},dates:[]}],selectedRecurringDate:null,recurringDates:null,updateStatusDisabled:!1,recurringPeriods:[{label:this.$root.labels.recurring_type_weekly,value:"weekly"},{label:this.$root.labels.recurring_type_monthly,value:"monthly"},{label:this.$root.labels.recurring_type_yearly,value:"yearly"}],colors:["#1788FB","#4BBEC6","#FBC22D","#FA3C52","#D696B8","#689BCA","#26CC2B","#FD7E35","#E38587","#774DFB"],options:{fetched:!1,entities:{settings:{payments:{wc:null},general:{usedLanguages:[]}},employees:[],locations:[],tags:[]}},searchCounter:0,loadingEvents:!1,searchEventsTimer:null,searchedEvents:[],searchEventsQuery:""}},methods:{showDialogEditEvent:function(e){this.dialogEvent=!0,this.event=null,this.getEvent(e)},closeDialogEvent:function(){this.dialogEvent=!1},getInitEventObject:function(){return{id:0,parentId:null,name:"",periods:[{id:null,eventId:null,range:null,startTime:null,endTime:null,bookings:[]}],bookingStartsNow:!0,bookingStartsDate:null,bookingStartsTime:null,bookingEndsAfter:!0,bookingEndsDate:null,bookingEndsTime:null,bookingOpensRec:"same",bookingClosesRec:"same",ticketRangeRec:"calculate",isRecurring:!1,recurring:{cycle:null,order:null,until:null,cycleInterval:null},bringingAnyone:!0,bookMultipleTimes:!0,maxCapacity:null,maxCustomCapacity:null,maxExtraPeople:null,price:0,locationId:null,customLocation:null,providers:this.getInitEventProviders(),tags:[],description:null,gallery:[],colorType:2,selectedColor:"#1788FB",customColor:"#1788FB",show:!0,places:0,addToCalendarData:null,showAddToCalendar:!1,showEventDetails:!1,showEventBooking:!1,translations:null,canceling:!1,deleting:!1,bookable:!0,deposit:0,depositPayment:"disabled",depositPerPerson:1,customTickets:[],settings:this.getInitEntitySettings("event"),closeAfterMin:null,closeAfterMinBookings:!1,aggregatedPrice:!0}},showDialogNewEvent:function(){this.event=this.getInitEventObject(),this.dialogEvent=!0},getEvent:function(e){var t=this,s=null,a="";void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(a=""===this.$store.state.cabinet.timeZone?"UTC":this.$store.state.cabinet.timeZone,s=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType,timeZone:a}})),void 0===this.$store&&"provider"===this.$root.settings.role&&1===this.options.entities.employees.length&&this.options.entities.employees[0].timeZone&&(s=Object.assign({params:{timeZone:this.options.entities.employees[0].timeZone}})),this.$http.get(this.$root.getAjaxUrl+"/events/"+e,s).then(function(e){var s=Object.assign(t.getInitEventObject(),e.data.data.event),n=[],o=t;e.data.data.event.periods.forEach(function(e){"UTC"===a&&(e.periodStart=o.getConvertedUtcToLocalDateTime(e.periodStart),e.periodEnd=o.getConvertedUtcToLocalDateTime(e.periodEnd));var t=i()(e.periodStart,"YYYY-MM-DD HH:mm:ss"),s=i()(e.periodEnd,"YYYY-MM-DD HH:mm:ss"),r=e.periodStart.split(" ")[1].substring(0,5),l=e.periodEnd.split(" ")[1].substring(0,5);"00:00"===l&&(s.subtract(1,"days"),l="24:00"),n.push({id:e.id?e.id:null,eventId:e.eventId?e.eventId:null,range:{start:t.toDate(),end:s.toDate()},startTime:r,endTime:l,bookings:e.bookings,zoomMeeting:e.zoomMeeting,lessonSpace:e.lessonSpace,googleCalendarEventId:e.googleCalendarEventId,googleMeetUrl:e.googleMeetUrl,outlookCalendarEventId:e.outlookCalendarEventId,microsoftTeamsUrl:e.microsoftTeamsUrl,appleCalendarEventId:e.appleCalendarEventId})}),s.periods=n;var r=[];s.tags.forEach(function(e){r.push(e.name)}),s.tags=r,null===s.recurring?s.recurring={cycle:null,until:null,order:null}:(s.isRecurring=!0,s.recurring.cycleInterval=null===e.data.data.event.recurring.cycleInterval?1:e.data.data.event.recurring.cycleInterval,s.recurring.until=e.data.data.event.recurring.until?i()(e.data.data.event.recurring.until).toDate():null),s.bookingStartsNow=null===e.data.data.event.bookingOpens,s.bookingStartsDate=e.data.data.event.bookingOpens?i()(e.data.data.event.bookingOpens).toDate():null,s.bookingStartsTime=e.data.data.event.bookingOpens?e.data.data.event.bookingOpens.split(" ")[1].substring(0,5):null,s.bookingEndsAfter=null===e.data.data.event.bookingCloses,s.bookingEndsDate=e.data.data.event.bookingCloses?i()(e.data.data.event.bookingCloses).toDate():null,s.bookingEndsTime=e.data.data.event.bookingCloses?e.data.data.event.bookingCloses.split(" ")[1].substring(0,5):null,s.zoomUserId=e.data.data.event.zoomUserId,s.organizerId=e.data.data.event.organizerId,s.closeAfterMin=e.data.data.event.closeAfterMin,s.closeAfterMinBookings=e.data.data.event.closeAfterMinBookings,s.aggregatedPrice=e.data.data.event.aggregatedPrice;var l=s.bookings;l.forEach(function(e){if(e.info){var t=JSON.parse(e.info);e.customer.firstName=t.firstName,e.customer.lastName=t.lastName,e.customer.phone=t.phone}else{var s=o.getCustomerById(e.customerId);e.customer.firstName=s?s.firstName:o.$root.labels.customer+" "+e.customerId,e.customer.lastName=s?s.lastName:"",e.customer.phone=s?s.phone:""}e.show=!0,e.removing=!1,e.checked=!1,"[]"!==e.customFields&&null!==e.customFields||(e.customFields="{}"),e.payments=e.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)}),e.customFields=JSON.parse(e.customFields)});var c=!1;t.colors.forEach(function(e){e===s.color&&(s.colorType=1,s.selectedColor=e,s.customColor=e,c=!0)}),c||(s.colorType=2,s.selectedColor=null,s.customColor=s.color),s.gallery=s.gallery.sort(function(e,t){return e.position>t.position?1:-1}),t.eventBookings=l,t.setEntitySettings(s,"event"),null===s.deposit&&(s.deposit=0),t.event=s,t.bookingCreatedCount++}).catch(function(e){console.log(e.message)})},getInitEventProviders:function(){return"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents?this.options.entities.employees:[]},handleDateTimeFormat:function(e){return[this.getFrontedFormattedDate(e.split(" ")[0]),this.getFrontedFormattedTime(e.split(" ")[1])]},showDialogAttendees:function(e){this.eventBookings=null,this.dialogAttendees=!0,this.getEvent(e)},searchEvents:function(e){var t=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e||a.length<this.$root.settings.general.eventsFilterLimit)return this.loadingEvents=!0,this.searchedEvents=a,void setTimeout(function(){t.loadingEvents=!1},500);this.searchEventsQuery=e,clearTimeout(this.searchEventsTimer),this.loadingEvents=!0,this.searchCounter++,this.searchEventsTimer=setTimeout(function(){var a=t.searchCounter;t.$http.get(t.$root.getAjaxUrl+"/events",{params:{search:e,page:1,limit:t.$root.settings.general.eventsFilterLimit,skipCount:1,dates:[i()().format("YYYY-MM-DD")]}}).then(function(e){a>=t.searchCounter&&(t.searchedEvents=s?t.groupRecurringEvents(e.data.data.events):e.data.data.events),t.loadingEvents=!1}).catch(function(e){t.loadingEvents=!1})},500)},getNotRetrievedEvents:function(e,t,s){var a=e.map(function(e){return e.id}),n=[];return t.forEach(function(e){n=n.concat(e[s].filter(function(e){return-1===a.indexOf(e.id)}))}),n},groupRecurringEvents:function(e){var t=this,s=[];if(e)for(var a=function(a){var n=e[a];if("approved"!==n.status)return"continue";if(s.find(function(e){return(e.id===n.parentId||e.parentId===n.parentId)&&null!==n.parentId}))return"continue";var i=s.find(function(e){return e.name===n.name&&e.id!==n.id});i?(n.displayName=n.name+" ("+t.getFrontedFormattedDateTime(n.periods[0].periodStart)+")",i.displayName=i.name+" ("+t.getFrontedFormattedDateTime(i.periods[0].periodStart)+")",s.push(n)):s.push(n)},n=0;n<e.length;n++)a(n);return s}},watch:{}}},802:function(e,t,s){var a=s(90)(s(803),s(804),!1,null,null,null);e.exports=a.exports},803:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(91),n=s(654),i=s(336);t.default={mixins:[a.a,n.a,i.a],props:{data:null,action:null},data:function(){return{delimiter:",",delimiters:[{label:this.$root.labels.csv_delimiter_comma,value:","},{label:this.$root.labels.csv_delimiter_semicolon,value:";"}],separateBookings:!1,hasSeparateBookingOption:!1}},updated:function(){this.inlineSVG()},mounted:function(){this.hasSeparateBookingOption=this.action===this.$root.getAjaxUrl+"/report/appointments"||this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.separateBookings=this.action===this.$root.getAjaxUrl+"/report/event/attendees",this.$emit("updateAction",this.getAction()),this.inlineSVG()},methods:{changeFields:function(){this.$emit("updateAction",this.getAction())},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){var e=this,t=this.$root.settings.activation.disableUrlParams?{}:[],s=function(s){if(e.data.hasOwnProperty(s))if(e.data[s]instanceof Array||e.data[s]instanceof Object){var a=Object.keys(e.data[s]).map(function(t){return e.data[s][t]});for(var n in a)if(""!==a[n]){var i="";""!==(i=a[n]instanceof Date?a[n]instanceof Date?e.getDatabaseFormattedDate(a[n]):a[n]:a[n]instanceof Object&&!0===a[n].checked?a[n].value:a[n])&&(e.$root.settings.activation.disableUrlParams?(s in t||(t[s]=[]),t[s].push(encodeURIComponent(i))):t.push(s+"["+n+"]="+encodeURIComponent(i)))}}else""!==e.data[s]&&(e.$root.settings.activation.disableUrlParams?(s in t||(t[s]=[]),t[s].push(encodeURIComponent(e.data[s]))):t.push(s+"="+encodeURIComponent(e.data[s])))};for(var a in this.data)s(a);if(this.$root.settings.activation.disableUrlParams){var n=[];for(var a in t)n.push(a+"="+t[a].join(","));t=n}return this.action+"&"+t.join("&")+"&delimiter="+this.delimiter+(this.hasSeparateBookingOption?"&separate="+this.separateBookings:"")+"&wpAmeliaNonce="+window.wpAmeliaNonce}},components:{}}},804:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"am-dialog-scrollable"},[s("div",{staticClass:"am-dialog-header"},[s("el-row",[s("el-col",{attrs:{span:14}},[s("h2",[e._v(e._s(e.$root.labels.export))])]),e._v(" "),s("el-col",{staticClass:"align-right",attrs:{span:10}},[s("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),s("LicenceBlockHeader",{attrs:{licence:"starter"}}),e._v(" "),s("el-form",{class:e.licenceClassDisabled("starter"),attrs:{"label-position":"top"}},[s("el-form-item",{attrs:{label:e.$root.labels.csv_delimiter+":"}},[s("el-select",{attrs:{placeholder:e.$root.labels.csv_delimiter},on:{change:e.changeFields},model:{value:e.delimiter,callback:function(t){e.delimiter=t},expression:"delimiter"}},e._l(e.delimiters,function(e){return s("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),e.hasSeparateBookingOption?s("el-form-item",{attrs:{label:e.$root.labels["select_rows_settings"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")]+":"}},[s("el-select",{attrs:{placeholder:e.$root.labels.exported_same_row},on:{change:e.changeFields},model:{value:e.separateBookings,callback:function(t){e.separateBookings=t},expression:"separateBookings"}},[s("el-option",{attrs:{label:this.$root.labels["exported_same_row"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!1}}),e._v(" "),s("el-option",{attrs:{label:this.$root.labels["exported_separate_rows"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!0}})],1)],1):e._e(),e._v(" "),e._l(e.data.fields,function(t){return[s("el-checkbox",{attrs:{checked:"",label:t.label,border:""},on:{change:e.changeFields},model:{value:t.checked,callback:function(s){e.$set(t,"checked",s)},expression:"field.checked"}})]})],2)],1),e._v(" "),s("div",{staticClass:"am-dialog-footer"},[s("div",{staticClass:"am-dialog-footer-actions"},[s("el-row",[s("el-col",{staticClass:"align-right",attrs:{sm:24}},[s("el-button",{attrs:{disabled:e.notInLicence("starter"),type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),s("el-button",{staticClass:"am-dialog-create",attrs:{disabled:e.notInLicence("starter"),type:"primary","native-type":"submit"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},823:function(e,t,s){var a=s(90)(s(824),s(825),!1,null,null,null);e.exports=a.exports},824:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(680),n=s.n(a),i=s(699),o=(s.n(i),s(336)),r=s(654),l=s(658),c=s(657),u=s(684),d=s(673),m=s(666);t.default={mixins:[r.a,o.a,l.a,c.a,u.a,d.a,m.a],props:{modalData:null,bookingFetched:!1,customersNoShowCount:null,invoiceInDialog:!1},data:function(){return{dialogLoading:!0,refundBtnLoading:!1,refundMainBtnLoading:!1,finance:{bookablePriceTotal:0,extrasPriceTotal:0,discountTotal:0,subTotal:0,due:0,refunded:0,total:0,paidDeposit:0,paidRemaining:0,tax:0,wcTax:0,multipleBookings:!1},form:new n.a,payment:null,paymentStatuses:[{value:"pending",label:this.$root.labels.pending},{value:"paid",label:this.$root.labels.paid},{value:"partiallyPaid",label:this.$root.labels.partially_paid}],showDeleteConfirmation:!1,showUpdatePaymentAmount:!1,payments:[],showRefundConfirmation:!1,refundAmount:0,invoiceLoading:{preview:!1,download:!1,send:!1}}},created:function(){n.a.defaults.axios=this.$http,this.$root.licence.isBasic||this.$root.licence.isStarter||this.$root.licence.isLite||this.paymentStatuses.push({value:"refunded",label:this.$root.labels.refunded}),this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var e=this;setTimeout(function(){e.inlineSVG()},5)})},methods:{showPaidSeparate:function(){return this.payments.filter(function(e){return"partiallyPaid"===e.status}).length>0&&!this.invoiceInDialog},createFileUrlFromResponse:function(e){for(var t=atob(e.data),s=new Array(t.length),a=0;a<t.length;a++)s[a]=t.charCodeAt(a);var n=new Uint8Array(s),i=new Blob([n],{type:"application/pdf;base64"});return URL.createObjectURL(i)},sendInvoice:function(){var e=this;if(this.invoiceLoading.send=!0,this.modalData.customer.email){var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id,{sendEmail:!0}).then(function(t){e.notify(e.$root.labels.success,e.$root.labels.invoice_sent,"success"),e.invoiceLoading.send=!1}).catch(function(t){console.log(t.response.data.message),e.notify(e.$root.labels.error,e.$root.labels.invoice_sending_failed,"error"),e.invoiceLoading.send=!1})}else this.notify(this.$root.labels.error,this.$root.labels.send_invoice_no_email,"error"),this.invoiceLoading.send=!1},previewInvoice:function(){var e=this;this.invoiceLoading.preview=!0;var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id).then(function(t){window.open(e.createFileUrlFromResponse(t)),e.invoiceLoading.preview=!1}).catch(function(t){console.log(t.message),e.invoiceLoading.preview=!1})},downloadInvoice:function(){var e=this;this.invoiceLoading.download=!0;var t=this.payments.find(function(e){return null===e.parentId});this.$http.post(this.$root.getAjaxUrl+"/invoices/"+t.id).then(function(t){var s=e.createFileUrlFromResponse(t),a=document.createElement("a");a.href=s,a.download="Invoice",document.body.appendChild(a),a.click(),document.body.removeChild(a),e.invoiceLoading.download=!1}).catch(function(t){console.log(t.message),e.invoiceLoading.download=!1})},showRefundModal:function(e){var t=this;this.showDeleteConfirmation=!1,this.showUpdatePaymentAmount=!1,this.payment=e,this.refundMainBtnLoading=!0,this.$http.get(this.$root.getAjaxUrl+"/payments/transaction/"+e.id).then(function(e){t.refundAmount=e.data.data.refundAmount,t.showRefundConfirmation=!0,t.refundMainBtnLoading=!1}).catch(function(e){console.log(e.message),t.refundMainBtnLoading=!1})},showUpdateModal:function(e){this.showUpdatePaymentAmount=!0,this.showDeleteConfirmation=!1,this.payment=e},showDeleteModal:function(e){this.showDeleteConfirmation=!0,this.showRefundConfirmation=!1,this.showUpdatePaymentAmount=!1,this.payment=e},paymentRefundable:function(e){return!this.$root.licence.isBasic&&!this.$root.licence.isStarter&&!this.$root.licence.isLite&&("partiallyPaid"===e.status||"paid"===e.status)&&(e.transactionId||e.wcOrderId)&&("mollie"!==e.gateway||e.transactionId&&!e.transactionId.includes("pl_"))&&"onSite"!==e.gateway},refundPayment:function(){var e=this;this.refundBtnLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/refund/"+this.payment.id).then(function(t){e.notify(e.$root.labels.success,e.$root.labels.payment_refunded,"success"),e.refundBtnLoading=!1,e.payment.status="refunded",e.showRefundConfirmation=!1,e.$emit("updatePaymentCallback",e.payment)}).catch(function(t){console.log(t),e.refundBtnLoading=!1,e.notify(e.$root.labels.error,t.response.data.message?t.response.data.message:e.$root.labels.payment_refund_failed,"error")})},getTicketsData:function(){var e=[];return"event"===this.modalData.bookableType&&this.modalData[this.modalData.bookableType][0]&&this.modalData.event.forEach(function(t){t.booking.ticketsData.forEach(function(s){var a=t.bookable.customTickets.find(function(e){return e.id===s.eventTicketId});a&&e.push({name:a.name,persons:s.persons})})}),e},instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){var e=this;JSON.parse(JSON.stringify(this.modalData[this.modalData.bookableType])).forEach(function(t){e.payments=e.payments.concat(t.booking.payments)}),this.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)});var t=this.modalData.bookableType,s=this.modalData[t];this.finance=this.getPaymentAmountData(s,t),this.finance.multipleBookings=s.length>0},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(s){s.value===e&&(t=s.label)}),t},deletePayment:function(){var e=this;this.dialogLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/delete/"+this.payment.id).then(function(t){e.dialogLoading=!1,t.data&&(e.$emit("deletePaymentCallback",e.payment),e.showDeleteConfirmation=!e.showDeleteConfirmation,e.notify(e.$root.labels.success,e.$root.labels.payment_deleted,"success"))}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},updatePayment:function(){var e=this;this.payment?(this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/payments/"+this.payment.id,this.payment).then(function(){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.setFinance(),e.notify(e.$root.labels.success,e.$root.labels.payment_saved,"success"),e.$emit("updatePaymentCallback",e.payment),e.dialogLoading=!1}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})):this.$emit("updatePaymentCallback")},getPaymentIconName:function(e){return"onSite"!==e.gateway&&"stripe"!==e.gateway||"oliver"!==e.gatewayTitle?e.gateway+".svg":"oliver.png"},getPaymentGatewayNiceName:function(e){return"stripe"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_line:"onSite"===e.gateway&&"oliver"===e.gatewayTitle?this.$root.labels.oliver_on_site:"onSite"===e.gateway?this.$root.labels.on_site:"wc"===e.gateway?e.gatewayTitle:e.gateway?e.gateway.charAt(0).toUpperCase()+e.gateway.slice(1):void 0}},watch:{bookingFetched:function(){!0===this.bookingFetched&&this.instantiateDialog()}},components:{Money:i.Money}}},825:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[s("div",{staticClass:"am-dialog-loader-content"},[s("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),s("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():s("div",{staticClass:"am-dialog-scrollable"},[s("div",{staticClass:"am-dialog-header"},[s("el-row",[s("el-col",{attrs:{span:18}},[s("h2",[e._v(e._s(e.invoiceInDialog?e.$root.labels.invoice_details:e.$root.labels.payment_details))])]),e._v(" "),s("el-col",{staticClass:"align-right",attrs:{span:6}},[s("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),s("div",{staticClass:"am-payment-details"},[!e.payments[0].invoiceNumber||e.$root.licence.isLite||e.$root.licence.isStarter?e._e():s("el-row",{staticClass:"am-payment-details-row"},[s("h4",[e._v(e._s(e.$root.labels.invoice_number+": #"+e.payments[0].invoiceNumber))])]),e._v(" "),s("el-row",{staticClass:"am-payment-details-row"},[s("h4",[e._v(e._s(e.$root.labels.customer))]),e._v(" "),s("el-col",{attrs:{span:24}},[s("h3",{class:e.getNoShowClass(e.modalData.customer.id,e.customersNoShowCount)},[e._v(e._s(e.modalData.customer.id?e.modalData.customer.firstName+" "+e.modalData.customer.lastName:""))]),e._v(" "),s("p",[e._v(e._s(e.modalData.customer?e.modalData.customer.email:""))])])],1),e._v(" "),e._l(e.payments,function(t,a){return s("el-row",{key:t.id,staticClass:"am-payment-details-row"},[s("div",{staticClass:"am-payment-details-row-header"},[s("h4",[e._v(e._s(e.$root.labels.payment)+" "+e._s(e.payments.length>1?"#"+(a+1):"")+" ")]),e._v(" "),!e.invoiceInDialog&&e.payments.length>1?s("div",{staticClass:"am-payment-details-row-options"},[e.paymentRefundable(t)?s("div",[s("el-button",{attrs:{size:"small",loading:e.refundMainBtnLoading},on:{click:function(s){return e.showRefundModal(t)}}},[e._v("\n "+e._s(e.$root.labels.refund)+"\n ")])],1):e._e(),e._v(" "),s("el-button",{staticClass:"am-button-icon",staticStyle:{padding:"7px 10px"},attrs:{size:"small"},on:{click:function(s){return e.showUpdateModal(t)}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),!0===e.$root.settings.capabilities.canDelete?s("el-button",{staticClass:"am-button-icon",staticStyle:{padding:"7px 10px","margin-left":"0px"},attrs:{size:"small"},on:{click:function(s){return e.showDeleteModal(t)}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e()],1):e._e()]),e._v(" "),s("el-col",{attrs:{span:12}},[s("p",[e._v(e._s(e.invoiceInDialog?e.$root.labels.issue_date:e.$root.labels.date))]),e._v(" "),s("p",[e._v(e._s(e.$root.labels.payment_method))]),e._v(" "),t.wcOrderId?s("p",[e._v(e._s(e.$root.labels.wc_order)+":")]):e._e(),e._v(" "),s("p",[e._v(e._s(e.$root.labels.status))]),e._v(" "),s("p",[e._v(e._s(e.$root.labels.id))])]),e._v(" "),s("el-col",{attrs:{span:12}},[s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.invoiceInDialog?e.getFrontedFormattedDate(t.created):e.getFrontedFormattedDate(t.dateTime)))]),e._v(" "),s("p",{staticClass:"am-semi-strong"},[s("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway),verticalAlign:"middle"},attrs:{src:e.$root.getUrl+"public/img/payments/"+e.getPaymentIconName(t)}}),e._v(" "),e.longNamePayments(t.gateway)?e._e():s("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))])]),e._v(" "),t.wcOrderId?s("p",[s("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])]):e._e(),e._v(" "),s("div",{staticClass:"am-payment-status"},[s("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v(" "),s("p",{staticClass:"am-semi-strong"},[s("span",[e._v(e._s(e.getPaymentStatusNiceName(t.status)))])])]),e._v(" "),s("p",{staticClass:"am-semi-strong"},[e._v(e._s(t.id))])])],1)}),e._v(" "),e._l(e.modalData[e.modalData.bookableType],function(t,a){return s("el-row",{key:a,staticClass:"am-payment-details-row"},[s("h4",[e._v(e._s(e.$root.labels[e.modalData.bookableType+"_info"]))]),e._v(" "),s("el-col",{attrs:{span:12}},[s("p",[e._v(e._s(e.$root.labels[e.modalData.bookableType]))]),e._v(" "),"package"!==e.modalData.bookableType?s("p",[e._v(e._s(e.$root.labels.date))]):e._e(),e._v(" "),t.providers.length&&"appointment"===e.modalData.bookableType?s("p",[e._v(e._s(e.$root.labels.employee))]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?s("p",[e._v(e._s(e.$root.labels.event_tickets))]):e._e()]),e._v(" "),s("el-col",{attrs:{span:12}},[s("p",{staticClass:"am-semi-strong"},[e._v(e._s(t.bookable.name))]),e._v(" "),"package"!==e.modalData.bookableType?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDateTime(t.bookingStart)))]):e._e(),e._v(" "),t.providers.length>0&&"appointment"===e.modalData.bookableType?s("p",{staticClass:"am-semi-strong"},[s("img",{staticClass:"am-employee-photo",attrs:{src:e.pictureLoad(t.providers[0],!0)},on:{error:function(s){return e.imageLoadError(t.providers[0].id,!0)}}}),e._v("\n "+e._s(t.providers[0].fullName)+"\n ")]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?s("p",{staticClass:"am-semi-strong",staticStyle:{"white-space":"unset"}},e._l(e.getTicketsData(),function(t){return s("span",{staticClass:"am-attendees-plus"},[e._v("\n "+e._s(t.persons)+" x "+e._s(t.name)+"\n ")])}),0):e._e()])],1)}),e._v(" "),s("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[s("el-col",{attrs:{span:12}},[s("p",[e._v(e._s(e.$root.labels[(e.finance.multipleBookings?"bookings":"appointment"===e.modalData.bookableType?"service":e.modalData.bookableType)+"_price"]))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?s("p",[e._v(e._s(e.$root.labels.extras))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?s("p",[e._v(e._s(e.$root.labels.subtotal))]):e._e(),e._v(" "),e.finance.discountTotal?s("p",[e._v(e._s(e.$root.labels.discount_amount))]):e._e(),e._v(" "),e.finance.tax?s("p",[e._v(e._s(e.$root.labels.tax))]):e._e(),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length>0?s("p",[e._v(e._s(e.$root.labels.tax)+" (Woo)")]):e._e(),e._v(" "),e.showPaidSeparate()?e._e():s("p",[e._v(e._s(e.$root.labels.paid))]),e._v(" "),e.showPaidSeparate()?s("p",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e(),e._v(" "),e.showPaidSeparate()?s("p",[e._v(e._s(e.$root.labels.paid_remaining_amount))]):e._e(),e._v(" "),e.finance.refunded>0?s("p",[e._v(e._s(e.$root.labels.refunded))]):e._e(),e._v(" "),s("p",[e._v(e._s(e.$root.labels.due))]),e._v(" "),s("p",{staticClass:"am-payment-total"},[e._v(e._s(e.$root.labels.total))])]),e._v(" "),s("el-col",{attrs:{span:12}},[s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.bookablePriceTotal)))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.extrasPriceTotal)))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.subTotal)))]):e._e(),e._v(" "),e.finance.discountTotal?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.discountTotal>e.finance.subTotal?e.finance.subTotal:e.finance.discountTotal)))]):e._e(),e._v(" "),e.finance.tax?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.tax)))]):e._e(),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length>0?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.wcTax)))]):e._e(),e._v(" "),e.showPaidSeparate()?e._e():s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidRemaining+e.finance.paidDeposit)))]),e._v(" "),e.showPaidSeparate()?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidDeposit)))]):e._e(),e._v(" "),e.showPaidSeparate()?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.paidRemaining)))]):e._e(),e._v(" "),e.finance.refunded>0?s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.refunded)))]):e._e(),e._v(" "),s("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.due)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))]),e._v(" "),s("p",{staticClass:"am-semi-strong am-payment-total"},[e._v(e._s(e.getFormattedPrice(e.finance.total)+(e.payments[0].wcItemTaxValue&&e.finance.due>0?e.$root.labels.plus_tax:"")))])])],1)],2)]),e._v(" "),!0!==e.$root.settings.capabilities.canWriteOthers||e.dialogLoading?e._e():s("div",{staticClass:"am-dialog-footer"},[s("div",{staticClass:"am-dialog-footer-actions"},[s("transition",{attrs:{name:"slide-vertical"}},[e.showDeleteConfirmation?s("div",{staticClass:"am-dialog-confirmation"},[s("h3",[e._v(e._s(e.$root.labels.confirm_delete_payment))]),e._v(" "),s("div",{staticClass:"align-left"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),s("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deletePayment()}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)]):e._e()]),e._v(" "),s("transition",{attrs:{name:"slide-vertical"}},[e.showUpdatePaymentAmount?s("div",{staticClass:"am-dialog-confirmation"},[s("el-form",{attrs:{"label-position":"top"}},[s("h3",[e._v(e._s(e.$root.labels.enter_new_payment_amount))]),e._v(" "),s("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$root.labels.payment+":"}},[s("money",e._b({staticClass:"el-input__inner",model:{value:e.payment.amount,callback:function(t){e.$set(e.payment,"amount",t)},expression:"payment.amount"}},"money",e.moneyComponentData,!1))],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[s("el-select",{model:{value:e.payment.status,callback:function(t){e.$set(e.payment,"status",t)},expression:"payment.status"}},e._l(e.paymentStatuses,function(t){return s("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[s("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value}),e._v(" "),s("span",[e._v(e._s(t.label))])])}),1)],1)],1)],1),e._v(" "),s("div",{staticClass:"align-left"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)],1):e._e()]),e._v(" "),s("transition",{attrs:{name:"slide-vertical"}},[!e.showRefundConfirmation||e.$root.licence.isBasic||e.$root.licence.isStarter||e.$root.licence.isLite?e._e():s("div",{staticClass:"am-dialog-confirmation"},[s("h3",[e._v(e._s(e.$root.labels.confirm_refund_payment))]),e._v(" "),s("h3",[s("b",[e._v(e._s(e.$root.labels.refund_payment_amount)+" "+e._s(e.getFormattedPrice(e.refundAmount)))])]),e._v(" "),s("div",{staticClass:"align-left"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.showRefundConfirmation=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),s("el-button",{attrs:{size:"small",type:"primary",loading:e.refundBtnLoading},on:{click:function(t){return e.refundPayment()}}},[e._v("\n "+e._s(e.$root.labels.confirm)+"\n ")])],1)])]),e._v(" "),e.invoiceInDialog?s("el-row",[s("el-col",{staticClass:"align-left invoice-download",attrs:{sm:8,span:8}},[s("el-button",{attrs:{loading:e.invoiceLoading.download},on:{click:function(t){return e.downloadInvoice()}}},[e._v("\n "+e._s(e.$root.labels.download)+"\n ")])],1),e._v(" "),s("el-col",{staticClass:"align-left invoice-download-mobile",attrs:{sm:4,span:4}},[s("el-button",{staticClass:"button-export am-button-icon",on:{click:function(t){return e.downloadInvoice()}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:"Import",src:e.$root.getUrl+"public/img/import.svg"}})])],1),e._v(" "),s("el-col",{staticClass:"align-right",attrs:{sm:16,span:16}},[s("el-button",{staticClass:"am-dialog-create",attrs:{loading:e.invoiceLoading.preview},on:{click:function(t){return e.previewInvoice()}}},[e._v("\n "+e._s(e.$root.labels.preview)+"\n ")]),e._v(" "),s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.invoiceLoading.send},on:{click:function(t){return e.sendInvoice()}}},[e._v("\n "+e._s(e.$root.labels.send_invoice)+"\n ")])],1)],1):s("el-row",[1===e.payments.length?s("el-col",{staticClass:"align-left",attrs:{sm:12}},[!0===e.$root.settings.capabilities.canDelete?s("el-button",{staticClass:"am-button-icon",style:{display:"none"},on:{click:function(t){return e.showDeleteModal(e.payments[0])}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e(),e._v(" "),s("el-button",{staticClass:"am-button-icon",on:{click:function(t){return e.showUpdateModal(e.payments[0])}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]),e._v(" "),e.paymentRefundable(e.payments[0])?s("el-button",{attrs:{loading:e.refundMainBtnLoading},on:{click:function(t){return e.showRefundModal(e.payments[0])}}},[e._v("\n "+e._s(e.$root.labels.refund)+"\n ")]):e._e()],1):e._e(),e._v(" "),s("el-col",{staticClass:"align-right",attrs:{sm:e.payments.length>1?24:12}},[s("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),s("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:function(t){return e.updatePayment()}}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},880:function(e,t,s){"use strict";t.a={data:function(){return{count:{success:0,error:0}}},methods:{deleteEntities:function(e,t,s,a){var n=this;e.forEach(function(i){n.$http.post(n.$root.getAjaxUrl+"/"+n.name+"/delete/"+i).then(function(){n.deleteEntityResult(e,!0,t),s(i)}).catch(function(){n.deleteEntityResult(e,!1,t),a(i)})})},deleteEntityResult:function(e,t,s){e.pop(),t?this.count.success++:this.count.error++,0===e.length&&(this.count.success&&this.notify(this.$root.labels.success,this.count.success+" "+(this.count.success>1?this.successMessage.multiple:this.successMessage.single),"success"),this.count.error&&this.notify(this.$root.labels.error,this.count.error+" "+(this.count.error>1?this.errorMessage.multiple:this.errorMessage.single),"error"),this.count.success=0,this.count.error=0,s())}}}},905:function(e,t,s){"use strict";t.a={data:function(){return{}},methods:{handleCheckAll:function(e,t,s){var a=void 0!==s?s:t.allChecked;return e.forEach(function(e){e.checked=a}),t.allChecked=a,t.toaster=a,t},handleCheckSingle:function(e,t){var s=0;return e.forEach(function(e){e.checked&&s++}),t.allChecked=s===e.length,t.toaster=0!==s,t}}}},948:function(e,t,s){var a=s(90)(s(949),s(950),!1,null,null,null);e.exports=a.exports},949:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s(658),n=s(905),i=s(880);t.default={mixins:[a.a,n.a,i.a],props:{name:null,entities:null,checkGroupData:{toaster:!1,allChecked:!1},confirmDeleteMessage:"",successMessage:{single:"",multiple:""},errorMessage:{single:"",multiple:""}},data:function(){return{deleteGroupLoading:!1,showDeleteConfirmation:!1}},methods:{deleteSelectedEntities:function(){var e=this;this.deleteGroupLoading=!0,this.deleteEntities(this.entities.filter(function(e){return e.checked}).map(function(e){return e.id}),function(){e.showDeleteConfirmation=!1,e.deleteGroupLoading=!1,e.$emit("groupDeleteCallback")},function(e){},function(e){})}}}},950:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("transition",{attrs:{name:"slide-vertical"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.checkGroupData.toaster,expression:"checkGroupData.toaster"}],staticClass:"am-bottom-popover"},[s("transition",{attrs:{name:"fade"}},[s("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.showDeleteConfirmation,expression:"!showDeleteConfirmation"}],staticClass:"am-button-icon",on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[s("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1),e._v(" "),s("transition",{attrs:{name:"slide-vertical"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-bottom-popover-confirmation"},[s("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[s("h3",[e._v(e._s(e.confirmDeleteMessage))]),e._v(" "),s("div",{staticClass:"align-left"},[s("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),s("el-button",{attrs:{size:"small",type:"primary",loading:e.deleteGroupLoading},on:{click:e.deleteSelectedEntities}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")])],1)])],1)])],1)])},staticRenderFns:[]}}});
Save
Back