webpackJsonp([3],{654:function(t,e,a){var i=a(325)(a(795),a(802),!1,null,null,null);t.exports=i.exports},673:function(t,e,a){"use strict";var i=a(680),o=a(331),n=Object.prototype.toString;function s(t){return"[object Array]"===n.call(t)}function r(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===n.call(t)}function c(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||s(t)||(t=[t]),s(t))for(var a=0,i=t.length;a0?e+"d ":"")+(a>0?a+"h ":"")+(i>0?i+"m ":"")}},computed:{momentTimeFormat:function(){var t=this;return"G \\h i \\m\\i\\n"===this.$root.settings.wordpress.timeFormat?"HH:mm":this.$root.settings.wordpress.timeFormat.replace(this.formatEx,function(e){return t.formatPHPtoMomentMap[e]})},momentDateFormat:function(){var t=this;return this.$root.settings.wordpress.dateFormat.replace(this.formatEx,function(e){return t.formatPHPtoMomentMap[e]})},vCalendarFormats:function(){return{input:[this.momentDateFormat,"YYYY-MM-DD","YYYY/MM/DD"]}},timePickerFormat:function(){return"HH:mm"}}}},675:function(t,e,a){"use strict";e.a={data:function(){return{colors:["1788FB","4BBEC6","FBC22D","FA3C52","D696B8","689BCA","26CC2B","FD7E35","E38587","774DFB","31CDF3","6AB76C","FD5FA1","A697C5"],usedColors:[]}},methods:{inlineSVG:function(){var t=a(685);t.init({svgSelector:"img.svg",initClass:"js-inlinesvg"})},imageFromText:function(t){var e=this.getNameInitials(t),a=Math.floor(Math.random()*this.colors.length),i=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=[]),location.protocol+"//via.placeholder.com/120/"+i+"/fff?text="+e},pictureLoad:function(t,e){if(null!==t){var a=!0===e?t.firstName+" "+t.lastName:t.name;if(void 0!==a)return t.pictureThumbPath=t.pictureThumbPath||this.imageFromText(a),t.pictureThumbPath}},imageLoadError:function(t,e){var a=!0===e?t.firstName+" "+t.lastName:t.name;void 0!==a&&(t.pictureThumbPath=this.imageFromText(a))},getNameInitials:function(t){return t.split(" ").map(function(t){return t.charAt(0)}).join("").toUpperCase().substring(0,3).replace(/[^\w\s]/g,"")}}}},676:function(t,e,a){"use strict";e.a={methods:{notify:function(t,e,a){var i=this;setTimeout(function(){i.$notify({title:t,message:e,type:a,offset:50})},700)}}}},677:function(t,e,a){"use strict";(function(e){var i=a(673),o=a(697),n={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var r,l={adapter:("undefined"!=typeof XMLHttpRequest?r=a(681):void 0!==e&&(r=a(681)),r),transformRequest:[function(t,e){return o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){l.headers[t]={}}),i.forEach(["post","put","patch"],function(t){l.headers[t]=i.merge(n)}),t.exports=l}).call(e,a(136))},678:function(t,e,a){"use strict";e.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:"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:"CL$",name:"Chilean Peso",symbol_native:"$",code:"CLP",iso:"cl"},{symbol:"CN¥",name:"Chinese Yuan",symbol_native:"CN¥",code:"CNY",iso:"cn"},{symbol:"CO$",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:"Dkr",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:"Ikr",name:"Icelandic Króna",symbol_native:"kr",code:"ISK",iso:"is"},{symbol:"Rs",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:"din.",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:"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 t=this;return this.currencies.find(function(e){return e.code===t.$root.settings.payments.currency}).symbol},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(){return"after"===this.$root.settings.payments.priceSymbolPosition||"afterWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"before"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol():this.getCurrencySymbol()+" "},getPriceSuffix:function(){return"before"===this.$root.settings.payments.priceSymbolPosition||"beforeWithSpace"===this.$root.settings.payments.priceSymbolPosition?"":"after"===this.$root.settings.payments.priceSymbolPosition?this.getCurrencySymbol():" "+this.getCurrencySymbol()},getFormattedPrice:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this.getPriceNumberOfDecimalPlaces(),i=this.getPriceThousandSeparator(),o=this.getPriceDecimalSeparator(),n=this.getPricePrefix(),s=this.getPriceSuffix(),r=parseInt(t=Math.abs(+t||0).toFixed(a))+"",l=r.length>3?r.length%3:0;return(e?n:"")+(l?r.substr(0,l)+i:"")+r.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+i)+(a?o+Math.abs(t-r).toFixed(a).slice(2):"")+(e?s:"")}},computed:{moneyComponentData:function(){return{decimal:this.getPriceDecimalSeparator(),thousands:this.getPriceThousandSeparator(),prefix:this.getPricePrefix(),suffix:this.getPriceSuffix(),precision:this.getPriceNumberOfDecimalPlaces(),masked:!1}}}}},679:function(t,e,a){"use strict";var i=function(){function t(t,e){for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};return e=e.toLowerCase(),this.hasFiles(o)&&(o=(0,s.default)(o),"post"!==e&&(o.append("_method",e.toUpperCase()),e="post")),this.progress=0,this.errors.clear(),this.isPending=!0,new Promise(function(n,s){t.defaults.axios[e](a,o,i.config()).then(function(t){n(t.data)}).catch(function(t){i.handleError(t),s(t)}).then(function(){return i.isPending=!1})})}},{key:"hasFiles",value:function(t){for(var e in t)if(this.fileIsPresent(t[e]))return!0;return!1}},{key:"fileIsPresent",value:function(t){return t instanceof File||t instanceof Array&&t.some(function(t){return t instanceof File})}},{key:"save",value:function(t,e){var a="post";return e.hasOwnProperty("id")&&(a="patch",t=this.urlToPatchResource(t,e)),this[a](t,e)}},{key:"urlToPatchResource",value:function(t,e){return t.replace(/\/+$/,"")+"/"+e.id}},{key:"config",value:function(){var t=this;return{onUploadProgress:function(e){t.progress=Math.round(100*e.loaded/e.total)}}}},{key:"handleError",value:function(t){if(t.response&&422===t.response.status){var e=t.response.data.hasOwnProperty("errors")?t.response.data.errors:t.response.data;this.errors.set(e)}}}]),t}();l.defaults={axios:o.default},t.exports=l},680:function(t,e,a){"use strict";t.exports=function(t,e){return function(){for(var a=new Array(arguments.length),i=0;ia;a++){o(arguments[a])}return t},s=function(t){var a=document.querySelectorAll(e.svgSelector),i=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}}(a.length,t);Array.prototype.forEach.call(a,function(t,a){var o=t.src||t.getAttribute("data-src"),n=t.attributes,s=new XMLHttpRequest;s.open("GET",o,!0),s.onload=function(){if(s.status>=200&&s.status<400){var a=(new DOMParser).parseFromString(s.responseText,"text/xml").getElementsByTagName("svg")[0];if(a.removeAttribute("xmlns:a"),a.removeAttribute("width"),a.removeAttribute("height"),a.removeAttribute("x"),a.removeAttribute("y"),a.removeAttribute("enable-background"),a.removeAttribute("xmlns:xlink"),a.removeAttribute("xml:space"),a.removeAttribute("version"),Array.prototype.slice.call(n).forEach(function(t){"src"!==t.name&&"alt"!==t.name&&a.setAttribute(t.name,t.value)}),a.classList?a.classList.add("inlined-svg"):a.className+=" inlined-svg",a.setAttribute("role","img"),n.longdesc){var o=document.createElementNS("http://www.w3.org/2000/svg","desc"),r=document.createTextNode(n.longdesc.value);o.appendChild(r),a.insertBefore(o,a.firstChild)}if(n.alt){a.setAttribute("aria-labelledby","title");var l=document.createElementNS("http://www.w3.org/2000/svg","title"),c=document.createTextNode(n.alt.value);l.appendChild(c),a.insertBefore(l,a.firstChild)}t.parentNode.replaceChild(a,t),i(e.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 a.init=function(t,a){i&&(e=n(o,t||{}),s(a||function(){}),document.documentElement.className+=" "+e.initClass)},a}(s),void 0===(n="function"==typeof i?i.apply(e,o):i)||(t.exports=n)}).call(e,a(39))},686:function(t,e,a){"use strict";e.a={data:function(){return{}},methods:{scrollView:function(t){jQuery(window).width()<=600&&document.getElementById(t).scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},getUrlQueryParams:function(t){var e=[],a={};return(t.indexOf("#")?t.substring(0,t.indexOf("#")).split("?")[1]:t.split("?")[1]).split("&").forEach(function(t){e=t.split("="),a[e[0]]=decodeURIComponent(e[1]).replace(/\+/g," ")}),a},removeURLParameter:function(t,e){var a=t.split("?");if(a.length>=2){for(var i=encodeURIComponent(e)+"=",o=a[1].split(/[&;]/g),n=o.length;n-- >0;)-1!==o[n].lastIndexOf(i,0)&&o.splice(n,1);return t=a[0]+(o.length>0?"?"+o.join("&"):"")}return t},capitalizeFirstLetter:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}}},687:function(t,e,a){var i,o;i={expires:"1d",path:"; path=/"},o={install:function(t){t.prototype.$cookies=this,t.cookies=this},config:function(t,e){t&&(i.expires=t),e&&(i.path="; path="+e)},get:function(t){var e=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(e&&"{"===e.substring(0,1)&&"}"===e.substring(e.length-1,e.length))try{e=JSON.parse(e)}catch(t){return e}return e},set:function(t,e,a,o,n,s){if(!t)throw new Error("cookie name is not find in first argument");if(/^(?:expires|max\-age|path|domain|secure)$/i.test(t))throw new Error("cookie key name illegality ,Cannot be set to ['expires','max-age','path','domain','secure']\t","current key name: "+t);e&&e.constructor===Object&&(e=JSON.stringify(e));var r="";if((a=void 0===a?i.expires:a)&&0!=a)switch(a.constructor){case Number:r=a===1/0||-1===a?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+a;break;case String:if(/^(?:\d{1,}(y|m|d|h|min|s))$/i.test(a)){var l=a.replace(/^(\d{1,})(?:y|m|d|h|min|s)$/i,"$1");switch(a.replace(/^(?:\d{1,})(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":r="; max-age="+2592e3*+l;break;case"d":r="; max-age="+86400*+l;break;case"h":r="; max-age="+3600*+l;break;case"min":r="; max-age="+60*+l;break;case"s":r="; max-age="+l;break;case"y":r="; max-age="+31104e3*+l;break;default:new Error("unknown exception of 'set operation'")}}else r="; expires="+a;break;case Date:r="; expires="+a.toUTCString()}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+r+(n?"; domain="+n:"")+(o?"; path="+o:i.path)+(s?"; secure":""),this},remove:function(t,e,a){return!(!t||!this.isKey(t))&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(a?"; domain="+a:"")+(e?"; path="+e:i.path),this)},isKey:function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=0;e1&&void 0!==arguments[1]?arguments[1]:84600,a=[],i=this.getTimeSlotLength();i<=e;i+=this.getTimeSlotLength())a.push(i);return t&&-1===a.indexOf(t)&&(a.push(t),a.sort(function(t,e){return t-e})),a},getTimeSelectOptionsWithLimits:function(t,e){return{start:"00:00",end:"24:00",step:this.secondsToTimeSelectStep(this.getTimeSlotLength()),minTime:t,maxTime:e}},getStringTimeInSeconds:function(t){return o()(t,"HH:mm").diff(o()().startOf("day"),"seconds")}}}},689:function(t,e,a){var i=a(325)(a(716),a(717),!1,null,null,null);t.exports=i.exports},690:function(t,e,a){var i=a(325)(a(691),a(692),!1,null,null,null);t.exports=i.exports},691:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(674);e.default={mixins:[i.a],props:["appointmentsApproved","appointmentsPending","employeesTotal","customersTotal","locationsTotal","servicesTotal","categoriesTotal","financeTotal","addNewCouponBtnDisplay","addNewCustomFieldBtnDisplay","locations","categories","params","fetched"],data:function(){return{}},methods:{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")},showDialogCoupon:function(){this.$emit("newCouponBtnClicked")},showDialogCustomFields:function(){this.$emit("newCustomFieldBtnClicked")},selectAllInCategory:function(t){this.$emit("selectAllInCategory",t)},changeFilter:function(){this.$emit("changeFilter")}},components:{}}},692:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"am-page-header am-section"},[a("el-row",{attrs:{type:"wpamelia-calendar"===t.$router.currentRoute.name?"":"flex",align:"middle"}},[a("el-col",{attrs:{span:"wpamelia-calendar"===t.$router.currentRoute.name?6:18}},[a("div",{staticClass:"am-logo"},[a("img",{staticClass:"logo-big",attrs:{width:"92",src:t.$root.getUrl+"public/img/amelia-logo-horizontal.svg"}}),t._v(" "),a("img",{staticClass:"logo-small",attrs:{width:"28",src:t.$root.getUrl+"public/img/amelia-logo-symbol.svg"}})]),t._v(" "),a("h1",{staticClass:"am-page-title"},[t._v("\n "+t._s(t.$router.currentRoute.meta.title)+"\n\n "),t._v(" "),t.appointmentsApproved>=0?a("span",{staticClass:"am-appointments-number approved"},[t._v("\n "+t._s(t.appointmentsApproved)+"\n ")]):t._e(),t._v(" "),t.appointmentsPending>=0?a("span",{staticClass:"am-appointments-number pending"},[t._v("\n "+t._s(t.appointmentsPending)+"\n ")]):t._e(),t._v(" "),t.employeesTotal>=0&&!0===t.$root.settings.capabilities.canReadOthers?a("span",[a("span",{staticClass:"total-number"},[t._v(t._s(t.employeesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.customersTotal>=0?a("span",[a("span",{staticClass:"total-number"},[t._v(t._s(t.customersTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.locationsTotal>=0?a("span",[a("span",{staticClass:"total-number"},[t._v(t._s(t.locationsTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.servicesTotal>=0?a("span",[a("span",{staticClass:"total-number"},[t._v(t._s(t.servicesTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e(),t._v(" "),t.financeTotal>=0?a("span",[a("span",{staticClass:"total-number"},[t._v(t._s(t.financeTotal))]),t._v(" "+t._s(t.$root.labels.total)+"\n ")]):t._e()])]),t._v(" "),a("el-col",{staticClass:"align-right v-calendar-column",attrs:{span:"wpamelia-calendar"===t.$router.currentRoute.name?18:6}},["wpamelia-appointments"===t.$router.currentRoute.name&&(!0===t.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteAppointments)?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogAppointment}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_appointment))])]):t._e(),t._v(" "),"wpamelia-events"===t.$router.currentRoute.name&&(!0===t.$root.settings.capabilities.canWriteOthers||"provider"===this.$root.settings.role&&this.$root.settings.roles.allowWriteEvents)?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogEvent}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_event))])]):t._e(),t._v(" "),t.$root.isLite||"wpamelia-employees"!==t.$router.currentRoute.name||!0!==t.$root.settings.capabilities.canWrite||!0!==t.$root.settings.capabilities.canWriteOthers?t._e():a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogEmployee}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_employee))])]),t._v(" "),"wpamelia-customers"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogCustomer}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_customer))])]):t._e(),t._v(" "),a("el-popover",t._b({ref:"addLocationPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[a("PopLite")],1),t._v(" "),a("div",{directives:[{name:"popover",rawName:"v-popover:addLocationPop",arg:"addLocationPop"}]},["wpamelia-locations"===t.$router.currentRoute.name&&!0===t.$root.settings.capabilities.canWrite?a("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary",disabled:t.$root.isLite},on:{click:t.showDialogLocation}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_location))])]):t._e()],1),t._v(" "),"wpamelia-services"===t.$router.currentRoute.name&&t.categoriesTotal>0&&!0===t.$root.settings.capabilities.canWrite?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogService}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_service))])]):t._e(),t._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{directives:[{name:"popover",rawName:"v-popover:addCouponPop",arg:"addCouponPop"}]},[a("el-popover",t._b({ref:"addCouponPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[a("PopLite")],1),t._v(" "),"wpamelia-finance"===t.$router.currentRoute.name&&t.addNewCouponBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?a("el-button",{class:{"am-dialog-create":!0,"am-lite-disabled":t.$root.isLite},attrs:{type:"primary"},on:{click:t.showDialogCoupon}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_coupon))])]):t._e()],1)]),t._v(" "),a("transition",{attrs:{name:"fade"}},["wpamelia-customize"===t.$router.currentRoute.name&&t.addNewCustomFieldBtnDisplay&&!0===t.$root.settings.capabilities.canWrite?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogCustomFields}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.add_custom_field))])]):t._e()],1),t._v(" "),"wpamelia-dashboard"===t.$router.currentRoute.name?a("div",{staticClass:"v-calendar-column"},[a("div",{staticClass:"el-form-item__content"},[a("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:t.vCalendarFormats,"is-double-paned":!0},on:{input:t.changeFilter},model:{value:t.params.dates,callback:function(e){t.$set(t.params,"dates",e)},expression:"params.dates"}})],1)]):t._e(),t._v(" "),"wpamelia-calendar"===t.$router.currentRoute.name?a("div",{staticClass:"am-calendar-header-filters"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-popover",t._b({ref:"filterEmployeePop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[a("PopLite")],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.services+":"}},[a("el-select",{directives:[{name:"popover",rawName:"v-popover:filterEmployeePop",arg:"filterEmployeePop"}],attrs:{multiple:"",filterable:"",placeholder:t.$root.labels.all_services,"collapse-tags":"",loading:!t.fetched,disabled:t.$root.isLite},on:{change:t.changeFilter},model:{value:t.params.services,callback:function(e){t.$set(t.params,"services",e)},expression:"params.services"}},t._l(t.categories,function(e){return a("div",{key:e.id},[a("div",{staticClass:"am-drop-parent",on:{click:function(a){return t.selectAllInCategory(e.id)}}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),t._l(e.serviceList,function(t){return a("el-option",{key:t.id,staticClass:"am-drop-child",attrs:{label:t.name,value:t.id}})})],2)}),0)],1),t._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.locations.length,expression:"locations.length"}],attrs:{label:t.$root.labels.locations+":"}},[a("el-select",{attrs:{placeholder:t.$root.labels.all_locations,clearable:"",multiple:"","collapse-tags":"",loading:!t.fetched},on:{change:t.changeFilter},model:{value:t.params.locations,callback:function(e){t.$set(t.params,"locations",e)},expression:"params.locations"}},t._l(t.locations,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1),t._v(" "),"wpamelia-calendar"===t.$router.currentRoute.name&&("admin"===t.$root.settings.role||"manager"===t.$root.settings.role||"provider"===t.$root.settings.role&&t.$root.settings.roles.allowWriteAppointments)?a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.showDialogAppointment}},[a("i",{staticClass:"el-icon-plus"}),t._v(" "),a("span",{staticClass:"button-text"},[t._v(t._s(t.$root.labels.new_appointment))])]):t._e()],1):t._e()],1)],1)],1)},staticRenderFns:[]}},693:function(t,e,a){"use strict";e.a={data:function(){return{}},methods:{setEntitiesFilter:function(){var t=this,e={categories:{services:[],employees:[],locations:[]},locations:{services:[],employees:[],categories:[]},services:{categories:[],employees:[],locations:[]},employees:{categories:[],services:[],locations:[]}};for(var a in e)this.options.entitiesChoices[a]={selection:"",dependents:e[a]};var i=function(t,e,a){t[e]||(t[e]=[]),-1===t[e].indexOf(a)&&t[e].push(a)};this.options.entities.employees.forEach(function(e){e.serviceList.forEach(function(a){t.options.entities.services.forEach(function(o){o.id===a.id&&(i(t.options.entitiesChoices.categories.dependents.employees,o.categoryId,e.id),i(t.options.entitiesChoices.categories.dependents.locations,o.categoryId,e.locationId),i(t.options.entitiesChoices.categories.dependents.services,o.categoryId,o.id),i(t.options.entitiesChoices.employees.dependents.categories,e.id,o.categoryId),i(t.options.entitiesChoices.services.dependents.categories,o.id,o.categoryId),i(t.options.entitiesChoices.locations.dependents.categories,e.locationId,o.categoryId))}),i(t.options.entitiesChoices.employees.dependents.services,e.id,a.id),i(t.options.entitiesChoices.services.dependents.employees,a.id,e.id),i(t.options.entitiesChoices.services.dependents.locations,a.id,e.locationId),i(t.options.entitiesChoices.locations.dependents.services,e.locationId,a.id)}),i(t.options.entitiesChoices.employees.dependents.locations,e.id,e.locationId),i(t.options.entitiesChoices.locations.dependents.employees,e.locationId,e.id)})},resetEntitiesFilter:function(){var t=this;["employees","services","locations","categories"].forEach(function(e){t.options.entities[e].forEach(function(t){t.disabled=!1})})},getLocationById:function(t){return this.options.entities.locations.find(function(e){return e.id===t})||null},getCustomerById:function(t){return this.options.entities.customers.find(function(e){return e.id===t})||null},getProviderById:function(t){return this.options.entities.employees.find(function(e){return e.id===t})||null},getServiceById:function(t){return this.options.entities.services.find(function(e){return e.id===t})||null},getServiceProviders:function(t){return this.options.entities.employees.filter(function(e){return-1!==e.serviceList.map(function(t){return t.id}).indexOf(t)})},getServicesFromCategories:function(){var t=[];return this.options.entities.categories.map(function(t){return t.serviceList}).forEach(function(e){t=t.concat(e)}),t},getCategoryServices:function(t){return this.options.entities.categories.find(function(e){return e.id===t}).serviceList},getCustomerInfo:function(t){return t.info?JSON.parse(t.info):this.getCustomerById(t.customerId)}},computed:{visibleLocations:function(){return this.options.entities.locations.filter(function(t){return"visible"===t.status})},visibleEmployees:function(){return this.options.entities.employees.filter(function(t){return"visible"===t.status})},visibleCustomers:function(){return this.options.entities.customers.filter(function(t){return"visible"===t.status})},visibleServices:function(){return this.options.entities.services.filter(function(t){return"visible"===t.status})}}}},694:function(t,e,a){t.exports=a(695)},695:function(t,e,a){"use strict";var i=a(673),o=a(680),n=a(696),s=a(677);function r(t){var e=new n(t),a=o(n.prototype.request,e);return i.extend(a,n.prototype,e),i.extend(a,e),a}var l=r(s);l.Axios=n,l.create=function(t){return r(i.merge(s,t))},l.Cancel=a(684),l.CancelToken=a(710),l.isCancel=a(683),l.all=function(t){return Promise.all(t)},l.spread=a(711),t.exports=l,t.exports.default=l},696:function(t,e,a){"use strict";var i=a(677),o=a(673),n=a(705),s=a(706),r=a(708),l=a(709);function c(t){this.defaults=t,this.interceptors={request:new n,response:new n}}c.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(i,this.defaults,{method:"get"},t)).method=t.method.toLowerCase(),t.baseURL&&!r(t.url)&&(t.url=l(t.baseURL,t.url));var e=[s,void 0],a=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)a=a.then(e.shift(),e.shift());return a},o.forEach(["delete","get","head","options"],function(t){c.prototype[t]=function(e,a){return this.request(o.merge(a||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){c.prototype[t]=function(e,a,i){return this.request(o.merge(i||{},{method:t,url:e,data:a}))}}),t.exports=c},697:function(t,e,a){"use strict";var i=a(673);t.exports=function(t,e){i.forEach(t,function(a,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(t[e]=a,delete t[i])})}},698:function(t,e,a){"use strict";var i=a(682);t.exports=function(t,e,a){var o=a.config.validateStatus;a.status&&o&&!o(a.status)?e(i("Request failed with status code "+a.status,a.config,null,a.request,a)):t(a)}},699:function(t,e,a){"use strict";t.exports=function(t,e,a,i,o){return t.config=e,a&&(t.code=a),t.request=i,t.response=o,t}},700:function(t,e,a){"use strict";var i=a(673);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,a){if(!e)return t;var n;if(a)n=a(e);else if(i.isURLSearchParams(e))n=e.toString();else{var s=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))}))}),n=s.join("&")}return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}},701:function(t,e,a){"use strict";var i=a(673);t.exports=function(t){var e,a,o,n={};return t?(i.forEach(t.split("\n"),function(t){o=t.indexOf(":"),e=i.trim(t.substr(0,o)).toLowerCase(),a=i.trim(t.substr(o+1)),e&&(n[e]=n[e]?n[e]+", "+a:a)}),n):n}},702:function(t,e,a){"use strict";var i=a(673);t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");function o(t){var i=t;return e&&(a.setAttribute("href",i),i=a.href),a.setAttribute("href",i),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:"/"===a.pathname.charAt(0)?a.pathname:"/"+a.pathname}}return t=o(window.location.href),function(e){var a=i.isString(e)?o(e):e;return a.protocol===t.protocol&&a.host===t.host}}():function(){return!0}},703:function(t,e,a){"use strict";var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,a,n=String(t),s="",r=0,l=i;n.charAt(0|r)||(l="=",r%1);s+=l.charAt(63&e>>8-r%1*8)){if((a=n.charCodeAt(r+=.75))>255)throw new o;e=e<<8|a}return s}},704:function(t,e,a){"use strict";var i=a(673);t.exports=i.isStandardBrowserEnv()?{write:function(t,e,a,o,n,s){var r=[];r.push(t+"="+encodeURIComponent(e)),i.isNumber(a)&&r.push("expires="+new Date(a).toGMTString()),i.isString(o)&&r.push("path="+o),i.isString(n)&&r.push("domain="+n),!0===s&&r.push("secure"),document.cookie=r.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},705:function(t,e,a){"use strict";var i=a(673);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},706:function(t,e,a){"use strict";var i=a(673),o=a(707),n=a(683),s=a(677);function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return r(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return n(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},707:function(t,e,a){"use strict";var i=a(673);t.exports=function(t,e,a){return i.forEach(a,function(a){t=a(t,e)}),t}},708:function(t,e,a){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},709:function(t,e,a){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},710:function(t,e,a){"use strict";var i=a(684);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var a=this;t(function(t){a.reason||(a.reason=new i(t),e(a.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},711:function(t,e,a){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},712:function(t,e,a){"use strict";var i,o=function(){function t(t,e){for(var a=0;a0}}]),t}()},713:function(t,e,a){"use strict";function i(t){return void 0===t}function o(t){return Array.isArray(t)}function n(t){return t&&"number"==typeof t.size&&"string"==typeof t.type&&"function"==typeof t.slice}t.exports=function t(e,a,s,r){if(a instanceof FormData&&(r=s,s=a,a=null),(a=a||{}).indices=!i(a.indices)&&a.indices,a.nulls=!!i(a.nulls)||a.nulls,s=s||new FormData,i(e))return s;if(function(t){return null===t}(e))a.nulls&&s.append(r,"");else if(o(e))if(e.length)e.forEach(function(e,i){var o=r+"["+(a.indices?i:"")+"]";t(e,a,s,o)});else{var l=r+"[]";s.append(l,"")}else!function(t){return t instanceof Date}(e)?!function(t){return t===Object(t)}(e)||function(t){return n(t)&&("object"==typeof t.lastModifiedDate||"number"==typeof t.lastModified)&&"string"==typeof t.name}(e)||n(e)?s.append(r,e):Object.keys(e).forEach(function(i){var n=e[i];if(o(n))for(;i.length>2&&i.lastIndexOf("[]")===i.length-2;)i=i.substring(0,i.length-2);t(n,a,s,r?r+"["+i+"]":i)}):s.append(r,e.toISOString());return s}},714:function(t,e,a){var i=a(325)(a(718),a(719),!1,null,null,null);t.exports=i.exports},715:function(t,e,a){"use strict";e.a={data:function(){return{countries:[{id:1,iso:"af",nicename:"Afghanistan",phonecode:93,format:"070 123 4567"},{id:2,iso:"al",nicename:"Albania",phonecode:355,format:"066 123 4567"},{id:3,iso:"dz",nicename:"Algeria",phonecode:213,format:"0551 23 45 67"},{id:4,iso:"as",nicename:"American Samoa",phonecode:1,format:"(684) 733 1234"},{id:5,iso:"ad",nicename:"Andorra",phonecode:376,format:"312 345"},{id:6,iso:"ao",nicename:"Angola",phonecode:244,format:"923 123 456"},{id:7,iso:"ai",nicename:"Anguilla",phonecode:1,format:"(264) 235 1234"},{id:8,iso:"ag",nicename:"Antigua and Barbuda",phonecode:1,format:"(268) 464 1234"},{id:9,iso:"ar",nicename:"Argentina",phonecode:54,format:"9 (11) 1234 567"},{id:10,iso:"am",nicename:"Armenia",phonecode:374,format:"077 123 456"},{id:11,iso:"aw",nicename:"Aruba",phonecode:297,format:"560 1234"},{id:12,iso:"au",nicename:"Australia",phonecode:61,format:"0412 345 678"},{id:13,iso:"at",nicename:"Austria",phonecode:43,format:"0664 123456"},{id:14,iso:"az",nicename:"Azerbaijan",phonecode:994,format:"040 123 45 67"},{id:15,iso:"bs",nicename:"Bahamas",phonecode:1,format:"(242) 359 1234"},{id:16,iso:"bh",nicename:"Bahrain",phonecode:973,format:"3600 1234"},{id:17,iso:"bd",nicename:"Bangladesh",phonecode:880,format:"018 1234 5678"},{id:18,iso:"bb",nicename:"Barbados",phonecode:1,format:"(246) 250 1234"},{id:19,iso:"by",nicename:"Belarus",phonecode:375,format:"029 491 1911"},{id:20,iso:"be",nicename:"Belgium",phonecode:32,format:"0470 123 456"},{id:21,iso:"bz",nicename:"Belize",phonecode:501,format:"622 1234"},{id:22,iso:"bj",nicename:"Benin",phonecode:229,format:"90 123 456"},{id:23,iso:"bm",nicename:"Bermuda",phonecode:1,format:"(441) 370 1234"},{id:24,iso:"bt",nicename:"Bhutan",phonecode:975,format:"17 123 456"},{id:25,iso:"bo",nicename:"Bolivia",phonecode:591,format:"7 123 4567"},{id:26,iso:"ba",nicename:"Bosnia and Herzegovina",phonecode:387,format:"061 123 456"},{id:27,iso:"bw",nicename:"Botswana",phonecode:267,format:"71 123 456"},{id:28,iso:"br",nicename:"Brazil",phonecode:55,format:"(11) 9 1234 5678"},{id:29,iso:"vg",nicename:"British Virgin Islands",phonecode:1,format:"(284) 300 1234"},{id:30,iso:"bn",nicename:"Brunei",phonecode:673,format:"712 3456"},{id:31,iso:"bg",nicename:"Bulgaria",phonecode:359,format:"087 123 4567"},{id:32,iso:"bf",nicename:"Burkina Faso",phonecode:226,format:"70 12 34 56"},{id:33,iso:"bi",nicename:"Burundi",phonecode:257,format:"79 56 12 34"},{id:34,iso:"kh",nicename:"Cambodia",phonecode:855,format:"091 234 567"},{id:35,iso:"cm",nicename:"Cameroon",phonecode:237,format:"6 71 23 45 67"},{id:36,iso:"ca",nicename:"Canada",phonecode:1,format:"(204) 123 4567"},{id:37,iso:"cv",nicename:"Cape Verde",phonecode:238,format:"991 12 34"},{id:38,iso:"ky",nicename:"Cayman Islands",phonecode:1,format:"(345) 323 1234"},{id:39,iso:"cf",nicename:"Central African Republic",phonecode:236,format:"70 01 23 45"},{id:40,iso:"td",nicename:"Chad",phonecode:235,format:"63 01 23 45"},{id:41,iso:"cl",nicename:"Chile",phonecode:56,format:"09 6123 4567"},{id:42,iso:"cn",nicename:"China",phonecode:86,format:"131 2345 6789"},{id:43,iso:"co",nicename:"Colombia",phonecode:57,format:"321 1234567"},{id:44,iso:"km",nicename:"Comoros",phonecode:269,format:"321 23 45"},{id:45,iso:"cd",nicename:"Congo (DRC)",phonecode:243,format:"0991 234 567"},{id:46,iso:"cg",nicename:"Congo (Republic)",phonecode:242,format:"06 123 4567"},{id:47,iso:"ck",nicename:"Cook Islands",phonecode:682,format:"71 234"},{id:48,iso:"cr",nicename:"Costa Rica",phonecode:506,format:"8312 3456"},{id:49,iso:"ci",nicename:"Cote D'Ivoire",phonecode:225,format:"01 23 45 67"},{id:50,iso:"hr",nicename:"Croatia",phonecode:385,format:"091 234 5678"},{id:51,iso:"cu",nicename:"Cuba",phonecode:53,format:"05 1234567"},{id:57,iso:"cy",nicename:"Cyprus",phonecode:357,format:"96 123456"},{id:58,iso:"cz",nicename:"Czech Republic",phonecode:420,format:"601 123 456"},{id:59,iso:"dk",nicename:"Denmark",phonecode:45,format:"20 12 34 56"},{id:60,iso:"dj",nicename:"Djibouti",phonecode:253,format:"77 83 10 01"},{id:61,iso:"dm",nicename:"Dominica",phonecode:1,format:"(767) 225 1234"},{id:62,iso:"do",nicename:"Dominican Republic",phonecode:1,format:"(809) 234 5678"},{id:63,iso:"ec",nicename:"Ecuador",phonecode:593,format:"099 123 4567"},{id:64,iso:"eg",nicename:"Egypt",phonecode:20,format:"0100 123 4567"},{id:65,iso:"sv",nicename:"El Salvador",phonecode:503,format:"7012 3456"},{id:66,iso:"gq",nicename:"Equatorial Guinea",phonecode:240,format:"222 123 456"},{id:67,iso:"er",nicename:"Eritrea",phonecode:291,format:"07 123 456"},{id:68,iso:"ee",nicename:"Estonia",phonecode:372,format:"5123 4567"},{id:69,iso:"et",nicename:"Ethiopia",phonecode:251,format:"091 123 4567"},{id:70,iso:"fk",nicename:"Falkland Islands (Malvinas)",phonecode:500,format:"51234"},{id:71,iso:"fo",nicename:"Faroe Islands",phonecode:298,format:"211234"},{id:72,iso:"fj",nicename:"Fiji",phonecode:679,format:"701 2345"},{id:73,iso:"fi",nicename:"Finland",phonecode:358,format:"041 2345678"},{id:74,iso:"fr",nicename:"France",phonecode:33,format:"06 12 34 56 78"},{id:75,iso:"gf",nicename:"French Guiana",phonecode:594,format:"0694 20 12 34"},{id:76,iso:"pf",nicename:"French Polynesia",phonecode:689,format:"87 12 34 56"},{id:77,iso:"ga",nicename:"Gabon",phonecode:241,format:"06 03 12 34"},{id:78,iso:"gm",nicename:"Gambia",phonecode:220,format:"301 2345"},{id:79,iso:"ge",nicename:"Georgia",phonecode:995,format:"555 12 34 56"},{id:80,iso:"de",nicename:"Germany",phonecode:49,format:"01512 3456789"},{id:81,iso:"gh",nicename:"Ghana",phonecode:233,format:"023 123 4567"},{id:82,iso:"gi",nicename:"Gibraltar",phonecode:350,format:"57123456"},{id:83,iso:"gr",nicename:"Greece",phonecode:30,format:"691 234 5678"},{id:84,iso:"gl",nicename:"Greenland",phonecode:299,format:"22 12 34"},{id:87,iso:"gu",nicename:"Guam",phonecode:1,format:"(671) 300 1234"},{id:88,iso:"gt",nicename:"Guatemala",phonecode:502,format:"5123 4567"},{id:89,iso:"gg",nicename:"Guernsey",phonecode:44,format:"07781 123456"},{id:90,iso:"gn",nicename:"Guinea",phonecode:224,format:"601 12 34 56"},{id:91,iso:"gw",nicename:"Guinea-Bissau",phonecode:245,format:"955 012 345"},{id:92,iso:"gy",nicename:"Guyana",phonecode:592,format:"609 1234"},{id:93,iso:"ht",nicename:"Haiti",phonecode:509,format:"34 10 1234"},{id:94,iso:"hn",nicename:"Honduras",phonecode:504,format:"9123 4567"},{id:95,iso:"hk",nicename:"Hong Kong",phonecode:852,format:"5123 4567"},{id:96,iso:"hu",nicename:"Hungary",phonecode:36,format:"(20) 123 4567"},{id:97,iso:"is",nicename:"Iceland",phonecode:354,format:"611 1234"},{id:98,iso:"in",nicename:"India",phonecode:91,format:"099876 54321"},{id:99,iso:"id",nicename:"Indonesia",phonecode:62,format:"0812 345 678"},{id:100,iso:"ir",nicename:"Iran",phonecode:98,format:"0912 345 6789"},{id:101,iso:"iq",nicename:"Iraq",phonecode:964,format:"0791 234 5678"},{id:102,iso:"ie",nicename:"Ireland",phonecode:353,format:"085 012 3456"},{id:103,iso:"im",nicename:"Isle of Man",phonecode:44,format:"07924 123456"},{id:104,iso:"il",nicename:"Israel",phonecode:972,format:"050 123 4567"},{id:105,iso:"it",nicename:"Italy",phonecode:39,format:"312 345 6789"},{id:106,iso:"jm",nicename:"Jamaica",phonecode:1,format:"(876) 210 1234"},{id:107,iso:"jp",nicename:"Japan",phonecode:81,format:"090 1234 5678"},{id:108,iso:"je",nicename:"Jersey",phonecode:44,format:"07797 123456"},{id:109,iso:"jo",nicename:"Jordan",phonecode:962,format:"07 9012 3456"},{id:110,iso:"kz",nicename:"Kazakhstan",phonecode:7,format:"(771) 123 4567"},{id:111,iso:"ke",nicename:"Kenya",phonecode:254,format:"0712 123456"},{id:112,iso:"ki",nicename:"Kiribati",phonecode:686,format:"72012345"},{id:113,iso:"kw",nicename:"Kuwait",phonecode:965,format:"500 12345"},{id:114,iso:"kg",nicename:"Kyrgyzstan",phonecode:996,format:"0700 123 456"},{id:115,iso:"la",nicename:"Laos",phonecode:856,format:"020 23 123 456"},{id:116,iso:"lv",nicename:"Latvia",phonecode:371,format:"21 234 567"},{id:117,iso:"lb",nicename:"Lebanon",phonecode:961,format:"71 123 456"},{id:118,iso:"ls",nicename:"Lesotho",phonecode:266,format:"5012 3456"},{id:119,iso:"lr",nicename:"Liberia",phonecode:231,format:"077 012 3456"},{id:120,iso:"ly",nicename:"Libya",phonecode:218,format:"091 2345678"},{id:121,iso:"li",nicename:"Liechtenstein",phonecode:423,format:"660 234 567"},{id:122,iso:"lt",nicename:"Lithuania",phonecode:370,format:"612 345 67"},{id:123,iso:"lu",nicename:"Luxembourg",phonecode:352,format:"628 123 456"},{id:124,iso:"mo",nicename:"Macao",phonecode:853,format:"6612 3456"},{id:125,iso:"mk",nicename:"Macedonia (FYROM)",phonecode:389,format:"072 345 678"},{id:126,iso:"mg",nicename:"Madagascar",phonecode:261,format:"032 12 345 67"},{id:127,iso:"mw",nicename:"Malawi",phonecode:265,format:"0991 23 45 67"},{id:128,iso:"my",nicename:"Malaysia",phonecode:60,format:"012 345 6789"},{id:129,iso:"mv",nicename:"Maldives",phonecode:960,format:"771 2345"},{id:130,iso:"ml",nicename:"Mali",phonecode:223,format:"65 01 23 45"},{id:131,iso:"mt",nicename:"Malta",phonecode:356,format:"9696 1234"},{id:132,iso:"mh",nicename:"Marshall Islands",phonecode:692,format:"235 1234"},{id:133,iso:"mq",nicename:"Martinique",phonecode:596,format:"0696 20 12 34"},{id:134,iso:"mr",nicename:"Mauritania",phonecode:222,format:"22 12 34 56"},{id:135,iso:"mu",nicename:"Mauritius",phonecode:230,format:"5251 2345"},{id:136,iso:"yt",nicename:"Mayotte",phonecode:269,format:"0639 12 34 56"},{id:137,iso:"mx",nicename:"Mexico",phonecode:52,format:"044 222 123 4567"},{id:138,iso:"fm",nicename:"Micronesia",phonecode:691,format:"350 1234"},{id:139,iso:"md",nicename:"Moldova",phonecode:373,format:"0621 12 345"},{id:140,iso:"mc",nicename:"Monaco",phonecode:377,format:"06 12 34 56 78"},{id:141,iso:"mn",nicename:"Mongolia",phonecode:976,format:"8812 3456"},{id:142,iso:"me",nicename:"Montenegro",phonecode:382,format:"067 622 901"},{id:143,iso:"ms",nicename:"Montserrat",phonecode:1,format:"(664) 492 3456"},{id:144,iso:"ma",nicename:"Morocco",phonecode:212,format:"0650 123456"},{id:145,iso:"mz",nicename:"Mozambique",phonecode:258,format:"82 123 4567"},{id:146,iso:"mm",nicename:"Myanmar",phonecode:95,format:"09 212 3456"},{id:147,iso:"na",nicename:"Namibia",phonecode:264,format:"081 123 4567"},{id:149,iso:"np",nicename:"Nepal",phonecode:977,format:"984 1234567"},{id:150,iso:"nl",nicename:"Netherlands",phonecode:31,format:"06 12345678"},{id:151,iso:"nc",nicename:"New Caledonia",phonecode:687,format:"75 12 34"},{id:152,iso:"nz",nicename:"New Zealand",phonecode:64,format:"021 123 4567"},{id:153,iso:"ni",nicename:"Nicaragua",phonecode:505,format:"8123 4567"},{id:154,iso:"ne",nicename:"Niger",phonecode:227,format:"93 12 34 56"},{id:155,iso:"ng",nicename:"Nigeria",phonecode:234,format:"0802 123 4567"},{id:156,iso:"nu",nicename:"Niue",phonecode:683,format:"1234"},{id:157,iso:"nf",nicename:"Norfolk Island",phonecode:672,format:"3 81234"},{id:160,iso:"no",nicename:"Norway",phonecode:47,format:"406 12 345"},{id:161,iso:"om",nicename:"Oman",phonecode:968,format:"9212 3456"},{id:162,iso:"pk",nicename:"Pakistan",phonecode:92,format:"0301 2345678"},{id:163,iso:"pw",nicename:"Palau",phonecode:680,format:"620 1234"},{id:164,iso:"ps",nicename:"Palestine",phonecode:970,format:"0599 123 456"},{id:165,iso:"pa",nicename:"Panama",phonecode:507,format:"6001 2345"},{id:166,iso:"pg",nicename:"Papua New Guinea",phonecode:675,format:"681 2345"},{id:167,iso:"py",nicename:"Paraguay",phonecode:595,format:"0961 456789"},{id:168,iso:"pe",nicename:"Peru",phonecode:51,format:"912 345 678"},{id:169,iso:"ph",nicename:"Philippines",phonecode:63,format:"0905 123 4567"},{id:170,iso:"pl",nicename:"Poland",phonecode:48,format:"512 345 678"},{id:171,iso:"pt",nicename:"Portugal",phonecode:351,format:"912 345 678"},{id:172,iso:"pr",nicename:"Puerto Rico",phonecode:1,format:"(787) 234 5678"},{id:173,iso:"qa",nicename:"Qatar",phonecode:974,format:"3312 3456"},{id:175,iso:"ro",nicename:"Romania",phonecode:40,format:"0712 345 678"},{id:176,iso:"ru",nicename:"Russia",phonecode:7,format:"(912) 123 4567",priority:1},{id:177,iso:"rw",nicename:"Rwanda",phonecode:250,format:"0720 123 456"},{id:180,iso:"kn",nicename:"Saint Kitts and Nevis",phonecode:1,format:"(869) 765 2917"},{id:181,iso:"lc",nicename:"Saint Lucia",phonecode:1,format:"(758) 284 5678"},{id:184,iso:"vc",nicename:"Saint Vincent and the Grenadines",phonecode:1,format:"(784) 430 1234"},{id:185,iso:"ws",nicename:"Samoa",phonecode:684,format:"601234"},{id:186,iso:"sm",nicename:"San Marino",phonecode:378,format:"66 66 12 12"},{id:187,iso:"st",nicename:"Sao Tome and Principe",phonecode:239,format:"981 2345"},{id:188,iso:"sa",nicename:"Saudi Arabia",phonecode:966,format:"051 234 5678"},{id:189,iso:"sn",nicename:"Senegal",phonecode:221,format:"70 123 45 67"},{id:190,iso:"rs",nicename:"Serbia",phonecode:381,format:"060 1234567"},{id:191,iso:"sc",nicename:"Seychelles",phonecode:248,format:"2 510 123"},{id:192,iso:"sl",nicename:"Sierra Leone",phonecode:232,format:"(025) 123456"},{id:193,iso:"sg",nicename:"Singapore",phonecode:65,format:"8123 4567"},{id:195,iso:"sk",nicename:"Slovakia",phonecode:421,format:"0912 123 456"},{id:196,iso:"si",nicename:"Slovenia",phonecode:386,format:"031 234 567"},{id:197,iso:"sb",nicename:"Solomon Islands",phonecode:677,format:"74 21234"},{id:198,iso:"so",nicename:"Somalia",phonecode:252,format:"7 1123456"},{id:199,iso:"za",nicename:"South Africa",phonecode:27,format:"071 123 4567"},{id:200,iso:"kr",nicename:"South Korea",phonecode:82,format:"010 1234 567"},{id:201,iso:"ss",nicename:"South Sudan",phonecode:211,format:"0977 123 456"},{id:202,iso:"es",nicename:"Spain",phonecode:34,format:"612 34 56 78"},{id:203,iso:"lk",nicename:"Sri Lanka",phonecode:94,format:"071 234 5678"},{id:204,iso:"sd",nicename:"Sudan",phonecode:249,format:"091 123 1234"},{id:205,iso:"sr",nicename:"Suriname",phonecode:597,format:"741 2345"},{id:207,iso:"sz",nicename:"Swaziland",phonecode:268,format:"7612 3456"},{id:208,iso:"se",nicename:"Sweden",phonecode:46,format:"070 123 45 67"},{id:209,iso:"ch",nicename:"Switzerland",phonecode:41,format:"078 123 45 67"},{id:210,iso:"sy",nicename:"Syria",phonecode:963,format:"0944 567 890"},{id:211,iso:"tw",nicename:"Taiwan",phonecode:886,format:"0912 345 678"},{id:212,iso:"tj",nicename:"Tajikistan",phonecode:992,format:"917 123 456"},{id:214,iso:"th",nicename:"Thailand",phonecode:66,format:"081 234 5678"},{id:215,iso:"tl",nicename:"Timor-Leste",phonecode:670,format:"7721 2345"},{id:216,iso:"tg",nicename:"Togo",phonecode:228,format:"90 11 23 45"},{id:218,iso:"to",nicename:"Tonga",phonecode:676,format:"771 5123"},{id:219,iso:"tt",nicename:"Trinidad and Tobago",phonecode:1,format:"(868) 291 1234"},{id:220,iso:"tn",nicename:"Tunisia",phonecode:216,format:"20 123 456"},{id:221,iso:"tr",nicename:"Turkey",phonecode:90,format:"0501 234 56 78"},{id:222,iso:"tm",nicename:"Turkmenistan",phonecode:7370,format:"8 66 123456"},{id:223,iso:"tc",nicename:"Turks and Caicos Islands",phonecode:1,format:"(649) 231 1234"},{id:224,iso:"tv",nicename:"Tuvalu",phonecode:688,format:"901234"},{id:225,iso:"ug",nicename:"Uganda",phonecode:256,format:"0712 345678"},{id:226,iso:"ua",nicename:"Ukraine",phonecode:380,format:"039 123 4567"},{id:227,iso:"ae",nicename:"United Arab Emirates",phonecode:971,format:"050 123 4567"},{id:228,iso:"gb",nicename:"United Kingdom",phonecode:44,format:"07400 123456",priority:1},{id:229,iso:"us",nicename:"United States",phonecode:1,format:"(201) 555 0123",priority:1},{id:230,iso:"uy",nicename:"Uruguay",phonecode:598,format:"094 231 234"},{id:231,iso:"uz",nicename:"Uzbekistan",phonecode:998,format:"8 91 234 56 78"},{id:232,iso:"vu",nicename:"Vanuatu",phonecode:678,format:"591 2345"},{id:234,iso:"ve",nicename:"Venezuela",phonecode:58,format:"0412 1234567"},{id:235,iso:"vn",nicename:"Vietnam",phonecode:84,format:"091 234 56 78"},{id:236,iso:"vi",nicename:"Virgin Islands, U.S.",phonecode:1,format:"(340) 642 1234"},{id:237,iso:"ye",nicename:"Yemen",phonecode:967,format:"0712 345 678"},{id:238,iso:"zm",nicename:"Zambia",phonecode:260,format:"095 5123456"},{id:239,iso:"zw",nicename:"Zimbabwe",phonecode:263,format:"071 123 4567"},{id:240,iso:"ax",nicename:"Åland Islands",phonecode:358,format:"041 2345678"}]}}}},716:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(679),o=a.n(i),n=a(676),s=a(674);e.default={mixins:[n.a,s.a],props:{formName:"",urlName:null,isNew:null,entity:null,getParsedEntity:null,haveSaveConfirmation:null,hasApplyGloballyVisibility:!1,hasApplyGloballyDeletion:!1,hasIcons:!0,status:null,buttonType:{status:"primary",remove:"danger"},action:{haveAdd:!1,haveEdit:!1,haveStatus:!1,haveRemove:!1,haveRemoveEffect:!1,ignoreDeleteEffect:!1,haveDuplicate:!1},message:{success:{save:null,remove:null,show:null,hide:null},confirm:{remove:null,show:null,hide:null,duplicate:null,save:null}},buttonText:null},data:function(){return{form:new o.a,allowedDelete:!0,showDeleteConfirmation:!1,showVisibilityConfirmation:!1,showDuplicateConfirmation:!1,showSaveConfirmation:!1,deleteEffectMessage:null,dialogLoading:!1}},methods:{getButtonType:function(t){switch(t){case"status":return this.hasIcons?null:this.buttonType.status;case"remove":return this.hasIcons?null:this.buttonType.remove;case"duplicate":return null}},closeDialog:function(){this.$parent.$emit("closeDialog")},onSubmit:function(t){var e=this,a=this.$root;this.$parent.$refs[this.formName].validate(function(i,o){if(!i)return"appointment"===e.formName&&e.handleAppointmentDialogTabChange(o),e.$emit("validationFailCallback"),!1;e.dialogLoading=!0,e.isNew?e.addEntity(t):e.editEntity(t),e.$root=a})},onSuccess:function(t,e,a){var i=this;this.$parent.$emit("saveCallback",a),setTimeout(function(){i.dialogLoading=!1,i.$parent.$emit("closeDialog")},300),this.notify(t,e,"success")},onError:function(t,e){this.dialogLoading=!1,this.$emit("errorCallback",e)},addEntity:function(t){var e=this;this.form.post(this.$root.getAjaxUrl+"/"+this.urlName,this.getParsedEntity(t)).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.save,t.data)}).catch(function(t){t.response&&e.onError("",t.response.data)})},editEntity:function(t){var e=this;this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/"+this.entity.id,this.getParsedEntity(t)).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.save,t.data)}).catch(function(t){t.response&&e.onError("",t.response.data)})},deleteEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/delete/"+this.entity.id,{status:this.status.on,applyGlobally:t}).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.remove,t.data)}).catch(function(t){t.response&&e.onError("",t.response.data.message)})},showEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.on,applyGlobally:t}).then(function(t){e.onSuccess(e.$root.labels.success,e.message.success.show,null)}).catch(function(t){t.response&&e.onError("",t.response.data.message)})},hideEntity:function(t){var e=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/"+this.urlName+"/status/"+this.entity.id,{status:this.status.off,applyGlobally:t}).then(function(){e.onSuccess(e.$root.labels.success,e.message.success.hide,null)}).catch(function(t){t.response&&e.onError("",t.response.data.message)})},duplicateEntity:function(){this.dialogLoading=!0,this.$parent.$emit("closeDialog",!0),this.$parent.$emit("duplicateCallback",this.entity)},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 t=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(e){t.allowedDelete=e.data.data.valid||t.ignoreDeleteEffect,t.deleteEffectMessage=e.data.data.message,t.showDeleteConfirmation=!t.showDeleteConfirmation}).catch(function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation,t.deleteEffectMessage=""}):this.showDeleteConfirmation=!this.showDeleteConfirmation},handleSaveClick:function(){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:""},handleAppointmentDialogTabChange:function(t){for(var e=Object.keys(t),a=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:d.a;"number"==typeof t&&(t=t.toFixed(s(e.precision)));var a=t.indexOf("-")>=0?"-":"",i=l(r(n(t),e.precision)).split("."),o=i[0],c=i[1];return o=function(t,e){return t.replace(/(\d)(?=(?:\d{3})+\b)/gm,"$1"+e)}(o,e.thousands),e.prefix+a+function(t,e,a){return e?t+a+e:t}(o,c,e.decimal)+e.suffix}function o(t,e){var a=t.indexOf("-")>=0?-1:1,i=r(n(t),e);return parseFloat(i)*a}function n(t){return l(t).replace(/\D+/g,"")||"0"}function s(t){return function(t,e,a){return Math.max(t,Math.min(e,a))}(0,t,20)}function r(t,e){var a=Math.pow(10,e);return(parseFloat(t)/a).toFixed(s(e))}function l(t){return t?t.toString():""}function c(t,e){var a=function(){t.setSelectionRange(e,e)};t===document.activeElement&&(a(),setTimeout(a,1))}function u(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}var d=a(0);a.d(e,"a",function(){return i}),a.d(e,"d",function(){return o}),a.d(e,"b",function(){return c}),a.d(e,"c",function(){return u})},function(t,e,a){"use strict";function i(t,e){e&&Object.keys(e).map(function(t){r.a[t]=e[t]}),t.directive("money",s.a),t.component("money",n.a)}Object.defineProperty(e,"__esModule",{value:!0});var o=a(6),n=a.n(o),s=a(1),r=a(0);a.d(e,"Money",function(){return n.a}),a.d(e,"VMoney",function(){return s.a}),a.d(e,"options",function(){return r.a}),a.d(e,"VERSION",function(){return l});var l="0.8.1";e.default=i,"undefined"!=typeof window&&window.Vue&&window.Vue.use(i)},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(1),o=a(0),n=a(2);e.default={name:"Money",props:{value:{required:!0,type:[Number,String],default:0},masked:{type:Boolean,default:!1},precision:{type:Number,default:function(){return o.a.precision}},decimal:{type:String,default:function(){return o.a.decimal}},thousands:{type:String,default:function(){return o.a.thousands}},prefix:{type:String,default:function(){return o.a.prefix}},suffix:{type:String,default:function(){return o.a.suffix}}},directives:{money:i.a},data:function(){return{formattedValue:""}},watch:{value:{immediate:!0,handler:function(t,e){var i=a.i(n.a)(t,this.$props);i!==this.formattedValue&&(this.formattedValue=i)}}},methods:{change:function(t){this.$emit("input",this.masked?t.target.value:a.i(n.d)(t.target.value,this.precision))}}}},function(t,e,a){"use strict";e.a=function(t,e){return t=t||{},e=e||{},Object.keys(t).concat(Object.keys(e)).reduce(function(a,i){return a[i]=void 0===e[i]?t[i]:e[i],a},{})}},function(t,e,a){var i=a(7)(a(4),a(8),null,null);t.exports=i.exports},function(t,e){t.exports=function(t,e,a,i){var o,n=t=t||{},s=typeof t.default;"object"!==s&&"function"!==s||(o=t,n=t.default);var r="function"==typeof n?n.options:n;if(e&&(r.render=e.render,r.staticRenderFns=e.staticRenderFns),a&&(r._scopeId=a),i){var l=r.computed||(r.computed={});Object.keys(i).forEach(function(t){var e=i[t];l[t]=function(){return e}})}return{esModule:o,exports:n,options:r}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{directives:[{name:"money",rawName:"v-money",value:{precision:t.precision,decimal:t.decimal,thousands:t.thousands,prefix:t.prefix,suffix:t.suffix},expression:"{precision, decimal, thousands, prefix, suffix}"}],staticClass:"v-money",attrs:{type:"tel"},domProps:{value:t.formattedValue},on:{change:t.change}})},staticRenderFns:[]}},function(t,e,a){t.exports=a(3)}])},t.exports=i()},722:function(t,e,a){"use strict";e.a={data:function(){return{}},methods:{filterResponseData:function(t){t.data.data.employees=t.data.data.employees.slice(0,1),t.data.data.employees.length&&(t.data.data.employees[0].locationId=null,t.data.data.employees[0].serviceList.forEach(function(t){t.maxCapacity=1,t.minCapacity=1,t.timeAfter="",t.timeBefore=""}))},setInitialEmployee:function(t){var e=this;t.length||this.$http.get(this.$root.getAjaxUrl+"/users/current").then(function(t){var a=null;(a=t.data.data.user?{email:t.data.data.user.email,firstName:t.data.data.user.firstName,lastName:t.data.data.user.lastName,phone:t.data.data.user.phone||""}:{firstName:"firstname",lastName:"lastname",email:"example@example.com"}).type="provider",a.weekDayList=e.getSettingsSchedule(),e.form.post(e.$root.getAjaxUrl+"/users/providers",a).then(function(t){e.options.employees=[t.data.user]}).catch()}).catch()}}}},723:function(t,e,a){"use strict";e.a={data:function(){return{}},methods:{getPaymentData:function(t,e,a){var i=this,o={};if(o.paymentId=t,e){o.bookableType="appointment",o.bookings=e.bookings,o.bookingStart=e.bookingStart,o.bookableName=this.getServiceById(e.serviceId).name;var n=this.getProviderById(e.providerId);n.fullName=n.firstName+" "+n.lastName,o.providers=[n],e.bookings.forEach(function(e){e.payments.forEach(function(a){a.id===t&&(o.customer=i.getCustomerById(e.customerId))})})}return a&&(o.bookableType="event",o.bookings=a.bookings,o.bookingStart=a.periods[0].periodStart,o.bookableName=a.name,o.providers=a.providers,a.bookings.forEach(function(e){e.payments.forEach(function(a){a.id===t&&(o.customer=i.getCustomerById(e.customerId))})})),o},getPaymentGatewayNiceName:function(t){return"onSite"===t.gateway?this.$root.labels.on_site:"wc"===t.gateway?t.gatewayTitle:t.gateway?t.gateway.charAt(0).toUpperCase()+t.gateway.slice(1):void 0}}}},724:function(t,e,a){var i=a(325)(a(726),a(727),!1,null,null,null);t.exports=i.exports},726:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.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}}}},727:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"am-pagination am-section"},[a("el-row",[a("el-col",{attrs:{sm:8}},[a("p",[t._v(t._s(t.paginationMessage))])]),t._v(" "),a("el-col",{attrs:{sm:16}},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.getItemsPerPage,total:t.count,"current-page":t.params.page},on:{"update:currentPage":function(e){return t.$set(t.params,"page",e)},"update:current-page":function(e){return t.$set(t.params,"page",e)},"current-change":t.change}})],1)],1)],1)},staticRenderFns:[]}},732:function(t,e,a){"use strict";e.a={data:function(){return{}},methods:{getAppointmentPrice:function(t,e){var a=0,i=this,o=this.getServiceById(t);return e.forEach(function(t){t.payments.forEach(function(){["approved","pending"].includes(t.status)&&(a+=i.getBookingPrice(t,!1,null))}),0===t.payments.length&&(a+=i.getBookingPrice(t,!0,o.price))}),this.getFormattedPrice(a>=0?a:0)},getBookingPrice:function(t,e,a){var i=0;t.extras.forEach(function(e){void 0!==e.selected&&!0!==e.selected||(i+=e.price*e.quantity*t.persons)});var o=(e?a:t.price*t.persons)+i;return o-(o/100*(t.coupon?t.coupon.discount:0)+(t.coupon?t.coupon.deduction:0))}},watch:{}}},733:function(t,e,a){"use strict";e.a={data:function(){return{dialogCustomer:!1}},methods:{getInitCustomerObject:function(){return{id:0,firstName:"",lastName:"",externalId:"",phone:"",email:"",gender:"",birthday:null,note:"",status:"visible",type:"customer",countPendingAppointments:0}}}}},734:function(t,e,a){var i=a(325)(a(735),a(736),!1,null,null,null);t.exports=i.exports},735:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(689),o=a.n(i),n=a(714),s=a.n(n),r=a(675),l=a(674),c=a(676),u=a(686);e.default={mixins:[r.a,l.a,c.a,u.a],props:{customer:null},data:function(){return{dialogLoading:!0,errors:{email:""},formOptions:{wpUsers:[],genders:[{value:"female",label:"Female"},{value:"male",label:"Male"}]},rules:{firstName:[{required:!0,message:this.$root.labels.enter_first_name_warning,trigger:"submit"}],lastName:[{required:!0,message:this.$root.labels.enter_last_name_warning,trigger:"submit"}],email:[{required:this.$root.settings.general.requiredEmailField,message:this.$root.labels.enter_email_warning,trigger:"submit"},{type:"email",message:this.$root.labels.enter_valid_email_warning,trigger:"submit"}]}}},created:function(){0!==this.customer.id?(this.customer.birthday=this.$moment(this.customer.birthday).toDate(),this.getWPUsers(this.customer.externalId),this.customer.gender&&(this.customer.gender=this.capitalizeFirstLetter(this.customer.gender))):this.getWPUsers(0)},mounted:function(){this.inlineSVG()},methods:{errorCallback:function(t){var e=this;e.errors.email="",setTimeout(function(){e.errors.email=t.message},200)},getParsedEntity:function(){var t=JSON.parse(JSON.stringify(this.customer));return t.birthday&&(t.birthday=this.getDatabaseFormattedDate(this.$moment(t.birthday).format("YYYY-MM-DD"))),t},closeDialog:function(){this.$emit("closeDialog")},getWPUsers:function(){this.customer.externalId=null,this.dialogLoading=!1},phoneFormatted:function(t){this.clearValidation(),this.customer.phone=t},clearValidation:function(){void 0!==this.$refs.customer&&this.$refs.customer.clearValidate()},selectCreateNewWPUser:function(){this.customer.externalId=0,this.$refs.wpUser.blur()}},components:{PhoneInput:s.a,DialogActions:o.a}}},736:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[a("div",{staticClass:"am-dialog-loader-content"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),a("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.dialogLoading?t._e():a("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==t.customer.id}},[a("div",{staticClass:"am-dialog-header"},[a("el-row",[a("el-col",{attrs:{span:18}},[0!==t.customer.id?a("h2",[t._v(t._s(t.$root.labels.edit_customer))]):a("h2",[t._v(t._s(t.$root.labels.new_customer))])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:6}},[a("span"),t._v(" "),a("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),a("el-form",{ref:"customer",attrs:{model:t.customer,rules:t.rules,"label-position":"top"},on:{submit:function(e){return e.preventDefault(),t.onSubmit(e)}}},[a("el-form-item",{attrs:{label:t.$root.labels.first_name+":",prop:"firstName"}},[a("el-input",{attrs:{"auto-complete":"off"},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.firstName,callback:function(e){t.$set(t.customer,"firstName",e)},expression:"customer.firstName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.last_name+":",prop:"lastName"}},[a("el-input",{attrs:{"auto-complete":"off"},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.lastName,callback:function(e){t.$set(t.customer,"lastName",e)},expression:"customer.lastName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.email+":",prop:"email",error:t.errors.email}},[a("el-input",{attrs:{"auto-complete":"off",placeholder:t.$root.labels.email_placeholder},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.email,callback:function(e){t.$set(t.customer,"email",e)},expression:"customer.email"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"placeholder"}},[a("label",{attrs:{slot:"label"},slot:"label"},[t._v("\n "+t._s(t.$root.labels.wp_user)+":\n "),a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.wp_user_customer_tooltip)},slot:"content"}),t._v(" "),a("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),t._v(" "),a("el-popover",t._b({ref:"externalIdPop",attrs:{disabled:!t.$root.isLite}},"el-popover",t.$root.popLiteProps,!1),[a("PopLite")],1),t._v(" "),a("el-select",{directives:[{name:"popover",rawName:"v-popover:externalIdPop",arg:"externalIdPop"}],ref:"wpUser",attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_wp_user,disabled:t.$root.isLite},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.externalId,callback:function(e){t.$set(t.customer,"externalId",e)},expression:"customer.externalId"}},[a("div",{staticClass:"am-drop"},[t.$root.settings.general.requiredEmailField||t.customer&&t.customer.email?a("div",{staticClass:"am-drop-create-item",on:{click:t.selectCreateNewWPUser}},[t._v("\n "+t._s(t.$root.labels.create_new)+"\n ")]):t._e(),t._v(" "),t._l(t.formOptions.wpUsers,function(t){return a("el-option",{key:t.value,class:{hidden:0===t.value},attrs:{label:t.label,value:t.value}})})],2)])],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.phone+":"}},[a("phone-input",{attrs:{savedPhone:t.customer.phone},on:{phoneFormatted:t.phoneFormatted}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.gender+":"}},[a("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(e){return t.clearValidation()}},model:{value:t.customer.gender,callback:function(e){t.$set(t.customer,"gender",e)},expression:"customer.gender"}},t._l(t.formOptions.genders,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.date_of_birth+":"}},[a("v-date-picker",{attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"is-expanded":!1,"input-class":"el-input__inner",placeholder:t.$root.labels.select_date_of_birth,"available-dates":{end:this.$moment().toDate().setDate(this.$moment().toDate().getDate()-1)},formats:t.vCalendarFormats},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.birthday,callback:function(e){t.$set(t.customer,"birthday",e)},expression:"customer.birthday"}})],1),t._v(" "),a("div",{staticClass:"am-divider"}),t._v(" "),a("el-form-item",{attrs:{label:t.$root.labels.note_internal+":"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.customer.note,callback:function(e){t.$set(t.customer,"note",e)},expression:"customer.note"}})],1)],1)],1),t._v(" "),t.dialogLoading?t._e():a("dialog-actions",{attrs:{formName:"customer",urlName:"users/customers",isNew:0===t.customer.id,entity:t.customer,getParsedEntity:t.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},buttonText:{confirm:{status:{yes:"visible"===t.customer.status?t.$root.labels.visibility_hide:t.$root.labels.visibility_show,no:t.$root.labels.no}}},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===t.$root.settings.capabilities.canDelete,haveRemoveEffect:!0,haveDuplicate:!1},message:{success:{save:t.$root.labels.customer_saved,remove:t.$root.labels.customer_deleted,show:"",hide:""},confirm:{remove:t.$root.labels.confirm_delete_customer,show:"",hide:"",duplicate:""}}},on:{errorCallback:t.errorCallback}})],1)},staticRenderFns:[]}},737:function(t,e,a){var i=a(325)(a(738),a(739),!1,null,null,null);t.exports=i.exports},738:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(675),o=a(674);e.default={mixins:[i.a,o.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:";"}]}},updated:function(){},mounted:function(){},methods:{changeFields:function(){},closeDialog:function(){this.$emit("closeDialogExport")},getAction:function(){}},components:{}}},739:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"am-dialog-scrollable"},[a("div",{staticClass:"am-dialog-header"},[a("el-row",[a("el-col",{attrs:{span:14}},[a("h2",[t._v(t._s(t.$root.labels.export))])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[a("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),a("BlockLite"),t._v(" "),a("el-form",{class:{"am-lite-container-disabled":t.$root.isLite},attrs:{"label-position":"top"}},[a("el-form-item",{attrs:{label:t.$root.labels.csv_delimiter+":"}},[a("el-select",{attrs:{placeholder:t.$root.labels.csv_delimiter},on:{change:t.changeFields},model:{value:t.delimiter,callback:function(e){t.delimiter=e},expression:"delimiter"}},t._l(t.delimiters,function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}),1)],1),t._v(" "),t._l(t.data.fields,function(e){return[a("el-checkbox",{attrs:{checked:"",label:e.label,border:""},on:{change:t.changeFields},model:{value:e.checked,callback:function(a){t.$set(e,"checked",a)},expression:"field.checked"}})]})],2)],1),t._v(" "),a("div",{staticClass:"am-dialog-footer",class:{"am-lite-container-disabled":t.$root.isLite}},[a("div",{staticClass:"am-dialog-footer-actions"},[a("el-row",[a("el-col",{staticClass:"align-right",attrs:{sm:24}},[a("el-button",{attrs:{type:""},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary","native-type":"submit"},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.export)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},740:function(t,e,a){var i=a(325)(a(741),a(742),!1,null,null,null);t.exports=i.exports},741:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(679),o=a.n(i),n=a(721),s=(a.n(n),a(674)),r=a(675),l=a(676),c=a(678);e.default={mixins:[r.a,s.a,l.a,c.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 o.a,payment:{},paymentStatuses:[{value:"pending",label:this.$root.labels.pending},{value:"paid",label:this.$root.labels.paid}],showDeleteConfirmation:!1,showUpdatePaymentAmount:!1}},created:function(){this.bookingFetched&&(this.setFinance(),this.dialogLoading=!1)},updated:function(){this.$nextTick(function(){var t=this;setTimeout(function(){t.inlineSVG()},5)})},methods:{instantiateDialog:function(){null!==this.modalData.bookings&&(this.setFinance(),this.dialogLoading=!1)},setFinance:function(){var t=this;t.modalData.bookings.forEach(function(e){e.payments.forEach(function(a){a.id===t.modalData.paymentId&&(t.payment=a,t.booking=e,t.finance.extrasPriceTotal=0,e.extras.forEach(function(a){t.finance.extrasPriceTotal+=a.price*a.quantity*e.persons}),t.finance.bookablePriceTotal=e.price*e.persons,t.finance.subTotal=t.finance.bookablePriceTotal+t.finance.extrasPriceTotal,t.finance.discountTotal=t.finance.subTotal/100*(e.coupon?e.coupon.discount:0)+(e.coupon?e.coupon.deduction:0),t.finance.total=t.finance.subTotal-t.finance.discountTotal,t.finance.total=t.finance.total>=0?t.finance.total:0,t.finance.due=t.finance.total-t.payment.amount>=0?t.finance.total-t.payment.amount:0)})})},closeDialog:function(){this.$emit("closeDialogPayment")},getPaymentStatus:function(t){var e="";return this.paymentStatuses.forEach(function(a){a.value===t&&(e=a.label)}),e},deletePayment:function(){var t=this;this.dialogLoading=!0,this.$http.post(this.$root.getAjaxUrl+"/payments/delete/"+this.payment.id).then(function(e){t.dialogLoading=!1,e.data&&(t.$emit("updatePaymentCallback",t.payment.id),t.showDeleteConfirmation=!t.showDeleteConfirmation,t.notify(t.$root.labels.success,t.$root.labels.payment_deleted,"success"))}).catch(function(e){t.dialogLoading=!1,t.errorMessage=e.message})},updatePayment:function(){var t=this;this.dialogLoading=!0,this.form.post(this.$root.getAjaxUrl+"/payments/"+this.payment.id,this.payment).then(function(){t.showUpdatePaymentAmount=!t.showUpdatePaymentAmount,t.setFinance(),t.notify(t.$root.labels.success,t.$root.labels.payment_saved,"success"),t.$emit("updatePaymentCallback"),t.dialogLoading=!1}).catch(function(e){t.dialogLoading=!1,t.errorMessage=e.message})},getPaymentGatewayNiceName:function(){return"onSite"===this.payment.gateway?this.$root.labels.on_site:"wc"===this.payment.gateway?this.payment.gatewayTitle:this.payment.gateway?this.payment.gateway.charAt(0).toUpperCase()+this.payment.gateway.slice(1):void 0}},watch:{bookingFetched:function(){!0===this.bookingFetched&&this.instantiateDialog()}},components:{Money:n.Money}}},742:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[a("div",{staticClass:"am-dialog-loader-content"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),a("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.dialogLoading?t._e():a("div",{staticClass:"am-dialog-scrollable"},[a("div",{staticClass:"am-dialog-header"},[a("el-row",[a("el-col",{attrs:{span:18}},[a("h2",[t._v(t._s(t.$root.labels.payment_details))])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:6}},[a("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),a("div",{staticClass:"am-payment-details"},[a("el-row",{staticClass:"am-payment-details-row"},[a("h4",[t._v(t._s(t.$root.labels.customer))]),t._v(" "),a("el-col",{attrs:{span:24}},[a("h3",[t._v(t._s(t.modalData.customer?t.modalData.customer.firstName+" "+t.modalData.customer.lastName:""))]),t._v(" "),a("p",[t._v(t._s(t.modalData.customer?t.modalData.customer.email:""))])])],1),t._v(" "),a("el-row",{staticClass:"am-payment-details-row"},[a("h4",[t._v(t._s(t.$root.labels.payment))]),t._v(" "),a("el-col",{attrs:{span:12}},[a("p",[t._v(t._s(t.$root.labels.date))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.payment_method))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.status))])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFrontedFormattedDate(t.payment.dateTime)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[a("img",{staticClass:"svg",attrs:{width:"14px",src:t.$root.getUrl+"public/img/payments/"+t.payment.gateway+".svg"}}),t._v("\n "+t._s(t.getPaymentGatewayNiceName())+"\n ")]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[a("i",{class:{"el-icon-circle-check":"paid"===t.payment.status,"el-icon-refresh":"paid"!==t.payment.status}}),t._v(" "),a("span",[t._v(t._s(t.getPaymentStatus(t.payment.status)))])])])],1),t._v(" "),a("el-row",{staticClass:"am-payment-details-row"},[a("h4",[t._v(t._s(t.$root.labels[t.modalData.bookableType+"_info"]))]),t._v(" "),a("el-col",{attrs:{span:12}},[a("p",[t._v(t._s(t.$root.labels[t.modalData.bookableType]))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.date))]),t._v(" "),t.modalData.providers.length&&"appointment"===t.modalData.bookableType?a("p",[t._v(t._s(t.$root.labels.employee))]):t._e()]),t._v(" "),a("el-col",{attrs:{span:12}},[a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.modalData.bookableName))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFrontedFormattedDateTime(t.modalData.bookingStart)))]),t._v(" "),t.modalData.providers.length&&"appointment"===t.modalData.bookableType?a("p",{staticClass:"am-semi-strong"},[a("img",{staticClass:"am-employee-photo",attrs:{src:t.pictureLoad(t.modalData.providers[0],!0)},on:{error:function(e){return t.imageLoadError(t.modalData.providers[0].id,!0)}}}),t._v("\n "+t._s(t.modalData.providers.length?t.modalData.providers[0].fullName:"")+"\n ")]):t._e()])],1),t._v(" "),a("el-row",{staticClass:"am-payment-details-row am-payment-summary"},[a("el-col",{attrs:{span:12}},[a("p",[t._v(t._s(t.$root.labels[("appointment"===t.modalData.bookableType?"service":"event")+"_price"]))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.extras))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.subtotal))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.discount_amount))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.paid))]),t._v(" "),a("p",[t._v(t._s(t.$root.labels.due))]),t._v(" "),a("p",{staticClass:"am-payment-total"},[t._v(t._s(t.$root.labels.total))])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.finance.bookablePriceTotal)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.finance.extrasPriceTotal)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.finance.subTotal)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.finance.discountTotal)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.payment.amount)))]),t._v(" "),a("p",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFormattedPrice(t.finance.due)))]),t._v(" "),a("p",{staticClass:"am-semi-strong am-payment-total"},[t._v(t._s(t.getFormattedPrice(t.finance.total)))])])],1)],1)]),t._v(" "),!0!==t.$root.settings.capabilities.canWriteOthers||t.dialogLoading?t._e():a("div",{staticClass:"am-dialog-footer"},[a("div",{staticClass:"am-dialog-footer-actions"},[a("transition",{attrs:{name:"slide-vertical"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.showDeleteConfirmation,expression:"showDeleteConfirmation"}],staticClass:"am-dialog-confirmation"},[a("h3",[t._v(t._s(t.$root.labels.confirm_delete_payment))]),t._v(" "),a("div",{staticClass:"align-left"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation,t.showDeleteConfirmation=!1}}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.deletePayment()}}},[t._v("\n "+t._s(t.$root.labels.delete)+"\n ")])],1)])]),t._v(" "),a("transition",{attrs:{name:"slide-vertical"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.showUpdatePaymentAmount,expression:"showUpdatePaymentAmount"}],staticClass:"am-dialog-confirmation"},[a("el-form",{attrs:{"label-position":"top"}},[a("h3",[t._v(t._s(t.$root.labels.enter_new_payment_amount))]),t._v(" "),a("el-row",{staticClass:"am-no-padding",attrs:{gutter:24}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:t.$root.labels.payment+":"}},[a("money",t._b({staticClass:"el-input__inner",model:{value:t.payment.amount,callback:function(e){t.$set(t.payment,"amount",e)},expression:"payment.amount"}},"money",t.moneyComponentData,!1))],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:t.$root.labels.status+":"}},[a("el-select",{model:{value:t.payment.status,callback:function(e){t.$set(t.payment,"status",e)},expression:"payment.status"}},t._l(t.paymentStatuses,function(e){return a("el-option",{key:e.value,staticClass:"am-appointment-status-option",attrs:{label:e.label,value:e.value}},[a("span",{staticClass:"am-appointment-status-symbol",class:e.value}),t._v(" "),a("span",[t._v(t._s(e.label))])])}),1)],1)],1)],1),t._v(" "),a("div",{staticClass:"align-left"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.showUpdatePaymentAmount=!t.showUpdatePaymentAmount}}},[t._v("\n "+t._s(t.$root.labels.close)+"\n ")])],1)],1)],1)]),t._v(" "),a("el-row",[a("el-col",{staticClass:"align-left",attrs:{sm:6}},[!0===t.$root.settings.capabilities.canDelete?a("el-button",{staticClass:"am-button-icon",on:{click:function(e){t.showDeleteConfirmation=!t.showDeleteConfirmation,t.showUpdatePaymentAmount=!1}}},[a("img",{staticClass:"svg",attrs:{alt:t.$root.labels.delete,src:t.$root.getUrl+"public/img/delete.svg"}})]):t._e(),t._v(" "),a("el-button",{staticClass:"am-button-icon",on:{click:function(e){t.showUpdatePaymentAmount=!t.showUpdatePaymentAmount,t.showDeleteConfirmation=!1}}},[a("img",{staticClass:"svg",attrs:{alt:t.$root.labels.edit,src:t.$root.getUrl+"public/img/edit.svg"}})])],1),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{sm:18}},[a("el-button",{attrs:{type:""},on:{click:t.closeDialog}},[t._v("\n "+t._s(t.$root.labels.cancel)+"\n ")]),t._v(" "),a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:function(e){return t.updatePayment()}}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")])],1)],1)],1)])])},staticRenderFns:[]}},744:function(t,e,a){"use strict";e.a={data:function(){return{appointment:null,bookings:[],duplicateEvent:!1,exportAction:"",exportParams:{fields:[{label:this.$root.labels.customers,value:"customers",checked:!0},{label:this.$root.labels.employee,value:"employee",checked:!0},{label:this.$root.labels.service,value:"service",checked:!0},{label:this.$root.labels.start_time,value:"startTime",checked:!0},{label:this.$root.labels.end_time,value:"endTime",checked:!0},{label:this.$root.labels.note,value:"note",checked:!0},{label:this.$root.labels.status,value:"status",checked:!0}]},savedAppointment:null,statuses:[{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}],options:{fetched:!1,entities:{categories:[],customers:[],customFields:[],employees:[],locations:[],services:[]},entitiesChoices:{}}}},methods:{getInitAppointmentObject:function(){return{id:0,bookings:[],categoryId:"",serviceId:"",providerId:"",locationId:"",selectedDate:null,selectedPeriod:"",status:this.$root.settings.general.defaultAppointmentStatus,internalNotes:"",notifyParticipants:this.$root.settings.notifications.notifyCustomers,dateTimeSlots:[],calendarTimeSlots:[],extrasTotalPrice:0,serviceTotalPrice:0,discountTotalPrice:0,providerServiceMinCapacity:0,providerServiceMaxCapacity:0,extrasCount:0,extrasSelectedCount:0}},showDialogNewAppointment:function(){this.resetEntitiesFilter(),this.setBookings(0),this.savedAppointment=null,this.appointment=this.getInitAppointmentObject(),1===this.options.entities.employees.length&&this.$root.isLite&&(this.appointment.providerId=this.options.entities.employees[0].id),this.dialogAppointment=!0},showDialogEditAppointment:function(t){this.dialogAppointment=!0,this.resetEntitiesFilter(),this.getAppointment(t)},closeDialogAppointment:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.duplicateEvent=t,this.dialogAppointment=!1},setBookings:function(t){var e=[],a=this;this.options.entities.customers.forEach(function(i){if("visible"===i.status){var o=0,n=[],s=[],r=null,l=0,c=1,u=JSON.stringify({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone});a.appointment&&t&&a.appointment.bookings.forEach(function(t){t.customerId===i.id&&(o=t.id,n=t.extras,s=t.payments,l=t.price,c=t.persons,r=t.coupon,u=t.info)}),e.push({id:o,customer:i,status:a.$root.settings.general.defaultAppointmentStatus,persons:c,total:0,extras:n,payments:s,price:l,coupon:r,added:!1,info:u,customFields:{}})}}),this.bookings=e},getAppointment:function(t){var e=this;this.$http.get(this.$root.getAjaxUrl+"/appointments/"+t).then(function(a){var i=e;e.savedAppointment=JSON.parse(JSON.stringify(a.data.data.appointment)),e.appointment=Object.assign(e.getInitAppointmentObject(),a.data.data.appointment),e.appointment.notifyParticipants=!!e.appointment.notifyParticipants,e.appointment.bookings.forEach(function(t){var e=null;i.options.entities.services.forEach(function(t){t.id===i.appointment.serviceId&&(e=JSON.parse(JSON.stringify(t.extras))).forEach(function(t){t.quantity=1,t.selected=!1})}),t.customer=null,t.added=!1,i.options.entities.customers.forEach(function(e){if(e.id===t.customerId){t.customer=e;var a=i.getCustomerInfo(t);0!==t.id&&a&&(t.info=JSON.stringify({firstName:a.firstName,lastName:a.lastName,email:a.email,phone:a.phone})),t.added=!0}}),t.extras.forEach(function(t){e.forEach(function(e){e.extraId===t.extraId&&(e.id=t.id,e.selected=!0,e.quantity=t.quantity?t.quantity:1,e.price=t.price)})}),e.forEach(function(t){t.selected||(t.id=0)}),t.extras=e,t.customFields=JSON.parse(t.customFields)}),e.setBookings(t)}).catch(function(t){console.log(t.message)})},sortBookings:function(t){t.sort(function(t,e){return(t.customer.firstName+" "+t.customer.lastName).localeCompare(e.customer.firstName+" "+e.customer.lastName)})},duplicateAppointmentCallback:function(t){var e=this;this.appointment=t,this.appointment.id=0,this.appointment.selectedDate=null,this.appointment.selectedPeriod="",this.appointment.dateTimeSlots=[],this.appointment.calendarTimeSlots=[],setTimeout(function(){e.dialogAppointment=!0},300)},getCustomersFromGroup:function(t){var e="",a=this;return t.bookings.forEach(function(t){if(a.options.entities.customers.length){var i=a.getCustomerById(t.customerId);e+=''+i.firstName+" "+i.lastName+"
"}}),e},saveCustomerCallback:function(t){this.options.entities.customers.push(t.user);var e={id:0,customer:t.user,status:this.$root.settings.general.defaultAppointmentStatus,persons:1,total:0,extras:this.appointment.serviceId?this.getServiceById(this.appointment.serviceId).extras:[],payments:[],coupon:null,info:JSON.stringify({firstName:t.user.firstName,lastName:t.user.lastName,email:t.user.email,phone:t.user.phone}),customFields:[],added:!0};this.bookings.push(e),this.sortBookings(this.bookings),null!==this.appointment&&(this.appointment.bookings.push(e),this.sortBookings(this.appointment.bookings)),this.setBookingCustomFields()},updateAppointmentStatus:function(t,e,a){var i=this;this.updateStatusDisabled=!0,this.form.post(this.$root.getAjaxUrl+"/appointments/status/"+t.id,{status:e}).then(function(o){a&&i.setTotalStatusCounts(t,e,o.data.status),i.notify(t.status===o.data.status?i.$root.labels.success:i.$root.labels.error,o.data.message,t.status===o.data.status?"success":"error"),t.status=o.data.status,i.updateStatusDisabled=!1}).catch(function(t){i.errorMessage=t.message,i.updateStatusDisabled=!1})},getAppointmentPaymentMethods:function(t){var e=[];return t.forEach(function(t){var a=t.payments.length?t.payments[0].gateway:null;-1===e.indexOf(a)&&e.push(a)}),e},updatePaymentCallback:function(t){this.appointment.bookings.forEach(function(e){e.payments.forEach(function(a,i){a.id===t&&e.payments.splice(i,1)})}),this.dialogPayment=!1}},watch:{dialogAppointment:function(){!1===this.dialogAppointment&&!1===this.duplicateEvent&&(this.appointment=null)}}}},745:function(t,e,a){var i=a(325)(a(746),a(754),!1,null,null,null);t.exports=i.exports},746:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(747),o=a(689),n=a.n(o),s=a(675),r=a(674),l=a(676),c=a(693),u=a(732),d=a(678),h=a(748),m=a.n(h),p=a(751),f=a.n(p),g=a(720),v=a(1),b=a.n(v);e.default={mixins:[c.a,s.a,r.a,l.a,d.a,g.a,u.a],props:{appointment:null,bookings:null,options:null,entitiesChoices:null},data:function(){var t=this,e=function(e,a,i){a||(t.newAppointmentTabs="schedule"),i()};return{availableDates:[],categorySpinnerActive:!1,dialogLoading:!0,disabledWeekdays:null,employeeSpinnerActive:!1,executeUpdate:!0,filter:null,locationSpinnerActive:!1,mounted:!1,newAppointmentTabs:"schedule",serviceSpinnerActive:!1,statusMessage:"",loadingTimeSlots:!1,payment:{amount:0,gateway:"onSite"},rulesInit:{bookings:[{required:!0,message:this.$root.labels.select_customer_warning,trigger:"submit",type:"array"},{validator:function(e,a,i){t.appointment.serviceId&&t.appointment.providerId&&t.getApprovedPersonsCount()>t.appointment.providerServiceMaxCapacity?(t.newAppointmentTabs="schedule",i(new Error(t.$root.labels.select_max_customer_count_warning+" "+t.appointment.providerServiceMaxCapacity))):i()},trigger:"submit"}],serviceId:[{required:!0,message:this.$root.labels.select_service_warning,trigger:"submit",type:"number"}],providerId:[{required:!0,message:this.$root.labels.select_employee_warning,trigger:"submit",type:"number"}],selectedDate:[{validator:e,trigger:"submit"},{required:!0,message:this.$root.labels.select_date_warning,trigger:"submit",type:"date"}],"selectedPeriod.time":[{validator:e,trigger:"submit"},{required:!0,message:this.$root.labels.select_time_warning,trigger:"submit"}]},rules:{},statuses:[{id:1,value:"approved",label:this.$root.labels.approved},{id:0,value:"pending",label:this.$root.labels.pending},{id:2,value:"canceled",label:this.$root.labels.canceled},{id:3,value:"rejected",label:this.$root.labels.rejected}]}},mounted:function(){this.rules=this.rulesInit,this.instantiateDialog()},updated:function(){this.instantiateDialog()},methods:{updateByCustomer:function(){var t=this;this.dialogLoading=!0;var e=this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time;this.$http.post(this.$root.getAjaxUrl+"/appointments/time/"+this.appointment.id,{bookingStart:e}).then(function(e){t.$emit("saveCallback",e),setTimeout(function(){t.dialogLoading=!1,t.$emit("closeDialog")},300),t.notify(t.$root.labels.success,t.$root.labels.appointment_rescheduled,"success")}).catch(function(e){if(e.response){t.dialogLoading=!1;var a=t;setTimeout(function(){"timeSlotUnavailable"in e.response.data.data&&!0===e.response.data.data.timeSlotUnavailable&&a.notify(a.$root.labels.error,a.$root.labels.time_slot_unavailable,"error")},200)}})},editPayment:function(t){this.$emit("editPayment",t)},instantiateDialog:function(){(null!==this.appointment||null!==this.appointment&&0===this.appointment.id)&&!0===this.executeUpdate&&(this.filter=new i.a(this.entitiesChoices,this.options.entities),0!==this.appointment.id?(this.setCategory(),this.setLocation(),this.handleCustomerChange(),this.filter=new i.a(this.entitiesChoices,this.options.entities),this.filter.process("employees",this.appointment.providerId,["locations","categories","services"]),this.filter.process("locations",this.appointment.locationId,["categories","employees","services"]),this.filter.process("services",this.appointment.serviceId,["locations","employees","categories"]),this.filter.process("categories",this.appointment.categoryId,["locations","employees","services"]),this.getTimeSlots(function(t){var e=this,a=e.appointment.bookingStart.split(" "),i=a[0],o=a[1].slice(0,-3);if(i in t){if(!(o in t[i])){var n=Object.keys(t[i]);n.push(o);var s={};n.sort().forEach(function(a){s[a]=a===o?[e.appointment.providerId]:t[i][a]}),t[i]=s}}else t[i]={},t[i][o]=[this.appointment.providerId];this.appointment.selectedDate=b()(i).toDate(),this.appointment.selectedPeriod={time:o,employee:e.appointment.providerId},this.updateCalendar(t)}.bind(this))):0===this.appointment.id&&""!==this.appointment.serviceId&&(this.setCategory(),this.setLocation(),this.getTimeSlots(this.updateCalendar)),this.mounted=!0,this.executeUpdate=!1,null!==this.appointment&&0===this.appointment.id&&(this.dialogLoading=!1))},setCategory:function(){var t=this;this.appointment.categoryId=this.options.entities.services.filter(function(e){return e.id===t.appointment.serviceId})[0].categoryId},setLocation:function(){var t=this;this.appointment.locationId=this.options.entities.employees.filter(function(e){return t.appointment.providerId===e.id})[0].locationId},closeDialog:function(){this.$emit("closeDialog")},getParsedEntity:function(){var t=[];return this.appointment.bookings.forEach(function(e){var a=[];e.extras.forEach(function(t){t.selected&&a.push({id:t.id,customerBookingId:e.id,extraId:t.extraId,quantity:t.quantity,price:t.price})}),t.push({id:e.id,customerId:e.customer.id,status:e.status,persons:e.persons,extras:a,customFields:JSON.stringify(e.customFields),coupon:e.coupon})}),{serviceId:this.appointment.serviceId,providerId:this.appointment.providerId,bookings:t,bookingStart:this.getStringFromDate(this.appointment.selectedDate)+" "+this.appointment.selectedPeriod.time,notifyParticipants:this.appointment.notifyParticipants?1:0,internalNotes:this.appointment.internalNotes,id:this.appointment.id,payment:this.payment}},showDialogNewCustomer:function(){this.$emit("showDialogNewCustomer")},handleCustomerChange:function(){this.setSelectedExtrasCount(),this.setServiceExtrasForCustomers(!1),this.setPrice(),this.setServiceCapacityForProvider(),this.setBookingCustomFields(),this.addCustomFieldsValidationRules(),this.$emit("sortBookings",this.appointment.bookings)},handleCustomerRemove:function(t){this.clearValidation(),this.appointment.bookings.splice(t,1),this.setPrice()},setServiceExtrasForCustomers:function(t){var e=this,a=null;e.appointment.serviceId&&(e.options.entities.services.forEach(function(t){t.id===e.appointment.serviceId&&(a=t.extras,e.appointment.extrasCount=a.length)}),e.appointment.bookings.forEach(function(e){(t||!e.id&&!e.added)&&(e.extras=JSON.parse(JSON.stringify(a)),e.extras.forEach(function(t){t.selected=!1,t.id=0,t.customerBookingId=0})),e.added=!0}),this.setSelectedExtrasCount())},handleSelected:function(){for(var t=this,e=document.querySelectorAll(".am-appointment-status-option.selected"),a=0;a0&&this.getTimeSlots(this.updateCalendar)},getStringFromDate:function(t){return t.getFullYear()+"-"+"0".concat(t.getMonth()+1).slice(-2)+"-"+"0".concat(t.getDate()).slice(-2)},updateCalendar:function(t){var e=this;this.appointment.calendarTimeSlots=t;var a=[];Object.keys(this.appointment.calendarTimeSlots).forEach(function(t){a.push(e.getDate(t))}),this.availableDates=a,this.disabledWeekdays={weekdays:[]},this.disabledWeekdays=0===this.availableDates.length?{weekdays:[1,2,3,4,5,6,7]}:null,this.dateChange()},getTimeSlots:function(t){var e=this,a=this.appointment,i=[];a.serviceId&&(this.loadingTimeSlots=!0,this.appointment.bookings.forEach(function(t){t.extras.forEach(function(t){t.selected&&i.push({id:t.extraId,quantity:t.quantity})})}),this.$http.get(this.$root.getAjaxUrl+"/slots",{params:{serviceId:a.serviceId,providerIds:a.providerId?[a.providerId]:[],extras:JSON.stringify(i),excludeAppointmentId:a.id,group:0}}).then(function(a){t(a.data.data.slots),e.dialogLoading=!1,e.loadingTimeSlots=!1}).catch(function(t){console.log(t.message),e.loadingTimeSlots=!1}))},dateChange:function(){this.clearValidation();var t=this,e=[],a=null,i=!1;this.appointment.selectedDate&&this.appointment.calendarTimeSlots&&(a=this.appointment.calendarTimeSlots[this.getStringFromDate(this.appointment.selectedDate)])?(Object.keys(a).forEach(function(o){t.appointment.selectedPeriod&&t.appointment.selectedPeriod.hasOwnProperty("time")&&t.appointment.selectedPeriod.time===o&&(i=!0),e.push({time:o,employees:a[o]})}),i||(this.appointment.selectedPeriod="")):(this.appointment.selectedDate=null,this.appointment.selectedPeriod=""),this.appointment.dateTimeSlots=e},setSelectedExtrasCount:function(){var t=0;this.appointment.bookings.forEach(function(e){e.extras.forEach(function(e){e.selected&&t++})}),this.appointment.extrasSelectedCount=t},clearValidation:function(){void 0!==this.$refs.appointment&&this.$refs.appointment.clearValidate()},errorCallback:function(t){var e=this;setTimeout(function(){"timeSlotUnavailable"in t.data&&!0===t.data.timeSlotUnavailable&&(e.notify(e.$root.labels.error,e.$root.labels.time_slot_unavailable,"error"),e.getTimeSlots(e.updateCalendar))},200)},addCustomFieldsValidationRules:function(){if(this.appointment.serviceId&&this.appointment.bookings.length>0){this.rules=this.rulesInit;for(var t=0;t0&&this.appointment.bookings.length>0&&this.appointment.serviceId&&t.includes(this.appointment.serviceId)},validationBookingsFailCallback:function(){this.newAppointmentTabs="customFields"}},computed:{locationsFiltered:function(){var t=this;return this.options.entities.locations.filter(function(e){return"visible"===e.status||t.appointment.id&&t.appointment.providerId&&"hidden"===e.status&&t.getProviderById(t.appointment.providerId).locationId===e.id})},employeesFiltered:function(){var t=this,e=this.options.entities.employees;return e=e.filter(function(e){return e.serviceList.filter(function(t){return"visible"===t.status}).length>0||e.id===t.appointment.providerId}),this.locationsFiltered.length>0&&(e=e.filter(function(e){return null!==e.locationId&&"visible"===t.getLocationById(e.locationId).status||e.id===t.appointment.providerId})),e.filter(function(e){return"visible"===e.status||e.id===t.appointment.providerId})},servicesFiltered:function(){var t=this,e=[];return this.options.entities.employees.filter(function(t){return"visible"===t.status}).map(function(t){return t.serviceList}).map(function(t){return t.map(function(t){return t.id})}).forEach(function(t){e=e.concat(t)}),this.options.entities.services.filter(function(a){return"visible"===a.status&&-1!==e.indexOf(a.id)||t.appointment.serviceId===a.id})},categoriesFiltered:function(){var t=this;return this.options.entities.categories.filter(function(e){return e.serviceList.filter(function(e){return"visible"===e.status&&-1!==t.servicesFiltered.map(function(t){return t.id}).indexOf(e.id)||t.appointment.serviceId===e.id}).length>0})},selectedCustomersMessage:function(){return""!==this.statusMessage?this.$root.labels.selected_customers+" "+this.statusMessage+":":this.$root.labels.selected_customers+":"},customersMaxLimit:function(){return this.appointment.serviceId&&this.appointment.providerId?this.getProviderService().maxCapacity:this.appointment.serviceId&&this.appointment.providerId?this.getServiceById(this.appointment.serviceId).maxCapacity:0}},watch:{},components:{DialogAppointmentPayment:m.a,DialogAppointmentCustomFields:f.a,DialogActions:n.a}}},747:function(t,e,a){"use strict";var i=function(){function t(t,e){for(var a=0;a-1}):o.concat(t)}),o}},{key:"filterOptions",value:function(t,e,a){t.forEach(function(t){t.disabled=-1===e.indexOf(t.id)&&""!==a})}}]),t}();e.a=o},748:function(t,e,a){var i=a(325)(a(749),a(750),!1,null,null,null);t.exports=i.exports},749:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(674),o=a(678),n=a(723);e.default={mixins:[i.a,o.a,n.a],props:{appointment:{default:function(){},type:Object}},data:function(){return{paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending}]}},methods:{showDialogEditPayment:function(t){this.$emit("editPayment",{paymentId:t,appointment:this.appointment})},getPaymentStatus:function(t){var e="";return this.paymentStatuses.forEach(function(a){a.value===t&&(e=a.label)}),e},getBookingSubtotal:function(t){var e=t.serviceTotalPrice+t.extrasTotalPrice-t.discountTotalPrice;return e>=0?e:0}}}},750:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"am-dialog-table"},[t.appointment.bookings.length>0?a("div",t._l(t.appointment.bookings,function(e){return a("div",{staticClass:"am-customer-extras"},t._l(e.payments,function(i){return a("div",[a("el-row",{staticClass:"am-customer-extras-data"},[a("el-col",[a("h3",[t._v(t._s(e.customer.firstName)+" "+t._s(e.customer.lastName))]),t._v(" "),a("span",[t._v(t._s(e.customer.email))])])],1),t._v(" "),a("el-row",{staticClass:"am-customer-extras-payment",attrs:{gutter:10}},[a("el-col",{attrs:{span:12}},[a("span",{staticClass:"am-strong"},[t._v(t._s(t.$root.labels.payment))])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",{staticClass:"am-link",on:{click:function(e){return t.showDialogEditPayment(i.id)}}},[t._v("\n "+t._s(t.$root.labels.view_payment_details)+"\n ")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",[t._v(t._s(t.$root.labels.date)+":")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",{staticClass:"am-semi-strong"},[t._v(t._s(t.getFrontedFormattedDate(i.dateTime)))])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",[t._v(t._s(t.$root.labels.payment_method)+":")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",{staticClass:"am-semi-strong"},[a("img",{staticClass:"svg",attrs:{width:"14px",src:t.$root.getUrl+"public/img/payments/"+i.gateway+".svg"}}),t._v(" "+t._s(t.getPaymentGatewayNiceName(i))+"\n ")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",[t._v(t._s(t.$root.labels.status)+":")])]),t._v(" "),a("el-col",{attrs:{span:12}},[a("span",{staticClass:"am-semi-strong"},[a("i",{class:{"el-icon-circle-check":"paid"===i.status,"el-icon-refresh":"paid"!==i.status}}),t._v(" "+t._s(t.getPaymentStatus(i.status)))])])],1),t._v(" "),a("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v("\n "+t._s(t.$root.labels.service_price)+":\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[t._v("\n "+t._s(t.getFormattedPrice(e.serviceTotalPrice))+"\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v("\n "+t._s(t.$root.labels.extras)+":\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[t._v("\n "+t._s(t.getFormattedPrice(e.extrasTotalPrice))+"\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v("\n "+t._s(t.$root.labels.discount_amount)+":\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[t._v("\n "+t._s(t.getFormattedPrice(e.discountTotalPrice))+"\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:14}},[a("span",{staticClass:"am-strong"},[t._v(t._s(t.$root.labels.subtotal)+":")])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[a("span",{staticClass:"am-strong"},[t._v(t._s(t.getFormattedPrice(t.getBookingSubtotal(e))))])])],1)],1)}),0)}),0):a("div",[a("p",{attrs:{align:"center"}},[t._v(t._s(t.$root.labels.no_selected_customers))])])])},staticRenderFns:[]}},751:function(t,e,a){var i=a(325)(a(752),a(753),!1,null,null,null);t.exports=i.exports},752:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(720);e.default={mixins:[i.a],props:{appointment:{default:function(){},type:Object},customFields:{default:function(){return[]}}},data:function(){return{hasPayments:!1,paymentStatuses:[{value:"paid",label:this.$root.labels.paid},{value:"pending",label:this.$root.labels.pending}]}},methods:{isCustomFieldVisible:function(t){return-1!==t.services.map(function(t){return t.id}).indexOf(this.appointment.serviceId)},clearValidation:function(){this.$emit("clearValidation")}}}},753:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"am-dialog-table"},t._l(t.appointment.bookings,function(e,i){return a("div",{staticClass:"am-customer-extras"},[a("el-row",{staticClass:"am-customer-extras-data"},[a("el-col",[a("h3",[t._v(t._s(e.customer.firstName)+" "+t._s(e.customer.lastName))]),t._v(" "),a("span",[t._v(t._s(e.customer.email))])])],1),t._v(" "),a("div",{staticClass:"am-custom-fields"},t._l(t.customFields,function(e){return t.isCustomFieldVisible(e)&&"content"!==e.type?a("el-form-item",{key:e.id,attrs:{label:e.label+":",prop:!0===e.required&&"content"!==e.type?"bookings."+i+".customFields."+e.id+".value":null}},["text"===e.type?a("el-input",{attrs:{placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[i].customFields[e.id].value,callback:function(a){t.$set(t.appointment.bookings[i].customFields[e.id],"value",a)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"text-area"===e.type?a("el-input",{staticClass:"am-front-texarea",attrs:{placeholder:"",type:"textarea",rows:3},on:{input:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[i].customFields[e.id].value,callback:function(a){t.$set(t.appointment.bookings[i].customFields[e.id],"value",a)},expression:"appointment.bookings[key].customFields[customField.id].value"}}):"select"===e.type?a("el-select",{attrs:{placeholder:"",clearable:""},on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[i].customFields[e.id].value,callback:function(a){t.$set(t.appointment.bookings[i].customFields[e.id],"value",a)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return a("el-option",{key:e,attrs:{value:t,label:t}})}),1):"checkbox"===e.type?a("el-checkbox-group",{on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.bookings[i].customFields[e.id].value,callback:function(a){t.$set(t.appointment.bookings[i].customFields[e.id],"value",a)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(t,e){return a("el-checkbox",{key:e,attrs:{label:t}})}),1):a("el-radio-group",{model:{value:t.appointment.bookings[i].customFields[e.id].value,callback:function(a){t.$set(t.appointment.bookings[i].customFields[e.id],"value",a)},expression:"appointment.bookings[key].customFields[customField.id].value"}},t._l(t.getCustomFieldOptions(e.options),function(e,i){return a("el-radio",{key:i,attrs:{label:e},on:{change:function(e){return t.clearValidation()}}})}),1)],1):t._e()}),1)],1)}),0)},staticRenderFns:[]}},754:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[a("div",{staticClass:"am-dialog-loader-content"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),a("p",[t._v(t._s(t.$root.labels.loader_message))])])]),t._v(" "),t.appointment&&!t.dialogLoading?a("div",{staticClass:"am-dialog-scrollable",class:{"am-edit":0!==t.appointment.id}},[a("div",{staticClass:"am-dialog-header"},[a("el-row",[a("el-col",{attrs:{span:18}},[0!==t.appointment.id?a("h2",[t._v(t._s(t.$root.labels.edit_appointment))]):a("h2",[t._v(t._s(t.$root.labels.new_appointment))])]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:6}},[a("el-button",{staticClass:"am-dialog-close",attrs:{size:"small",icon:"el-icon-close"},on:{click:t.closeDialog}})],1)],1)],1),t._v(" "),t.mounted?a("el-form",{ref:"appointment",attrs:{model:t.appointment,rules:t.rules,"label-position":"top"}},[a("el-tabs",{model:{value:t.newAppointmentTabs,callback:function(e){t.newAppointmentTabs=e},expression:"newAppointmentTabs"}},[a("el-tab-pane",{attrs:{label:t.$root.labels.schedule,name:"schedule"}},["customer"!==this.$root.settings.role?a("el-form-item",{attrs:{label:t.$root.labels.customers_singular_plural+":",prop:"bookings"}},[a("el-select",{staticClass:"no-tags",attrs:{"value-key":"customer.id",multiple:"","multiple-limit":t.customersMaxLimit,placeholder:t.$root.labels.select_customers,"collapse-tags":"",filterable:""},on:{change:t.handleCustomerChange},model:{value:t.appointment.bookings,callback:function(e){t.$set(t.appointment,"bookings",e)},expression:"appointment.bookings"}},[a("div",{staticClass:"am-drop"},[a("div",{staticClass:"am-drop-create-item",on:{click:t.showDialogNewCustomer}},[t._v("\n "+t._s(t.$root.labels.create_new)+"\n ")]),t._v(" "),t._l(t.bookings,function(e){return a("el-option",{key:e.customer.id,staticClass:"am-has-option-meta",attrs:{label:null!==(t.user=t.getCustomerInfo(e))?t.user.firstName+" "+t.user.lastName:"",value:e}},[a("span",{staticClass:"am-drop-item-name"},[t._v(t._s(e.customer.firstName)+" "+t._s(e.customer.lastName))]),t._v(" "),a("span",{staticClass:"am-drop-item-meta"},[t._v(t._s(e.customer.email))])])})],2)])],1):t._e(),t._v(" "),a("transition",{attrs:{name:"fade"}},[t.appointment.bookings.length>0&&"customer"!==this.$root.settings.role?a("div",{staticClass:"am-selected-dropdown-items"},[a("el-form-item",{attrs:{label:t.selectedCustomersMessage}}),t._v(" "),t._l(t.appointment.bookings,function(e,i){return a("div",{key:i,staticClass:"am-selected-dropdown-item"},[a("el-row",{attrs:{align:"middle",gutter:4,justify:"left"}},[a("el-col",{attrs:{sm:14}},[a("h3",[t._v(t._s(null!==(t.user=t.getCustomerInfo(e))?t.user.firstName+" "+t.user.lastName:""))]),t._v(" "),a("span",[t._v(t._s(e.customer.email))])]),t._v(" "),a("el-col",{staticClass:"am-align-right",attrs:{sm:9}},[a("div",{staticClass:"am-appointment-status small"},[a("span",{staticClass:"am-appointment-status-symbol",class:e.status}),t._v(" "),a("el-select",{on:{change:t.handleBookingChange},model:{value:e.status,callback:function(a){t.$set(e,"status",a)},expression:"booking.status"}},t._l(t.statuses,function(t){return a("el-option",{key:t.value,attrs:{value:t.value}},[a("span",{staticClass:"am-appointment-status-symbol",class:t.value})])}),1)],1),t._v(" "),a("div",{staticClass:"am-appointment-persons small"},[a("img",{staticClass:"svg",attrs:{slot:"prefix",width:"16px",src:t.$root.getUrl+"public/img/group.svg"},slot:"prefix"}),t._v(" "),a("el-select",{staticClass:"small-status",attrs:{"no-data-text":t.$root.labels.choose_a_group_service},on:{change:t.handleBookingChange},model:{value:e.persons,callback:function(a){t.$set(e,"persons",a)},expression:"booking.persons"}},t._l(t.appointment.providerServiceMaxCapacity,function(t){return a("el-option",{key:t,attrs:{value:t}})}),1),t._v(" "),a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.customers_tooltip)},slot:"content"}),t._v(" "),a("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),t._v(" "),a("i",{staticClass:"el-icon-close remove",on:{click:function(e){return t.handleCustomerRemove(i)}}})],1)],1)}),t._v(" "),t.appointment.bookings.length>1?a("div",{staticClass:"group-status-change"},[a("el-row",{attrs:{gutter:4}},[a("el-col",{attrs:{sm:14}},[a("h3",[t._v(t._s(t.$root.labels.change_group_status))])]),t._v(" "),a("el-col",{attrs:{sm:10}},[a("el-form-item",[a("div",{staticClass:"am-appointment-status"},[a("span",{staticClass:"am-appointment-status-symbol",class:t.appointment.status}),t._v(" "),a("el-select",{on:{change:t.handleGroupStatusChange,"visible-change":t.handleSelected},model:{value:t.appointment.status,callback:function(e){t.$set(t.appointment,"status",e)},expression:"appointment.status"}},t._l(t.statuses,function(e){return a("el-option",{key:e.value,staticClass:"am-appointment-status-option",attrs:{label:e.label,value:e.value}},[a("span",{staticClass:"am-appointment-status-symbol",class:e.value},[t._v(t._s(e.label))])])}),1)],1)])],1)],1)],1):t._e()],2):t._e()]),t._v(" "),a("el-form-item",{class:{active:t.categorySpinnerActive},attrs:{label:t.$root.labels.service_category+":"}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_service_category,disabled:"customer"===t.$root.settings.role},on:{change:t.handleCategoryChange},model:{value:t.appointment.categoryId,callback:function(e){t.$set(t.appointment,"categoryId",e)},expression:"appointment.categoryId"}},t._l(t.categoriesFiltered,function(t){return a("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),t._v(" "),a("img",{staticClass:"svg is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1),t._v(" "),a("el-form-item",{class:{active:t.serviceSpinnerActive},attrs:{label:t.$root.labels.service+":",prop:"serviceId"}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_service+":",disabled:"customer"===t.$root.settings.role},on:{change:t.handleServiceChange},model:{value:t.appointment.serviceId,callback:function(e){t.$set(t.appointment,"serviceId",e)},expression:"appointment.serviceId"}},t._l(t.servicesFiltered,function(t){return a("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),t._v(" "),a("img",{staticClass:"svg is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1),t._v(" "),t.locationsFiltered.length?a("el-form-item",{class:{active:t.locationSpinnerActive},attrs:{label:t.$root.labels.location+":",disabled:"customer"===t.$root.settings.role}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_location},on:{change:t.handleLocationChange},model:{value:t.appointment.locationId,callback:function(e){t.$set(t.appointment,"locationId",e)},expression:"appointment.locationId"}},t._l(t.locationsFiltered,function(t){return a("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.name,value:t.id}})}),1),t._v(" "),a("img",{staticClass:"svg is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1):t._e(),t._v(" "),t.$root.isLite?t._e():a("el-form-item",{class:{active:t.employeeSpinnerActive},attrs:{label:t.$root.labels.employee+":",prop:"providerId"}},[a("el-select",{attrs:{filterable:"",clearable:"",placeholder:t.$root.labels.select_employee,disabled:"customer"===t.$root.settings.role},on:{change:t.handleEmployeeChange},model:{value:t.appointment.providerId,callback:function(e){t.$set(t.appointment,"providerId",e)},expression:"appointment.providerId"}},t._l(t.employeesFiltered,function(t){return a("el-option",{key:t.id,attrs:{disabled:t.disabled,label:t.firstName+" "+t.lastName,value:t.id}})}),1),t._v(" "),a("img",{staticClass:"svg is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1),t._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{staticClass:"v-calendar-column",attrs:{span:12}},[a("el-form-item",{class:{active:t.loadingTimeSlots},attrs:{label:t.$root.labels.date+":",prop:"selectedDate"}},[a("v-date-picker",{directives:[{name:"show",rawName:"v-show",value:!t.loadingTimeSlots,expression:"!loadingTimeSlots"}],attrs:{mode:"single","popover-visibility":"focus","popover-direction":"top","tint-color":"#1A84EE","show-day-popover":!1,"input-props":{class:"el-input__inner"},"available-dates":t.availableDates,"is-expanded":!1,"is-required":!0,"disabled-dates":t.disabledWeekdays,disabled:!1,formats:t.vCalendarFormats},on:{input:t.dateChange},model:{value:t.appointment.selectedDate,callback:function(e){t.$set(t.appointment,"selectedDate",e)},expression:"appointment.selectedDate"}}),t._v(" "),a("el-input",{directives:[{name:"show",rawName:"v-show",value:t.loadingTimeSlots,expression:"loadingTimeSlots"}],attrs:{placeholder:t.appointment.selectedDate?t.getFrontedFormattedDate(t.appointment.selectedDate):this.momentDateFormat,disabled:!0}}),t._v(" "),a("img",{staticClass:"svg is-spinner is-spinner-right",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{class:{active:t.loadingTimeSlots},attrs:{label:t.$root.labels.time+":",prop:"selectedPeriod.time"}},[a("el-select",{attrs:{"value-key":"time",filterable:"",placeholder:t.$root.labels.select_time,disabled:t.loadingTimeSlots},on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.selectedPeriod,callback:function(e){t.$set(t.appointment,"selectedPeriod",e)},expression:"appointment.selectedPeriod"}},t._l(t.appointment.dateTimeSlots,function(e){return a("el-option",{key:e.time,attrs:{label:t.getFrontedFormattedTime(e.time+":00"),value:e}})}),1),t._v(" "),a("img",{staticClass:"svg is-spinner",attrs:{src:t.$root.getUrl+"public/img/oval-spinner.svg"}})],1)],1)],1),t._v(" "),"customer"!==this.$root.settings.role?a("el-form-item",[a("el-checkbox",{on:{change:function(e){return t.clearValidation()}},model:{value:t.appointment.notifyParticipants,callback:function(e){t.$set(t.appointment,"notifyParticipants",e)},expression:"appointment.notifyParticipants"}},[t._v("\n "+t._s(t.$root.labels.notify_customers)+"\n "),a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(t.$root.labels.notify_customers_tooltip)},slot:"content"}),t._v(" "),a("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)],1):t._e(),t._v(" "),"customer"!==this.$root.settings.role?a("div",{staticClass:"am-divider"}):t._e(),t._v(" "),"customer"!==this.$root.settings.role?a("el-form-item",{attrs:{label:t.$root.labels.note_internal+":"}},[a("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:6},placeholder:""},on:{input:function(e){return t.clearValidation()}},model:{value:t.appointment.internalNotes,callback:function(e){t.$set(t.appointment,"internalNotes",e)},expression:"appointment.internalNotes"}})],1):t._e()],1),t._v(" "),"customer"!==this.$root.settings.role?a("el-tab-pane",{attrs:{name:"extras"}},[a("span",{attrs:{slot:"label"},slot:"label"},[t._v(t._s(t.$root.labels.extras)+"\n "),t.appointment.serviceId&&t.appointment.bookings.length>0&&t.appointment.extrasSelectedCount>0?a("el-badge",{staticClass:"mark",attrs:{value:t.appointment.extrasSelectedCount}}):t._e()],1),t._v(" "),a("div",{staticClass:"am-dialog-table"},[t.appointment.providerId&&t.appointment.serviceId&&t.appointment.extrasCount>0&&t.appointment.bookings.length>0?a("div",[t._l(t.appointment.bookings,function(e,i){return["approved","pending"].includes(e.status)?a("div",{key:i,staticClass:"am-customer-extras"},[a("el-row",{staticClass:"am-customer-extras-data"},[a("el-col",[a("h3",[t._v(t._s(e.customer.firstName)+" "+t._s(e.customer.lastName))]),t._v(" "),a("span",[t._v(t._s(e.customer.email))])])],1),t._v(" "),t._l(e.extras,function(e){return a("el-row",{key:e.extraId,attrs:{gutter:10}},[a("el-col",{attrs:{span:2}},[a("el-checkbox",{on:{change:function(a){return t.handleExtrasSelectionChange(e)}},model:{value:e.selected,callback:function(a){t.$set(e,"selected",a)},expression:"item.selected"}})],1),t._v(" "),a("el-col",{attrs:{span:10}},[a("span",[t._v(t._s(e.name))])]),t._v(" "),a("el-col",{attrs:{span:7}},[a("el-input-number",{attrs:{type:"number",value:e.quantity,disabled:!e.selected,min:1,max:e.maxQuantity,size:"small"},on:{change:function(a){return t.handleExtrasSelectionChange(e)}},model:{value:e.quantity,callback:function(a){t.$set(e,"quantity",a)},expression:"item.quantity"}})],1),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:5}},[t._v(t._s(t.getFormattedPrice(e.price)))])],1)}),t._v(" "),a("el-row",{staticClass:"subtotal",attrs:{gutter:10}},[a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v("\n "+t._s(t.$root.labels.subtotal)+":\n ")]),t._v(" "),a("el-col",{staticClass:"align-right",attrs:{span:10}},[t._v("\n "+t._s(t.getFormattedPrice(e.extrasTotalPrice))+"\n ")])],1)],2):t._e()}),t._v(" "),a("div",{staticClass:"total"},[a("el-row",{attrs:{gutter:10}},[a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v(t._s(t.$root.labels.service_price)+":")]),t._v(" "),a("el-col",{staticClass:"align-right ",attrs:{span:10}},[t._v(t._s(t.getFormattedPrice(t.appointment.serviceTotalPrice))+"\n ")])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v(t._s(t.$root.labels.extras)+":")]),t._v(" "),a("el-col",{staticClass:"align-right ",attrs:{span:10}},[t._v(t._s(t.getFormattedPrice(t.appointment.extrasTotalPrice))+"\n ")])],1),t._v(" "),a("el-row",{staticClass:"am-strong",attrs:{gutter:10}},[a("el-col",{staticClass:"align-right",attrs:{span:14}},[t._v(t._s(t.$root.labels.total)+":")]),t._v(" "),a("el-col",{staticClass:"align-right ",attrs:{span:10}},[t._v(t._s(t.getAppointmentPrice(t.appointment.serviceId,t.appointment.bookings))+"\n ")])],1)],1)],2):t.appointment.serviceId&&t.appointment.providerId&&t.appointment.serviceId&&0===t.appointment.extrasCount?a("div",[a("p",{attrs:{align:"center"}},[t._v(t._s(t.$root.labels.service_no_extras))])]):a("div",[a("p",{attrs:{align:"center"}},[t._v(t._s(t.$root.labels.no_selected_extras_requirements))])])])]):t._e(),t._v(" "),0!==t.appointment.id&&"customer"!==this.$root.settings.role?a("el-tab-pane",{attrs:{label:t.$root.labels.payment,name:"payment"}},[a("dialog-appointment-payment",{attrs:{appointment:t.appointment},on:{editPayment:t.editPayment}})],1):t._e(),t._v(" "),t.showCustomFieldsTab()&&"customer"!==this.$root.settings.role?a("el-tab-pane",{attrs:{label:t.$root.labels.custom_fields,name:"customFields"}},[a("dialog-appointment-custom-fields",{attrs:{appointment:t.appointment,customFields:this.options.entities.customFields},on:{clearValidation:t.clearValidation}})],1):t._e()],1)],1):t._e()],1):t._e(),t._v(" "),t.appointment&&!t.dialogLoading&&"customer"!==this.$root.settings.role?a("dialog-actions",{attrs:{formName:"appointment",urlName:"appointments",isNew:0===t.appointment.id,entity:t.appointment,getParsedEntity:t.getParsedEntity,hasIcons:!0,status:{on:"visible",off:"hidden"},action:{haveAdd:!0,haveEdit:!0,haveStatus:!1,haveRemove:!0===t.$root.settings.capabilities.canDelete,haveRemoveEffect:!1,haveDuplicate:!0},message:{success:{save:t.$root.labels.appointment_saved,remove:t.$root.labels.appointment_deleted,show:"",hide:""},confirm:{remove:t.$root.labels.confirm_delete_appointment,show:"",hide:"",duplicate:t.$root.labels.confirm_duplicate_appointment}}},on:{errorCallback:t.errorCallback,validationBookingsFailCallback:t.validationBookingsFailCallback}}):t._e(),t._v(" "),a("div",["customer"===this.$root.settings.role?a("div",{staticClass:"am-dialog-footer"},[a("div",{staticClass:"am-dialog-footer-actions"},[a("el-row",[a("el-col",{staticClass:"align-right",attrs:{sm:24}},[a("el-button",{staticClass:"am-dialog-create",attrs:{type:"primary"},on:{click:t.updateByCustomer}},[t._v("\n "+t._s(t.$root.labels.save)+"\n ")])],1)],1)],1)]):t._e(),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogLoading,expression:"dialogLoading"}],staticClass:"am-dialog-loader"},[a("div",{staticClass:"am-dialog-loader-content"},[a("img",{attrs:{src:t.$root.getUrl+"public/img/spinner.svg"}}),t._v(" "),a("p",[t._v(t._s(t.$root.labels.loader_message))])])])])],1)},staticRenderFns:[]}},758:function(t,e,a){var i=a(325)(a(759),a(760),!1,null,null,null);t.exports=i.exports},759:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(693);e.default={mixins:[i.a],props:["app","options"],data:function(){return{}},methods:{getCustomFieldLabel:function(t,e){var a=this.options.entities.customFields.find(function(t){return t.id===parseInt(e)});return void 0!==a?a.label.trim():t.label.trim()},getCustomFieldValue:function(t){return Array.isArray(t)?t.join("; "):t},showCustomField:function(t){return Array.isArray(t)?t.length>0:!!t}}}},760:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"am-appointment-details"},[a("el-row",[t._l(t.app.bookings,function(e,i){return a("el-row",{key:i,class:{"has-divider":t.app.bookings.length>1&&(t.app.bookings.length!==i+1||t.app.internalNotes)}},[t.app.bookings.length>1?a("h3",[t._v("\n "+t._s(null!==(t.user=t.getCustomerById(e.customerId))?t.user.firstName+" "+t.user.lastName:"")+"\n ")]):t._e(),t._v(" "),"customer"!==t.$root.settings.role?a("div",{staticClass:"am-appointment-collapsed-field"},[a("el-col",{attrs:{sm:5}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.customer_email)+":")])]),t._v(" "),a("el-col",{attrs:{sm:7}},[a("p",{staticClass:"am-value"},[t._v("\n "+t._s(null!==(t.user=t.getCustomerById(t.app.bookings[i].customerId))?t.user.email:"")+"\n ")])])],1):t._e(),t._v(" "),t.getCustomerInfo(t.app.bookings[i])&&t.getCustomerInfo(t.app.bookings[i]).phone&&"customer"!==t.$root.settings.role?a("div",{staticClass:"am-appointment-collapsed-field"},[a("el-col",{attrs:{sm:5}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.customer_phone)+":")])]),t._v(" "),a("el-col",{attrs:{sm:7}},[a("p",{staticClass:"am-value"},[t._v("\n "+t._s(t.getCustomerInfo(t.app.bookings[i]).phone)+"\n ")])])],1):t._e(),t._v(" "),t._l(JSON.parse(t.app.bookings[i].customFields),function(e,i){return e&&t.showCustomField(e.value)?a("div",{staticClass:"am-appointment-collapsed-field"},[a("el-col",{attrs:{sm:5}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.getCustomFieldLabel(e,i))+":")])]),t._v(" "),a("el-col",{attrs:{sm:7}},[a("p",{staticClass:"am-value"},[t._v("\n "+t._s(e?t.getCustomFieldValue(e.value):"")+"\n ")])])],1):t._e()})],2)}),t._v(" "),t.app.internalNotes&&"customer"!==t.$root.settings.role?a("el-row",[a("el-col",{attrs:{sm:12}},[a("el-row",[a("el-col",{attrs:{sm:10}},[a("p",{staticClass:"am-data"},[t._v(t._s(t.$root.labels.note)+":")])]),t._v(" "),a("el-col",{attrs:{sm:14}},[a("p",{staticClass:"am-value"},[t._v(t._s(t.app.internalNotes))])])],1)],1)],1):t._e()],2)],1)])},staticRenderFns:[]}},761:function(t,e,a){"use strict";var i=a(797),o=a(798);a.d(e,"a",function(){return o.a}),a.d(e,"b",function(){return o.c}),a.d(e,"c",function(){return o.e});o.a,o.d,o.c,o.e,o.f,o.g,o.h,o.b,o.i,i.a,o.j},795:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(758),o=a.n(i),n=a(722),s=a(744),r=a(732),l=a(796),c=a(800),u=a(801),d=a(733),h=a(674),m=a(745),p=a.n(m),f=a(734),g=a.n(f),v=a(737),b=a.n(v),y=a(740),_=a.n(y),x=a(688),C=a(693),w=a(679),k=a.n(w),S=a(675),P=a(1),D=a.n(P),M=a(676),T=a(690),A=a.n(T),$=a(723),F=a(678),I=a(724),L=a.n(I);e.default={mixins:[n.a,$.a,C.a,s.a,S.a,h.a,x.a,F.a,d.a,M.a,r.a],data:function(){var t=this;return{currentUser:null,todayAppointmentsCount:{approved:null,pending:null},periodChange:{count:0,available:0,occupied:0,revenue:0},previousPeriodStats:{count:0,available:0,occupied:0,revenue:0},selectedPeriodStats:{count:0,available:0,occupied:0,revenue:0},statsLabels:[],customer:null,appointments:[],buttonNewItems:!1,chartTabs:"employee",customersChartData:{labels:[this.$root.labels.new,this.$root.labels.returning,""],datasets:[{backgroundColor:["#1a84ee","#ffd400","#ebeef5"],borderColor:"#E2E6EC",data:[0,0,1],hoverBackgroundColor:["#117ce6","#eec600","#ebeef5"],hoverBorderColor:"#D3DDEA"}]},dialogAppointment:!1,dialogPayment:!1,dialogExport:!1,employees:[],tableStats:"employeeTableStats",smallBarChartAppointmentsData:{labels:[],datasets:[{backgroundColor:"#5FCE19",data:[],hoverBackgroundColor:"#5FCE19",label:"",borderWidth:0}]},smallBarChartAppointmentsOptions:{legend:{display:!1},scales:{xAxes:[{barThickness:6,beginAtZero:!0,gridLines:{display:!1},ticks:{stepSize:1,min:1,autoSkip:!0}}],yAxes:[{display:!1,beginAtZero:!0,gridLines:{display:!1},ticks:{stepSize:10,min:0}}]},tooltips:{custom:function(t){t&&(t.displayColors=!1)},callbacks:{label:function(e,a){return t.statsLabels[e.xLabel]+": "+e.yLabel},title:function(t,e){}}}},smallLineChartLoadData:{labels:[],datasets:[{backgroundColor:"transparent",borderColor:"#9A47FF",data:[],label:"",borderWidth:2,lineTension:0,pointRadius:3,pointBorderColor:"#fff"}]},smallLineChartLoadOptions:{legend:{display:!1},scales:{xAxes:[{gridLines:{display:!1},ticks:{stepSize:10,min:0,autoSkip:!0}}],yAxes:[{display:!1,beginAtZero:!0,gridLines:{display:!1},ticks:{stepSize:1,min:0}}]},tooltips:{custom:function(t){t&&(t.displayColors=!1)},callbacks:{label:function(e,a){return t.statsLabels[e.xLabel]+": "+e.yLabel+"%"},title:function(t,e){}}}},smallLineChartRevenueData:{labels:[],datasets:[{backgroundColor:"transparent",borderColor:"#FD8863",data:[],label:"",borderWidth:2,lineTension:0,pointBackgroundColor:"#FD8863",pointRadius:3,pointBorderColor:"#fff"}]},smallLineChartRevenueOptions:{legend:{display:!1},scales:{xAxes:[{barPercentage:.2,categoryPercentage:.8,gridLines:{display:!1},ticks:{stepSize:1,min:0,autoSkip:!0}}],yAxes:[{display:!1,beginAtZero:!0,gridLines:{display:!1},ticks:{stepSize:1,min:0}}]},tooltips:{custom:function(t){t&&(t.displayColors=!1)},callbacks:{label:function(e,a){return t.statsLabels[e.xLabel]+": "+t.getFormattedPrice(e.yLabel)},title:function(t,e){}}}},employeePeriodStats:[],employeeTableData:[],visibleEmployeeTableData:[],serviceTableData:[],visibleServiceTableData:[],visibleTableDataCount:[],employeeTableParams:{show:5,total:0,page:1},serviceTableParams:{show:5,total:0,page:1},employeesChartData:{labels:[],datasets:[{backgroundColor:"#D3DDEA",data:[],hoverBackgroundColor:"#c8d4e5",label:this.$root.labels.views,borderWidth:0},{backgroundColor:"#5FCE19",data:[],hoverBackgroundColor:"#58BF17",label:this.$root.labels.scheduled_appointments,borderWidth:0}]},defaultBarChartOptions:{responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{barPercentage:.5,categoryPercentage:.8,ticks:{stepSize:1,min:0,autoSkip:!1}}],yAxes:[{gridLines:{display:!0},ticks:{beginAtZero:!0,userCallback:function(t){if(Math.floor(t)===t)return t}}}]}},employeesStats:[],fetched:!1,form:new k.a,locations:[],locationsChartData:{labels:[],datasets:[{backgroundColor:"#D3DDEA",data:[],hoverBackgroundColor:"#c8d4e5",label:this.$root.labels.views,borderWidth:0},{backgroundColor:"#5FCE19",data:[],hoverBackgroundColor:"#58BF17",label:this.$root.labels.scheduled_appointments,borderWidth:0}]},locationsStats:[],params:{dates:this.getDatePickerInitRange()},popover:!1,selectedPaymentModalData:null,services:[],servicesChartData:{labels:[],datasets:[{backgroundColor:"#D3DDEA",data:[],hoverBackgroundColor:"#c8d4e5",label:this.$root.labels.views,borderWidth:0},{backgroundColor:"#5FCE19",data:[],hoverBackgroundColor:"#58BF17",label:this.$root.labels.scheduled_appointments,borderWidth:0}]},totalPastPeriodCustomers:0}},created:function(){this.getDashboardOptions(),this.getCurrentUser()},methods:{revenueFormatter:function(t,e){return this.getFormattedPrice(t.sumPayments)},hoursFormatter:function(t,e){var a=this.getMinutesToDays(t.hoursAppointment);return""===a?0:a},employeeTableSortChange:function(t){switch(t.order){case null:this.employeeTableData=this.employeeTableData.sort(function(t,e){return t.employeeName>e.employeeName?1:-1});break;case"ascending":this.employeeTableData=this.employeeTableData.sort(function(e,a){return e[t.prop]>a[t.prop]?1:-1});break;case"descending":this.employeeTableData=this.employeeTableData.sort(function(e,a){return e[t.prop]e.serviceName?1:-1});break;case"ascending":this.serviceTableData=this.serviceTableData.sort(function(e,a){return e[t.prop]>a[t.prop]?1:-1});break;case"descending":this.serviceTableData=this.serviceTableData.sort(function(e,a){return e[t.prop]25&&t<50:return"#FFA700";case t>50&&t<75:return"#BDDE00";case t>75:default:return"#5FCE19"}},growthClass:function(t){return t>0||"+∞"===t?"am-growth-increase":t<0||"-∞"===t?"am-growth-decrease":"am-growth-equal"},growthPercentageCharacter:function(t){return"+∞"===t||"-∞"===t?"":"%"},growthPercentage:function(t,e){return 0===t&&0===e?0:0===t&&0!==e?"-∞":0!==t&&0===e?"+∞":t-e==0?0:((t-e)/e*100).toFixed(1)}},computed:{newCustomers:function(){return this.customersChartData.datasets[0].data[0]},returningCustomers:function(){return this.customersChartData.datasets[0].data[1]},totalCustomers:function(){return this.newCustomers+this.returningCustomers},newCustomersPercentage:function(){return 0===this.totalCustomers?0:parseFloat((this.newCustomers/this.totalCustomers*100).toFixed(1))},returnedCustomersPercentage:function(){return 0===this.totalCustomers?0:parseFloat((this.returningCustomers/this.totalCustomers*100).toFixed(1))},countGrowthPercentage:function(){return this.growthPercentage(this.selectedPeriodStats.count,this.previousPeriodStats.count)},countGrowthClass:function(){return this.growthClass(this.countGrowthPercentage)},revenueGrowthPercentage:function(){return this.growthPercentage(this.selectedPeriodStats.revenue,this.previousPeriodStats.revenue)},revenueGrowthClass:function(){return this.growthClass(this.revenueGrowthPercentage)},revenueGrowthPercentageCharacter:function(){return this.growthPercentageCharacter(this.revenueGrowthPercentage)},loadGrowthPercentage:function(){return this.growthPercentage(this.selectedPeriodStats.occupied,this.previousPeriodStats.occupied)},loadGrowthClass:function(){return this.growthClass(this.loadGrowthPercentage)},loadGrowthPercentageCharacter:function(){return this.growthPercentageCharacter(this.loadGrowthPercentage)},customersGrowthPercentage:function(){return this.growthPercentage(this.totalCustomers,this.totalPastPeriodCustomers)},customerGrowthClass:function(){return this.growthClass(this.customersGrowthPercentage)},customerGrowthPercentageCharacter:function(){return this.growthPercentageCharacter(this.customersGrowthPercentage)}},components:{BarChart:l.a,DoughnutChart:c.a,LineChart:u.a,DialogCustomer:g.a,DialogAppointment:p.a,DialogPayment:_.a,PageHeader:A.a,DialogExport:b.a,AppointmentListCollapsed:o.a,PaginationBlock:L.a}}},796:function(t,e,a){"use strict";var i=a(761);e.a={extends:i.a,props:["data","options"],data:function(){return{defaultOptions:{responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{barPercentage:.5,categoryPercentage:.8,ticks:{stepSize:1,min:0,autoSkip:!1}}],yAxes:[{gridLines:{display:!0},ticks:{beginAtZero:!0,stepSize:1,min:0,userCallback:function(t){if(Math.floor(t)===t)return t}}}]}}}},methods:{update:function(t){t&&this.renderChart(this.data,this.options),this.$data._chart.update()}},mounted:function(){this.renderChart(this.data,this.options)}}},797:function(t,e,a){"use strict";function i(t,e){if(e){var a=this.$data._chart,i=t.datasets.map(function(t){return t.label}),o=e.datasets.map(function(t){return t.label}),n=JSON.stringify(o);JSON.stringify(i)===n&&e.datasets.length===t.datasets.length?(t.datasets.forEach(function(t,i){var o=Object.keys(e.datasets[i]),n=Object.keys(t),s=o.filter(function(t){return"_meta"!==t&&-1===n.indexOf(t)});for(var r in s.forEach(function(t){delete a.data.datasets[i][t]}),t)t.hasOwnProperty(r)&&(a.data.datasets[i][r]=t[r])}),t.hasOwnProperty("labels")&&(a.data.labels=t.labels,this.$emit("labels:update")),t.hasOwnProperty("xLabels")&&(a.data.xLabels=t.xLabels,this.$emit("xlabels:update")),t.hasOwnProperty("yLabels")&&(a.data.yLabels=t.yLabels,this.$emit("ylabels:update")),a.update(),this.$emit("chart:update")):(a&&(a.destroy(),this.$emit("chart:destroy")),this.renderChart(this.chartData,this.options),this.$emit("chart:render"))}else this.$data._chart&&(this.$data._chart.destroy(),this.$emit("chart:destroy")),this.renderChart(this.chartData,this.options),this.$emit("chart:render")}var o={data:function(){return{chartData:null}},watch:{chartData:i}},n={props:{chartData:{type:Object,required:!0,default:function(){}}},watch:{chartData:i}};e.a={reactiveData:o,reactiveProp:n}},798:function(t,e,a){"use strict";e.j=n,a.d(e,"a",function(){return s}),a.d(e,"d",function(){return r}),a.d(e,"c",function(){return l}),a.d(e,"e",function(){return c}),a.d(e,"f",function(){return u}),a.d(e,"g",function(){return d}),a.d(e,"h",function(){return h}),a.d(e,"b",function(){return m}),a.d(e,"i",function(){return p});var i=a(799),o=a.n(i);function n(t,e){return{render:function(t){return t("div",{style:this.styles,class:this.cssClasses},[t("canvas",{attrs:{id:this.chartId,width:this.width,height:this.height},ref:"canvas"})])},props:{chartId:{default:t,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:function(){return[]}}},data:function(){return{_chart:null,_plugins:this.plugins}},methods:{addPlugin:function(t){this.$data._plugins.push(t)},generateLegend:function(){if(this.$data._chart)return this.$data._chart.generateLegend()},renderChart:function(t,a){this.$data._chart&&this.$data._chart.destroy(),this.$data._chart=new o.a(this.$refs.canvas.getContext("2d"),{type:e,data:t,options:a,plugins:this.$data._plugins})}},beforeDestroy:function(){this.$data._chart&&this.$data._chart.destroy()}}}var s=n("bar-chart","bar"),r=n("horizontalbar-chart","horizontalBar"),l=n("doughnut-chart","doughnut"),c=n("line-chart","line"),u=n("pie-chart","pie"),d=n("polar-chart","polarArea"),h=n("radar-chart","radar"),m=n("bubble-chart","bubble"),p=n("scatter-chart","scatter")},799:function(t,e,a){var i;i=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={rgb2hsl:a,rgb2hsv:i,rgb2hwb:o,rgb2cmyk:n,rgb2keyword:s,rgb2xyz:l,rgb2lab:c,rgb2lch:function(t){return y(c(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],a=t[1]/100,i=t[2]/100;if(0===i)return[0,0,0];return[e,100*(2*(a*=(i*=2)<=1?i:2-i)/(i+a)),100*((i+a)/2)]},hsl2hwb:function(t){return o(u(t))},hsl2cmyk:function(t){return n(u(t))},hsl2keyword:function(t){return s(u(t))},hsv2rgb:d,hsv2hsl:function(t){var e,a,i=t[0],o=t[1]/100,n=t[2]/100;return e=o*n,[i,100*(e=(e/=(a=(2-o)*n)<=1?a:2-a)||0),100*(a/=2)]},hsv2hwb:function(t){return o(d(t))},hsv2cmyk:function(t){return n(d(t))},hsv2keyword:function(t){return s(d(t))},hwb2rgb:h,hwb2hsl:function(t){return a(h(t))},hwb2hsv:function(t){return i(h(t))},hwb2cmyk:function(t){return n(h(t))},hwb2keyword:function(t){return s(h(t))},cmyk2rgb:m,cmyk2hsl:function(t){return a(m(t))},cmyk2hsv:function(t){return i(m(t))},cmyk2hwb:function(t){return o(m(t))},cmyk2keyword:function(t){return s(m(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return i(C(t))},keyword2hwb:function(t){return o(C(t))},keyword2cmyk:function(t){return n(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return l(C(t))},xyz2rgb:p,xyz2lab:f,xyz2lch:function(t){return y(f(t))},lab2xyz:v,lab2rgb:_,lab2lch:y,lch2lab:x,lch2xyz:function(t){return v(x(t))},lch2rgb:function(t){return _(x(t))}};function a(t){var e,a,i=t[0]/255,o=t[1]/255,n=t[2]/255,s=Math.min(i,o,n),r=Math.max(i,o,n),l=r-s;return r==s?e=0:i==r?e=(o-n)/l:o==r?e=2+(n-i)/l:n==r&&(e=4+(i-o)/l),(e=Math.min(60*e,360))<0&&(e+=360),a=(s+r)/2,[e,100*(r==s?0:a<=.5?l/(r+s):l/(2-r-s)),100*a]}function i(t){var e,a,i=t[0],o=t[1],n=t[2],s=Math.min(i,o,n),r=Math.max(i,o,n),l=r-s;return a=0==r?0:l/r*1e3/10,r==s?e=0:i==r?e=(o-n)/l:o==r?e=2+(n-i)/l:n==r&&(e=4+(i-o)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,a,r/255*1e3/10]}function o(t){var e=t[0],i=t[1],o=t[2];return[a(t)[0],100*(1/255*Math.min(e,Math.min(i,o))),100*(o=1-1/255*Math.max(e,Math.max(i,o)))]}function n(t){var e,a=t[0]/255,i=t[1]/255,o=t[2]/255;return[100*((1-a-(e=Math.min(1-a,1-i,1-o)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-o-e)/(1-e)||0),100*e]}function s(t){return k[JSON.stringify(t)]}function l(t){var e=t[0]/255,a=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*a+.0722*i),100*(.0193*e+.1192*a+.9505*i)]}function c(t){var e=l(t),a=e[0],i=e[1],o=e[2];return i/=100,o/=108.883,a=(a/=95.047)>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(a-i),200*(i-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function u(t){var e,a,i,o,n,s=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return[n=255*l,n,n];e=2*l-(a=l<.5?l*(1+r):l+r-l*r),o=[0,0,0];for(var c=0;c<3;c++)(i=s+1/3*-(c-1))<0&&i++,i>1&&i--,n=6*i<1?e+6*(a-e)*i:2*i<1?a:3*i<2?e+(a-e)*(2/3-i)*6:e,o[c]=255*n;return o}function d(t){var e=t[0]/60,a=t[1]/100,i=t[2]/100,o=Math.floor(e)%6,n=e-Math.floor(e),s=255*i*(1-a),r=255*i*(1-a*n),l=255*i*(1-a*(1-n));i*=255;switch(o){case 0:return[i,l,s];case 1:return[r,i,s];case 2:return[s,i,l];case 3:return[s,r,i];case 4:return[l,s,i];case 5:return[i,s,r]}}function h(t){var e,a,i,o,n=t[0]/360,s=t[1]/100,l=t[2]/100,c=s+l;switch(c>1&&(s/=c,l/=c),a=1-l,i=6*n-(e=Math.floor(6*n)),0!=(1&e)&&(i=1-i),o=s+i*(a-s),e){default:case 6:case 0:r=a,g=o,b=s;break;case 1:r=o,g=a,b=s;break;case 2:r=s,g=a,b=o;break;case 3:r=s,g=o,b=a;break;case 4:r=o,g=s,b=a;break;case 5:r=a,g=s,b=o}return[255*r,255*g,255*b]}function m(t){var e=t[0]/100,a=t[1]/100,i=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,a*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o))]}function p(t){var e,a,i,o=t[0]/100,n=t[1]/100,s=t[2]/100;return a=-.9689*o+1.8758*n+.0415*s,i=.0557*o+-.204*n+1.057*s,e=(e=3.2406*o+-1.5372*n+-.4986*s)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(a=Math.min(Math.max(0,a),1)),255*(i=Math.min(Math.max(0,i),1))]}function f(t){var e=t[0],a=t[1],i=t[2];return a/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(e-a),200*(a-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function v(t){var e,a,i,o,n=t[0],s=t[1],r=t[2];return n<=8?o=(a=100*n/903.3)/100*7.787+16/116:(a=100*Math.pow((n+16)/116,3),o=Math.pow(a/100,1/3)),[e=e/95.047<=.008856?e=95.047*(s/500+o-16/116)/7.787:95.047*Math.pow(s/500+o,3),a,i=i/108.883<=.008859?i=108.883*(o-r/200-16/116)/7.787:108.883*Math.pow(o-r/200,3)]}function y(t){var e,a=t[0],i=t[1],o=t[2];return(e=360*Math.atan2(o,i)/2/Math.PI)<0&&(e+=360),[a,Math.sqrt(i*i+o*o),e]}function _(t){return p(v(t))}function x(t){var e,a=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[a,i*Math.cos(e),i*Math.sin(e)]}function C(t){return w[t]}var w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},k={};for(var S in w)k[JSON.stringify(w[S])]=S;var P=function(){return new $};for(var D in e){P[D+"Raw"]=function(t){return function(a){return"number"==typeof a&&(a=Array.prototype.slice.call(arguments)),e[t](a)}}(D);var M=/(\w+)2(\w+)/.exec(D),T=M[1],A=M[2];(P[T]=P[T]||{})[A]=P[D]=function(t){return function(a){"number"==typeof a&&(a=Array.prototype.slice.call(arguments));var i=e[t](a);if("string"==typeof i||void 0===i)return i;for(var o=0;o=0&&e<1?W(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return O(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:O,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return B(t,e);var a=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),o=Math.round(t[2]/255*100);return"rgb("+a+"%, "+i+"%, "+o+"%)"},percentaString:B,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return z(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:z,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return j[t.slice(0,3)]}};function N(t){if(t){var e=[0,0,0],a=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(i){o=(i=i[1])[3];for(var n=0;na?(e+.05)/(a+.05):(a+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,a=(e[0]+t)%360;return e[0]=a<0?360+a:a,this.setValues("hsl",e),this},mix:function(t,e){var a=t,i=void 0===e?.5:e,o=2*i-1,n=this.alpha()-a.alpha(),s=((o*n==-1?o:(o+n)/(1+o*n))+1)/2,r=1-s;return this.rgb(s*this.red()+r*a.red(),s*this.green()+r*a.green(),s*this.blue()+r*a.blue()).alpha(this.alpha()*i+a.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,a=new U,i=this.values,o=a.values;for(var n in i)i.hasOwnProperty(n)&&(t=i[n],"[object Array]"===(e={}.toString.call(t))?o[n]=t.slice(0):"[object Number]"===e?o[n]=t:console.error("unexpected color value:",t));return a}},U.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},U.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},U.prototype.getValues=function(t){for(var e=this.values,a={},i=0;i=0;o--)e.call(a,t[o],o);else for(o=0;o=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:1===t?1:(a||(a=.3),i<1?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a))},easeOutElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:1===t?1:(a||(a=.3),i<1?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},easeInOutElastic:function(t){var e=1.70158,a=0,i=1;return 0===t?0:2==(t/=.5)?1:(a||(a=.45),i<1?(i=1,e=a/4):e=a/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-Z.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*Z.easeInBounce(2*t):.5*Z.easeOutBounce(2*t-1)+.5}},J={effects:Z};K.easingEffects=Z;var X=Math.PI,Q=X/180,tt=2*X,et=X/2,at=X/4,it=2*X/3,ot={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,a,i,o,n){if(n){var s=Math.min(n,o/2,i/2),r=e+s,l=a+s,c=e+i-s,u=a+o-s;t.moveTo(e,l),re.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,a,i,o=this.animations,n=0;n=a?(ct.callback(t.onAnimationComplete,[t],e),e.animating=!1,o.splice(n,1)):++n}},bt=ct.options.resolve,yt=["push","pop","shift","splice","unshift"];function _t(t,e){var a=t._chartjs;if(a){var i=a.listeners,o=i.indexOf(e);-1!==o&&i.splice(o,1),i.length>0||(yt.forEach(function(e){delete t[e]}),delete t._chartjs)}}var xt=function(t,e){this.initialize(t,e)};ct.extend(xt.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),a=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=a.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=a.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&_t(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,a=this.getMeta(),i=this.getDataset().data||[],o=a.data;for(t=0,e=i.length;ta&&this.insertElements(a,i-a)},insertElements:function(t,e){for(var a=0;ar;)o-=2*Math.PI;for(;o=s&&o<=r,c=n>=a.innerRadius&&n<=a.outerRadius;return l&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,a=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,a=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*a,y:t.y+Math.sin(e)*a}},draw:function(){var t,e=this._chart.ctx,a=this._view,i=a.startAngle,o=a.endAngle,n="inner"===a.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(a.x,a.y,Math.max(a.outerRadius-n,0),i,o),e.arc(a.x,a.y,a.innerRadius,o,i,!0),e.closePath(),e.fillStyle=a.backgroundColor,e.fill(),a.borderWidth&&("inner"===a.borderAlign?(e.beginPath(),t=n/a.outerRadius,e.arc(a.x,a.y,a.outerRadius,i-t,o+t),a.innerRadius>n?(t=n/a.innerRadius,e.arc(a.x,a.y,a.innerRadius-n,o+t,i-t,!0)):e.arc(a.x,a.y,n,o+Math.PI/2,i-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(a.x,a.y,a.outerRadius,i,o),e.arc(a.x,a.y,a.innerRadius,o,i,!0),e.closePath(),e.lineWidth=2*a.borderWidth,e.lineJoin="round"):(e.lineWidth=a.borderWidth,e.lineJoin="bevel"),e.strokeStyle=a.borderColor,e.stroke()),e.restore()}}),kt=ct.valueOrDefault,St=rt.global.defaultColor;rt._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Pt=pt.extend({draw:function(){var t,e,a,i,o=this._view,n=this._chart.ctx,s=o.spanGaps,r=this._children.slice(),l=rt.global,c=l.elements.line,u=-1;for(this._loop&&r.length&&r.push(r[0]),n.save(),n.lineCap=o.borderCapStyle||c.borderCapStyle,n.setLineDash&&n.setLineDash(o.borderDash||c.borderDash),n.lineDashOffset=kt(o.borderDashOffset,c.borderDashOffset),n.lineJoin=o.borderJoinStyle||c.borderJoinStyle,n.lineWidth=kt(o.borderWidth,c.borderWidth),n.strokeStyle=o.borderColor||l.defaultColor,n.beginPath(),u=-1,t=0;tt.x&&(e=Lt(e,"left","right")):t.basea?a:i,r:l.right||o<0?0:o>e?e:o,b:l.bottom||n<0?0:n>a?a:n,l:l.left||s<0?0:s>e?e:s}}function Et(t,e,a){var i=null===e,o=null===a,n=!(!t||i&&o)&&It(t);return n&&(i||e>=n.left&&e<=n.right)&&(o||a>=n.top&&a<=n.bottom)}rt._set("global",{elements:{rectangle:{backgroundColor:$t,borderColor:$t,borderSkipped:"bottom",borderWidth:0}}});var Rt={},Ot=wt,Bt=Pt,zt=At,Vt=pt.extend({draw:function(){var t=this._chart.ctx,e=this._view,a=function(t){var e=It(t),a=e.right-e.left,i=e.bottom-e.top,o=Nt(t,a/2,i/2);return{outer:{x:e.left,y:e.top,w:a,h:i},inner:{x:e.left+o.l,y:e.top+o.t,w:a-o.l-o.r,h:i-o.t-o.b}}}(e),i=a.outer,o=a.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===o.w&&i.h===o.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(o.x,o.y,o.w,o.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Et(this._view,t,e)},inLabelRange:function(t,e){var a=this._view;return Ft(a)?Et(a,t,null):Et(a,null,e)},inXRange:function(t){return Et(this._view,t,null)},inYRange:function(t){return Et(this._view,null,t)},getCenterPoint:function(){var t,e,a=this._view;return Ft(a)?(t=a.x,e=(a.y+a.base)/2):(t=(a.x+a.base)/2,e=a.y),{x:t,y:e}},getArea:function(){var t=this._view;return Ft(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}});Rt.Arc=Ot,Rt.Line=Bt,Rt.Point=zt,Rt.Rectangle=Vt;var Wt=ct.options.resolve;rt._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var jt=Ct.extend({dataElementType:Rt.Rectangle,initialize:function(){var t;Ct.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,a,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,a=i.length;e0?Math.min(s,i-a):s,a=i;return s}(a,l):-1,pixels:l,start:s,end:r,stackCount:i,scale:a}},calculateBarValuePixels:function(t,e){var a,i,o,n,s,r,l=this.chart,c=this.getMeta(),u=this._getValueScale(),d=u.isHorizontal(),h=l.data.datasets,m=+u.getRightValue(h[t].data[e]),p=u.options.minBarLength,f=u.options.stacked,g=c.stack,v=0;if(f||void 0===f&&void 0!==g)for(a=0;a=0&&o>0)&&(v+=o));return n=u.getPixelForValue(v),r=(s=u.getPixelForValue(v+m))-n,void 0!==p&&Math.abs(r)=0&&!d||m<0&&d?n-p:n+p),{size:r,base:n,head:s,center:s+r/2}},calculateBarIndexPixels:function(t,e,a){var i=a.scale.options,o="flex"===i.barThickness?function(t,e,a){var i,o=e.pixels,n=o[t],s=t>0?o[t-1]:null,r=t');var a=t.data,i=a.datasets,o=a.labels;if(i.length)for(var n=0;n'),o[n]&&e.push(o[n]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(a,i){var o=t.getDatasetMeta(0),n=e.datasets[0],s=o.data[i],r=s&&s.custom||{},l=t.options.elements.arc;return{text:a,fillStyle:qt([r.backgroundColor,n.backgroundColor,l.backgroundColor],void 0,i),strokeStyle:qt([r.borderColor,n.borderColor,l.borderColor],void 0,i),lineWidth:qt([r.borderWidth,n.borderWidth,l.borderWidth],void 0,i),hidden:isNaN(n.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var a,i,o,n=e.index,s=this.chart;for(a=0,i=(s.data.datasets||[]).length;a=Math.PI?-1:g<-Math.PI?1:0))+p,b={x:Math.cos(g),y:Math.sin(g)},y={x:Math.cos(v),y:Math.sin(v)},_=g<=0&&v>=0||g<=2*Math.PI&&2*Math.PI<=v,x=g<=.5*Math.PI&&.5*Math.PI<=v||g<=2.5*Math.PI&&2.5*Math.PI<=v,C=g<=-Math.PI&&-Math.PI<=v||g<=Math.PI&&Math.PI<=v,w=g<=.5*-Math.PI&&.5*-Math.PI<=v||g<=1.5*Math.PI&&1.5*Math.PI<=v,k=m/100,S={x:C?-1:Math.min(b.x*(b.x<0?1:k),y.x*(y.x<0?1:k)),y:w?-1:Math.min(b.y*(b.y<0?1:k),y.y*(y.y<0?1:k))},P={x:_?1:Math.max(b.x*(b.x>0?1:k),y.x*(y.x>0?1:k)),y:x?1:Math.max(b.y*(b.y>0?1:k),y.y*(y.y>0?1:k))},D={width:.5*(P.x-S.x),height:.5*(P.y-S.y)};c=Math.min(r/D.width,l/D.height),u={x:-.5*(P.x+S.x),y:-.5*(P.y+S.y)}}for(e=0,a=h.length;e0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,a,i,o,n,s,r,l,c=0,u=this.chart;if(!t)for(e=0,a=u.data.datasets.length;e(c=r>c?r:c)?l:c);return c},setHoverStyle:function(t){var e=t._model,a=t._options,i=ct.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Gt(a.hoverBackgroundColor,i(a.backgroundColor)),e.borderColor=Gt(a.hoverBorderColor,i(a.borderColor)),e.borderWidth=Gt(a.hoverBorderWidth,a.borderWidth)},_resolveElementOptions:function(t,e){var a,i,o,n=this.chart,s=this.getDataset(),r=t.custom||{},l=n.options.elements.arc,c={},u={chart:n,dataIndex:e,dataset:s,datasetIndex:this.index},d=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(a=0,i=d.length;a0&&Qt(l[t-1]._model,r)&&(a.controlPointPreviousX=c(a.controlPointPreviousX,r.left,r.right),a.controlPointPreviousY=c(a.controlPointPreviousY,r.top,r.bottom)),t');var a=t.data,i=a.datasets,o=a.labels;if(i.length)for(var n=0;n'),o[n]&&e.push(o[n]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(a,i){var o=t.getDatasetMeta(0),n=e.datasets[0],s=o.data[i].custom||{},r=t.options.elements.arc;return{text:a,fillStyle:ae([s.backgroundColor,n.backgroundColor,r.backgroundColor],void 0,i),strokeStyle:ae([s.borderColor,n.borderColor,r.borderColor],void 0,i),lineWidth:ae([s.borderWidth,n.borderWidth,r.borderWidth],void 0,i),hidden:isNaN(n.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var a,i,o,n=e.index,s=this.chart;for(a=0,i=(s.data.datasets||[]).length;a0&&(n=t.getDatasetMeta(n[0]._datasetIndex).data),n},"x-axis":function(t,e){return pe(t,e,{intersect:!1})},point:function(t,e){return de(t,ce(e,t))},nearest:function(t,e,a){var i=ce(e,t);a.axis=a.axis||"xy";var o=me(a.axis);return he(t,i,a.intersect,o)},x:function(t,e,a){var i=ce(e,t),o=[],n=!1;return ue(t,function(t){t.inXRange(i.x)&&o.push(t),t.inRange(i.x,i.y)&&(n=!0)}),a.intersect&&!n&&(o=[]),o},y:function(t,e,a){var i=ce(e,t),o=[],n=!1;return ue(t,function(t){t.inYRange(i.y)&&o.push(t),t.inRange(i.x,i.y)&&(n=!0)}),a.intersect&&!n&&(o=[]),o}}};function ge(t,e){return ct.where(t,function(t){return t.position===e})}function ve(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,a){var i=e?a:t,o=e?t:a;return i.weight===o.weight?i._tmpIndex_-o._tmpIndex_:i.weight-o.weight}),t.forEach(function(t){delete t._tmpIndex_})}function be(t,e){ct.each(t,function(t){e[t.position]+=t.isHorizontal()?t.height:t.width})}rt._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ye={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var a=t.boxes?t.boxes.indexOf(e):-1;-1!==a&&t.boxes.splice(a,1)},configure:function(t,e,a){for(var i,o=["fullWidth","position","weight"],n=o.length,s=0;s div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&_e.default||_e,Ce="$chartjs",we="chartjs-size-monitor",ke="chartjs-render-monitor",Se="chartjs-render-animation",Pe=["animationstart","webkitAnimationStart"],De={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Me(t,e){var a=ct.getStyle(t,e),i=a&&a.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Ae(t,e,a){t.addEventListener(e,a,Te)}function $e(t,e,a){t.removeEventListener(e,a,Te)}function Fe(t,e,a,i,o){return{type:t,chart:e,native:o||null,x:void 0!==a?a:null,y:void 0!==i?i:null}}function Ie(t){var e=document.createElement("div");return e.className=t||"",e}function Le(t,e,a){var i,o,n,s,r=t[Ce]||(t[Ce]={}),l=r.resizer=function(t){var e=Ie(we),a=Ie(we+"-expand"),i=Ie(we+"-shrink");a.appendChild(Ie()),i.appendChild(Ie()),e.appendChild(a),e.appendChild(i),e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var o=function(){e._reset(),t()};return Ae(a,"scroll",o.bind(a,"expand")),Ae(i,"scroll",o.bind(i,"shrink")),e}((i=function(){if(r.resizer){var i=a.options.maintainAspectRatio&&t.parentNode,o=i?i.clientWidth:0;e(Fe("resize",a)),i&&i.clientWidth0){var n=t[0];n.label?a=n.label:n.xLabel?a=n.xLabel:o>0&&n.index-1?t.split("\n"):t}function Ue(t){var e=rt.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ve(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ve(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ve(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ve(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ve(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ve(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ve(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ve(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ve(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ye(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function qe(t){return je([],He(t))}var Ge=pt.extend({initialize:function(){this._model=Ue(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),a=t.title.apply(this,arguments),i=t.afterTitle.apply(this,arguments),o=[];return o=je(o=je(o=je(o,He(e)),He(a)),He(i))},getBeforeBody:function(){return qe(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var a=this,i=a._options.callbacks,o=[];return ct.each(t,function(t){var n={before:[],lines:[],after:[]};je(n.before,He(i.beforeLabel.call(a,t,e))),je(n.lines,i.label.call(a,t,e)),je(n.after,He(i.afterLabel.call(a,t,e))),o.push(n)}),o},getAfterBody:function(){return qe(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),a=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),o=[];return o=je(o=je(o=je(o,He(e)),He(a)),He(i))},update:function(t){var e,a,i,o,n,s,r,l,c,u,d=this,h=d._options,m=d._model,p=d._model=Ue(h),f=d._active,g=d._data,v={xAlign:m.xAlign,yAlign:m.yAlign},b={x:m.x,y:m.y},y={width:m.width,height:m.height},_={x:m.caretX,y:m.caretY};if(f.length){p.opacity=1;var x=[],C=[];_=We[h.position].call(d,f,d._eventPosition);var w=[];for(e=0,a=f.length;ei.width&&(o=i.width-e.width),o<0&&(o=0)),"top"===u?n+=d:n-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===c?o+=d:"right"===c&&(o-=d):"left"===c?o-=h:"right"===c&&(o+=h),{x:o,y:n}}(p,y=function(t,e){var a=t._chart.ctx,i=2*e.yPadding,o=0,n=e.body,s=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);s+=e.beforeBody.length+e.afterBody.length;var r=e.title.length,l=e.footer.length,c=e.titleFontSize,u=e.bodyFontSize,d=e.footerFontSize;i+=r*c,i+=r?(r-1)*e.titleSpacing:0,i+=r?e.titleMarginBottom:0,i+=s*u,i+=s?(s-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*d,i+=l?(l-1)*e.footerSpacing:0;var h=0,m=function(t){o=Math.max(o,a.measureText(t).width+h)};return a.font=ct.fontString(c,e._titleFontStyle,e._titleFontFamily),ct.each(e.title,m),a.font=ct.fontString(u,e._bodyFontStyle,e._bodyFontFamily),ct.each(e.beforeBody.concat(e.afterBody),m),h=e.displayColors?u+2:0,ct.each(n,function(t){ct.each(t.before,m),ct.each(t.lines,m),ct.each(t.after,m)}),h=0,a.font=ct.fontString(d,e._footerFontStyle,e._footerFontFamily),ct.each(e.footer,m),{width:o+=2*e.xPadding,height:i}}(this,p),v=function(t,e){var a,i,o,n,s,r=t._model,l=t._chart,c=t._chart.chartArea,u="center",d="center";r.yl.height-e.height&&(d="bottom");var h=(c.left+c.right)/2,m=(c.top+c.bottom)/2;"center"===d?(a=function(t){return t<=h},i=function(t){return t>h}):(a=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),o=function(t){return t+e.width+r.caretSize+r.caretPadding>l.width},n=function(t){return t-e.width-r.caretSize-r.caretPadding<0},s=function(t){return t<=m?"top":"bottom"},a(r.x)?(u="left",o(r.x)&&(u="center",d=s(r.y))):i(r.x)&&(u="right",n(r.x)&&(u="center",d=s(r.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:d}}(this,y),d._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=b.x,p.y=b.y,p.width=y.width,p.height=y.height,p.caretX=_.x,p.caretY=_.y,d._model=p,t&&h.custom&&h.custom.call(d,p),d},drawCaret:function(t,e){var a=this._chart.ctx,i=this._view,o=this.getCaretPosition(t,e,i);a.lineTo(o.x1,o.y1),a.lineTo(o.x2,o.y2),a.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,a){var i,o,n,s,r,l,c=a.caretSize,u=a.cornerRadius,d=a.xAlign,h=a.yAlign,m=t.x,p=t.y,f=e.width,g=e.height;if("center"===h)r=p+g/2,"left"===d?(o=(i=m)-c,n=i,s=r+c,l=r-c):(o=(i=m+f)+c,n=i,s=r-c,l=r+c);else if("left"===d?(i=(o=m+u+c)-c,n=o+c):"right"===d?(i=(o=m+f-u-c)-c,n=o+c):(i=(o=a.caretX)-c,n=o+c),"top"===h)r=(s=p)-c,l=s;else{r=(s=p+g)+c,l=s;var v=n;n=i,i=v}return{x1:i,x2:o,x3:n,y1:s,y2:r,y3:l}},drawTitle:function(t,e,a){var i=e.title;if(i.length){t.x=Ye(e,e._titleAlign),a.textAlign=e._titleAlign,a.textBaseline="top";var o,n,s=e.titleFontSize,r=e.titleSpacing;for(a.fillStyle=e.titleFontColor,a.font=ct.fontString(s,e._titleFontStyle,e._titleFontFamily),o=0,n=i.length;o0&&a.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var a={width:e.width,height:e.height},i={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,n=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&n&&(t.save(),t.globalAlpha=o,this.drawBackground(i,e,t,a),i.y+=e.yPadding,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),t.restore())}},handleEvent:function(t){var e,a=this,i=a._options;return a._lastActive=a._lastActive||[],"mouseout"===t.type?a._active=[]:a._active=a._chart.getElementsAtEventForMode(t,i.mode,i),(e=!ct.arrayEquals(a._active,a._lastActive))&&(a._lastActive=a._active,(i.enabled||i.custom)&&(a._eventPosition={x:t.x,y:t.y},a.update(!0),a.pivot())),e}}),Ke=We,Ze=Ge;Ze.positioners=Ke;var Je=ct.valueOrDefault;function Xe(){return ct.merge({},[].slice.call(arguments),{merger:function(t,e,a,i){if("xAxes"===t||"yAxes"===t){var o,n,s,r=a[t].length;for(e[t]||(e[t]=[]),o=0;o=e[t].length&&e[t].push({}),!e[t][o].type||s.type&&s.type!==e[t][o].type?ct.merge(e[t][o],[ze.getScaleDefaults(n),s]):ct.merge(e[t][o],s)}else ct._merger(t,e,a,i)}})}function Qe(){return ct.merge({},[].slice.call(arguments),{merger:function(t,e,a,i){var o=e[t]||{},n=a[t];"scales"===t?e[t]=Xe(o,n):"scale"===t?e[t]=ct.merge(o,[ze.getScaleDefaults(n.type),n]):ct._merger(t,e,a,i)}})}function ta(t){return"top"===t||"bottom"===t}rt._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ea=function(t,e){return this.construct(t,e),this};ct.extend(ea.prototype,{construct:function(t,e){var a=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Qe(rt.global,rt[t.type],t.options||{}),t}(e);var i=Oe.acquireContext(t,e),o=i&&i.canvas,n=o&&o.height,s=o&&o.width;a.id=ct.uid(),a.ctx=i,a.canvas=o,a.config=e,a.width=s,a.height=n,a.aspectRatio=n?s/n:null,a.options=e.options,a._bufferedRender=!1,a.chart=a,a.controller=a,ea.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),i&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Be.notify(t,"beforeInit"),ct.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Be.notify(t,"afterInit"),t},clear:function(){return ct.canvas.clear(this),this},stop:function(){return vt.cancelAnimation(this),this},resize:function(t){var e=this,a=e.options,i=e.canvas,o=a.maintainAspectRatio&&e.aspectRatio||null,n=Math.max(0,Math.floor(ct.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?n/o:ct.getMaximumHeight(i)));if((e.width!==n||e.height!==s)&&(i.width=e.width=n,i.height=e.height=s,i.style.width=n+"px",i.style.height=s+"px",ct.retinaScale(e,a.devicePixelRatio),!t)){var r={width:n,height:s};Be.notify(e,"resize",[r]),a.onResize&&a.onResize(e,r),e.stop(),e.update({duration:a.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},a=t.scale;ct.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),ct.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),a&&(a.id=a.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,a=t.scales||{},i=[],o=Object.keys(a).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ct.each(i,function(e){var i=e.options,n=i.id,s=Je(i.type,e.dtype);ta(i.position)!==ta(e.dposition)&&(i.position=e.dposition),o[n]=!0;var r=null;if(n in a&&a[n].type===s)(r=a[n]).options=i,r.ctx=t.ctx,r.chart=t;else{var l=ze.getScaleConstructor(s);if(!l)return;r=new l({id:n,type:s,options:i,ctx:t.ctx,chart:t}),a[r.id]=r}r.mergeTicksOptions(),e.isDefault&&(t.scale=r)}),ct.each(o,function(t,e){t||delete a[e]}),t.scales=a,ze.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ct.each(t.data.datasets,function(a,i){var o=t.getDatasetMeta(i),n=a.type||t.config.type;if(o.type&&o.type!==n&&(t.destroyDatasetMeta(i),o=t.getDatasetMeta(i)),o.type=n,o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{var s=le[o.type];if(void 0===s)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new s(t,i),e.push(o.controller)}},t),e},resetElements:function(){var t=this;ct.each(t.data.datasets,function(e,a){t.getDatasetMeta(a).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,a,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),a=(e=i).options,ct.each(e.scales,function(t){ye.removeBox(e,t)}),a=Qe(rt.global,rt[e.config.type],a),e.options=e.config.options=a,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=a.tooltips,e.tooltip.initialize(),Be._invalidate(i),!1!==Be.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var o=i.buildOrUpdateControllers();ct.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&ct.each(o,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Be.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){!1!==Be.notify(this,"beforeLayout")&&(ye.update(this,this.width,this.height),Be.notify(this,"afterScaleUpdate"),Be.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Be.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=0;--a)e.isDatasetVisible(a)&&e.drawDataset(a,t);Be.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var a=this.getDatasetMeta(t),i={meta:a,index:t,easingValue:e};!1!==Be.notify(this,"beforeDatasetDraw",[i])&&(a.controller.draw(e),Be.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,a={tooltip:e,easingValue:t};!1!==Be.notify(this,"beforeTooltipDraw",[a])&&(e.draw(),Be.notify(this,"afterTooltipDraw",[a]))},getElementAtEvent:function(t){return fe.modes.single(this,t)},getElementsAtEvent:function(t){return fe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return fe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,a){var i=fe.modes[e];return"function"==typeof i?i(this,t,a):[]},getDatasetAtEvent:function(t){return fe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var a=e._meta[this.id];return a||(a=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),a},getVisibleDatasetCount:function(){for(var t=0,e=0,a=this.data.datasets.length;e3?a[2]-a[1]:a[1]-a[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var o=ct.log10(Math.abs(i)),n="";if(0!==t)if(Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))<1e-4){var s=ct.log10(Math.abs(t));n=t.toExponential(Math.floor(s)-Math.floor(o))}else{var r=-1*Math.floor(o);r=Math.max(Math.min(r,20),0),n=t.toFixed(r)}else n="0";return n},logarithmic:function(t,e,a){var i=t/Math.pow(10,Math.floor(ct.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===a.length-1?t.toExponential():""}}},ra=ct.valueOrDefault,la=ct.valueAtIndexOrDefault;function ca(t){var e,a,i=[];for(e=0,a=t.length;ec&&nt.maxHeight){n--;break}n++,l=s*r}t.labelRotation=n},afterCalculateTickRotation:function(){ct.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ct.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},a=ca(t._ticks),i=t.options,o=i.ticks,n=i.scaleLabel,s=i.gridLines,r=t._isVisible(),l=i.position,c=t.isHorizontal(),u=ct.options._parseFont,d=u(o),h=i.gridLines.tickMarkLength;if(e.width=c?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:r&&s.drawTicks?h:0,e.height=c?r&&s.drawTicks?h:0:t.maxHeight,n.display&&r){var m=u(n),p=ct.options.toPadding(n.padding),f=m.lineHeight+p.height;c?e.height+=f:e.width+=f}if(o.display&&r){var g=ct.longestText(t.ctx,d.string,a,t.longestTextCache),v=ct.numberOfLabelLines(a),b=.5*d.size,y=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=g,c){var _=ct.toRadians(t.labelRotation),x=Math.cos(_),C=Math.sin(_)*g+d.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+C+y),t.ctx.font=d.string;var w,k,S=ua(t.ctx,a[0],d.string),P=ua(t.ctx,a[a.length-1],d.string),D=t.getPixelForTick(0)-t.left,M=t.right-t.getPixelForTick(a.length-1);0!==t.labelRotation?(w="bottom"===l?x*S:x*b,k="bottom"===l?x*b:x*P):(w=S/2,k=P/2),t.paddingLeft=Math.max(w-D,0)+3,t.paddingRight=Math.max(k-M,0)+3}else o.mirror?g=0:g+=y+b,e.width=Math.min(t.maxWidth,e.width+g),t.paddingTop=d.size/2,t.paddingBottom=d.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ct.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ct.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ct.noop,getPixelForValue:ct.noop,getValueForPixel:ct.noop,getPixelForTick:function(t){var e=this,a=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(a?0:1),1),o=i*t+e.paddingLeft;a&&(o+=i/2);var n=e.left+o;return n+=e.isFullWidth()?e.margins.left:0}var s=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(s/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var a=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+a;return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,a,i=this,o=i.isHorizontal(),n=i.options.ticks.minor,s=t.length,r=!1,l=n.maxTicksLimit,c=i._tickSize()*(s-1),u=o?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.PaddingBottom),d=[];for(c>u&&(r=1+Math.floor(c/u)),s>l&&(r=Math.max(r,1+Math.floor(s/l))),e=0;e1&&e%r>0&&delete a.label,d.push(a);return d},_tickSize:function(){var t=this,e=t.isHorizontal(),a=t.options.ticks.minor,i=ct.toRadians(t.labelRotation),o=Math.abs(Math.cos(i)),n=Math.abs(Math.sin(i)),s=a.autoSkipPadding||0,r=t.longestLabelWidth+s||0,l=ct.options._parseFont(a),c=t._maxLabelLines*l.lineHeight+s||0;return e?c*o>r*n?r/o:c/n:c*n0&&i>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,n=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==n&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,a=e.stepSize,i=e.maxTicksLimit;return a?t=Math.ceil(this.max/a)-Math.floor(this.min/a)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:pa,buildTicks:function(){var t=this,e=t.options.ticks,a=t.getTickLimit(),i={maxTicks:a=Math.max(2,a),min:e.min,max:e.max,precision:e.precision,stepSize:ct.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=function(t,e){var a,i,o,n,s=[],r=t.stepSize,l=r||1,c=t.maxTicks-1,u=t.min,d=t.max,h=t.precision,m=e.min,p=e.max,f=ct.niceNum((p-m)/c/l)*l;if(f<1e-14&&fa(u)&&fa(d))return[m,p];(n=Math.ceil(p/f)-Math.floor(m/f))>c&&(f=ct.niceNum(n*f/c/l)*l),r||fa(h)?a=Math.pow(10,ct._decimalPlaces(f)):(a=Math.pow(10,h),f=Math.ceil(f*a)/a),i=Math.floor(m/f)*f,o=Math.ceil(p/f)*f,r&&(!fa(u)&&ct.almostWhole(u/f,f/1e3)&&(i=u),!fa(d)&&ct.almostWhole(d/f,f/1e3)&&(o=d)),n=(o-i)/f,n=ct.almostEquals(n,Math.round(n),f/1e3)?Math.round(n):Math.ceil(n),i=Math.round(i*a)/a,o=Math.round(o*a)/a,s.push(fa(u)?i:u);for(var g=1;gt.max&&(t.max=i))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=ct.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,a=e.start,i=+e.getRightValue(t),o=e.end-a;return e.isHorizontal()?e.left+e.width/o*(i-a):e.bottom-e.height/o*(i-a)},getValueForPixel:function(t){var e=this,a=e.isHorizontal(),i=a?e.width:e.height,o=(a?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),ya=va;ba._defaults=ya;var _a=ct.valueOrDefault;var xa={position:"left",ticks:{callback:sa.formatters.logarithmic}};function Ca(t,e){return ct.isFinite(t)&&t>=0?t:e}var wa=da.extend({determineDataLimits:function(){var t=this,e=t.options,a=t.chart,i=a.data.datasets,o=t.isHorizontal();function n(e){return o?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var s=e.stacked;if(void 0===s&&ct.each(i,function(t,e){if(!s){var i=a.getDatasetMeta(e);a.isDatasetVisible(e)&&n(i)&&void 0!==i.stack&&(s=!0)}}),e.stacked||s){var r={};ct.each(i,function(i,o){var s=a.getDatasetMeta(o),l=[s.type,void 0===e.stacked&&void 0===s.stack?o:"",s.stack].join(".");a.isDatasetVisible(o)&&n(s)&&(void 0===r[l]&&(r[l]=[]),ct.each(i.data,function(e,a){var i=r[l],o=+t.getRightValue(e);isNaN(o)||s.data[a].hidden||o<0||(i[a]=i[a]||0,i[a]+=o)}))}),ct.each(r,function(e){if(e.length>0){var a=ct.min(e),i=ct.max(e);t.min=null===t.min?a:Math.min(t.min,a),t.max=null===t.max?i:Math.max(t.max,i)}})}else ct.each(i,function(e,i){var o=a.getDatasetMeta(i);a.isDatasetVisible(i)&&n(o)&&ct.each(e.data,function(e,a){var i=+t.getRightValue(e);isNaN(i)||o.data[a].hidden||i<0||(null===t.min?t.min=i:it.max&&(t.max=i),0!==i&&(null===t.minNotZero||i0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(ct.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,a=!t.isHorizontal(),i={min:Ca(e.min),max:Ca(e.max)},o=t.ticks=function(t,e){var a,i,o=[],n=_a(t.min,Math.pow(10,Math.floor(ct.log10(e.min)))),s=Math.floor(ct.log10(e.max)),r=Math.ceil(e.max/Math.pow(10,s));0===n?(a=Math.floor(ct.log10(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,a)),o.push(n),n=i*Math.pow(10,a)):(a=Math.floor(ct.log10(n)),i=Math.floor(n/Math.pow(10,a)));var l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push(n),10==++i&&(i=1,l=++a>=0?1:l),n=Math.round(i*Math.pow(10,a)*l)/l}while(ao?{start:e-a,end:e}:{start:e,end:e+a}}function Fa(t){return 0===t||180===t?"center":t<180?"left":"right"}function Ia(t,e,a,i){var o,n,s=a.y+i/2;if(ct.isArray(e))for(o=0,n=e.length;o270||t<90)&&(a.y-=e.h)}function Na(t){return ct.isNumber(t)?t:0}var Ea=ga.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Aa(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,a=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;ct.each(e.data.datasets,function(o,n){if(e.isDatasetVisible(n)){var s=e.getDatasetMeta(n);ct.each(o.data,function(e,o){var n=+t.getRightValue(e);isNaN(n)||s.data[o].hidden||(a=Math.min(n,a),i=Math.max(n,i))})}}),t.min=a===Number.POSITIVE_INFINITY?0:a,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Aa(this.options))},convertTicksToLabels:function(){var t=this;ga.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,a,i,o=ct.options._parseFont(t.options.pointLabels),n={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=o.string,t._pointLabelSizes=[];var r,l,c,u=Ta(t);for(e=0;en.r&&(n.r=m.end,s.r=d),p.startn.b&&(n.b=p.end,s.b=d)}t.setReductions(t.drawingArea,n,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,a){var i=this,o=e.l/Math.sin(a.l),n=Math.max(e.r-i.width,0)/Math.sin(a.r),s=-e.t/Math.cos(a.t),r=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(a.b);o=Na(o),n=Na(n),s=Na(s),r=Na(r),i.drawingArea=Math.min(Math.floor(t-(o+n)/2),Math.floor(t-(s+r)/2)),i.setCenterPoint(o,n,s,r)},setCenterPoint:function(t,e,a,i){var o=this,n=o.width-e-o.drawingArea,s=t+o.drawingArea,r=a+o.drawingArea,l=o.height-o.paddingTop-i-o.drawingArea;o.xCenter=Math.floor((s+n)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Ta(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var a=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*a:(t-e.min)*a},getPointPosition:function(t,e){var a=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(a)*e+this.xCenter,y:Math.sin(a)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,e=t.options,a=e.gridLines,i=e.ticks;if(e.display){var o=t.ctx,n=this.getIndexAngle(0),s=ct.options._parseFont(i);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,a=t.options,i=a.angleLines,o=a.gridLines,n=a.pointLabels,s=Sa(i.lineWidth,o.lineWidth),r=Sa(i.color,o.color),l=Aa(a);e.save(),e.lineWidth=s,e.strokeStyle=r,e.setLineDash&&(e.setLineDash(Da([i.borderDash,o.borderDash,[]])),e.lineDashOffset=Da([i.borderDashOffset,o.borderDashOffset,0]));var c=t.getDistanceFromCenterForValue(a.ticks.reverse?t.min:t.max),u=ct.options._parseFont(n);e.font=u.string,e.textBaseline="middle";for(var d=Ta(t)-1;d>=0;d--){if(i.display&&s&&r){var h=t.getPointPosition(d,c);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(h.x,h.y),e.stroke()}if(n.display){var m=0===d?l/2:0,p=t.getPointPosition(d,c+m+5),f=Pa(n.fontColor,d,rt.global.defaultFontColor);e.fillStyle=f;var g=t.getIndexAngle(d),v=ct.toDegrees(g);e.textAlign=Fa(v),La(v,t._pointLabelSizes[d],p),Ia(e,t.pointLabels[d]||"",p,u.lineHeight)}}e.restore()}(t),ct.each(t.ticks,function(e,r){if(r>0||i.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[r]);if(a.display&&0!==r&&function(t,e,a,i){var o,n=t.ctx,s=e.circular,r=Ta(t),l=Pa(e.color,i-1),c=Pa(e.lineWidth,i-1);if((s||r)&&l&&c){if(n.save(),n.strokeStyle=l,n.lineWidth=c,n.setLineDash&&(n.setLineDash(e.borderDash||[]),n.lineDashOffset=e.borderDashOffset||0),n.beginPath(),s)n.arc(t.xCenter,t.yCenter,a,0,2*Math.PI);else{o=t.getPointPosition(0,a),n.moveTo(o.x,o.y);for(var u=1;u=0&&s<=r;){if(o=t[(i=s+r>>1)-1]||null,n=t[i],!o)return{lo:null,hi:n};if(n[e]a))return{lo:o,hi:n};r=i-1}}return{lo:n,hi:null}}(t,e,a),n=o.lo?o.hi?o.lo:t[t.length-2]:t[0],s=o.lo?o.hi?o.hi:t[t.length-1]:t[1],r=s[e]-n[e],l=r?(a-n[e])/r:0,c=(s[i]-n[i])*l;return n[i]+c}function Ya(t,e){var a=t._adapter,i=t.options.time,o=i.parser,n=o||i.format,s=e;return"function"==typeof o&&(s=o(s)),ct.isFinite(s)||(s="string"==typeof n?a.parse(s,n):a.parse(s)),null!==s?+s:(o||"function"!=typeof n||(s=n(e),ct.isFinite(s)||(s=a.parse(s))),s)}function qa(t,e){if(ct.isNullOrUndef(e))return null;var a=t.options.time,i=Ya(t,t.getRightValue(e));return null===i?i:(a.round&&(i=+t._adapter.startOf(i,a.round)),i)}function Ga(t){for(var e=Wa.indexOf(t)+1,a=Wa.length;e=o&&a<=n&&c.push(a);return i.min=o,i.max=n,i._unit=r.unit||function(t,e,a,i,o){var n,s;for(n=Wa.length-1;n>=Wa.indexOf(a);n--)if(s=Wa[n],Va[s].common&&t._adapter.diff(o,i,s)>=e.length)return s;return Wa[a?Wa.indexOf(a):0]}(i,c,r.minUnit,i.min,i.max),i._majorUnit=Ga(i._unit),i._table=function(t,e,a,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:a,pos:1}];var o,n,s,r,l,c=[],u=[e];for(o=0,n=t.length;oe&&r=0&&t0?s:1}}),Ja={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};Za._defaults=Ja;var Xa={category:ha,linear:ba,logarithmic:wa,radialLinear:Ea,time:Za},Qa={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};na._date.override("function"==typeof t?{_id:"moment",formats:function(){return Qa},parse:function(e,a){return"string"==typeof e&&"string"==typeof a?e=t(e,a):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,a){return t(e).format(a)},add:function(e,a,i){return t(e).add(a,i).valueOf()},diff:function(e,a,i){return t.duration(t(e).diff(t(a))).as(i)},startOf:function(e,a,i){return e=t(e),"isoWeek"===a?e.isoWeekday(i).valueOf():e.startOf(a).valueOf()},endOf:function(e,a){return t(e).endOf(a).valueOf()},_create:function(e){return t(e)}}:{}),rt._set("global",{plugins:{filler:{propagate:!0}}});var ti={dataset:function(t){var e=t.fill,a=t.chart,i=a.getDatasetMeta(e),o=i&&a.isDatasetVisible(e)&&i.dataset._children||[],n=o.length||0;return n?function(t,e){return e=a)&&i;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function ai(t){var e,a=t.el._model||{},i=t.el._scale||{},o=t.fill,n=null;if(isFinite(o))return null;if("start"===o?n=void 0===a.scaleBottom?i.bottom:a.scaleBottom:"end"===o?n=void 0===a.scaleTop?i.top:a.scaleTop:void 0!==a.scaleZero?n=a.scaleZero:i.getBasePosition?n=i.getBasePosition():i.getBasePixel&&(n=i.getBasePixel()),void 0!==n&&null!==n){if(void 0!==n.x&&void 0!==n.y)return n;if(ct.isFinite(n))return{x:(e=i.isHorizontal())?n:null,y:e?null:n}}return null}function ii(t,e,a){var i,o=t[e].fill,n=[e];if(!a)return o;for(;!1!==o&&-1===n.indexOf(o);){if(!isFinite(o))return o;if(!(i=t[o]))return!1;if(i.visible)return o;n.push(o),o=i.fill}return!1}function oi(t){var e=t.fill,a="dataset";return!1===e?null:(isFinite(e)||(a="boundary"),ti[a](t))}function ni(t){return t&&!t.skip}function si(t,e,a,i,o){var n;if(i&&o){for(t.moveTo(e[0].x,e[0].y),n=1;n0;--n)ct.canvas.lineTo(t,a[n],a[n-1],!0)}}var ri={id:"filler",afterDatasetsUpdate:function(t,e){var a,i,o,n,s=(t.data.datasets||[]).length,r=e.propagate,l=[];for(i=0;ie?e:t.boxWidth}rt._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var a=e.datasetIndex,i=this.chart,o=i.getDatasetMeta(a);o.hidden=null===o.hidden?!i.data.datasets[a].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return ct.isArray(e.datasets)?e.datasets.map(function(e,a){return{text:e.label,fillStyle:ct.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(a),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:a}},this):[]}}},legendCallback:function(t){var e=[];e.push('
    ');for(var a=0;a'),t.data.datasets[a].label&&e.push(t.data.datasets[a].label),e.push("");return e.push("
"),e.join("")}});var di=pt.extend({initialize:function(t){ct.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:li,update:function(t,e,a){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=a,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:li,beforeSetDimensions:li,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:li,beforeBuildLabels:li,buildLabels:function(){var t=this,e=t.options.labels||{},a=ct.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(a=a.filter(function(a){return e.filter(a,t.chart.data)})),t.options.reverse&&a.reverse(),t.legendItems=a},afterBuildLabels:li,beforeFit:li,fit:function(){var t=this,e=t.options,a=e.labels,i=e.display,o=t.ctx,n=ct.options._parseFont(a),s=n.size,r=t.legendHitBoxes=[],l=t.minSize,c=t.isHorizontal();if(c?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i)if(o.font=n.string,c){var u=t.lineWidths=[0],d=0;o.textAlign="left",o.textBaseline="top",ct.each(t.legendItems,function(t,e){var i=ui(a,s)+s/2+o.measureText(t.text).width;(0===e||u[u.length-1]+i+a.padding>l.width)&&(d+=s+a.padding,u[u.length-(e>0?0:1)]=a.padding),r[e]={left:0,top:0,width:i,height:s},u[u.length-1]+=i+a.padding}),l.height+=d}else{var h=a.padding,m=t.columnWidths=[],p=a.padding,f=0,g=0,v=s+h;ct.each(t.legendItems,function(t,e){var i=ui(a,s)+s/2+o.measureText(t.text).width;e>0&&g+v>l.height-h&&(p+=f+a.padding,m.push(f),f=0,g=0),f=Math.max(f,i),g+=v,r[e]={left:0,top:0,width:i,height:s}}),p+=f,m.push(f),l.width+=p}t.width=l.width,t.height=l.height},afterFit:li,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,a=e.labels,i=rt.global,o=i.defaultColor,n=i.elements.line,s=t.width,r=t.lineWidths;if(e.display){var l,c=t.ctx,u=ci(a.fontColor,i.defaultFontColor),d=ct.options._parseFont(a),h=d.size;c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=u,c.fillStyle=u,c.font=d.string;var m=ui(a,h),p=t.legendHitBoxes,f=t.isHorizontal();l=f?{x:t.left+(s-r[0])/2+a.padding,y:t.top+a.padding,line:0}:{x:t.left+a.padding,y:t.top+a.padding,line:0};var g=h+a.padding;ct.each(t.legendItems,function(i,u){var d=c.measureText(i.text).width,v=m+h/2+d,b=l.x,y=l.y;f?u>0&&b+v+a.padding>t.left+t.minSize.width&&(y=l.y+=g,l.line++,b=l.x=t.left+(s-r[l.line])/2+a.padding):u>0&&y+g>t.top+t.minSize.height&&(b=l.x=b+t.columnWidths[l.line]+a.padding,y=l.y=t.top+a.padding,l.line++),function(t,a,i){if(!(isNaN(m)||m<=0)){c.save();var s=ci(i.lineWidth,n.borderWidth);if(c.fillStyle=ci(i.fillStyle,o),c.lineCap=ci(i.lineCap,n.borderCapStyle),c.lineDashOffset=ci(i.lineDashOffset,n.borderDashOffset),c.lineJoin=ci(i.lineJoin,n.borderJoinStyle),c.lineWidth=s,c.strokeStyle=ci(i.strokeStyle,o),c.setLineDash&&c.setLineDash(ci(i.lineDash,n.borderDash)),e.labels&&e.labels.usePointStyle){var r=m*Math.SQRT2/2,l=t+m/2,u=a+h/2;ct.canvas.drawPoint(c,i.pointStyle,r,l,u)}else 0!==s&&c.strokeRect(t,a,m,h),c.fillRect(t,a,m,h);c.restore()}}(b,y,i),p[u].left=b,p[u].top=y,function(t,e,a,i){var o=h/2,n=m+o+t,s=e+o;c.fillText(a.text,n,s),a.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(n,s),c.lineTo(n+i,s),c.stroke())}(b,y,i,d),f?l.x+=v+a.padding:l.y+=g})}},_getLegendItemAt:function(t,e){var a,i,o,n=this;if(t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom)for(o=n.legendHitBoxes,a=0;a=(i=o[a]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return n.legendItems[a];return null},handleEvent:function(t){var e,a=this,i=a.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!i.onHover&&!i.onLeave)return}else{if("click"!==o)return;if(!i.onClick)return}e=a._getLegendItemAt(t.x,t.y),"click"===o?e&&i.onClick&&i.onClick.call(a,t.native,e):(i.onLeave&&e!==a._hoveredItem&&(a._hoveredItem&&i.onLeave.call(a,t.native,a._hoveredItem),a._hoveredItem=e),i.onHover&&e&&i.onHover.call(a,t.native,e))}});function hi(t,e){var a=new di({ctx:t.ctx,options:e,chart:t});ye.configure(t,a,e),ye.addBox(t,a),t.legend=a}var mi={id:"legend",_element:di,beforeInit:function(t){var e=t.options.legend;e&&hi(t,e)},beforeUpdate:function(t){var e=t.options.legend,a=t.legend;e?(ct.mergeIf(e,rt.global.legend),a?(ye.configure(t,a,e),a.options=e):hi(t,e)):a&&(ye.removeBox(t,a),delete t.legend)},afterEvent:function(t,e){var a=t.legend;a&&a.handleEvent(e)}},pi=ct.noop;rt._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var fi=pt.extend({initialize:function(t){ct.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:pi,update:function(t,e,a){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=a,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:pi,beforeSetDimensions:pi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:pi,beforeBuildLabels:pi,buildLabels:pi,afterBuildLabels:pi,beforeFit:pi,fit:function(){var t=this,e=t.options,a=e.display,i=t.minSize,o=ct.isArray(e.text)?e.text.length:1,n=ct.options._parseFont(e),s=a?o*n.lineHeight+2*e.padding:0;t.isHorizontal()?(i.width=t.maxWidth,i.height=s):(i.width=s,i.height=t.maxHeight),t.width=i.width,t.height=i.height},afterFit:pi,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,a=t.options;if(a.display){var i,o,n,s=ct.options._parseFont(a),r=s.lineHeight,l=r/2+a.padding,c=0,u=t.top,d=t.left,h=t.bottom,m=t.right;e.fillStyle=ct.valueOrDefault(a.fontColor,rt.global.defaultFontColor),e.font=s.string,t.isHorizontal()?(o=d+(m-d)/2,n=u+l,i=m-d):(o="left"===a.position?d+l:m-l,n=u+(h-u)/2,i=h-u,c=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(o,n),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var p=a.text;if(ct.isArray(p))for(var f=0,g=0;g=0;i--){var o=t[i];if(e(o))return o}},ct.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ct.almostEquals=function(t,e,a){return Math.abs(t-e)t},ct.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},ct.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},ct.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ct.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,a=Math.round(e);return t===Math.pow(10,a)?a:e},ct.toRadians=function(t){return t*(Math.PI/180)},ct.toDegrees=function(t){return t*(180/Math.PI)},ct._decimalPlaces=function(t){if(ct.isFinite(t)){for(var e=1,a=0;Math.round(t*e)/e!==t;)e*=10,a++;return a}},ct.getAngleFromPoint=function(t,e){var a=e.x-t.x,i=e.y-t.y,o=Math.sqrt(a*a+i*i),n=Math.atan2(i,a);return n<-.5*Math.PI&&(n+=2*Math.PI),{angle:n,distance:o}},ct.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ct.aliasPixel=function(t){return t%2==0?0:.5},ct._alignPixel=function(t,e,a){var i=t.currentDevicePixelRatio,o=a/2;return Math.round((e-o)*i)/i+o},ct.splineCurve=function(t,e,a,i){var o=t.skip?e:t,n=e,s=a.skip?e:a,r=Math.sqrt(Math.pow(n.x-o.x,2)+Math.pow(n.y-o.y,2)),l=Math.sqrt(Math.pow(s.x-n.x,2)+Math.pow(s.y-n.y,2)),c=r/(r+l),u=l/(r+l),d=i*(c=isNaN(c)?0:c),h=i*(u=isNaN(u)?0:u);return{previous:{x:n.x-d*(s.x-o.x),y:n.y-d*(s.y-o.y)},next:{x:n.x+h*(s.x-o.x),y:n.y+h*(s.y-o.y)}}},ct.EPSILON=Number.EPSILON||1e-14,ct.splineCurveMonotone=function(t){var e,a,i,o,n,s,r,l,c,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),d=u.length;for(e=0;e0?u[e-1]:null,(o=e0?u[e-1]:null,o=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ct.previousItem=function(t,e,a){return a?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ct.niceNum=function(t,e){var a=Math.floor(ct.log10(t)),i=t/Math.pow(10,a);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,a)},ct.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ct.getRelativePosition=function(t,e){var a,i,o=t.originalEvent||t,n=t.target||t.srcElement,s=n.getBoundingClientRect(),r=o.touches;r&&r.length>0?(a=r[0].clientX,i=r[0].clientY):(a=o.clientX,i=o.clientY);var l=parseFloat(ct.getStyle(n,"padding-left")),c=parseFloat(ct.getStyle(n,"padding-top")),u=parseFloat(ct.getStyle(n,"padding-right")),d=parseFloat(ct.getStyle(n,"padding-bottom")),h=s.right-s.left-l-u,m=s.bottom-s.top-c-d;return{x:a=Math.round((a-s.left-l)/h*n.width/e.currentDevicePixelRatio),y:i=Math.round((i-s.top-c)/m*n.height/e.currentDevicePixelRatio)}},ct.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},ct.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},ct._calculatePadding=function(t,e,a){return(e=ct.getStyle(t,e)).indexOf("%")>-1?a*parseInt(e,10)/100:parseInt(e,10)},ct._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ct.getMaximumWidth=function(t){var e=ct._getParentNode(t);if(!e)return t.clientWidth;var a=e.clientWidth,i=a-ct._calculatePadding(e,"padding-left",a)-ct._calculatePadding(e,"padding-right",a),o=ct.getConstraintWidth(t);return isNaN(o)?i:Math.min(i,o)},ct.getMaximumHeight=function(t){var e=ct._getParentNode(t);if(!e)return t.clientHeight;var a=e.clientHeight,i=a-ct._calculatePadding(e,"padding-top",a)-ct._calculatePadding(e,"padding-bottom",a),o=ct.getConstraintHeight(t);return isNaN(o)?i:Math.min(i,o)},ct.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ct.retinaScale=function(t,e){var a=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==a){var i=t.canvas,o=t.height,n=t.width;i.height=o*a,i.width=n*a,t.ctx.scale(a,a),i.style.height||i.style.width||(i.style.height=o+"px",i.style.width=n+"px")}},ct.fontString=function(t,e,a){return e+" "+t+"px "+a},ct.longestText=function(t,e,a,i){var o=(i=i||{}).data=i.data||{},n=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(o=i.data={},n=i.garbageCollect=[],i.font=e),t.font=e;var s=0;ct.each(a,function(e){void 0!==e&&null!==e&&!0!==ct.isArray(e)?s=ct.measureText(t,o,n,s,e):ct.isArray(e)&&ct.each(e,function(e){void 0===e||null===e||ct.isArray(e)||(s=ct.measureText(t,o,n,s,e))})});var r=n.length/2;if(r>a.length){for(var l=0;li&&(i=n),i},ct.numberOfLabelLines=function(t){var e=1;return ct.each(t,function(t){ct.isArray(t)&&t.length>e&&(e=t.length)}),e},ct.color=q?function(t){return t instanceof CanvasGradient&&(t=rt.global.defaultColor),q(t)}:function(t){return console.error("Color.js not found!"),t},ct.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ct.color(t).saturate(.5).darken(.1).rgbString()}}(),aa._adapters=na,aa.Animation=gt,aa.animationService=vt,aa.controllers=le,aa.DatasetController=Ct,aa.defaults=rt,aa.Element=pt,aa.elements=Rt,aa.Interaction=fe,aa.layouts=ye,aa.platform=Oe,aa.plugins=Be,aa.Scale=da,aa.scaleService=ze,aa.Ticks=sa,aa.Tooltip=Ze,aa.helpers.each(Xa,function(t,e){aa.scaleService.registerScaleType(e,t,t._defaults)}),vi)vi.hasOwnProperty(xi)&&aa.plugins.register(vi[xi]);aa.platform.initialize();var Ci=aa;return"undefined"!=typeof window&&(window.Chart=aa),aa.Chart=aa,aa.Legend=vi.legend._element,aa.Title=vi.title._element,aa.pluginService=aa.plugins,aa.PluginBase=aa.Element.extend({}),aa.canvasHelpers=aa.helpers.canvas,aa.layoutService=aa.layouts,aa.LinearScaleBase=ga,aa.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){aa[t]=function(e,a){return new aa(e,aa.helpers.merge(a||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Ci},t.exports=i(function(){try{return a(1)}catch(t){}}())},800:function(t,e,a){"use strict";var i=a(761);e.a={extends:i.b,props:["data"],data:function(){return{options:{cutoutPercentage:80,legend:{labels:{usePointStyle:!0,padding:40,filter:function(t){return 2!==t.index}},position:"bottom"},maintainAspectRatio:!1,responsive:!0,tooltips:{mode:"label",filter:function(t){return 2!==t.index}}}}},methods:{update:function(t){t&&this.renderChart(this.data,this.options),this.$data._chart.update()}},mounted:function(){this.renderChart(this.data,this.options)}}},801:function(t,e,a){"use strict";var i=a(761);e.a={extends:i.c,props:["data","options"],data:function(){return{defaultOptions:{responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{ticks:{stepSize:1,min:0,autoSkip:!1}}],yAxes:[{gridLines:{display:!0},ticks:{beginAtZero:!0,stepSize:1,min:0,userCallback:function(t){if(Math.floor(t)===t)return t}}}]}}}},methods:{update:function(t){t&&this.renderChart(this.data,this.options),this.$data._chart.update()}},mounted:function(){this.renderChart(this.data,this.options)}}},802:function(t,e){t.exports={render:function(){var t=this,e=this,a=e.$createElement,i=e._self._c||a;return i("div",{staticClass:"am-wrap"},[i("div",{staticClass:"am-body",attrs:{id:"am-dashboard"}},[i("page-header",{attrs:{params:e.params},on:{changeFilter:e.changeFilter}}),e._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:!e.fetched,expression:"!fetched"}],staticClass:"am-spinner am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/spinner.svg"}})]),e._v(" "),!0===e.fetched?i("div",[i("div",{staticClass:"am-hello am-section"},[i("div",{staticClass:"am-user-name"},[i("h1",[e._v(e._s(e.$root.labels.hello_message_part0)+" "+e._s(e.currentUser.firstName)+" "+e._s(e.currentUser.lastName)+" "),i("img",{attrs:{src:e.$root.getUrl+"public/img/wave.png"}})]),e._v(" "),i("div",{staticClass:"am-user-alert"},[i("span",[e._v(e._s(e.$root.labels.hello_message_part1)+" "),i("img",{attrs:{src:e.$root.getUrl+"public/img/check.png"}}),e._v(" "),i("span",[e._v(e._s(null!==e.todayAppointmentsCount.approved?e.todayAppointmentsCount.approved:0))]),e._v(" "+e._s(e.$root.labels.approved_appointments.toLowerCase())+" "+e._s(e.$root.labels.hello_message_part2)+" "),i("img",{attrs:{src:e.$root.getUrl+"public/img/clock.png"}}),e._v(" "+e._s(null!==e.todayAppointmentsCount.pending?e.todayAppointmentsCount.pending:0)+" "+e._s(e.$root.labels.pending_appointments.toLowerCase())+" "+e._s(e.$root.labels.hello_message_part3))])])])]),e._v(" "),i("BlockLite"),e._v(" "),i("div",{staticClass:"am-stats am-section",class:{"am-lite-container-disabled":e.$root.isLite}},[i("div",{staticClass:"am-big-stats"},[i("el-row",{attrs:{gutter:0}},[i("el-col",{attrs:{sm:24,md:12,lg:8}},[i("div",{staticClass:"am-grid-content"},[i("div",{staticClass:"am-title"},[i("h3",[e._v(e._s(e.$root.labels.approved_appointments)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.approved_appointments_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]),e._v(" "),i("span",{staticClass:"am-change",class:e.countGrowthClass},[e._v(e._s(e.selectedPeriodStats.count-e.previousPeriodStats.count))])],1)]),e._v(" "),i("div",{staticClass:"am-big-num"},[i("span",[e._v(e._s(e.calculateChartTotal("count")))])]),e._v(" "),i("bar-chart",{ref:"appointmentsCountChart",attrs:{data:e.smallBarChartAppointmentsData,options:e.smallBarChartAppointmentsOptions,width:40,height:15}}),e._v(" "),i("div",[i("a",{staticClass:"am-goto",on:{click:function(t){return e.navigateTo("appointments")}}},[e._v(e._s(e.$root.labels.view)+" "+e._s(e.$root.labels.appointments))])])],1)]),e._v(" "),i("el-col",{attrs:{sm:24,md:12,lg:8}},[i("div",{staticClass:"am-grid-content"},[i("div",{staticClass:"am-title"},[i("h3",[e._v(e._s(e.$root.labels.percentage_of_load)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.percentage_of_load_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]),e._v(" "),i("span",{staticClass:"am-change",class:e.loadGrowthClass},[e._v(e._s(e.loadGrowthPercentage)+e._s(e.loadGrowthPercentageCharacter))])],1)]),e._v(" "),i("div",{staticClass:"am-big-num"},[i("span",[e._v(e._s(e.calculateChartTotal("load")))])]),e._v(" "),i("line-chart",{ref:"appointmentsLoadChart",attrs:{data:e.smallLineChartLoadData,options:e.smallLineChartLoadOptions,width:40,height:15}}),e._v(" "),i("div",[i("a",{staticClass:"am-goto",on:{click:function(t){return e.navigateTo("employees")}}},[e._v(e._s(e.$root.labels.view)+" "+e._s(e.$root.labels.employees))])])],1)]),e._v(" "),i("el-col",{attrs:{sm:24,md:12,lg:8}},[i("div",{staticClass:"am-grid-content"},[i("div",{staticClass:"am-title"},[i("h3",[e._v(e._s(e.$root.labels.revenue)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.revenue_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})]),e._v(" "),i("span",{staticClass:"am-change",class:e.revenueGrowthClass},[e._v(e._s(e.revenueGrowthPercentage)+e._s(e.revenueGrowthPercentageCharacter))])],1)]),e._v(" "),i("div",{staticClass:"am-big-num"},[i("span",[e._v(e._s(e.calculateChartTotal("revenue")))])]),e._v(" "),i("line-chart",{ref:"appointmentsRevenueChart",attrs:{data:e.smallLineChartRevenueData,options:e.smallLineChartRevenueOptions,width:40,height:15}}),e._v(" "),i("div",[i("a",{staticClass:"am-goto",on:{click:function(t){return e.navigateTo("finance")}}},[e._v(e._s(e.$root.labels.view)+" "+e._s(e.$root.labels.finance))])])],1)])],1)],1)]),e._v(" "),i("div",{staticClass:"am-employee-table-stats am-section",class:{"am-lite-container-disabled":e.$root.isLite}},[i("el-tabs",{model:{value:e.tableStats,callback:function(t){e.tableStats=t},expression:"tableStats"}},[i("el-tab-pane",{attrs:{label:e.$root.labels.employees,name:"employeeTableStats"}},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.visibleEmployeeTableData,"default-sort":{prop:"employeeName",order:"ascending"},"empty-text":e.$root.labels.no_employees_yet},on:{"sort-change":e.employeeTableSortChange}},[i("el-table-column",{attrs:{fixed:"",prop:"employeeName",label:e.$root.labels.employee,sortable:"","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("img",{attrs:{src:t.row.imgSrc}}),e._v("\n "+e._s(t.row.employeeName)+"\n ")]}}],null,!1,3058239493)}),e._v(" "),i("el-table-column",{attrs:{prop:"numAppointments",label:e.$root.labels.appointments_count,sortable:"","min-width":"220"}}),e._v(" "),i("el-table-column",{attrs:{prop:"sumPayments",label:e.$root.labels.appointments_revenue,formatter:e.revenueFormatter,sortable:"","min-width":"220"}}),e._v(" "),i("el-table-column",{attrs:{prop:"hoursAppointment",label:e.$root.labels.appointments_hours,formatter:e.hoursFormatter,sortable:"","min-width":"220"}}),e._v(" "),i("el-table-column",{attrs:{prop:"load",label:e.$root.labels.appointments_load,sortable:"","min-width":"220"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticStyle:{width:"100%"}},[i("div",{staticStyle:{width:"50px",display:"inline-block"}},[e._v(e._s(t.row.load)+"%")]),e._v(" "),i("el-progress",{attrs:{width:120,"show-text":!1,percentage:t.row.load,color:e.getPercentageBarColor(t.row.load)}})],1)]}}],null,!1,2031911931)})],1),e._v(" "),i("pagination-block",{attrs:{params:e.employeeTableParams,show:e.serviceTableParams.show,count:e.employeeTableParams.total,label:e.$root.labels.employees.toLowerCase(),visible:e.employeeTableParams.show0?i("div",{staticClass:"am-appointments-list-head"},[i("el-row",[i("el-col",{attrs:{lg:15}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.date)+" / "+e._s(e.$root.labels.time)+":")])]),e._v(" "),i("el-col",{attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.customer)+":")])]),e._v(" "),i("el-col",{attrs:{lg:5,md:5}},[i("p",[e._v(e._s(e.$root.labels.assigned_to)+":")])]),e._v(" "),i("el-col",{attrs:{lg:9,md:9}},[i("p",[e._v(e._s(e.$root.labels.service)+":")])])],1)],1),e._v(" "),i("el-col",{attrs:{lg:9}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:0,md:3}}),e._v(" "),i("el-col",{attrs:{lg:5,md:6}},[i("p",[e._v(e._s(e.$root.labels.duration)+":")])]),e._v(" "),i("el-col",{attrs:{lg:6,md:6}},[i("p",[e._v(e._s(e.$root.labels.payment)+":")])]),e._v(" "),i("el-col",{attrs:{lg:13,md:6}},[i("p",[e._v(e._s(e.$root.labels.status)+":")])])],1)],1)],1)],1):e._e(),e._v(" "),e.appointments.length>0?i("div",{staticClass:"am-appointments"},[i("div",{staticClass:"am-appointments-list"},[i("el-collapse",e._l(e.appointments,function(t){return t.providerId&&(e.appointmentProvider=e.getProviderById(t.providerId))&&null!==e.appointmentProvider?i("el-collapse-item",{key:t.id,staticClass:"am-appointment",attrs:{name:t.id}},[i("template",{slot:"title"},[i("div",{staticClass:"am-appointment-data"},[i("el-row",[i("el-col",{attrs:{lg:15}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:5,sm:5}},[i("span",{staticClass:"am-appointment-time",class:t.status},[e._v(e._s(e.getFrontedFormattedDateTime(t.bookingStart)))])]),e._v(" "),i("el-col",{attrs:{lg:5,sm:5}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.customer)+":")]),e._v(" "),[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",placement:"top",disabled:1===t.bookings.length,"popper-class":"am-align-left"}},[t.bookings.length>1?i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.getCustomersFromGroup(t))},slot:"content"}):e._e(),e._v(" "),i("h3",{class:{grouped:t.bookings.length>1}},[i("img",{directives:[{name:"show",rawName:"v-show",value:t.bookings.length>1,expression:"app.bookings.length > 1"}],staticClass:"svg",attrs:{width:"16px",src:e.$root.getUrl+"public/img/group.svg"}}),e._v(" "),e._l(t.bookings,function(a,o){return i("span",[e._v("\n "+e._s(null!==(e.user=e.getCustomerById(a.customerId))?e.user.firstName+" "+e.user.lastName:"")),t.bookings.length>1&&o+1!==t.bookings.length?i("span",[e._v(",")]):e._e()])})],2)]),e._v(" "),e._l(t.bookings,function(a){return 1===t.bookings.length?i("span",[e._v(e._s(null!==(e.user=e.getCustomerById(a.customerId))?e.user.email:""))]):e._e()}),e._v(" "),t.bookings.length>1?i("span",[e._v(e._s(e.$root.labels.multiple_emails))]):e._e()]],2),e._v(" "),i("el-col",{attrs:{lg:5,sm:5}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.assigned)+":")]),e._v(" "),i("div",{staticClass:"am-assigned"},[e.options.fetched?i("img",{attrs:{src:e.pictureLoad(e.getProviderById(t.providerId),!0)},on:{error:function(a){e.imageLoadError(e.getProviderById(t.providerId),!0)}}}):e._e(),e._v(" "),i("h4",[e._v("\n "+e._s(null!==(e.user=e.getProviderById(t.providerId))?e.user.firstName+" "+e.user.lastName:"")+"\n ")])])]),e._v(" "),i("el-col",{attrs:{lg:9,sm:9}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.service)+":")]),e._v(" "),i("h4",[e._v("\n "+e._s(null!==(e.service=e.getServiceById(t.serviceId))?e.service.name:"")+"\n ")])])],1)],1),e._v(" "),i("el-col",{attrs:{lg:9}},[i("el-row",{staticClass:"am-appointments-flex-row-middle-align",attrs:{gutter:10}},[i("el-col",{attrs:{lg:0,sm:3}}),e._v(" "),i("el-col",{attrs:{lg:5,sm:6,xs:12}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.duration)+":")]),e._v(" "),i("h4",[e._v(e._s(e.momentDurationToNiceDurationWithUnit(e.convertDateTimeRangeDifferenceToMomentDuration(t.bookingStart,t.bookingEnd))))])]),e._v(" "),i("el-col",{staticClass:"am-appointment-payment",attrs:{lg:6,sm:6,xs:12}},[i("p",{staticClass:"am-col-title"},[e._v(e._s(e.$root.labels.payment)+":")]),e._v(" "),i("div",{staticClass:"am-appointment-payment-wrap"},[e._l(e.getAppointmentPaymentMethods(t.bookings),function(t){return i("img",{attrs:{src:e.$root.getUrl+"public/img/payments/"+t+".svg"}})}),e._v(" "),i("h4",[e._v(e._s(e.getAppointmentPrice(t.serviceId,t.bookings)))])],2)]),e._v(" "),i("el-col",{attrs:{lg:8,sm:6,xs:17}},[i("div",{staticClass:"am-appointment-status",on:{click:function(t){t.stopPropagation()}}},[i("span",{staticClass:"am-appointment-status-symbol",class:t.status}),e._v(" "),i("el-select",{attrs:{placeholder:e.$root.labels.status},on:{change:function(a){return e.updateAppointmentStatus(t,t.status,!1)}},model:{value:t.status,callback:function(a){e.$set(t,"status",a)},expression:"app.status"}},e._l(e.statuses,function(t){return i("el-option",{key:t.value,staticClass:"am-appointment-status-option",attrs:{label:t.label,value:t.value}},[i("span",{staticClass:"am-appointment-status-symbol",class:t.value},[e._v(e._s(t.label))])])}),1)],1)]),e._v(" "),i("el-col",{attrs:{lg:5,sm:3,xs:7}},[i("div",{staticClass:"am-edit-btn",on:{click:function(t){t.stopPropagation()}}},[i("el-button",{on:{click:function(a){return e.showDialogEditAppointment(t.id)}}},[e._v("\n "+e._s(e.$root.labels.edit)+"\n ")])],1)])],1)],1)],1)],1)]),e._v(" "),i("appointment-list-collapsed",{attrs:{app:t,options:e.options}})],2):e._e()}),1)],1)]):e._e(),e._v(" "),0===e.appointments.length?i("div",{staticClass:"am-empty-state am-section"},[i("img",{attrs:{src:e.$root.getUrl+"public/img/emptystate.svg"}}),e._v(" "),i("p",[e._v(e._s(e.$root.labels.no_upcoming_appointments))])]):e._e()],1),e._v(" "),i("BlockLite"),e._v(" "),i("div",{staticClass:"am-charts am-section",class:{"am-lite-container-disabled":e.$root.isLite}},[i("el-row",{attrs:{gutter:32}},[i("el-col",{staticClass:"am-border-right",attrs:{md:16}},[i("div",{staticClass:"am-chart bar-chart"},[i("h2",{staticClass:"am-section-title"},[e._v("\n "+e._s(e.$root.labels.conversions)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.conversions_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1),e._v(" "),i("el-tabs",{model:{value:e.chartTabs,callback:function(t){e.chartTabs=t},expression:"chartTabs"}},[i("el-tab-pane",{attrs:{label:e.$root.labels.employees,name:"employee"}},[i("div",{staticClass:"am-chart-filter"},[i("el-row",{attrs:{gutter:10}},[i("el-col",{attrs:{sm:12}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_employee,multiple:"","collapse-tags":""},on:{change:e.filterEmployeesChart},model:{value:e.employees,callback:function(t){e.employees=t},expression:"employees"}},e._l(e.options.entities.employees,function(t){return i("el-option",{key:t.id,attrs:{label:t.firstName+" "+t.lastName,value:t.id}})}),1)],1)],1)],1),e._v(" "),"employee"===e.chartTabs?i("bar-chart",{ref:"employeesChart",attrs:{data:e.employeesChartData,options:e.defaultBarChartOptions}}):e._e()],1),e._v(" "),i("el-tab-pane",{attrs:{label:e.$root.labels.services,name:"service"}},[i("div",{staticClass:"am-chart-filter"},[i("el-row",{attrs:{gutter:10}},[i("el-col",{attrs:{sm:12}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_service,multiple:"","collapse-tags":""},on:{change:e.filterServicesChart},model:{value:e.services,callback:function(t){e.services=t},expression:"services"}},e._l(e.options.entities.services,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1)],1),e._v(" "),"service"===e.chartTabs?i("bar-chart",{ref:"servicesChart",attrs:{data:e.servicesChartData,options:e.defaultBarChartOptions}}):e._e()],1),e._v(" "),e.options.entities.locations.length?i("el-tab-pane",{attrs:{label:e.$root.labels.locations,name:"location"}},[i("div",{staticClass:"am-chart-filter"},[i("el-row",{attrs:{gutter:10}},[i("el-col",{attrs:{sm:12}},[i("el-select",{attrs:{filterable:"",clearable:"",placeholder:e.$root.labels.select_location,multiple:"","collapse-tags":""},on:{change:e.filterLocationsChart},model:{value:e.locations,callback:function(t){e.locations=t},expression:"locations"}},e._l(e.options.entities.locations,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1)],1),e._v(" "),"location"===e.chartTabs?i("bar-chart",{ref:"locationsChart",attrs:{data:e.locationsChartData,options:e.defaultBarChartOptions}}):e._e()],1):e._e()],1)],1)]),e._v(" "),i("el-col",{attrs:{md:8}},[i("div",{staticClass:"am-chart doughnut-chart"},[i("el-row",[i("el-col",{attrs:{span:12}},[i("h2",{staticClass:"am-section-title"},[e._v("\n "+e._s(e.$root.labels.customers)+"\n "),i("el-tooltip",{attrs:{placement:"top"}},[i("div",{attrs:{slot:"content"},domProps:{innerHTML:e._s(e.$root.labels.customers_tooltip)},slot:"content"}),e._v(" "),i("i",{staticClass:"el-icon-question am-tooltip-icon"})])],1)]),e._v(" "),i("el-col",{attrs:{span:12}},[e.fetched?i("h2",{staticClass:"align-right"},[e._v(e._s(e.totalCustomers)+"\n "),i("span",{class:e.customerGrowthClass},[e._v("\n "+e._s(e.customersGrowthPercentage)+e._s(e.customerGrowthPercentageCharacter)+"\n ")])]):e._e()])],1),e._v(" "),i("div",{staticStyle:{padding:"0 40px"}},[i("doughnut-chart",{ref:"customersChart",attrs:{data:e.customersChartData}})],1),e._v(" "),i("el-row",[i("el-col",{attrs:{span:12}},[e.fetched?i("p",{staticClass:"am-big-num"},[e._v("\n "+e._s(e.newCustomers)+"\n ")]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.new))]),e._v(" "),e.fetched?i("el-progress",{attrs:{percentage:e.newCustomersPercentage,color:"#1A84EE"}}):e._e()],1),e._v(" "),i("el-col",{attrs:{span:12}},[e.fetched?i("p",{staticClass:"am-big-num"},[e._v("\n "+e._s(e.returningCustomers)+"\n ")]):e._e(),e._v(" "),i("p",[e._v(e._s(e.$root.labels.returning))]),e._v(" "),e.fetched?i("el-progress",{attrs:{percentage:e.returnedCustomersPercentage,color:"#FFD400"}}):e._e()],1)],1)],1)])],1)],1),e._v(" "),!0===e.$root.settings.capabilities.canWrite?i("div",{staticClass:"am-button-new",attrs:{id:"am-button-new"}},[i("el-popover",{ref:"popover",attrs:{placement:"top",width:"160","visible-arrow":"false","popper-class":"am-button-popover"},model:{value:e.popover,callback:function(t){e.popover=t},expression:"popover"}},[i("div",{staticClass:"am-overlay",on:{click:function(t){e.popover=!1,e.buttonNewItems=!e.buttonNewItems}}},[i("div",{staticClass:"am-button-new-items"},[i("transition",{attrs:{name:"el-zoom-in-bottom"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:e.buttonNewItems,expression:"buttonNewItems"}]},[i("el-button",{on:{click:e.showDialogNewAppointment}},[e._v(e._s(e.$root.labels.new_appointment))]),e._v(" "),i("el-button",{on:{click:e.showDialogNewCustomer}},[e._v(e._s(e.$root.labels.create_customer))])],1)])],1)])]),e._v(" "),i("el-button",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],ref:"rotating",attrs:{id:"am-plus-symbol",type:"primary",icon:"el-icon-plus"},on:{click:function(t){e.buttonNewItems=!e.buttonNewItems}}})],1):e._e(),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogAppointment?i("el-dialog",{staticClass:"am-side-dialog",attrs:{visible:e.dialogAppointment,"show-close":!1},on:{"update:visible":function(t){e.dialogAppointment=t}}},[i("dialog-appointment",{attrs:{appointment:e.appointment,bookings:e.bookings,entitiesChoices:e.options.entitiesChoices,options:e.options},on:{sortBookings:e.sortBookings,saveCallback:e.getDashboardOptions,duplicateCallback:e.duplicateAppointmentCallback,closeDialog:e.closeDialogAppointment,showDialogNewCustomer:e.showDialogNewCustomer,editPayment:e.editPayment}})],1):e._e()],1),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogCustomer?i("el-dialog",{staticClass:"am-side-dialog",attrs:{visible:e.dialogCustomer,"show-close":!1},on:{"update:visible":function(t){e.dialogCustomer=t}}},[i("dialog-customer",{attrs:{customer:e.customer},on:{saveCallback:e.saveCustomerCallback,closeDialog:function(t){e.dialogCustomer=!1}}})],1):e._e()],1),e._v(" "),i("transition",{attrs:{name:"slide"}},[e.dialogPayment?i("el-dialog",{staticClass:"am-side-dialog am-dialog-coupon",attrs:{visible:e.dialogPayment,"show-close":!1},on:{"update:visible":function(t){e.dialogPayment=t}}},[i("dialog-payment",{attrs:{modalData:e.selectedPaymentModalData,appointmentFetched:!0},on:{closeDialogPayment:function(t){e.dialogPayment=!1},updatePaymentCallback:e.updatePaymentCallback}})],1):e._e()],1)],1):e._e(),e._v(" "),i("DialogLite"),e._v(" "),i("el-col",{attrs:{md:6}},[i("a",{staticClass:"am-help-button",attrs:{href:"https://wpamelia.com/admin-dashboard/",target:"_blank"}},[i("i",{staticClass:"el-icon-question"}),e._v(" "+e._s(e.$root.labels.need_help)+"?\n ")])])],1)])},staticRenderFns:[]}}});