File manager - Edit - /home/premiey/www/wp-content/plugins/ameliabooking/public/js/chunks/amelia-booking-finance-794703ff4a735ec3551a.js
Back
wpJsonpAmeliaBookingPlugin([13],{1341:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(729),a=o.n(i),n=o(711),s=o.n(n),r=o(805),l=o(748),c=o(696),u=o(338),m=o(947),d=o(1342),p=o.n(d),f=o(820),h=o.n(f),v=o(809),g=o.n(v),b=o(700),y=o(702),C=o(725),w=o(978),k=o.n(w),$=o(699),x=o(791),P=o.n(x),D=o(697),S=o(736),T=o.n(S),E=o(775),F=o(741),L=o.n(F);t.default={mixins:[r.a,l.a,C.a,y.a,c.a,u.a,m.a,b.a,$.a,D.a,E.a],data:function(){return{bookingFetched:!1,paymentsFilteredCount:0,paymentsTotalCount:0,couponFetched:!1,couponsFilteredCount:0,couponsTotalCount:0,displayTotalCount:0,paymentsFiltering:!1,couponsFiltering:!1,fetchedFilteredPayments:!1,fetchedFilteredCoupons:!1,addNewCouponBtnDisplay:!1,dialogCoupon:!1,dialogPayment:!1,coupon:null,form:new s.a,checkPaymentData:{toaster:!1,allChecked:!1},checkCouponData:{toaster:!1,allChecked:!1},options:{entities:{events:[],services:[],employees:[],customers:[]},fetched:!1},dialogPaymentsExport:!1,dialogCouponsExport:!1,paymentsParams:{page:1,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.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}]},exportPaymentsAction:"",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:"",statuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending},{value:"partiallyPaid",label:this.$root.labels.partially_paid},{value:"refunded",label:this.$root.labels.refunded}],selectedPaymentModalData:{paymentId:null,bookingStart:null,bookings:null,service:null,providers:null,customer:null},filterPaymentsFields:!0,filterCouponsFields:!0,searchPlaceholder:this.$root.labels.finance_coupons_search_placeholder,financeTabs:"payments",payments:[],coupons:[],timer:null}},created:function(){s.a.defaults.axios=this.$http;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.fetchData(),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:{getPaymentsStatus:function(e){var t=[e].concat(e.secondaryPayments?Object.values(e.secondaryPayments):[]),o={extras:[],coupon:e.coupon,price:e.bookedPrice+e.bookingExtrasSum,aggregatedPrice:e.aggregatedPrice,persons:e.persons},i=this.getBookingPrice(o,!0,o.price,o.aggregatedPrice);return i+=t.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).reduce(function(e,t){return e+t.wcItemTaxValue},0),t.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0)>=i?"paid":t.filter(function(e){return"partiallyPaid"===e.status}).length>0?"partiallyPaid":"pending"},fetchData:function(){this.getPayments(),this.getCoupons()},getPayments:function(){var e=this;this.paymentsFiltering=!0,this.fetchedFilteredPayments=!1;var t=JSON.parse(JSON.stringify(this.paymentsParams)),o=[];t.dates&&(t.dates.start&&o.push(this.$moment(t.dates.start).format("YYYY-MM-DD")),t.dates.end&&o.push(this.$moment(t.dates.end).format("YYYY-MM-DD")),t.dates=o),Object.keys(t).forEach(function(e){return!t[e]&&0!==t[e]&&delete t[e]}),this.$http.get(this.$root.getAjaxUrl+"/payments",{params:this.getAppropriateUrlParams(t)}).then(function(t){var o=e.options.entities.customers.map(function(e){return e.id}),i=e.options.entities.customers,a=e;t.data.data.payments.forEach(function(e){e.checked=!1,e.fullStatus=a.getPaymentsStatus(e),-1===o.indexOf(e.customerId)&&i.push({id:e.customerId,firstName:e.customerFirstName,lastName:e.customerLastName,email:e.customerEmail})}),e.options.entities.customers=Object.values(i),e.payments=t.data.data.payments,e.paymentsFilteredCount=t.data.data.filteredCount,e.paymentsTotalCount=t.data.data.totalCount,"coupons"===e.financeTabs?e.displayTotalCount=e.couponsTotalCount:e.displayTotalCount=e.paymentsTotalCount,e.paymentsFiltering=!1,e.fetchedFilteredPayments=!0}).catch(function(t){console.log(t.message),e.paymentsFiltering=!1,e.fetchedFilteredPayments=!0})},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)}),o=e.options.entities.customers;e.searchedCustomers.forEach(function(e){-1===t.indexOf(parseInt(e.id))&&(t.push(e.id),o.push(e))}),e.options.entities.customers=Object.values(o)}),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.filterResponseData(t),e.options.entities.services=e.getServicesFromCategories(e.options.entities.categories),e.options.fetched=!0}).catch(function(t){console.log(t.message),e.options.fetched=!0})},getCoupons:function(){},getPaymentAppointment:function(e){var t=this;this.$http.get(this.$root.getAjaxUrl+"/appointments/"+e.appointmentId).then(function(o){t.selectedPaymentModalData=t.getPaymentData(e.id,o.data.data.appointment,null,null),t.selectedPaymentModalData.customer={email:e.customerEmail,firstName:e.customerFirstName,lastName:e.customerLastName},t.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(o){t.selectedPaymentModalData=t.getPaymentData(e.id,null,o.data.data.event,null),t.selectedPaymentModalData.customer={email:e.customerEmail,firstName:e.customerFirstName,lastName:e.customerLastName},t.bookingFetched=!0}).catch(function(e){console.log(e.message)})},getPackage:function(){},getCoupon:function(){},paymentGroupDeleteCallback:function(){this.checkPaymentData.allChecked=!1,this.checkPaymentData.toaster=!1,this.fetchData()},couponGroupDeleteCallback:function(){},changeRange:function(){this.setDatePickerSelectedDaysCount(this.paymentsParams.dates.start,this.paymentsParams.dates.end),this.filterPayments()},filterPayments:function(){this.getPayments()},filterCoupons:function(){},updatePaymentCallback:function(){this.dialogPayment=!1,this.fetchData()},duplicateCouponCallback:function(e){},handleResize:function(){this.filterPaymentsFields=window.innerWidth>=992,this.filterCouponsFields=window.innerWidth>=992},showDialogNewCoupon:function(){},showDialogEditCoupon:function(){},showDialogEditPayment:function(e){this.dialogPayment=!0,e.appointmentId&&this.getPaymentAppointment(e),e.eventId&&this.getEvent(e),e.packageId&&this.getPackage(e)},handleTabClick:function(e){"coupons"===e.name?(this.addNewCouponBtnDisplay=!0,this.displayTotalCount=this.couponsTotalCount):(this.addNewCouponBtnDisplay=!1,this.displayTotalCount=this.paymentsTotalCount)},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()},selectAllInCategoryCoupons:function(){},getInitCouponObject:function(){},closeDialogPayment:function(){this.dialogPayment=!1,this.bookingFetched=!1},closeDialogCoupon:function(){}},watch:{"couponsParams.search":function(){clearTimeout(this.timer),this.timer=setTimeout(this.filterCoupons,500)},dialogPayment:function(){!1===this.dialogPayment&&(this.bookingFetched=!1)},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},isPaymentsFiltering:function(){return this.paymentsFiltering&&"payments"===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:a.a,DialogCoupon:p.a,DialogPayment:h.a,DialogExport:g.a,GroupDelete:k.a,PaginationBlock:P.a,DialogNewCustomize:T.a,AmSurvey:L.a}}},1342:function(e,t,o){var i=o(335)(o(1343),o(1344),!1,null,null,null);e.exports=i.exports},1343:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(721),a=o.n(i),n=o(696),s=o(700),r=o(699),l=o(338);t.default={mixins:[n.a,s.a,r.a,l.a],props:{coupon:null,couponFetched:!1,services:null,events:null,packages:null},data:function(){var e=this,t=function(t,o,i){0===e.coupon.discount&&0===e.coupon.deduction?i(new Error(e.$root.labels.no_coupon_amount)):i()},o=function(t,o,i){0===e.coupon.serviceList.length&&0===e.coupon.eventList.length&&(e.$root.licence.isPro||e.$root.licence.isDeveloper)&&0===e.coupon.packageList.length?i(new Error(e.$root.labels.no_entities_selected)):i()};return{couponTabs:"details",allServicesSelected:!1,allEventsSelected:!1,allPackagesSelected:!1,dialogLoading:!0,rules:{code:[{required:!0,message:this.$root.labels.enter_coupon_code_warning,trigger:"submit"}],discount:[{validator:t,trigger:"submit"}],deduction:[{validator:t,trigger:"submit"}],services:[{validator:o,trigger:"submit"}],events:[{validator:o,trigger:"submit"}],packages:[{validator:o,trigger:"submit"}],limit:[{validator:function(t,o,i){e.coupon.limit<=0?i(new Error(e.$root.labels.coupon_usage_limit_validation)):i()},trigger:"submit"}]}}},mounted:function(){},created:function(){},updated:function(){this.inlineSVG()},methods:{limitChanged:function(){this.setWholeNumber(),this.coupon.limit<this.coupon.customerLimit&&(this.coupon.customerLimit=this.coupon.limit)},instantiateDialog:function(){},getParsedEntity:function(){},closeDialog:function(){},allServicesSelection:function(){},allEventsSelection:function(){this.coupon.eventList=(this.allEventsSelected=!this.allEventsSelected)?this.events:[]},allPackagesSelection:function(){},clearValidation:function(){}},watch:{couponFetched:function(){!0===this.couponFetched&&this.instantiateDialog()}},components:{DialogActions:a.a}}},1344:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():o("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==e.coupon.id}},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:18}},[0!==e.coupon.id?o("h2",[e._v(e._s(e.$root.labels.edit_coupon))]):o("h2",[e._v(e._s(e.$root.labels.new_coupon))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:6}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("el-form",{ref:"coupon",attrs:{model:e.coupon,rules:e.rules,"label-position":"top"},on:{submit:function(t){return t.preventDefault(),e.onSubmit(t)}}},[o("el-tabs",{model:{value:e.couponTabs,callback:function(t){e.couponTabs=t},expression:"couponTabs"}},[o("el-tab-pane",{attrs:{label:e.$root.labels.details,name:"details"}},[o("el-form-item",{attrs:{label:"placeholder",prop:"code"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.code)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.code_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-input",{attrs:{placeholder:e.$root.labels.code},on:{input:function(t){return e.clearValidation()}},model:{value:e.coupon.code,callback:function(t){e.$set(e.coupon,"code",t)},expression:"coupon.code"}})],1),e._v(" "),o("el-row",{attrs:{gutter:20}},[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.discount+":",prop:"discount"}},[o("el-input-number",{attrs:{min:0,max:100},on:{input:function(t){return e.clearValidation()}},model:{value:e.coupon.discount,callback:function(t){e.$set(e.coupon,"discount",t)},expression:"coupon.discount"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.deduction+" ("+e.getCurrencySymbol()+"):",prop:"deduction"}},[o("el-input-number",{attrs:{min:0},on:{input:function(t){return e.clearValidation()}},model:{value:e.coupon.deduction,callback:function(t){e.$set(e.coupon,"deduction",t)},expression:"coupon.deduction"}})],1)],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"placeholder",prop:"limit"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.usage_limit)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.usage_limit_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-input-number",{attrs:{min:0,max:1e13},on:{input:function(t){return e.clearValidation()},change:e.limitChanged},model:{value:e.coupon.limit,callback:function(t){e.$set(e.coupon,"limit",t)},expression:"coupon.limit"}})],1),e._v(" "),e.coupon.limit>=100?o("el-form-item",{attrs:{label:"placeholder",prop:"customerLimit"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.usage_customer_limit)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.usage_customer_limit_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-input-number",{attrs:{min:0,max:e.coupon.limit},on:{input:function(t){return e.clearValidation()},change:e.customerLimitChanged},model:{value:e.coupon.customerLimit,callback:function(t){e.$set(e.coupon,"customerLimit",t)},expression:"coupon.customerLimit"}})],1):e._e(),e._v(" "),e.coupon.limit<100?o("el-form-item",{attrs:{label:"placeholder"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.usage_customer_limit)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.usage_customer_limit_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-select",{model:{value:e.coupon.customerLimit,callback:function(t){e.$set(e.coupon,"customerLimit",t)},expression:"coupon.customerLimit"}},[o("el-option",{key:0,attrs:{label:e.$root.labels.unlimited,value:0}}),e._v(" "),e._l(e.coupon.limit,function(e){return o("el-option",{key:e,attrs:{label:e,value:e}})})],2)],1):e._e(),e._v(" "),o("el-form-item",{attrs:{label:"placeholder"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.expiration_date)+":\n ")]),e._v(" "),o("v-date-picker",{attrs:{clearable:"",mode:"single","popover-visibility":"focus","popover-direction":"top","show-day-popover":!1,"input-props":{class:"el-input__inner",readOnly:"readonly"},disabled:!1,"is-required":!1,formats:e.vCalendarFormats},model:{value:e.coupon.expirationDate,callback:function(t){e.$set(e.coupon,"expirationDate",t)},expression:"coupon.expirationDate"}}),e._v(" "),e.coupon.expirationDate?o("span",{staticClass:"am-v-date-picker-suffix el-input__suffix-inner",attrs:{disabled:!e.coupon.expirationDate},on:{click:function(t){e.coupon.expirationDate=null}}},[o("i",{staticClass:"el-select__caret el-input__icon el-icon-circle-close"})]):e._e()],1),e._v(" "),e.services.length>0?o("el-form-item",{attrs:{label:"placeholder",prop:"services"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.services)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.services_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-select",{attrs:{"value-key":"id",filterable:"",multiple:"",placeholder:e.$root.labels.select_service,"collapse-tags":""},on:{change:function(t){return e.clearValidation()}},model:{value:e.coupon.serviceList,callback:function(t){e.$set(e.coupon,"serviceList",t)},expression:"coupon.serviceList"}},[o("div",{staticClass:"am-drop-parent",on:{click:e.allServicesSelection}},[o("span",[e._v(e._s(e.$root.labels.select_all_services))])]),e._v(" "),e._l(e.services,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e}})})],2)],1):e._e(),e._v(" "),e.events.length>0?o("el-form-item",{attrs:{label:"placeholder",prop:"events"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.events)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.events_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-select",{attrs:{"value-key":"id",filterable:"",multiple:"",placeholder:e.$root.labels.select_event,"collapse-tags":""},on:{change:function(t){return e.clearValidation()}},model:{value:e.coupon.eventList,callback:function(t){e.$set(e.coupon,"eventList",t)},expression:"coupon.eventList"}},[o("div",{staticClass:"am-drop-parent",on:{click:e.allEventsSelection}},[o("span",[e._v(e._s(e.$root.labels.select_all_events))])]),e._v(" "),e._l(e.events,function(t){return o("el-option",{key:t.id,attrs:{label:t.name+(t.periods&&t.periods.length?" ("+e.getFrontedFormattedDate(t.periods[0].periodStart.split(" ")[0])+")":""),value:t}})})],2)],1):e._e(),e._v(" "),(e.$root.licence.isPro||e.$root.licence.isDeveloper)&&e.packages.length>0?o("el-form-item",{attrs:{label:"placeholder",prop:"packages"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.packages)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.packages_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-select",{attrs:{"value-key":"id",filterable:"",multiple:"",placeholder:e.$root.labels.select_package,"collapse-tags":""},on:{change:function(t){return e.clearValidation()}},model:{value:e.coupon.packageList,callback:function(t){e.$set(e.coupon,"packageList",t)},expression:"coupon.packageList"}},[o("div",{staticClass:"am-drop-parent",on:{click:e.allPackagesSelection}},[o("span",[e._v(e._s(e.$root.labels.select_all_packages))])]),e._v(" "),e._l(e.packages,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e}})})],2)],1):e._e()],1),e._v(" "),o("el-tab-pane",{attrs:{label:e.$root.labels.notifications,name:"notifications"}},[o("el-form-item",{attrs:{label:"placeholder",prop:"notificationInterval"}},[o("label",{attrs:{slot:"label"},slot:"label"},[e._v("\n "+e._s(e.$root.labels.send_interval)+":\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.send_interval_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-input-number",{attrs:{min:0},on:{input:function(t){return e.clearValidation()},change:function(){e.coupon.notificationInterval||(e.coupon.notificationRecurring=!1)}},model:{value:e.coupon.notificationInterval,callback:function(t){e.$set(e.coupon,"notificationInterval",t)},expression:"coupon.notificationInterval"}})],1),e._v(" "),o("div",{staticClass:"am-setting-box am-switch-box"},[o("el-row",{attrs:{type:"flex",align:"middle",gutter:24,disabled:!0}},[o("el-col",{attrs:{span:19}},[e._v("\n "+e._s(e.$root.labels.send_recurring)+"\n "),o("el-tooltip",{attrs:{placement:"top"}},[o("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.send_recurring_tooltip)},slot:"content"}),e._v(" "),o("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:5}},[o("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:!e.coupon.notificationInterval},model:{value:e.coupon.notificationRecurring,callback:function(t){e.$set(e.coupon,"notificationRecurring",t)},expression:"coupon.notificationRecurring"}})],1)],1)],1)],1)],1)],1)],1),e._v(" "),e.dialogLoading?e._e():o("dialog-actions",{attrs:{formName:"coupon",urlName:"coupons",isNew:0===e.coupon.id,entity:e.coupon,getParsedEntity:e.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:e.$root.labels.visibility_hide,no:e.$root.labels.visibility_show}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!0,haveRemove:!0===e.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!0},message:{success:{save:e.$root.labels.coupon_saved,remove:e.$root.labels.coupon_deleted,show:e.$root.labels.coupon_visible,hide:e.$root.labels.coupon_hidden},confirm:{remove:e.$root.labels.confirm_delete_coupon,show:e.$root.labels.confirm_show_coupon,hide:e.$root.labels.confirm_hide_coupon,duplicate:e.$root.labels.confirm_duplicate_coupon}}}})],1)},staticRenderFns:[]}},1345:function(e,t){e.exports={render:function(){var e=this,t=this,o=t.$createElement,i=t._self._c||o;return i("div",{staticClass:"am-wrap"},[i("div",{staticClass:"am-body",attrs:{id:"am-finance"}},[i("page-header",{attrs:{financeTotal:t.displayTotalCount,addNewCouponBtnDisplay:t.addNewCouponBtnDisplay},on:{newCouponBtnClicked:function(e){return t.showDialogNewCoupon()}}}),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.isPaymentsFiltering&&t.isCouponsFiltering,expression:"isPaymentsFiltering && isCouponsFiltering"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),i("div",{staticClass:"am-finances am-section"},[i("el-tabs",{directives:[{name:"show",rawName:"v-show",value:!t.isPaymentsFiltering||!t.isCouponsFiltering,expression:"!isPaymentsFiltering || !isCouponsFiltering"}],on:{"tab-click":t.handleTabClick},model:{value:t.financeTabs,callback:function(e){t.financeTabs=e},expression:"financeTabs"}},[i("el-tab-pane",{attrs:{label:t.$root.labels.payments,name:"payments"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments,expression:"hasPayments"}],staticClass:"am-finance-filter"},[i("el-form",{attrs:{action:t.exportPaymentsAction,method:"POST"}},[i("el-row",{attrs:{gutter:16}},[i("el-col",{staticClass:"v-calendar-column",attrs:{md:24,lg:5}},[i("el-form-item",{staticClass:"calc-width-mobile"},[i("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"}})],1)],1),t._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.filterPaymentsFields,expression:"filterPaymentsFields"}],staticClass:"am-filter-fields"},[i("el-col",{attrs:{md:6,lg:4}},[i("el-form-item",[i("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 i("el-option",{key:t,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{md:6,lg:4}},[i("el-form-item",[i("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 i("el-option",{key:e.id,attrs:{label:e.firstName+" "+e.lastName,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{md:6,lg:4}},[i("el-form-item",[i("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 i("div",{key:e.id},[i("div",{staticClass:"am-drop-parent",on:{click:function(o){return t.selectAllInCategoryFinance(e.id)}}},[i("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),i("el-col",{attrs:{md:6,lg:4}},[i("el-form-item",[i("el-select",{attrs:{multiple:"",clearable:"",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.options.entities.events,function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),t._v(" "),i("el-col",{attrs:{md:6,lg:3}},[i("el-form-item",[i("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 i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}},[i("span",[t._v(t._s(e.label))])])}),1)],1)],1)],1)]),t._v(" "),i("div",{},[i("el-button",{staticClass:"button-filter-toggle am-button-icon",attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterPaymentsFields=!t.filterPaymentsFields}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})]),t._v(" "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_payments)},slot:"content"}),t._v(" "),i("el-button",{staticClass:"button-export am-button-icon",on:{click:function(e){t.dialogPaymentsExport=!0}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:"Export",src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1)],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogPaymentsExport?i("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}}},[i("dialog-export",{attrs:{data:Object.assign(t.paymentsParams,t.exportParamsPayments),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(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.isPaymentsFiltering,expression:"isPaymentsFiltering"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.hasPayments||t.isPaymentsFiltering?t._e():i("div",{staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_payments_yet))]),t._v(" "),i("p")]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering,expression:"hasPayments && hasPaymentsFiltered && !isPaymentsFiltering"}],staticClass:"am-finance-list-head"},[i("el-row",[i("el-col",{attrs:{lg:14}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?i("el-col",{attrs:{lg:2}},[i("p",[i("el-checkbox",{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(" "),i("el-col",{attrs:{lg:6}},[i("p",[t._v(t._s(t.$root.labels.payment_date)+":")])]),t._v(" "),i("el-col",{attrs:{lg:8}},[i("p",[t._v(t._s(t.$root.labels.customer)+":")])]),t._v(" "),i("el-col",{attrs:{lg:8}},[i("p",[t._v(t._s(t.$root.labels.employee)+":")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:10}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),i("el-col",{attrs:{lg:12}},[i("p",[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")])]),t._v(" "),i("el-col",{attrs:{lg:12}},[i("p",[t._v(t._s(t.$root.labels.status)+":")])])],1)],1)],1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering,expression:"hasPayments && hasPaymentsFiltered && !isPaymentsFiltering"}],staticClass:"am-finance-list"},[i("el-collapse",t._l(t.payments,function(e,o){return 0===e.providers.length||e.providers.length&&null!==t.getProviderById(e.providers[0].id)?i("el-collapse-item",{key:e.id,staticClass:"am-finance",attrs:{name:e.id}},[i("template",{slot:"title"},[i("div",{staticClass:"am-finance-data"},[0===e.appointmentId?i("span",{staticClass:"am-entity-color am-event-color"}):i("span",{staticClass:"am-entity-color am-appointment-color"}),t._v(" "),i("el-row",[i("el-col",{attrs:{lg:14}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?i("el-col",{attrs:{lg:2,sm:1}},[i("span",{on:{click:function(e){e.stopPropagation()}}},[i("el-checkbox",{on:{change:function(e){t.checkPaymentData=t.handleCheckSingle(t.payments,t.checkPaymentData)}},model:{value:e.checked,callback:function(o){t.$set(e,"checked",o)},expression:"payment.checked"}})],1)]):t._e(),t._v(" "),i("el-col",{attrs:{lg:6,sm:6}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.payment_date)+":")]),t._v(" "),i("h4",[t._v(t._s(t.getFrontedFormattedDate(e.dateTime)))])]),t._v(" "),i("el-col",{attrs:{lg:8,sm:8}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.customer)+":")]),t._v(" "),i("h3",[t._v("\n "+t._s(e.customerFirstName+" "+e.customerLastName)+"\n ")]),t._v(" "),i("span",[t._v(t._s(e.customerEmail))])]),t._v(" "),i("el-col",{attrs:{lg:8,sm:8}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.employee)+":")]),t._v(" "),1===e.providers.length||t.$root.isLite?i("div",{staticClass:"am-assigned"},[e.providers.length>0&&null!==(t.appointmentProvider=t.getProviderById(e.providers[0].id))?i("img",{attrs:{src:t.pictureLoad(t.appointmentProvider,!0)},on:{error:function(e){return t.imageLoadError(t.appointmentProvider,!0)}}}):t._e(),t._v(" "),i("h4",[t._v(t._s(e.providers.length>0&&null!==(t.user=t.getProviderById(e.providers[0].id))?t.user.firstName+" "+t.user.lastName:""))])]):t._e(),t._v(" "),e.providers.length>1&&!t.$root.isLite?i("el-tooltip",{attrs:{placement:"top-start"}},[i("div",{staticClass:"am-all-event-employees",attrs:{slot:"content"},slot:"content"},t._l(e.providers,function(e){return i("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(" "),i("div",{staticClass:"am-assigned am-multiple-employees"},[t._l(e.providers,function(e,o){return o<=4?i("img",{key:e.id,attrs:{src:t.pictureLoad(t.getProviderById(e.id),!0)},on:{error:function(o){t.imageLoadError(t.getProviderById(e.id),!0)}}}):t._e()}),t._v(" "),o>4&&e.providers.length-5>0?i("h4",[t._v(" + "+t._s(e.providers.length-5))]):t._e()],2)]):t._e()],1)],1)],1),t._v(" "),i("el-col",{attrs:{lg:10}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),i("el-col",{staticClass:"am-payment-service",attrs:{lg:12,sm:14}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+"/"+t._s(t.$root.labels.event)+":")]),t._v(" "),e.packageId?i("img",{attrs:{src:t.$root.getUrl+"public/img/am-package-black.svg"}}):t._e(),t._v(" "),i("h4",[t._v(t._s(e.name))])]),t._v(" "),i("el-col",{staticClass:"am-finance-payment-status",attrs:{lg:6,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.status)+":")]),t._v(" "),i("div",{staticClass:"am-payment-status"},[i("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+e.fullStatus}),t._v(" "),i("h4",[t._v("\n "+t._s(t.getPaymentStatusNiceName(e.fullStatus))+"\n ")])])]),t._v(" "),i("el-col",{staticClass:"align-right",attrs:{lg:6,sm:4}},[i("div",{on:{click:function(e){e.stopPropagation()}}},[i("el-button",{on:{click:function(o){return t.showDialogEditPayment(e)}}},[t._v("\n "+t._s(t.$root.labels.details)+"\n ")])],1)])],1)],1)],1)],1)]),t._v(" "),i("div",{staticClass:"am-finance-details"},[i("el-row",[i("el-col",{attrs:{lg:14}},[i("el-row",{staticClass:"am-finance-flex-row-top-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:2,sm:1}}),t._v(" "),i("el-col",{attrs:{lg:22,sm:23}},[i("p",{staticClass:"am-data"},[t._v(t._s(0===e.appointmentId?t.$root.labels.event_date:t.$root.labels.appointment_date)+":")]),t._v(" "),i("p",{staticClass:"am-value"},[t._v(t._s(t.getFrontedFormattedDateTime(e.bookingStart)))])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:10}},[i("el-row",{staticClass:"am-finance-flex-row-top-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),i("el-col",{staticClass:"am-finance-payment-gateway",attrs:{lg:12,sm:14}},[i("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.method)+":")]),t._v(" "),i("img",{style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+e.gateway+".svg"}}),t._v(" "),"razorpay"!==e.gateway?i("p",{staticClass:"am-value"},[t._v(t._s(t.getPaymentGatewayNiceName(e)))]):t._e(),t._v(" "),t._l(e.secondaryPayments,function(e){return i("div",[i("img",{style:{width:t.getPaymentIconWidth(e.gateway)},attrs:{src:t.$root.getUrl+"public/img/payments/"+e.gateway+".svg"}}),t._v(" "),"razorpay"!==e.gateway?i("p",{staticClass:"am-value"},[t._v(t._s(t.getPaymentGatewayNiceName(e)))]):t._e()])})],2),t._v(" "),i("el-col",{attrs:{lg:12,sm:10}},[i("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.amount)+":")]),t._v(" "),i("p",{staticClass:"am-value"},[t._v(t._s(t.getFormattedPrice(e.amount)))]),t._v(" "),t._l(e.secondaryPayments,function(e){return i("div",[i("p",{staticClass:"am-value"},[t._v(t._s(t.getFormattedPrice(e.amount)))])])})],2)],1)],1)],1)],1)],2):t._e()}),1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasPayments&&!t.hasPaymentsFiltered&&!t.isPaymentsFiltering,expression:"hasPayments && !hasPaymentsFiltered && !isPaymentsFiltering"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),i("pagination-block",{attrs:{params:t.paymentsParams,count:t.paymentsFilteredCount,label:t.$root.labels.payments_lower,visible:t.hasPayments&&t.hasPaymentsFiltered&&!t.isPaymentsFiltering},on:{change:t.filterPayments}})],1),t._v(" "),t.$root.settings.payments.coupons||t.$root.isLite?i("el-tab-pane",{attrs:{label:t.$root.labels.coupons,name:"coupons"}},[i("BlockLite"),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons,expression:"hasCoupons"}],staticClass:"am-finance-filter"},[i("el-form",{attrs:{action:t.exportCouponsAction,method:"POST"}},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{md:24,lg:8}},[i("div",{staticClass:"am-search"},[i("el-form-item",[i("el-input",{staticClass:"calc-width-mobile",attrs:{placeholder:t.searchPlaceholder},model:{value:t.couponsParams.search,callback:function(e){t.$set(t.couponsParams,"search",e)},expression:"couponsParams.search"}})],1)],1)]),t._v(" "),i("transition",{attrs:{name:"fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.filterCouponsFields,expression:"filterCouponsFields"}],staticClass:"am-filter-fields"},[i("el-col",{attrs:{md:24,lg:8}},[i("el-form-item",[i("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 i("div",{key:e.id},[i("div",{staticClass:"am-drop-parent",on:{click:function(o){return t.selectAllInCategoryCoupons(e.id)}}},[i("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(e){return i("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1)],1),t._v(" "),i("el-col",{attrs:{md:24,lg:8}},[i("el-form-item",[i("el-select",{staticClass:"calc-width",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 i("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(" "),i("div",{},[i("el-button",{staticClass:"button-filter-toggle am-button-icon",attrs:{title:"Toggle Filters"},on:{click:function(e){t.filterCouponsFields=!t.filterCouponsFields}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:"Toggle Filters",src:t.$root.getUrl+"public/img/filter.svg"}})]),t._v(" "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.export_tooltip_coupons)},slot:"content"}),t._v(" "),i("el-button",{staticClass:"button-export am-button-icon",on:{click:function(e){t.dialogCouponsExport=!0}}},[i("img",{staticClass:"svg-amelia",attrs:{alt:"Export",src:t.$root.getUrl+"public/img/export.svg"}})])],1)],1)],1),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogCouponsExport?i("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}}},[i("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(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.isCouponsFiltering&&t.hasCoupons,expression:"isCouponsFiltering && hasCoupons"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}})]),t._v(" "),t.hasCoupons||t.isCouponsFiltering?t._e():i("div",{staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_coupons_yet))]),t._v(" "),i("p")]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering,expression:"hasCoupons && hasCouponsFiltered && !isCouponsFiltering"}],staticClass:"am-finance-list-head"},[i("el-row",[i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?7:8}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?i("el-col",{attrs:{lg:2}},[i("p",[i("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(" "),i("el-col",{attrs:{lg:6}},[i("p",[t._v(t._s(t.$root.labels.code)+":")])]),t._v(" "),i("el-col",{attrs:{lg:8}},[i("p",[t._v(t._s(t.$root.labels.discount)+":")])]),t._v(" "),i("el-col",{attrs:{lg:8}},[i("p",[t._v(t._s(t.$root.labels.deduction)+":")])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?17:16}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0}}),t._v(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6}},[i("p",[t._v(t._s(t.$root.labels.service)+":")])]),t._v(" "),t.$root.licence.isPro||t.$root.licence.isDeveloper?i("el-col",{attrs:{lg:4}},[i("p",[t._v(t._s(t.$root.labels.package)+":")])]):t._e(),t._v(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6}},[i("p",[t._v(t._s(t.$root.labels.event)+":")])]),t._v(" "),i("el-col",{attrs:{lg:3}},[i("p",[t._v(t._s(t.$root.labels.usage_limit)+":")])]),t._v(" "),i("el-col",{attrs:{lg:3}},[i("p",[t._v(t._s(t.$root.labels.times_used)+":")])]),t._v(" "),i("el-col",{attrs:{lg:3}},[i("p",[t._v(t._s(t.$root.labels.expiration_date)+":")])])],1)],1)],1)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering,expression:"hasCoupons && hasCouponsFiltered && !isCouponsFiltering"}],staticClass:"am-finance-list"},t._l(t.coupons,function(e){return i("div",{class:{"am-coupon-row am-hidden-entity":"hidden"===e.status,"am-coupon-row":"visible"===e.status}},[i("el-row",[i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?7:8}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[!0===t.$root.settings.capabilities.canDelete?i("el-col",{attrs:{lg:2,sm:1}},[i("span",{on:{click:function(e){e.stopPropagation()}}},[i("el-checkbox",{on:{change:function(e){t.checkCouponData=t.handleCheckSingle(t.coupons,t.checkCouponData)}},model:{value:e.checked,callback:function(o){t.$set(e,"checked",o)},expression:"coupon.checked"}})],1)]):t._e(),t._v(" "),i("el-col",{attrs:{lg:6,sm:9}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.code)+":")]),t._v(" "),i("h4",[t._v(t._s(e.code))])]),t._v(" "),i("el-col",{attrs:{lg:8,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.discount)+":")]),t._v(" "),i("h4",[t._v(t._s(e.discount))])]),t._v(" "),i("el-col",{attrs:{lg:8,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.deduction)+":")]),t._v(" "),i("h4",[t._v(t._s(t.getFormattedPrice(e.deduction)))])])],1)],1),t._v(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?17:16}},[i("el-row",{staticClass:"am-finance-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{staticClass:"hide-on-mobile",attrs:{lg:0,sm:1}}),t._v(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6,sm:9}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.service)+":")]),t._v(" "),i("h4",[t._v("\n "+t._s(e.serviceList.length>0?e.serviceList[0].name:"")+"\n "),i("br"),t._v(" "),i("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?i("el-col",{attrs:{lg:4,sm:9}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.package)+":")]),t._v(" "),i("h4",[t._v("\n "+t._s(e.packageList.length>0?e.packageList[0].name:"")+"\n "),i("br"),t._v(" "),i("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(" "),i("el-col",{attrs:{lg:t.$root.licence.isPro||t.$root.licence.isDeveloper?4:6,sm:9}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.event)+":")]),t._v(" "),i("h4",[t._v("\n "+t._s(e.eventList.length>0?e.eventList[0].name:"")+"\n "),i("br"),t._v(" "),i("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(" "),i("el-col",{attrs:{lg:3,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.usage_limit)+":")]),t._v(" "),i("h4",[t._v(t._s(e.limit))])]),t._v(" "),i("el-col",{attrs:{lg:3,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.times_used)+":")]),t._v(" "),i("h4",[t._v(t._s(e.used))])]),t._v(" "),i("el-col",{attrs:{lg:3,sm:5}},[i("p",{staticClass:"am-col-title"},[t._v(t._s(t.$root.labels.expiration_date)+":")]),t._v(" "),i("h4",[t._v(t._s(e.expirationDate?t.getFrontedFormattedDate(e.expirationDate):"/"))])]),t._v(" "),i("el-col",{staticClass:"align-right",attrs:{lg:3,sm:4}},[i("div",{on:{click:function(e){e.stopPropagation()}}},[i("el-button",{on:{click:function(o){return t.showDialogEditCoupon(e.id)}}},[t._v(t._s(t.$root.labels.edit))])],1)])],1)],1)],1)],1)}),0),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.hasCoupons&&!t.hasCouponsFiltered&&!t.isCouponsFiltering,expression:"hasCoupons && !hasCouponsFiltered && !isCouponsFiltering"}],staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:t.$root.getUrl+"public/img/emptystate.svg"}}),t._v(" "),i("h2",[t._v(t._s(t.$root.labels.no_results))])]),t._v(" "),i("pagination-block",{attrs:{params:t.couponsParams,count:t.couponsFilteredCount,label:t.$root.labels.coupons_lower,visible:t.hasCoupons&&t.hasCouponsFiltered&&!t.isCouponsFiltering},on:{change:t.filterCoupons}})],1):t._e()],1)],1),t._v(" "),i("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(" "),i("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.coupons?i("transition",{attrs:{name:"slide"}},[t.dialogCoupon?i("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}}},[i("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.fetchData,duplicateCallback:t.duplicateCouponCallback}})],1):t._e()],1):t._e(),t._v(" "),i("transition",{attrs:{name:"slide"}},[t.dialogPayment?i("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}}},[i("dialog-payment",{attrs:{modalData:t.selectedPaymentModalData,bookingFetched:t.bookingFetched},on:{updatePaymentCallback:t.updatePaymentCallback,closeDialogPayment:function(e){return t.closeDialogPayment()}}})],1):t._e()],1),t._v(" "),i("DialogLite"),t._v(" "),i("el-col",{attrs:{md:6}},[i("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/admin-finances/",target:"_blank"}},[i("i",{staticClass:"el-icon-question"}),t._v(" "+t._s(t.$root.labels.need_help)+"?\n ")])]),t._v(" "),i("dialog-new-customize"),t._v(" "),i("AmSurvey")],1)])},staticRenderFns:[]}},683:function(e,t,o){var i=o(335)(o(1341),o(1345),!1,null,null,null);e.exports=i.exports},696:function(e,t,o){"use strict";t.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{getAppropriateUrlParams:function(e){if(!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 o=[];t.extras.forEach(function(e){o.push(e.id+"-"+e.quantity)}),t.extras=o.length?o:null}e in t&&Array.isArray(t[e])&&t[e].length&&(t[e]=t[e].join(","))}),t},inlineSVG:function(){var e=o(703);e.init({svgSelector:"img.svg-amelia",initClass:"js-inlinesvg"})},inlineSVGCabinet:function(){setTimeout(function(){o(703).init({svgSelector:"img.svg-cabinet",initClass:"js-inlinesvg"})},100)},imageFromText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.getNameInitials(e),a=Math.floor(Math.random()*this.colors.length),n=this.colors[a];return this.usedColors.push(this.colors[a]),this.colors.splice(a,1),0===this.colors.length&&(this.colors=this.usedColors,this.usedColors=[]),o?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":location.protocol+"//via.placeholder.com/120/"+n+"/fff?text="+i},pictureLoad:function(e,t){if(null!==e){var o=!0===t?e.firstName+" "+e.lastName:e.name;if(void 0!==o)return e.pictureThumbPath=e.pictureThumbPath||this.imageFromText(o),e.pictureThumbPath}},imageLoadError:function(e,t){var o=!0===t?e.firstName+" "+e.lastName:e.name;void 0!==o&&(e.pictureThumbPath=this.imageFromText(o,e,!0))},getNameInitials:function(e){return e.split(" ").map(function(e){return e.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},697:function(e,t,o){"use strict";var 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={data:function(){return{}},methods:{replaceExistingObjectProperties:function(e,t){var o=this;Object.keys(e).forEach(function(a){null!==e[a]&&"object"===i(e[a])&&a in t?o.replaceExistingObjectProperties(e[a],t[a]):a in t&&(e[a]=t[a])})},addMissingObjectProperties:function(e,t){var o=this;Object.keys(t).forEach(function(a){var n=!1;a in e||("object"===i(t[a])?(e[a]={},n=!0):(e[a]=null,n=!0)),null===t[a]||"object"!==i(t[a])?n&&(e[a]=t[a]):o.addMissingObjectProperties(e[a],t[a])})},scrollView:function(e,t,o){"undefined"!=typeof jQuery&&(void 0!==o&&o||jQuery(window).width()<=600)&&setTimeout(function(){var o=document.getElementById(e);void 0!==o&&null!==o&&o.scrollIntoView({behavior:"smooth",block:t,inline:"end"})},200)},scrollViewInModal:function(e){this.$nextTick(function(){var t=document.getElementById(e),o=document.querySelectorAll(".am-dialog-scrollable");if(t&&o&&o.length){var i=t,a=t.offsetTop;do{a+=(i=i.offsetParent).offsetTop}while(i===o[0]);o[0].scrollTop=a}})},getUrlQueryParams:function(e){var t=e.indexOf("#")>0?e.substring(0,e.indexOf("#")).split("?")[1]:e.split("?")[1];if(t){var o=[],i={};return t.split("&").forEach(function(e){o=e.split("="),i[o[0]]=decodeURIComponent(o[1]).replace(/\+/g," ")}),i}},getUrlParams:function(e){var t={};if(-1!==e.indexOf("?")){var o=[];e.split("?")[1].split("&").forEach(function(e){o=e.split("="),t[o[0]]=decodeURIComponent(o[1]).replace(/\+/g," ")})}return t},removeURLParameter:function(e,t){var o=e.split("?");if(o.length>=2){for(var i=encodeURIComponent(t)+"=",a=o[1].split(/[&;]/g),n=a.length;n-- >0;)-1!==a[n].lastIndexOf(i,0)&&a.splice(n,1);return e=o[0]+(a.length>0?"?"+a.join("&"):"")}return e},capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},trimProperty:function(e,t){e[t]=e[t].trim()}}}},698:function(e,t,o){"use strict";var i=o(716),a=o(344),n=Object.prototype.toString;function s(e){return"[object Array]"===n.call(e)}function r(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===n.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||s(e)||(e=[e]),s(e))for(var o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===n.call(e)},isBuffer:a,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]"===n.call(e)},isFile:function(e){return"[object File]"===n.call(e)},isBlob:function(e){return"[object Blob]"===n.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 o(o,i){"object"==typeof t[i]&&"object"==typeof o?t[i]=e(t[i],o):t[i]=o}for(var i=0,a=arguments.length;i<a;i++)c(arguments[i],o);return t},extend:function(e,t,o){return c(t,function(t,a){e[a]=o&&"function"==typeof t?i(t,o):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},699:function(e,t,o){"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],o=this.currencies.find(function(t){return t.code===e.$root.settings.payments.currencyCode});return o&&t&&"INR"!==o.code?o.symbol_native:t&&"INR"===o.code?o.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],o=this.getPriceNumberOfDecimalPlaces(),i=this.getPriceThousandSeparator(),a=this.getPriceDecimalSeparator(),n=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(e=Math.abs(+e||0).toFixed(o))+"",l=r.length>3?r.length%3:0;return(t?n:"")+(l?r.substr(0,l)+i:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+i)+(o?a+Math.abs(e-r).toFixed(o).slice(2):"")+(t?s:"")}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(!0),suffix:this.getPriceSuffix(!0),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},700:function(e,t,o){"use strict";t.a={methods:{notify:function(e,t,o,i){var a=this;void 0===i&&(i=""),setTimeout(function(){a.$notify({customClass:i,title:e,message:t,type:o,offset:50})},700)}}}},702:function(e,t,o){"use strict";var i=o(722),a=o(715),n="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:[i.a,a.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 o=this.getProviderById(e).serviceList.find(function(e){return e.id===parseInt(t)});return o?Object.assign(this.getServiceById(t),o):null},getServiceProviders:function(e,t){var o=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 o.isEmployeeService(t.id,e.id)}).map(function(e){return e.id}).indexOf(e)})},getServiceLocations:function(e,t){var o=this,i=[];return this.options.entities.employees.filter(function(t){return-1!==t.serviceList.map(function(e){return e.id}).indexOf(e)}).forEach(function(e){i=o.getProviderLocations(e.id,t).map(function(e){return e.id}).concat(i)}),this.options.entities.locations.filter(function(e){return-1!==i.indexOf(e.id)})},getProviderLocations:function(e,t){var o=this,i=[this.getProviderById(e).locationId];if(e in this.options.entitiesRelations)for(var a in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(a)&&(i=i.concat(this.options.entitiesRelations[e][a]));return i=i.filter(function(e,t,o){return o.indexOf(e)===t}),(void 0!==t&&t?this.options.entities.locations:this.options.entities.locations.filter(function(t){return o.isEmployeeLocation(e,t.id)})).filter(function(e){return-1!==i.indexOf(e.id)})},getLocationProviders:function(e,t){var o=this,i=[];return this.options.entities.employees.forEach(function(a){-1!==(void 0!==t&&t?o.getProviderLocations(a.id).filter(function(e){return o.isEmployeeLocation(a.id,e.id)}):o.getProviderLocations(a.id)).map(function(e){return e.id}).indexOf(e)&&i.push(a.id)}),i=i.filter(function(e,t,o){return o.indexOf(e)===t}),this.options.entities.employees.filter(function(e){return-1!==i.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){return"info"in e&&e.info?Object.assign({id:"customer"in e?e.customer.id:null},JSON.parse(e.info)):"customerId"in e?this.getCustomerById(e.customerId):"customer"in e?this.getCustomerById(e.customer.id):null},isEmployeeServiceLocation:function(e,t,o){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]&&-1!==this.options.entitiesRelations[e][t].indexOf(o)},isEmployeeService:function(e,t){return e in this.options.entitiesRelations&&t in this.options.entitiesRelations[e]},isEmployeeLocation:function(e,t){var o=!1;if(e in this.options.entitiesRelations)for(var i in this.options.entitiesRelations[e])this.options.entitiesRelations[e].hasOwnProperty(i)&&-1!==this.options.entitiesRelations[e][i].indexOf(t)&&(o=!0);return o},getAvailableEntitiesIds:function(e,t){var o=this,i=[],a=[],n=[],s=null!==t.categoryId?e.categories.find(function(e){return e.id===t.categoryId}):null,r=s?s.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(!o.options.entitiesRelations.hasOwnProperty(e))return"continue";var s=parseInt(e);if(null!==t.employeeId&&t.employeeId!==s||null!==t.locationId&&!o.isEmployeeLocation(s,t.locationId)||null!==t.serviceId&&!o.isEmployeeService(s,t.serviceId)||null!==t.categoryId&&0===r.filter(function(e){return o.isEmployeeService(s,e)}).length||null!==t.categoryId&&null!==t.locationId&&0===r.filter(function(e){return o.isEmployeeServiceLocation(s,e,t.locationId)}).length||null!==t.serviceId&&null!==t.locationId&&!o.isEmployeeServiceLocation(s,t.serviceId,t.locationId))return"continue";for(var l in-1===a.indexOf(s)&&a.push(s),o.options.entitiesRelations[s])if(o.options.entitiesRelations[s].hasOwnProperty(l)){var c=parseInt(l);null!==t.serviceId&&t.serviceId!==c||null!==t.categoryId&&-1===r.indexOf(c)||null!==t.locationId&&!o.isEmployeeServiceLocation(s,c,t.locationId)||(-1===i.indexOf(c)&&i.push(c),o.options.entitiesRelations[s][c].length&&o.options.entitiesRelations[s][c].forEach(function(e){null!==t.locationId&&t.locationId!==e||-1===n.indexOf(e)&&n.push(e)}))}};for(var c in this.options.entitiesRelations)l(c);return{services:i,locations:n,employees:a,categories:e.categories.filter(function(e){return e.serviceList.map(function(e){return e.id}).filter(function(e){return-1!==i.indexOf(e)}).length>0}).map(function(e){return e.id})}},getParsedCustomPricing:function(e){return null===e.customPricing?e.customPricing={enabled:!1,durations:[]}:"object"!==n(e.customPricing)&&(e.customPricing=this.getArrayCustomPricing(e.customPricing)),e.customPricing},filterEntities:function(e,t){var o=this,i=this.getAvailableEntitiesIds(e,t);this.options.entities.employees=e.employees.filter(function(e){return-1!==i.employees.indexOf(e.id)&&e.serviceList.filter(function(e){return-1!==i.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=o.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!==i.services.indexOf(e.id)}),this.options.entities.services.forEach(function(e){e.extras.forEach(function(e){e.extraId=e.id}),e.customPricing=o.getParsedCustomPricing(e)}),this.options.entities.locations=e.locations.filter(function(e){return-1!==i.locations.indexOf(e.id)}),this.options.entities.customFields=e.customFields;var a=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 n=e.packages.filter(function(e){return"visible"===e.status}).filter(function(e){return e.bookableIds.filter(function(e){return-1!==a.indexOf(e)}).length}),s=this.options.entities.locations.map(function(e){return e.id}),r=this.options.entities.employees.map(function(e){return e.id}),l=[];if(n.forEach(function(t){var i=!1;"availableBookableInfo"in t||(t.availableBookableInfo=[]),t.bookable.forEach(function(a){var n=!1;(0===a.minimumScheduled&&a.maximumScheduled>0||a.minimumScheduled>0&&0===a.maximumScheduled||a.minimumScheduled>0&&a.maximumScheduled>0)&&(i=!0,n=!0),a.hasSlots=n;var c=a.providers.length;if(!e.locations.length||o.options.entities.locations.length){var u=a.locations.length;!c||(a.providers=a.providers.filter(function(e){return-1!==r.indexOf(e.id)&&u?a.locations.filter(function(t){return o.isEmployeeServiceLocation(e.id,a.service.id,t.id)}).length:!o.options.entities.locations.length||o.options.entities.locations.filter(function(t){return o.isEmployeeServiceLocation(e.id,a.service.id,t.id)}).length}),a.providers.length)?(u&&(a.locations=a.locations.filter(function(e){return-1!==s.indexOf(e.id)&&(c?a.providers.filter(function(t){return o.isEmployeeServiceLocation(t.id,a.service.id,e.id)}).length:o.options.entities.employees.filter(function(t){return o.isEmployeeServiceLocation(t.id,a.service.id,e.id)}).length)}),a.locations.length||l.push(t.id)),-1===t.availableBookableInfo.map(function(e){return e.serviceId}).indexOf(a.service.id)&&t.availableBookableInfo.push({serviceId:a.service.id,serviceName:o.getNameTranslated(a.service),serviceQuantity:a.quantity,providersCount:a.providers.length})):l.push(t.id)}else l.push(t.id)}),t.bookable=t.bookable.filter(function(e){return e.hasSlots}),t.hasSlots=i}),this.options.entities.packages=n.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)})}}},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:[],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,this.options.entities.customers=e.customers,this.options.entities.services=this.getServicesFromCategories(this.options.entities.categories),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:[]},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 o=t.find(function(t){return t.id===e.service.id});o&&(e.service=JSON.parse(JSON.stringify(o)))})})},fetchEntities:function(e,t){var o=this,i={params:this.getAppropriateUrlParams({types:t.types})};if(t.page?i.params.page=t.page:"isFrontEnd"in t&&t.isFrontEnd&&(i.params.page="booking"),void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(i=Object.assign(i,this.getAuthorizationHeaderObject()),Object.assign(i.params,{source:"cabinet-"+this.$store.state.cabinet.cabinetType})),t.isPanel||"calendar"===i.params.page||this.$root.hasApiCall&&!this.entitiesLoaded())this.$http.get(this.$root.getAjaxUrl+"/entities",i).then(function(i){o.options.isFrontEnd=t.isFrontEnd,window.ameliaAppointmentEntities=i.data.data;var a=JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));o.fillCachedEntities(a),o.processEntities(a),o.$root.useTranslations&&o.translateEntities(a);e(!0)}).catch(function(t){console.log(t);e(!1)});else var a=setInterval(function(){if(o.entitiesLoaded()){clearInterval(a),o.options.isFrontEnd=t.isFrontEnd;var i="ameliaEntities"in window?JSON.parse(JSON.stringify(window.ameliaEntities)):JSON.parse(JSON.stringify(window.ameliaAppointmentEntities));o.fillCachedEntities(i),o.processEntities(i),o.$root.useTranslations&&o.translateEntities(i);e(!0)}},1e3)},getFilteredEntities:function(e,t,o){var i=this,a=this.appointment&&this.appointment.id&&this.appointment[o]?this.appointment[o]: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!==i.options.availableEntitiesIds[t].indexOf(e.id)||null!==a&&a===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,o=this.visibleEmployees.filter(function(o){return o.serviceList.filter(function(i){return"visible"===i.status&&(null===t||i.maxCapacity>=t)&&(!e.appointment.serviceId||e.isEmployeeService(o.id,i.id)&&i.id===e.appointment.serviceId)&&(!e.appointment.locationId||e.isEmployeeServiceLocation(o.id,i.id,e.appointment.locationId))&&(!e.appointment.categoryId||o.serviceList.filter(function(t){return"visible"===t.status&&t.categoryId===e.appointment.categoryId}).length>0)}).length>0});return this.options.isFrontEnd?o:this.getFilteredEntities(o.map(function(e){return e.id}),"employees","providerId")},servicesFiltered:function(){var e=this,t=[];if(this.appointment.providerId){var o=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==o?o.serviceList.filter(function(e){return"visible"===e.status}).map(function(e){return e.id}):[]}var i=this.visibleServices.filter(function(o){return!(e.appointment.providerId&&-1===t.indexOf(o.id)||e.appointment.locationId&&!(e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,o.id,e.appointment.locationId)}).length>0)||e.appointment.categoryId&&o.categoryId!==e.appointment.categoryId)});return this.options.isFrontEnd?i:this.getFilteredEntities(i.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 o=this.employeesFiltered.find(function(t){return t.id===e.appointment.providerId});t=void 0!==o?o.serviceList.filter(function(e){return"visible"===e.status}):[]}var i=null;this.appointment.categoryId&&(i=this.categoriesFiltered.find(function(t){return t.id===e.appointment.categoryId}));var a=this.visibleLocations.filter(function(o){return(!e.appointment.providerId||t.filter(function(t){return e.isEmployeeServiceLocation(e.appointment.providerId,t.id,o.id)}).length>0)&&(!e.appointment.serviceId||e.employeesFiltered.filter(function(t){return e.isEmployeeServiceLocation(t.id,e.appointment.serviceId,o.id)}).length>0)&&(!e.appointment.categoryId||void 0!==i&&e.employeesFiltered.filter(function(t){return t.serviceList.filter(function(a){return"visible"===a.status&&a.categoryId===i.id&&e.isEmployeeServiceLocation(t.id,a.id,o.id)}).length>0}).length>0)});return this.options.isFrontEnd?a:this.getFilteredEntities(a.map(function(e){return e.id}),"locations","locationId")},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 o=null;this.appointment.serviceId&&(o=this.servicesFiltered.find(function(t){return t.id===e.appointment.serviceId}));var i=this.options.entities.categories.filter(function(i){return(!e.appointment.serviceId||void 0!==o&&o.categoryId===i.id)&&(!e.appointment.locationId||i.serviceList.filter(function(t){return"visible"===t.status&&e.employeesFiltered.filter(function(o){return e.isEmployeeServiceLocation(o.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(i.id))});return this.options.isFrontEnd?i:this.getFilteredEntities(i.map(function(e){return e.id}),"categories","categoryId")}}}},703:function(e,t,o){(function(o){var i,a,n,s;s=void 0!==o?o:this.window||this.global,a=[],i=function(e){var t,o={},i=!!document.querySelector&&!!e.addEventListener,a={initClass:"js-inlinesvg",svgSelector:"img.svg"},n=function(){var e={},t=!1,o=0,i=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],o++);for(var a=function(o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t&&"[object Object]"===Object.prototype.toString.call(o[i])?e[i]=n(!0,e[i],o[i]):e[i]=o[i])};i>o;o++){a(arguments[o])}return e},s=function(e){var o=document.querySelectorAll(t.svgSelector),i=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}}(o.length,e);Array.prototype.forEach.call(o,function(e,o){var a=e.src||e.getAttribute("data-src"),n=e.attributes,s=new XMLHttpRequest;s.open("GET",a,!0),s.onload=function(){if(s.status>=200&&s.status<400){var o=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(o.removeAttribute("xmlns:a"),o.removeAttribute("width"),o.removeAttribute("height"),o.removeAttribute("x"),o.removeAttribute("y"),o.removeAttribute("enable-background"),o.removeAttribute("xmlns:xlink"),o.removeAttribute("xml:space"),o.removeAttribute("version"),Array.prototype.slice.call(n).forEach(function(e){"src"!==e.name&&"alt"!==e.name&&o.setAttribute(e.name,e.value)}),o.classList?o.classList.add("inlined-svg"):o.className+=" inlined-svg",o.setAttribute("role","img"),n.longdesc){var a=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(n.longdesc.value);a.appendChild(r),o.insertBefore(a,o.firstChild)}if(n.alt){o.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(n.alt.value);l.appendChild(c),o.insertBefore(l,o.firstChild)}e.parentNode.replaceChild(o,e),i(t.svgSelector)}else console.error("There was an error retrieving the source of the SVG.")},s.onerror=function(){console.error("There was an error connecting to the origin server.")},s.send()})};return o.init=function(e,o){i&&(t=n(a,e||{}),s(o||function(){}),document.documentElement.className+=" "+t.initClass)},o}(s),void 0===(n="function"==typeof i?i.apply(t,a):i)||(e.exports=n)}).call(t,o(39))},704:function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=function(e,t){var o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"==typeof btoa){var a=(s=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),n=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[o].concat(n).concat([a]).join("\n")}var s;return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},a=0;a<this.length;a++){var n=this[a][0];"number"==typeof n&&(i[n]=!0)}for(a=0;a<e.length;a++){var s=e[a];"number"==typeof s[0]&&i[s[0]]||(o&&!s[2]?s[2]=o:o&&(s[2]="("+s[2]+") and ("+o+")"),t.push(s))}},t}},705:function(e,t,o){var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a=o(713),n={},s=i&&(document.head||document.getElementsByTagName("head")[0]),r=null,l=0,c=!1,u=function(){},m=null,d="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e){for(var t=0;t<e.length;t++){var o=e[t],i=n[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a]));i.parts.length>o.parts.length&&(i.parts.length=o.parts.length)}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(v(o.parts[a]));n[o.id]={id:o.id,refs:1,parts:s}}}}function h(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function v(e){var t,o,i=document.querySelector("style["+d+'~="'+e.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(p){var a=l++;i=r||(r=h()),t=y.bind(null,i,a,!1),o=y.bind(null,i,a,!0)}else i=h(),t=function(e,t){var o=t.css,i=t.media,a=t.sourceMap;i&&e.setAttribute("media",i);m.ssrId&&e.setAttribute(d,t.id);a&&(o+="\n/*# sourceURL="+a.sources[0]+" */",o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}.bind(null,i),o=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else o()}}e.exports=function(e,t,o,i){c=o,m=i||{};var s=a(e,t);return f(s),function(t){for(var o=[],i=0;i<s.length;i++){var r=s[i];(l=n[r.id]).refs--,o.push(l)}t?f(s=a(e,t)):s=[];for(i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete n[l.id]}}}};var g,b=(g=[],function(e,t){return g[e]=t,g.filter(Boolean).join("\n")});function y(e,t,o,i){var a=o?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,a);else{var n=document.createTextNode(a),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(n,s[t]):e.appendChild(n)}}},708:function(e,t,o){"use strict";(function(t){var i=o(698),a=o(752),n={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=o(717):void 0!==t&&(r=o(717)),r),transformRequest:[function(e,t){return a(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(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, */*"}},i.forEach(["delete","get","head"],function(e){l.headers[e]={}}),i.forEach(["post","put","patch"],function(e){l.headers[e]=i.merge(n)}),e.exports=l}).call(t,o(142))},711:function(e,t,o){"use strict";var i=function(){function e(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),a=r(o(749)),n=r(o(767)),s=r(o(768));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 n.default,["post","patch","put","delete"].forEach(function(e){t[e]=function(o,i){return t.submit(e,o,i)}})}return i(e,[{key:"submit",value:function(t,o){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.toLowerCase(),this.hasFiles(a)&&(a=(0,s.default)(a),"post"!==t&&(a.append("_method",t.toUpperCase()),t="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(n,s){e.defaults.axios[t](o,a,i.config()).then(function(e){n(e.data)}).catch(function(e){i.handleError(e),s(e)}).then(function(){return i.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 o="post";return t.hasOwnProperty("id")&&(o="patch",e=this.urlToPatchResource(e,t)),this[o](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:a.default},e.exports=l},713:function(e,t){e.exports=function(e,t){for(var o=[],i={},a=0;a<t.length;a++){var n=t[a],s=n[0],r={id:e+":"+a,css:n[1],media:n[2],sourceMap:n[3]};i[s]?i[s].parts.push(r):o.push(i[s]={id:s,parts:[r]})}return o}},715:function(e,t,o){"use strict";var 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={methods:{getArrayCustomPricing:function(e){var t=null;if(void 0===e||null===e||""===e)t={enabled:!1,durations:{}};else if("object"===(void 0===e?"undefined":i(e))){if(Array.isArray(e.durations))return e;t=JSON.parse(JSON.stringify(e))}else t=JSON.parse(e);var o=[];return Object.keys(t.durations).forEach(function(e){o.push({duration:parseInt(e),price:t.durations[e].price,rules:t.durations[e].rules})}),{enabled:t.enabled,durations:o}},getJsonCustomPricing:function(e){var t={};return e&&e.durations.filter(function(e){return e.duration}).length>0?(e.durations.forEach(function(e){t[e.duration]={price:e.price,rules:e.rules}}),JSON.stringify({enabled:e.enabled,durations:t})):JSON.stringify({enabled:!1,durations:{}})}}}},716:function(e,t,o){"use strict";e.exports=function(e,t){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return e.apply(t,o)}}},717:function(e,t,o){"use strict";var i=o(698),a=o(753),n=o(755),s=o(756),r=o(757),l=o(718),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||o(758);e.exports=function(e){return new Promise(function(t,u){var m=e.data,d=e.headers;i.isFormData(m)&&delete d["Content-Type"];var p=new XMLHttpRequest,f="onreadystatechange",h=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||r(e.url)||(p=new window.XDomainRequest,f="onload",h=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var v=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+c(v+":"+g)}if(p.open(e.method.toUpperCase(),n(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[f]=function(){if(p&&(4===p.readyState||h)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var o="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,i={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:o,config:e,request:p};a(t,u,i),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},i.isStandardBrowserEnv()){var b=o(759),y=(e.withCredentials||r(e.url))&&e.xsrfCookieName?b.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&i.forEach(d,function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete d[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===m&&(m=null),p.send(m)})}},718:function(e,t,o){"use strict";var i=o(754);e.exports=function(e,t,o,a,n){var s=new Error(e);return i(s,t,o,a,n)}},719:function(e,t,o){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},720:function(e,t,o){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},721:function(e,t,o){var i=o(335)(o(776),o(777),!1,null,null,null);e.exports=i.exports},722:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{checkTranslations:function(e,t){var o=""!==t?JSON.parse(e.translations)[t]:JSON.parse(e.translations);if(window.localeLanguage[0]in o)return o[window.localeLanguage[0]];for(var i=Object.keys(o),a=Object.keys(o).map(function(e){return e.length>2?e.slice(0,2):e}),n=window.localeLanguage[0].length>2?window.localeLanguage[0].slice(0,2):window.localeLanguage[0],s="",r=0;r<a.length;r++)if(a[r]===n){s=o[i[r]];break}return s},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:{}}},725:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{getPaymentType:function(e){return e.gateway&&"onSite"!==e.gateway?"partiallyPaid"===e.status?"deposit":"online":"onsite"},getPaymentData:function(e,t,o,i){var a={};if(a.paymentId=e,t){a.bookableType="appointment",a.bookings=t.bookings,a.bookingStart=t.bookingStart,a.bookableName=this.getServiceById(t.serviceId).name,a.bookable=this.getServiceById(t.serviceId);var n=this.getProviderById(t.providerId);n.fullName=n.firstName+" "+n.lastName,a.providers=[n],t.bookings.forEach(function(t,o){t.payments.forEach(function(i){i.id===e&&(a.customer=t.customer,a.bookingIndex=o)})})}return o&&(a.bookableType="event",a.bookings=o.bookings,a.bookingStart=o.periods[0].periodStart,a.bookableName=o.name,a.providers=o.providers,a.bookable=o,o.bookings.forEach(function(t,o){t.payments.forEach(function(i){i.id===e&&(a.customer=t.customer,a.bookingIndex=o)})})),i&&(a.bookableType="package",a.bookings=[],a.bookingStart=null,a.bookableName=i.name,a.providers=[],a.bookable=i,a.bookings=[],a.bookingIndex=0),a},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}},getPaymentGatewayNiceName:function(e){return"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){return"razorpay"===e?"76px":"mollie"===e?"38px":"16px"}}}},727:function(e,t,o){"use strict";var i=o(0),a=o.n(i);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"]}]}},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 o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.payBtnLoader=t.bookings?t.bookings[0].id:t.id;var a=JSON.parse(JSON.stringify(t));a[a.type]=t;var n=JSON.parse(JSON.stringify(this.$store.state.cabinet.profile));if(n.birthday=null,a.customer=n,"package"===a.type){var s=i||Object.keys(a.payments)[0],r=a.payments[s].payments.sort(function(e,t){return e.id>t.id?1:-1});a.paymentId=r[0].id,a.packageCustomerId=s,a.packageReservations=[],a.bookable.forEach(function(e){a.packageReservations=a.packageReservations.concat(e.service.bookedAppointments.filter(function(e){return e.bookings[0].packageCustomerService.packageCustomer.id===parseInt(s)}))}),a.booking=a.packageReservations&&a.packageReservations.length>0?a.packageReservations[0].bookings[0]:null}else a.booking=t.bookings[0],a.paymentId=t.bookings[0].payments[0].id;this.$http.post(this.$root.getAjaxUrl+"/payments/link",{data:a,paymentMethod:e}).then(function(e){o.payBtnLoader=null,!e.data.data.error&&e.data.data.paymentLink?window.open(e.data.data.paymentLink,"_blank"):o.notify(o.$root.labels.error,o.$root.labels.payment_link_error,"error")}).catch(function(e){o.payBtnLoader=null,o.notify(o.$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 o=JSON.parse(t),i=o.payments.paymentLinks?o.payments.paymentLinks:this.$root.settings.payments.paymentLinks,n="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,s="package"===e.type?e.price:e.bookings[0].price,r=!1;switch(e.type){case"package":r=!e.expireDateString||a()(e.expireDateString,"YYYY-MM-DD HH:mm:ss").isAfter(a()());break;case"appointment":r=a()(e.bookingStart,"YYYY-MM-DD HH:mm:ss").isAfter(a()())&&e.bookings[0].payments.length>0;break;case"event":r=a()(e.periods[e.periods.length-1].periodEnd,"YYYY-MM-DD HH:mm:ss").isAfter(a()())&&e.bookings[0].payments.length>0}return this.paymentMethods(o).length&&o&&i&&i.enabled&&n&&s>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&&e.mollie.enabled?t.push({value:"mollie",label:this.$root.labels.on_line}):(this.$root.settings.payments.payPal.enabled&&e.payPal.enabled&&t.push({value:"payPal",label:this.$root.labels.pay_pal}),this.$root.settings.payments.stripe.enabled&&e.stripe.enabled&&t.push({value:"stripe",label:this.$root.labels.credit_card}),this.$root.settings.payments.razorpay.enabled&&e.razorpay.enabled&&t.push({value:"razorpay",label:this.$root.labels.razorpay})),t}}}},729:function(e,t,o){var i=o(335)(o(734),o(735),!1,null,null,null);e.exports=i.exports},734:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(338);t.default={mixins:[i.a],props:["oldCustomize","appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","packagesTotal","resourcesTotal","servicesTotal","categoriesTotal","financeTotal","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")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(e){this.$emit("selectAllInCategory",e)},changeFilter:function(){this.$emit("changeFilter")}}}},735:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"am-page-header am-section"},[o("el-row",{attrs:{type:"wpamelia-calendar"===e.$router.currentRoute.name?"":"flex",align:"middle"}},[o("el-col",{attrs:{span:"wpamelia-calendar"===e.$router.currentRoute.name?6:18}},[o("div",{staticClass:"am-logo"},[o("img",{staticClass:"logo-big",attrs:{width:"92",src:e.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),e._v(" "),o("img",{staticClass:"logo-small",attrs:{width:"28",src:e.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),e._v(" "),o("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?o("span",{staticClass:"am-appointments-number approved"},[e._v("\n "+e._s(e.appointmentsApproved)+"\n ")]):e._e(),e._v(" "),e.appointmentsPending>=0?o("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?o("span",[o("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?o("span",[o("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?o("span",[o("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?o("span",[o("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?o("span",[o("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?o("span",[o("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?o("span",[o("span",{staticClass:"total-number"},[e._v(e._s(e.financeTotal))]),e._v(" "+e._s(e.$root.labels.total)+"\n ")]):e._e()])]),e._v(" "),o("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)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("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)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEvent}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_event))])]):e._e(),e._v(" "),e.$root.isLite||"wpamelia-employees"!==e.$router.currentRoute.name||!0!==e.$root.settings.capabilities.canWrite||!0!==e.$root.settings.capabilities.canWriteOthers?e._e():o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogEmployee}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_employee))])]),e._v(" "),"wpamelia-customers"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomer}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_customer))])]):e._e(),e._v(" "),o("el-popover",e._b({ref:"addLocationPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),o("div",{directives:[{name:"popover",rawName:"v-popover:addLocationPop",arg:"addLocationPop"}]},["wpamelia-locations"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary",disabled:e.$root.isLite},on:{click:e.showDialogLocation}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_location))])]):e._e()],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.categoriesTotal>0&&!0===e.$root.settings.capabilities.canWrite&&"services"===e.bookableType?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogService}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_service))])]):e._e(),e._v(" "),o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"popover",rawName:"v-popover:addPackagePop",arg:"addPackagePop"}]},[o("el-popover",e._b({ref:"addPackagePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&e.packagesTotal>=0&&!0===e.$root.settings.capabilities.canWrite&&"packages"===e.bookableType?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:e.showDialogPackage}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_package))])]):e._e()],1)]),e._v(" "),o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"popover",rawName:"v-popover:addResourcePop",arg:"addResourcePop"}]},[o("el-popover",e._b({ref:"addResourcePop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),"wpamelia-services"===e.$router.currentRoute.name&&!0===e.$root.settings.capabilities.canWrite&&"resources"===e.bookableType?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:function(t){return e.showDialogResource()}}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.add_resource))])]):e._e()],1)]),e._v(" "),o("transition",{attrs:{name:"fade"}},[o("div",{directives:[{name:"popover",rawName:"v-popover:addCouponPop",arg:"addCouponPop"}]},[o("el-popover",e._b({ref:"addCouponPop",attrs:{disabled:!e.$root.isLite}},"el-popover",e.$root.popLiteProps,!1),[o("PopLite")],1),e._v(" "),"wpamelia-finance"===e.$router.currentRoute.name&&e.addNewCouponBtnDisplay&&!0===e.$root.settings.capabilities.canWrite?o("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":e.$root.isLite},attrs:{type:"primary"},on:{click:e.showDialogCoupon}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.new_coupon))])]):e._e()],1)]),e._v(" "),o("transition",{attrs:{name:"fade"}},["wpamelia-cf"===e.$router.currentRoute.name&&e.addNewCustomFieldBtnDisplay?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogCustomFields}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("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?o("div",{staticClass:"v-calendar-column"},[o("div",{staticClass:"el-form-item__content"},[o("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?o("div",{staticClass:"am-calendar-header-filters"},[o("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[o("el-form-item",{attrs:{label:e.$root.labels.services+":"}},[o("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 o("div",{key:t.id},[o("div",{staticClass:"am-drop-parent",on:{click:function(o){return e.selectAllInCategory(t.id)}}},[o("span",[e._v(e._s(t.name))])]),e._v(" "),e._l(t.serviceList,function(e){return o("el-option",{key:e.id,staticClass:"am-drop-child",attrs:{label:e.name,value:e.id}})})],2)}),0)],1),e._v(" "),o("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.locations.length,expression:"locations.length"}],attrs:{label:e.$root.labels.locations+":"}},[o("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 o("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)?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showDialogAppointment}},[o("i",{staticClass:"el-icon-plus"}),e._v(" "),o("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?o("div",{staticClass:"am-calendar-header-filters"},[o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:e.showMainCustomize}},[o("span",{staticClass:"button-text"},[e._v(e._s(e.$root.labels.go_back))])])],1):e._e()],1)],1)],1)},staticRenderFns:[]}},736:function(e,t,o){var i=o(335)(o(739),o(740),!1,function(e){o(737)},null,null);e.exports=i.exports},737:function(e,t,o){var i=o(738);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);o(705)("12c8ac4e",i,!0,{})},738:function(e,t,o){(e.exports=o(704)(!1)).push([e.i,".am-dialog-new-customize__content-img{margin-bottom:12px}.am-dialog-new-customize__content-img img{display:inline-block;width:100%;border-radius:6px}.am-dialog-new-customize__content-heading{font-family:Amelia Roboto,sans-serif;font-size:15px;font-weight:400;line-height:1.6;color:#1a2c37;word-break:break-word;margin:0 0 16px}.am-dialog-new-customize__content-list{margin-bottom:20px}.am-dialog-new-customize__content-list__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin:0 0 16px}.am-dialog-new-customize__content-list__item span{font-size:15px;font-weight:600;color:#1a2c37;margin:0 0 0 12px}.am-dialog-new-customize__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.am-dialog-new-customize__footer .el-button.el-button--primary{width:100%;border-radius:8px;margin-bottom:8px}.am-dialog-new-customize__footer .el-button.el-button--primary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500}.am-dialog-new-customize__footer .el-button.el-button--secondary{max-width:100px;border-radius:8px;border:none;background-color:#fff;margin:0}.am-dialog-new-customize__footer .el-button.el-button--secondary span{font-family:Amelia Roboto,sans-serif;font-size:14px;font-weight:500;color:#1a2c37}.am-dialog-new-customize .el-dialog{max-width:500px;width:100%;background-color:#fff;border-radius:8px;padding:24px;-webkit-box-sizing:border-box;box-sizing:border-box}.am-dialog-new-customize .el-dialog__body,.am-dialog-new-customize .el-dialog__footer,.am-dialog-new-customize .el-dialog__header{padding:0}.am-dialog-new-customize .el-dialog__header h1{font-family:Amelia Roboto,sans-serif;font-size:28px;font-weight:700;line-height:1.2857;color:#1a2c37;margin:0 0 16px}",""])},739:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"DialogNewCustomize",props:{customizePage:{type:Boolean,default:!1}},data:function(){return{dialogNewCustomize:!0}},created:function(){this.dialogNewCustomize=this.$root.settings.activation.showAmeliaPromoCustomizePopup},methods:{goToCustomize:function(){this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(e){window.location.href="admin.php?page=wpamelia-customize-new¤t=cbf"}).catch(function(e){})},closeDialog:function(){var e=this;this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaPromoCustomizePopup:!1}}).then(function(t){e.dialogNewCustomize=!1}).catch(function(t){e.dialogNewCustomize=!1})}}}},740:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return!e.dialogNewCustomize||"admin"!==e.$root.settings.role&&"manager"!==e.$root.settings.role?e._e():o("el-dialog",{staticClass:"am-dialog-new-customize",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:e.dialogNewCustomize},on:{"update:visible":function(t){e.dialogNewCustomize=t}},scopedSlots:e._u([{key:"title",fn:function(){return[o("h1",[e._v("\n "+e._s(e.$root.labels.customize_dialog_heading)+"\n ")])]},proxy:!0},{key:"default",fn:function(){return[o("div",{staticClass:"am-dialog-new-customize__content"},[o("div",{staticClass:"am-dialog-new-customize__content-img"},[o("img",{attrs:{src:e.$root.getUrl+"v3/src/assets/img/admin/customize/amelia-cat-2-0.png",alt:e.$root.labels.customize_dialog_heading}})]),e._v(" "),o("div",{staticClass:"am-dialog-new-customize__content-heading",domProps:{innerHTML:e._s(e.$root.labels.customize_dialog_sub_heading)}}),e._v(" "),o("div",{staticClass:"am-dialog-new-customize__content-description"})])]},proxy:!0},{key:"footer",fn:function(){return[o("div",{staticClass:"am-dialog-new-customize__footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.goToCustomize}},[e.customizePage?e._e():[e._v("\n "+e._s(e.$root.labels.customize_dialog_go_to)+"\n ")],e._v(" "),e.customizePage?[e._v("\n "+e._s(e.$root.labels.customize_dialog_check)+"\n ")]:e._e()],2),e._v(" "),o("el-button",{attrs:{type:"secondary"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.customize_dialog_close)+"\n ")])],1)]},proxy:!0}],null,!1,1990058167)})},staticRenderFns:[]}},741:function(e,t,o){var i=o(335)(o(744),o(745),!1,function(e){o(742)},null,null);e.exports=i.exports},742:function(e,t,o){var i=o(743);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);o(705)("279425cc",i,!0,{})},743:function(e,t,o){(e.exports=o(704)(!1)).push([e.i,".am-survey__btn{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;bottom:32px;right:104px;width:56px;height:56px;border-radius:50%;background:#1a2c37;background:linear-gradient(330deg,#1a2c37,#1a2c37 47%,#60addd 54%,#1a2c37 61%,#1a2c37);background-size:300%;-webkit-animation:am-survey-animation 4s infinite;animation:am-survey-animation 4s infinite;z-index:1000;-webkit-box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12);box-shadow:0 8px 8px 0 rgba(0,0,0,.24),0 0 8px 0 rgba(0,0,0,.12)}.am-survey__btn:hover{-webkit-animation:unset;animation:unset;background:#1a2c37}.am-survey__dialog .el-dialog{max-width:484px;width:100%;border-radius:8px}.am-survey__dialog .el-dialog__header{padding:20px 24px 24px}.am-survey__dialog .el-dialog__body{padding:0 24px 24px}.am-survey__dialog-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.am-survey__dialog-header__text{font-size:18px;font-weight:600;line-height:1.55556;color:#1a2c37}.am-survey__dialog-header__btn{font-size:15px;font-weight:500;line-height:1.6;color:#808a90;cursor:pointer}.am-survey__dialog-img{width:100%;margin-bottom:16px}.am-survey__dialog-img img{width:100%}.am-survey__dialog-text div{font-size:18px;font-weight:500;line-height:1.55556;color:#1a2c37;margin-bottom:4px}.am-survey__dialog-text span{display:block;font-size:15px;font-weight:500;line-height:1.6;color:#1a2c37;word-break:break-word}@-webkit-keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}@keyframes am-survey-animation{0%{-webkit-transform:scale(1);transform:scale(1);background-position:100% 0}15%{-webkit-transform:scale(1.05);transform:scale(1.05)}20%{background-position:-20% 0}30%{-webkit-transform:scale(1);transform:scale(1)}to{background-position:-20% 0}}",""])},744:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"AmSurvey",data:function(){return{dialogSurvey:!1,surveyVisibility:!0}},created:function(){this.surveyVisibility=this.$root.settings.activation.showAmeliaSurvey},methods:{closeForever:function(){var e=this;this.dialogSurvey=!1,this.$http.post(this.$root.getAjaxUrl+"/settings",{activation:{showAmeliaSurvey:!1}}).then(function(t){e.surveyVisibility=!1}).catch(function(e){})},maybeLater:function(){this.dialogSurvey=!1},goToSurvey:function(){this.dialogSurvey=!1,window.open("https://www.surveymonkey.com/r/VJQDLVX","_blank")},openSurvey:function(){this.dialogSurvey=!0}}}},745:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.surveyVisibility&&"admin"===e.$root.settings.role?o("div",{staticClass:"am-survey__wrapper"},[o("el-dialog",{staticClass:"am-survey__dialog",attrs:{"show-close":!1,"close-on-click-modal":!1,"append-to-body":!0,visible:e.dialogSurvey},on:{"update:visible":function(t){e.dialogSurvey=t}},scopedSlots:e._u([{key:"title",fn:function(){return[o("div",{staticClass:"am-survey__dialog-header"},[o("span",{staticClass:"am-survey__dialog-header__text"},[e._v("\n "+e._s(e.$root.labels.survey_heading)+"\n ")]),e._v(" "),o("span",{staticClass:"am-survey__dialog-header__btn",on:{click:e.closeForever}},[e._v("\n "+e._s(e.$root.labels.survey_close)+"\n ")])])]},proxy:!0},{key:"default",fn:function(){return[o("div",{staticClass:"am-survey__dialog-content"},[o("div",{staticClass:"am-survey__dialog-img"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/survey/am-survey.png",alt:e.$root.labels.survey_heading}})]),e._v(" "),o("div",{staticClass:"am-survey__dialog-text",domProps:{innerHTML:e._s(e.$root.labels.survey_content)}})])]},proxy:!0},{key:"footer",fn:function(){return[o("div",{staticClass:"am-survey__dialog-footer"},[o("el-button",{attrs:{type:"secondary"},on:{click:e.maybeLater}},[e._v("\n "+e._s(e.$root.labels.survey_maybe)+"\n ")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.goToSurvey}},[e._v("\n "+e._s(e.$root.labels.survey_sure)+"\n ")])],1)]},proxy:!0}],null,!1,3092811696)}),e._v(" "),o("div",{staticClass:"am-survey__btn",on:{click:e.openSurvey}},[o("img",{attrs:{src:e.$root.getUrl+"public/img/survey/am-clipboard.svg"}})])],1):e._e()},staticRenderFns:[]}},746:function(e,t,o){"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){})}}}},748:function(e,t,o){"use strict";t.a={data:function(){return{searchCounter:0,loadingCustomers:!1,searchCustomersTimer:null,searchedCustomers:[],dialogCustomer:!1}},methods:{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;"customer"!==this.$root.settings.role&&this.searchCustomers("",function(){var t=e.options.entities.customers.map(function(e){return parseInt(e.id)}),o=e.options.entities.customers;e.searchedCustomers.forEach(function(e){-1===t.indexOf(parseInt(e.id))&&(t.push(e.id),o.push(e))}),e.options.entities.customers=Object.values(o.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1}))})},searchCustomers:function(e,t){var o=this;clearTimeout(this.searchCustomersTimer),this.loadingCustomers=!0,this.searchCounter++,this.searchCustomersTimer=setTimeout(function(){var i=o.searchCounter;o.$http.get(o.$root.getAjaxUrl+"/users/customers",{params:{search:e,page:1,limit:o.$root.settings.general.customersFilterLimit,skipCount:1}}).then(function(e){i>=o.searchCounter&&(o.searchedCustomers=e.data.data.users.sort(function(e,t){return e.firstName.toLowerCase()>t.firstName.toLowerCase()?1:-1})),o.loadingCustomers=!1,t()}).catch(function(e){o.loadingCustomers=!1})},500)}}}},749:function(e,t,o){e.exports=o(750)},750:function(e,t,o){"use strict";var i=o(698),a=o(716),n=o(751),s=o(708);function r(e){var t=new n(e),o=a(n.prototype.request,t);return i.extend(o,n.prototype,t),i.extend(o,t),o}var l=r(s);l.Axios=n,l.create=function(e){return r(i.merge(s,e))},l.Cancel=o(720),l.CancelToken=o(765),l.isCancel=o(719),l.all=function(e){return Promise.all(e)},l.spread=o(766),e.exports=l,e.exports.default=l},751:function(e,t,o){"use strict";var i=o(708),a=o(698),n=o(760),s=o(761),r=o(763),l=o(764);function c(e){this.defaults=e,this.interceptors={request:new n,response:new n}}c.prototype.request=function(e){"string"==typeof e&&(e=a.merge({url:arguments[0]},arguments[1])),(e=a.merge(i,this.defaults,{method:"get"},e)).method=e.method.toLowerCase(),e.baseURL&&!r(e.url)&&(e.url=l(e.baseURL,e.url));var t=[s,void 0],o=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;)o=o.then(t.shift(),t.shift());return o},a.forEach(["delete","get","head","options"],function(e){c.prototype[e]=function(t,o){return this.request(a.merge(o||{},{method:e,url:t}))}}),a.forEach(["post","put","patch"],function(e){c.prototype[e]=function(t,o,i){return this.request(a.merge(i||{},{method:e,url:t,data:o}))}}),e.exports=c},752:function(e,t,o){"use strict";var i=o(698);e.exports=function(e,t){i.forEach(e,function(o,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=o,delete e[i])})}},753:function(e,t,o){"use strict";var i=o(718);e.exports=function(e,t,o){var a=o.config.validateStatus;o.status&&a&&!a(o.status)?t(i("Request failed with status code "+o.status,o.config,null,o.request,o)):e(o)}},754:function(e,t,o){"use strict";e.exports=function(e,t,o,i,a){return e.config=t,o&&(e.code=o),e.request=i,e.response=a,e}},755:function(e,t,o){"use strict";var i=o(698);function a(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,o){if(!t)return e;var n;if(o)n=o(t);else if(i.isURLSearchParams(t))n=t.toString();else{var s=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)&&(t+="[]"),i.isArray(e)||(e=[e]),i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(a(t)+"="+a(e))}))}),n=s.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}},756:function(e,t,o){"use strict";var i=o(698);e.exports=function(e){var t,o,a,n={};return e?(i.forEach(e.split("\n"),function(e){a=e.indexOf(":"),t=i.trim(e.substr(0,a)).toLowerCase(),o=i.trim(e.substr(a+1)),t&&(n[t]=n[t]?n[t]+", "+o:o)}),n):n}},757:function(e,t,o){"use strict";var i=o(698);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");function a(e){var i=e;return t&&(o.setAttribute("href",i),i=o.href),o.setAttribute("href",i),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}return e=a(window.location.href),function(t){var o=i.isString(t)?a(t):t;return o.protocol===e.protocol&&o.host===e.host}}():function(){return!0}},758:function(e,t,o){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function a(){this.message="String contains an invalid character"}a.prototype=new Error,a.prototype.code=5,a.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,o,n=String(e),s="",r=0,l=i;n.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&t>>8-r%1*8)){if((o=n.charCodeAt(r+=.75))>255)throw new a;t=t<<8|o}return s}},759:function(e,t,o){"use strict";var i=o(698);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,o,a,n,s){var r=[];r.push(e+"="+encodeURIComponent(t)),i.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),i.isString(a)&&r.push("path="+a),i.isString(n)&&r.push("domain="+n),!0===s&&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(){}}},760:function(e,t,o){"use strict";var i=o(698);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=a},761:function(e,t,o){"use strict";var i=o(698),a=o(762),n=o(719),s=o(708);function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=a(t.data,t.headers,e.transformResponse),t},function(t){return n(t)||(r(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},762:function(e,t,o){"use strict";var i=o(698);e.exports=function(e,t,o){return i.forEach(o,function(o){e=o(e,t)}),e}},763:function(e,t,o){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},764:function(e,t,o){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},765:function(e,t,o){"use strict";var i=o(720);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var o=this;e(function(e){o.reason||(o.reason=new i(e),t(o.reason))})}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a(function(t){e=t}),cancel:e}},e.exports=a},766:function(e,t,o){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},767:function(e,t,o){"use strict";var i,a=function(){function e(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),n=o(12),s=(i=n)&&i.__esModule?i:{default:i};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 a(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?s.default.delete(this.errors,e):this.errors={}}},{key:"any",value:function(){return Object.keys(this.errors).length>0}}]),e}()},768:function(e,t,o){"use strict";function i(e){return void 0===e}function a(e){return Array.isArray(e)}function n(e){return e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.slice}e.exports=function e(t,o,s,r){if(o instanceof FormData&&(r=s,s=o,o=null),(o=o||{}).indices=!i(o.indices)&&o.indices,o.nulls=!!i(o.nulls)||o.nulls,s=s||new FormData,i(t))return s;if(function(e){return null===e}(t))o.nulls&&s.append(r,"");else if(a(t))if(t.length)t.forEach(function(t,i){var a=r+"["+(o.indices?i:"")+"]";e(t,o,s,a)});else{var l=r+"[]";s.append(l,"")}else!function(e){return e instanceof Date}(t)?!function(e){return e===Object(e)}(t)||function(e){return n(e)&&("object"==typeof e.lastModifiedDate||"number"==typeof e.lastModified)&&"string"==typeof e.name}(t)||n(t)?s.append(r,t):Object.keys(t).forEach(function(i){var n=t[i];if(a(n))for(;i.length>2&&i.lastIndexOf("[]")===i.length-2;)i=i.substring(0,i.length-2);e(n,o,s,r?r+"["+i+"]":i)}):s.append(r,t.toISOString());return s}},769:function(e,t,o){var i;i=function(){return function(e){function t(i){if(o[i])return o[i].exports;var a=o[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,i){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=".",t(t.s=9)}([function(e,t,o){"use strict";t.a={prefix:"",suffix:"",thousands:",",decimal:".",precision:2}},function(e,t,o){"use strict";var i=o(2),a=o(5),n=o(0);t.a=function(e,t){if(t.value){var s=o.i(a.a)(n.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=o.i(i.a)(e.value,s),t=Math.max(t,s.suffix.length),t=e.value.length-t,t=Math.max(t,s.prefix.length+1),o.i(i.b)(e,t),e.dispatchEvent(o.i(i.c)("change"))},e.onfocus=function(){o.i(i.b)(e,e.value.length-s.suffix.length)},e.oninput(),e.dispatchEvent(o.i(i.c)("input"))}}},function(e,t,o){"use strict";function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.a;"number"==typeof e&&(e=e.toFixed(s(t.precision)));var o=e.indexOf("-")>=0?"-":"",i=l(r(n(e),t.precision)).split("."),a=i[0],c=i[1];return a=function(e,t){return e.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+t)}(a,t.thousands),t.prefix+o+function(e,t,o){return t?e+o+t:e}(a,c,t.decimal)+t.suffix}function a(e,t){var o=e.indexOf("-")>=0?-1:1,i=r(n(e),t);return parseFloat(i)*o}function n(e){return l(e).replace(/\D+/g,"")||"0"}function s(e){return function(e,t,o){return Math.max(e,Math.min(t,o))}(0,e,20)}function r(e,t){var o=Math.pow(10,t);return(parseFloat(e)/o).toFixed(s(t))}function l(e){return e?e.toString():""}function c(e,t){var o=function(){e.setSelectionRange(t,t)};e===document.activeElement&&(o(),setTimeout(o,1))}function u(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var m=o(0);o.d(t,"a",function(){return i}),o.d(t,"d",function(){return a}),o.d(t,"b",function(){return c}),o.d(t,"c",function(){return u})},function(e,t,o){"use strict";function i(e,t){t&&Object.keys(t).map(function(e){r.a[e]=t[e]}),e.directive("money",s.a),e.component("money",n.a)}Object.defineProperty(t,"__esModule",{value:!0});var a=o(6),n=o.n(a),s=o(1),r=o(0);o.d(t,"Money",function(){return n.a}),o.d(t,"VMoney",function(){return s.a}),o.d(t,"options",function(){return r.a}),o.d(t,"VERSION",function(){return l});var l="0.8.1";t.default=i,"undefined"!=typeof window&&window.Vue&&window.Vue.use(i)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=o(0),n=o(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 a.a.precision}},decimal:{type:String,default:function(){return a.a.decimal}},thousands:{type:String,default:function(){return a.a.thousands}},prefix:{type:String,default:function(){return a.a.prefix}},suffix:{type:String,default:function(){return a.a.suffix}}},directives:{money:i.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(e,t){var i=o.i(n.a)(e,this.$props);i!==this.formattedValue&&(this.formattedValue=i)}}},methods:{change:function(e){this.$emit("input",this.masked?e.target.value:o.i(n.d)(e.target.value,this.precision))}}}},function(e,t,o){"use strict";t.a=function(e,t){return e=e||{},t=t||{},Object.keys(e).concat(Object.keys(t)).reduce(function(o,i){return o[i]=void 0===t[i]?e[i]:t[i],o},{})}},function(e,t,o){var i=o(7)(o(4),o(8),null,null);e.exports=i.exports},function(e,t){e.exports=function(e,t,o,i){var a,n=e=e||{},s=typeof e.default;"object"!==s&&"function"!==s||(a=e,n=e.default);var r="function"==typeof n?n.options:n;if(t&&(r.render=t.render,r.staticRenderFns=t.staticRenderFns),o&&(r._scopeId=o),i){var l=r.computed||(r.computed={});Object.keys(i).forEach(function(e){var t=i[e];l[e]=function(){return t}})}return{esModule:a,exports:n,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,o){e.exports=o(3)}])},e.exports=i()},775:function(e,t,o){"use strict";t.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)},getBookingServicePrice:function(e,t){return e.customPricing.enabled&&t.duration&&e.customPricing.durations.filter(function(e){return e.duration===t.duration}).length?e.customPricing.durations.find(function(e){return e.duration===t.duration}).price:e.price},getAppointmentPrice:function(e,t,o,i){var a=0,n=this,s=parseInt(e)!==parseInt(t.id);return o.forEach(function(e){var o=(null===e.duration?t.duration:e.duration)!==t.duration,r=n.getBookingServicePrice(t,e);e.payments.length>0?["approved","pending"].includes(e.status)&&(a+=n.getBookingPrice(e,s,s||o?r:e.price,e.aggregatedPrice)):i||(a+=n.getBookingPrice(e,!0,r,t.aggregatedPrice))}),this.getFormattedPrice(a>=0?a:0,!this.$root.settings.payments.hideCurrencySymbolFrontend)},getBookingPrice:function(e,t,o,i){var a=0;e.extras.forEach(function(t){if(void 0===t.selected||!0===t.selected){var o=null===t.aggregatedPrice?i:t.aggregatedPrice;a+=t.price*t.quantity*(o?e.persons:1)}});var n=(t?o:e.price)*(i?e.persons:1)+a,s=n/100*(e.coupon?e.coupon.discount:0)+(e.coupon?e.coupon.deduction:0);return s>n?0:n-s},getPackagePrice:function(e){var t=e.bookings[0].packageCustomerService.packageCustomer.coupon,o=e.bookings[0].packageCustomerService.packageCustomer.price,i=o/100*(t?t.discount:0)+(t?t.deduction:0);return i>o?0:o-i}}}},776:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(711),a=o.n(i),n=o(700),s=o(338),r=o(727),l=o(746);t.default={mixins:[n.a,s.a,r.a,l.a],props:{formName:"",urlName:null,isNew:null,entity:null,getParsedEntity:null,updateStash:!1,haveSaveConfirmation:null,hasApplyGloballyVisibility:!1,hasApplyGloballyDeletion:!1,loadSaveButton:!1,calendarConflict:{enable:!1},getCalendarEvents:null,hasIcons:!0,status:null,buttonType:{status:"primary",remove:"danger"},action:{haveAdd:!1,haveEdit:!1,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,ignoreDeleteEffect:!1,haveDuplicate:!1,haveSaveWarning:!1},message:{success:{save:null,remove:null,show:null,hide:null},confirm:{remove:null,show:null,hide:null,duplicate:null,save:null,saveDetails:null}},buttonText:null},data:function(){return{form:new a.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,showAddHoursDialog:!1,confirmCalendarConflict:!1,deleteEffectMessage:null,dialogLoading:!1}},created:function(){a.a.defaults.axios=this.$http},methods:{getButtonType:function(e){switch(e){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"duplicate":return this.hasIcons?null:this.buttonType.duplicate}},closeDialog:function(){this.$parent.$emit("closeDialog")},onSubmit:function(e){var t=this,o=this.$root;this.$parent.$refs[this.formName].validate(function(i,a){if(!i)return"appointment"===t.formName&&t.handleDialogTabChange(a,"bookings."),"service"===t.formName&&t.handleDialogTabChange(a,"duration"),t.$emit("validationFailCallback"),!1;t.calendarConflict&&t.calendarConflict.enabled?(t.handleSaveConfirmation(),e&&(t.$emit("confirmCalendarConflict"),t.confirmCalendarConflict=!0,t.handleSaveClick(e))):(t.dialogLoading=!0,t.isNew?t.addEntity(e):t.editEntity(e)),t.$root=o})},onSuccess:function(e,t,o){var i=this;this.$parent.$emit("saveCallback",o),setTimeout(function(){i.dialogLoading=!1,i.$parent.$emit("closeDialog")},300),this.notify(e,t,"success")},onError:function(e,t){this.dialogLoading=!1,this.$emit("errorCallback",t)},addEntity:function(e){var t=this,o=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(o=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(e),o).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data)})},editEntity:function(e){var t=this,o=null;void 0!==this.$store&&void 0!==this.$store.state.cabinet&&"provider"===this.$store.state.cabinet.cabinetType&&(o=Object.assign(this.getAuthorizationHeaderObject(),{params:{source:"cabinet-"+this.$store.state.cabinet.cabinetType}})),this.$http.post(this.$root.getAjaxUrl+"/"+this.urlName+"/"+this.entity.id,this.getParsedEntity(e),o).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.save,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data)})},deleteEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.remove,e.data.data),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},showEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:e}).then(function(e){t.onSuccess(t.$root.labels.success,t.message.success.show,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},hideEntity:function(e){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:e}).then(function(){t.onSuccess(t.$root.labels.success,t.message.success.hide,null),t.updateStash&&t.updateStashEntities({})}).catch(function(e){e.response&&t.onError("",e.response.data.data.message)})},duplicateEntity:function(){var e=this;this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity),setTimeout(function(){e.showDuplicateConfirmation=!1,e.dialogLoading=!1},600)},handleSaveConfirmation:function(){this.showSaveConfirmation=!this.showSaveConfirmation,this.showVisibilityConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDuplicateConfirmation:function(){this.showDuplicateConfirmation=!this.showDuplicateConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showVisibilityConfirmation=!1},handleVisibilityConfirmation:function(){this.showVisibilityConfirmation=!this.showVisibilityConfirmation,this.showSaveConfirmation=!1,this.showDeleteConfirmation=!1,this.showDuplicateConfirmation=!1},handleDeleteConfirmation:function(){var e=this;this.showVisibilityConfirmation=!1,this.showDuplicateConfirmation=!1,this.showSaveConfirmation=!1,this.action.haveRemoveEffect?!1===this.showDeleteConfirmation&&this.$http.get(this.$root.getAjaxUrl+"/"+this.urlName+"/effect/"+this.entity.id).then(function(t){e.allowedDelete=t.data.data.valid||e.ignoreDeleteEffect,e.deleteEffectMessage=t.data.data.message,e.showDeleteConfirmation=!e.showDeleteConfirmation}).catch(function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){var e=this;this.getCalendarEvents&&!this.confirmCalendarConflict?this.getCalendarEvents().then(function(){e.haveSaveConfirmation&&e.haveSaveConfirmation()?e.handleSaveConfirmation():e.onSubmit(!1)}):this.haveSaveConfirmation&&this.haveSaveConfirmation()?this.handleSaveConfirmation():this.onSubmit(!1)},getConfirmSaveButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.save?{yes:this.buttonText.confirm.save.yes,no:this.buttonText.confirm.save.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmDeleteButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.remove?{yes:this.buttonText.confirm.remove.yes,no:this.buttonText.confirm.remove.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getConfirmStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.confirm&&this.buttonText.confirm.status?{yes:this.buttonText.confirm.status.yes,no:this.buttonText.confirm.status.no}:{yes:this.$root.labels.yes,no:this.$root.labels.no}},getActionStatusButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.status:""},getActionRemoveButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.remove:""},getActionDuplicateButtonText:function(){return null!==this.buttonText&&this.buttonText.action?this.buttonText.action.duplicate:""},handleDialogTabChange:function(e,t){for(var o=Object.keys(e),i=0,a=0;a<o.length;a++)i=o[a].startsWith(t)?i+1:i;i===o.length&&this.$emit("validationTabFailCallback")},isStatusOn:function(){return this.entity.status===this.status.on},isStatusOff:function(){return this.entity.status===this.status.off}},computed:{},components:{}}},777:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"am-dialog-footer"},[o("div",{staticClass:"am-dialog-footer-actions"},[o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[o("h3",{directives:[{name:"show",rawName:"v-show",value:e.allowedDelete,expression:"allowedDelete"}]},[e._v("\n "+e._s(e.message.confirm.remove)+"\n ")]),e._v(" "),e.action.haveRemoveEffect&&e.deleteEffectMessage?o("el-alert",{attrs:{title:"",type:"warning",description:e.deleteEffectMessage,"show-icon":"",closable:!1}}):e._e(),e._v(" "),e.hasApplyGloballyDeletion?o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().no)+"\n ")]),e._v(" "),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmDeleteButtonText().yes)+"\n ")])],1):o("div",{staticClass:"align-left"},[e.allowedDelete?o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.deleteEntity(!1)}}},[e._v("\n "+e._s(e.$root.labels.delete)+"\n ")]):e._e(),e._v(" "),e.allowedDelete?e._e():o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation}}},[e._v("\n "+e._s(e.$root.labels.close)+"\n ")])],1)],1)]),e._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[e.status?o("div",{directives:[{name:"show",rawName:"v-show",value:e.showVisibilityConfirmation,expression:"showVisibilityConfirmation"}],staticClass:"am-dialog-confirmation"},[e.isStatusOn()?o("h3",[e._v(e._s(e.message.confirm.hide))]):e.isStatusOff()?o("h3",[e._v(e._s(e.message.confirm.show))]):e._e(),e._v(" "),e.hasApplyGloballyVisibility?o("div",{staticClass:"align-left"},[e.isStatusOn()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOn()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().no)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!0)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e()],1):o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showVisibilityConfirmation=!e.showVisibilityConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.isStatusOn()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.hideEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e(),e._v(" "),e.isStatusOff()?o("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.showEntity(!1)}}},[e._v("\n "+e._s(e.getConfirmStatusButtonText().yes)+"\n ")]):e._e()],1)]):e._e()]),e._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showDuplicateConfirmation,expression:"showDuplicateConfirmation"}],staticClass:"am-dialog-confirmation"},[o("h3",[e._v(e._s(e.message.confirm.duplicate))]),e._v(" "),o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDuplicateConfirmation=!e.showDuplicateConfirmation}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.duplicateEntity}},[e._v("\n "+e._s(e.$root.labels.duplicate)+"\n ")])],1)])]),e._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showSaveConfirmation,expression:"showSaveConfirmation"}],staticClass:"am-dialog-confirmation"},[e.buttonText?o("h3",[e._v(e._s(e.message.confirm.save)+"\n "),e.message.confirm.saveDetails?o("span",[e._v(e._s(e.message.confirm.saveDetails))]):e._e()]):e._e(),e._v(" "),e.buttonText?o("div",{staticClass:"align-left"},[o("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!1)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().no)+"\n ")]),e._v(" "),o("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.onSubmit(!0)}}},[e._v("\n "+e._s(e.getConfirmSaveButtonText().yes)+"\n ")])],1):e._e(),e._v(" "),e.action.haveSaveWarning?o("el-alert",{staticStyle:{"word-break":"break-word"},attrs:{title:"",type:"warning",description:e.message.confirm.save,"show-icon":"",closable:!1}}):e._e()],1)]),e._v(" "),e.isNew?o("el-row",[o("el-col",{staticClass:"align-right",attrs:{sm:24}},[o("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),e.action.haveAdd&&e.action.haveEdit?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1):o("el-row",[o("el-col",{staticClass:"align-left",attrs:{sm:16}},[e.action.haveDuplicate?o("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("duplicate")},on:{click:e.handleDuplicateConfirmation}},[e.hasIcons?o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.duplicate,src:e.$root.getUrl+"public/img/copy.svg"}}):o("span",[e._v(e._s(e.getActionDuplicateButtonText()))])]):e._e(),e._v(" "),e.action.haveStatus?o("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("status")},on:{click:e.handleVisibilityConfirmation}},[e.hasIcons?o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.hide,src:e.$root.getUrl+(e.isStatusOff()?"public/img/unhide.svg":"public/img/hide.svg")}}):o("span",[e._v("\n "+e._s(e.getActionStatusButtonText())+"\n ")])]):e._e(),e._v(" "),e.action.haveRemove?o("el-button",{class:{"am-button-icon":e.hasIcons,"am-dialog-create":!e.hasIcons},attrs:{type:e.getButtonType("remove")},on:{click:e.handleDeleteConfirmation}},[e.hasIcons?o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}}):o("span",[e._v("\n "+e._s(e.getActionRemoveButtonText())+"\n ")])]):e._e()],1),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{sm:!1===e.action.haveRemove&&!1===e.action.haveStatus&&!1===e.action.haveDuplicate?24:8}},[e.action.haveAdd&&e.action.haveEdit?o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary",loading:e.loadSaveButton},on:{click:e.handleSaveClick}},[e._v("\n "+e._s(e.$root.labels.save)+"\n ")]):e._e()],1)],1)],1)]),e._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])])])},staticRenderFns:[]}},791:function(e,t,o){var i=o(335)(o(793),o(794),!1,null,null,null);e.exports=i.exports},793:function(e,t,o){"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}}}},794:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[o("el-row",[o("el-col",{attrs:{sm:8}},[o("p",[e._v(e._s(e.paginationMessage))])]),e._v(" "),o("el-col",{attrs:{sm:16}},[o("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:[]}},805:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{filterResponseData:function(){this.options.entities.employees.length&&(this.options.entities.employees[0].locationId=null,this.options.entities.employees[0].serviceList.forEach(function(e){e.maxCapacity=1,e.minCapacity=1,e.timeAfter="",e.timeBefore=""}))},setInitialEmployee:function(e){var t=this;e.length||this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(e){var o=null;(o=e.data.data.user?{email:e.data.data.user.email,firstName:e.data.data.user.firstName,lastName:e.data.data.user.lastName,phone:e.data.data.user.phone||""}:{firstName:"firstname",lastName:"lastname",email:"example@example.com"}).type="provider",o.weekDayList=t.getSettingsSchedule(),t.form.post(t.$root.getAjaxUrl+"/users/providers",o).then(function(e){t.options.employees=[e.data.user]}).catch()}).catch()}}}},809:function(e,t,o){var i=o(335)(o(810),o(811),!1,null,null,null);e.exports=i.exports},810:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(696),a=o(338);t.default={mixins:[i.a,a.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(){},mounted:function(){},methods:{changeFields:function(){},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){}},components:{}}},811:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{staticClass:"am-dialog-scrollable"},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:14}},[o("h2",[e._v(e._s(e.$root.labels.export))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:10}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("BlockLite"),e._v(" "),o("el-form",{class:{"am-lite-container-disabled":e.$root.isLite},attrs:{"label-position":"top"}},[o("el-form-item",{attrs:{label:e.$root.labels.csv_delimiter+":"}},[o("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 o("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),e.hasSeparateBookingOption?o("el-form-item",{attrs:{label:e.$root.labels["select_rows_settings"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")]+":"}},[o("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"}},[o("el-option",{attrs:{label:this.$root.labels["exported_same_row"+(e.action===e.$root.getAjaxUrl+"/report/event/attendees"?"_event":"")],value:!1}}),e._v(" "),o("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[o("el-checkbox",{attrs:{checked:"",label:t.label,border:""},on:{change:e.changeFields},model:{value:t.checked,callback:function(o){e.$set(t,"checked",o)},expression:"field.checked"}})]})],2)],1),e._v(" "),o("div",{staticClass:"am-dialog-footer",class:{"am-lite-container-disabled":e.$root.isLite}},[o("div",{staticClass:"am-dialog-footer-actions"},[o("el-row",[o("el-col",{staticClass:"align-right",attrs:{sm:24}},[o("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary","native-type":"submit"},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},820:function(e,t,o){var i=o(335)(o(821),o(822),!1,null,null,null);e.exports=i.exports},821:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(711),a=o.n(i),n=o(769),s=(o.n(n),o(338)),r=o(696),l=o(700),c=o(699),u=o(725);t.default={mixins:[r.a,s.a,l.a,c.a,u.a],props:{modalData:null,bookingFetched:!1},data:function(){return{booking:{},dialogLoading:!0,finance:{bookablePriceTotal:0,extrasPriceTotal:0,discountTotal:0,subTotal:0,due:0},form:new a.a,payment:{},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:[]}},created:function(){a.a.defaults.axios=this.$http,this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var e=this;setTimeout(function(){e.inlineSVG()},5)})},methods:{showUpdateModal:function(e){this.showUpdatePaymentAmount=!this.showUpdatePaymentAmount,this.showDeleteConfirmation=!1,this.payment=e},getTicketsData:function(){var e=this,t=[];return"bookable"in this.modalData&&this.modalData.bookable&&this.modalData.bookings.forEach(function(o){o.payments.forEach(function(i){i.id===e.modalData.paymentId&&o.ticketsData.forEach(function(o){var i=e.modalData.bookable.customTickets.find(function(e){return e.id===o.eventTicketId});i&&t.push({name:i.name,persons:o.persons})})})}),t},instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){this.payments=JSON.parse(JSON.stringify(this.modalData.bookings[this.modalData.bookingIndex].payments)),this.payments.sort(function(e,t){return new Date(e.dateTime)-new Date(t.dateTime)});var e=this;e.modalData.bookings.forEach(function(t){if(e.booking=t,e.finance.extrasPriceTotal=0,t.extras.forEach(function(o){e.finance.extrasPriceTotal+=o.price*o.quantity*(o.aggregatedPrice?t.persons:1)}),t.ticketsData&&t.ticketsData.length){var o=0;t.ticketsData.forEach(function(e){o+=e.price*(t.aggregatedPrice?e.persons:1)}),e.finance.bookablePriceTotal=o}else e.finance.bookablePriceTotal=t.price*(t.aggregatedPrice?t.persons:1);e.finance.subTotal=e.finance.bookablePriceTotal+e.finance.extrasPriceTotal,e.finance.discountTotal=e.finance.subTotal/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0),e.finance.total=e.finance.subTotal;var i=0;t.payments.forEach(function(t){e.payment=t,t.packageCustomerId&&(e.finance.discountTotal=e.finance.subTotal/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0)),e.finance.discountTotal+=t.wcOrderId?t.wcItemCouponValue:0,e.finance.total+=t.wcOrderId?t.wcItemTaxValue:0,i+=t.amount}),e.finance.total-=e.finance.discountTotal,e.finance.due=e.finance.total-i>0?e.finance.total-i:0,e.finance.total=e.finance.total>=0?e.finance.total:0})},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(e){var t="";return this.paymentStatuses.forEach(function(o){o.value===e&&(t=o.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("updatePaymentCallback",e.payment.id),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.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.dialogLoading=!1}).catch(function(t){e.dialogLoading=!1,e.errorMessage=t.message})},getPaymentGatewayNiceName:function(e){return"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:n.Money}}},822:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("div",{directives:[{name:"show",rawName:"v-show",value:e.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[o("div",{staticClass:"am-dialog-loader-content"},[o("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}}),e._v(" "),o("p",[e._v(e._s(e.$root.labels.loader_message))])])]),e._v(" "),e.dialogLoading?e._e():o("div",{staticClass:"am-dialog-scrollable"},[o("div",{staticClass:"am-dialog-header"},[o("el-row",[o("el-col",{attrs:{span:18}},[o("h2",[e._v(e._s(e.$root.labels.payment_details))])]),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{span:6}},[o("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:e.closeDialog}})],1)],1)],1),e._v(" "),o("div",{staticClass:"am-payment-details"},[o("el-row",{staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels.customer))]),e._v(" "),o("el-col",{attrs:{span:24}},[o("h3",[e._v(e._s(e.modalData.customer?e.modalData.customer.firstName+" "+e.modalData.customer.lastName:""))]),e._v(" "),o("p",[e._v(e._s(e.modalData.customer?e.modalData.customer.email:""))])])],1),e._v(" "),e._l(e.payments,function(t,i){return o("el-row",{key:t.id,staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels.payment)+" #"+e._s(i+1))]),e._v(" "),e.payments.length>1?o("el-button",{staticClass:"am-button-icon",staticStyle:{position:"absolute",right:"10px",top:"10px"},on:{click:function(o){return e.showUpdateModal(t)}}},[o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]):e._e(),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels.date))]),e._v(" "),o("p",[e._v(e._s(e.$root.labels.payment_method))]),e._v(" "),t.wcOrderId?o("p",[e._v(e._s(e.$root.labels.wc_order)+":")]):e._e(),e._v(" "),o("p",[e._v(e._s(e.$root.labels.status))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDate(t.dateTime)))]),e._v(" "),o("p",{staticClass:"am-semi-strong"},[o("img",{staticClass:"svg-amelia",style:{width:e.getPaymentIconWidth(t.gateway)},attrs:{src:e.$root.getUrl+"public/img/payments/"+t.gateway+".svg"}}),e._v(" "),"razorpay"!==t.gateway?o("span",[e._v(e._s(e.getPaymentGatewayNiceName(t)))]):e._e()]),e._v(" "),t.wcOrderId?o("p",[o("a",{attrs:{href:t.wcOrderUrl,target:"_blank"}},[e._v("\n #"+e._s(t.wcOrderId)+"\n ")])]):e._e(),e._v(" "),o("div",{staticClass:"am-payment-status"},[o("span",{class:"am-payment-status-symbol am-payment-status-symbol-"+t.status}),e._v(" "),o("p",{staticClass:"am-semi-strong"},[o("span",[e._v(e._s(e.getPaymentStatusNiceName(t.status)))])])])])],1)}),e._v(" "),o("el-row",{staticClass:"am-payment-details-row"},[o("h4",[e._v(e._s(e.$root.labels[e.modalData.bookableType+"_info"]))]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels[e.modalData.bookableType]))]),e._v(" "),"package"!==e.modalData.bookableType?o("p",[e._v(e._s(e.$root.labels.date))]):e._e(),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?o("p",[e._v(e._s(e.$root.labels.employee))]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?o("p",[e._v(e._s(e.$root.labels.event_tickets))]):e._e()]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.modalData.bookableName))]),e._v(" "),"package"!==e.modalData.bookableType?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFrontedFormattedDateTime(e.modalData.bookingStart)))]):e._e(),e._v(" "),e.modalData.providers.length&&"appointment"===e.modalData.bookableType?o("p",{staticClass:"am-semi-strong"},[o("img",{staticClass:"am-employee-photo",attrs:{src:e.pictureLoad(e.modalData.providers[0],!0)},on:{error:function(t){return e.imageLoadError(e.modalData.providers[0].id,!0)}}}),e._v("\n "+e._s(e.modalData.providers.length?e.modalData.providers[0].fullName:"")+"\n ")]):e._e(),e._v(" "),"event"===e.modalData.bookableType&&e.getTicketsData().length?o("p",{staticClass:"am-semi-strong",staticStyle:{"white-space":"unset"}},e._l(e.getTicketsData(),function(t){return o("span",{staticClass:"am-attendees-plus"},[e._v("\n "+e._s(t.persons)+" x "+e._s(t.name)+"\n ")])}),0):e._e()])],1),e._v(" "),o("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[o("el-col",{attrs:{span:12}},[o("p",[e._v(e._s(e.$root.labels[("appointment"===e.modalData.bookableType?"service":"event"===e.modalData.bookableType?"event":"package")+"_price"]))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?o("p",[e._v(e._s(e.$root.labels.extras))]):e._e(),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?o("p",[e._v(e._s(e.$root.labels.subtotal))]):e._e(),e._v(" "),o("p",[e._v(e._s(e.$root.labels.discount_amount))]),e._v(" "),e.payments.filter(function(e){return e.wcOrderId&&e.wcItemTaxValue}).length?o("p",[e._v(e._s(e.$root.labels.tax))]):e._e(),e._v(" "),1===e.payments.length?o("p",[e._v(e._s(e.$root.labels.paid))]):e._e(),e._v(" "),e.payments.length>1?o("p",[e._v(e._s(e.$root.labels.paid_deposit))]):e._e(),e._v(" "),e.payments.length>1?o("p",[e._v(e._s(e.$root.labels.paid_remaining_amount))]):e._e(),e._v(" "),o("p",[e._v(e._s(e.$root.labels.due))]),e._v(" "),o("p",{staticClass:"am-payment-total"},[e._v(e._s(e.$root.labels.total))])]),e._v(" "),o("el-col",{attrs:{span:12}},[o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.bookablePriceTotal)))]),e._v(" "),"package"!==e.modalData.bookableType&&"event"!==e.modalData.bookableType?o("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?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.subTotal)))]):e._e(),e._v(" "),o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.finance.discountTotal>e.finance.subTotal?e.finance.subTotal:e.finance.discountTotal)))]),e._v(" "),e.payment.wcOrderId&&e.payment.wcItemTaxValue?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.reduce(function(e,t){return e+t.wcItemTaxValue},0))))]):e._e(),e._v(" "),1===e.payments.length?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"pending"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),e.payments.length>1?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"partiallyPaid"===e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),e.payments.length>1?o("p",{staticClass:"am-semi-strong"},[e._v(e._s(e.getFormattedPrice(e.payments.filter(function(e){return"partiallyPaid"!==e.status}).reduce(function(e,t){return e+t.amount},0))))]):e._e(),e._v(" "),o("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(" "),o("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():o("div",{staticClass:"am-dialog-footer"},[o("div",{staticClass:"am-dialog-footer-actions"},[o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[o("h3",[e._v(e._s(e.$root.labels.confirm_delete_payment))]),e._v(" "),o("div",{staticClass:"align-left"},[o("el-button",{attrs:{size:"small"},on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showDeleteConfirmation=!1}}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("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._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showUpdatePaymentAmount,expression:"showUpdatePaymentAmount"}],staticClass:"am-dialog-confirmation"},[o("el-form",{attrs:{"label-position":"top"}},[o("h3",[e._v(e._s(e.$root.labels.enter_new_payment_amount))]),e._v(" "),o("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.payment+":"}},[o("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(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:e.$root.labels.status+":"}},[o("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 o("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[o("span",{class:"am-appointment-status-symbol am-appointment-status-symbol-"+t.value}),e._v(" "),o("span",[e._v(e._s(t.label))])])}),1)],1)],1)],1),e._v(" "),o("div",{staticClass:"align-left"},[o("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._v(" "),o("el-row",[o("el-col",{staticClass:"align-left",attrs:{sm:6}},[!0===e.$root.settings.capabilities.canDelete?o("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showDeleteConfirmation=!e.showDeleteConfirmation,e.showUpdatePaymentAmount=!1}}},[o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})]):e._e(),e._v(" "),1===e.payments.length?o("el-button",{staticClass:"am-button-icon",on:{click:function(t){e.showUpdatePaymentAmount=!e.showUpdatePaymentAmount,e.showDeleteConfirmation=!1}}},[o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.edit,src:e.$root.getUrl+"public/img/edit.svg"}})]):e._e()],1),e._v(" "),o("el-col",{staticClass:"align-right",attrs:{sm:18}},[o("el-button",{attrs:{type:""},on:{click:e.closeDialog}},[e._v("\n "+e._s(e.$root.labels.cancel)+"\n ")]),e._v(" "),o("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:[]}},946:function(e,t,o){"use strict";t.a={data:function(){return{count:{success:0,error:0}}},methods:{deleteEntities:function(e,t,o,i){var a=this;e.forEach(function(n){a.$http.post(a.$root.getAjaxUrl+"/"+a.name+"/delete/"+n).then(function(){a.deleteEntityResult(e,!0,t),o(n)}).catch(function(){a.deleteEntityResult(e,!1,t),i(n)})})},deleteEntityResult:function(e,t,o){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,o())}}}},947:function(e,t,o){"use strict";t.a={data:function(){return{}},methods:{handleCheckAll:function(e,t,o){var i=void 0!==o?o:t.allChecked;return e.forEach(function(e){e.checked=i}),t.allChecked=i,t.toaster=i,t},handleCheckSingle:function(e,t){var o=0;return e.forEach(function(e){e.checked&&o++}),t.allChecked=o===e.length,t.toaster=0!==o,t}}}},978:function(e,t,o){var i=o(335)(o(979),o(980),!1,null,null,null);e.exports=i.exports},979:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o(700),a=o(947),n=o(946);t.default={mixins:[i.a,a.a,n.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){})}}}},980:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.checkGroupData.toaster,expression:"checkGroupData.toaster"}],staticClass:"am-bottom-popover"},[o("transition",{attrs:{name:"fade"}},[o("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}}},[o("img",{staticClass:"svg-amelia",attrs:{alt:e.$root.labels.delete,src:e.$root.getUrl+"public/img/delete.svg"}})])],1),e._v(" "),o("transition",{attrs:{name:"slide-vertical"}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-bottom-popover-confirmation"},[o("el-row",{attrs:{type:"flex",justify:"start",align:"middle"}},[o("h3",[e._v(e._s(e.confirmDeleteMessage))]),e._v(" "),o("div",{staticClass:"align-left"},[o("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(" "),o("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:[]}}});
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings