2 lines
302 KiB
JavaScript
2 lines
302 KiB
JavaScript
(function(e){function t(t){for(var i,o,l=t[0],c=t[1],r=t[2],p=0,u=[];p<l.length;p++)o=l[p],Object.prototype.hasOwnProperty.call(s,o)&&s[o]&&u.push(s[o][0]),s[o]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);d&&d(t);while(u.length)u.shift()();return a.push.apply(a,r||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],i=!0,l=1;l<n.length;l++){var c=n[l];0!==s[c]&&(i=!1)}i&&(a.splice(t--,1),e=o(o.s=n[0]))}return e}var i={},s={app:0},a=[];function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/";var l=window["jsonpFunction"]=window["jsonpFunction"]||[],c=l.push.bind(l);l.push=t,l=l.slice();for(var r=0;r<l.length;r++)t(l[r]);var d=c;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"002f":function(e,t,n){"use strict";n("ae0c")},"03f3":function(e,t,n){"use strict";n("f54b")},"0444":function(e,t,n){},"06b4":function(e,t,n){},"0813":function(e,t,n){"use strict";n("e816")},"0b59":function(e,t,n){},"0c8b":function(e,t,n){},"0da1":function(e,t,n){"use strict";n("181c")},"0ee9":function(e,t,n){"use strict";n("4bc2")},"0fa7":function(e,t,n){"use strict";n("cfcf")},"153c":function(e,t,n){},"181c":function(e,t,n){},"20e5":function(e,t,n){},2174:function(e,t,n){var i={"./af":"e0ea","./af.js":"e0ea","./ar":"31db","./ar-dz":"4648","./ar-dz.js":"4648","./ar-kw":"1760","./ar-kw.js":"1760","./ar-ly":"7121","./ar-ly.js":"7121","./ar-ma":"be99","./ar-ma.js":"be99","./ar-sa":"510c","./ar-sa.js":"510c","./ar-tn":"c9f0","./ar-tn.js":"c9f0","./ar.js":"31db","./az":"2e49","./az.js":"2e49","./be":"1644","./be.js":"1644","./bg":"f593","./bg.js":"f593","./bm":"e3cd","./bm.js":"e3cd","./bn":"14f3","./bn-bd":"39d7","./bn-bd.js":"39d7","./bn.js":"14f3","./bo":"00b4","./bo.js":"00b4","./br":"8965","./br.js":"8965","./bs":"d6b8","./bs.js":"d6b8","./ca":"f87b","./ca.js":"f87b","./cs":"1be6","./cs.js":"1be6","./cv":"13a5","./cv.js":"13a5","./cy":"a3fd","./cy.js":"a3fd","./da":"45a0","./da.js":"45a0","./de":"8b74","./de-at":"ab78","./de-at.js":"ab78","./de-ch":"a74d","./de-ch.js":"a74d","./de.js":"8b74","./dv":"0184","./dv.js":"0184","./el":"4eb7","./el.js":"4eb7","./en-au":"2e91","./en-au.js":"2e91","./en-ca":"cfbe","./en-ca.js":"cfbe","./en-gb":"ace8","./en-gb.js":"ace8","./en-ie":"dc23","./en-ie.js":"dc23","./en-il":"4de1","./en-il.js":"4de1","./en-in":"e5be","./en-in.js":"e5be","./en-nz":"e989","./en-nz.js":"e989","./en-sg":"12b4","./en-sg.js":"12b4","./eo":"01f4","./eo.js":"01f4","./es":"f257","./es-do":"cf7c","./es-do.js":"cf7c","./es-mx":"1732","./es-mx.js":"1732","./es-us":"fd0e","./es-us.js":"fd0e","./es.js":"f257","./et":"2f03","./et.js":"2f03","./eu":"6ca9","./eu.js":"6ca9","./fa":"6c8d","./fa.js":"6c8d","./fi":"895a","./fi.js":"895a","./fil":"33bc","./fil.js":"33bc","./fo":"3447","./fo.js":"3447","./fr":"7e69","./fr-ca":"1d05","./fr-ca.js":"1d05","./fr-ch":"293b","./fr-ch.js":"293b","./fr.js":"7e69","./fy":"0fba","./fy.js":"0fba","./ga":"5608","./ga.js":"5608","./gd":"0ba7","./gd.js":"0ba7","./gl":"f486","./gl.js":"f486","./gom-deva":"669e","./gom-deva.js":"669e","./gom-latn":"1890","./gom-latn.js":"1890","./gu":"8e55","./gu.js":"8e55","./he":"90a9","./he.js":"90a9","./hi":"fd5f","./hi.js":"fd5f","./hr":"7335","./hr.js":"7335","./hu":"db32","./hu.js":"db32","./hy-am":"7c45","./hy-am.js":"7c45","./id":"55a0","./id.js":"55a0","./is":"c9c0","./is.js":"c9c0","./it":"347e","./it-ch":"7e47","./it-ch.js":"7e47","./it.js":"347e","./ja":"5caf","./ja.js":"5caf","./jv":"0831","./jv.js":"0831","./ka":"f30e","./ka.js":"f30e","./kk":"1390","./kk.js":"1390","./km":"d0af","./km.js":"d0af","./kn":"9f67","./kn.js":"9f67","./ko":"d662","./ko.js":"d662","./ku":"5fd7","./ku.js":"5fd7","./ky":"1d53","./ky.js":"1d53","./lb":"c3ea","./lb.js":"c3ea","./lo":"3751","./lo.js":"3751","./lt":"9d38","./lt.js":"9d38","./lv":"81a6","./lv.js":"81a6","./me":"d0b3","./me.js":"d0b3","./mi":"7349","./mi.js":"7349","./mk":"83e0","./mk.js":"83e0","./ml":"1738","./ml.js":"1738","./mn":"b933","./mn.js":"b933","./mr":"f00a","./mr.js":"f00a","./ms":"f119","./ms-my":"1db1","./ms-my.js":"1db1","./ms.js":"f119","./mt":"e6b6","./mt.js":"e6b6","./my":"22cf","./my.js":"22cf","./nb":"ebf0","./nb.js":"ebf0","./ne":"46dd","./ne.js":"46dd","./nl":"01bc","./nl-be":"4630","./nl-be.js":"4630","./nl.js":"01bc","./nn":"ff3f","./nn.js":"ff3f","./oc-lnc":"746a","./oc-lnc.js":"746a","./pa-in":"1107","./pa-in.js":"1107","./pl":"7bba","./pl.js":"7bba","./pt":"650c","./pt-br":"4b54","./pt-br.js":"4b54","./pt.js":"650c","./ro":"6ef9","./ro.js":"6ef9","./ru":"1abc","./ru.js":"1abc","./sd":"0351","./sd.js":"0351","./se":"e7ce","./se.js":"e7ce","./si":"bb82","./si.js":"bb82","./sk":"d631","./sk.js":"d631","./sl":"8bc9","./sl.js":"8bc9","./sq":"08cf","./sq.js":"08cf","./sr":"c2c0","./sr-cyrl":"135d","./sr-cyrl.js":"135d","./sr.js":"c2c0","./ss":"cac6","./ss.js":"cac6","./sv":"1d05e","./sv.js":"1d05e","./sw":"224a","./sw.js":"224a","./ta":"0e6e","./ta.js":"0e6e","./te":"b175","./te.js":"b175","./tet":"2085","./tet.js":"2085","./tg":"0cc6","./tg.js":"0cc6","./th":"1dd3","./th.js":"1dd3","./tk":"665c","./tk.js":"665c","./tl-ph":"267e","./tl-ph.js":"267e","./tlh":"0867","./tlh.js":"0867","./tr":"fcb5","./tr.js":"fcb5","./tzl":"d7e6","./tzl.js":"d7e6","./tzm":"2c4e","./tzm-latn":"6af6","./tzm-latn.js":"6af6","./tzm.js":"2c4e","./ug-cn":"1303","./ug-cn.js":"1303","./uk":"efed","./uk.js":"efed","./ur":"e027","./ur.js":"e027","./uz":"8dfa","./uz-latn":"6b2f","./uz-latn.js":"6b2f","./uz.js":"8dfa","./vi":"519e","./vi.js":"519e","./x-pseudo":"370c","./x-pseudo.js":"370c","./yo":"51c8","./yo.js":"51c8","./zh-cn":"51ef","./zh-cn.js":"51ef","./zh-hk":"647c","./zh-hk.js":"647c","./zh-mo":"2b9d","./zh-mo.js":"2b9d","./zh-tw":"1ee0","./zh-tw.js":"1ee0"};function s(e){var t=a(e);return n(t)}function a(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=a,e.exports=s,s.id="2174"},"229d":function(e,t,n){},"25a3":function(e,t,n){},"2be9":function(e,t,n){"use strict";n("cc76")},"2c97":function(e,t,n){},"2e5a":function(e,t,n){"use strict";n("637c")},3837:function(e,t,n){"use strict";n("83b9")},"3a3b":function(e,t,n){},4299:function(e,t,n){},"42b2":function(e,t,n){},"42d4":function(e,t,n){"use strict";n("4b12")},4486:function(e,t,n){"use strict";n("0c8b")},"46b0":function(e,t,n){"use strict";n("0444")},4881:function(e,t,n){"use strict";n("74e2")},"4b12":function(e,t,n){},"4bc2":function(e,t,n){},"4c24":function(e,t,n){},"4e31":function(e,t,n){"use strict";n("229d")},"55c1":function(e,t,n){"use strict";n("20e5")},"56d7":function(e,t,n){"use strict";n.r(t);var i=n("7a23"),s=n("5502"),a=n("7f45"),o=n.n(a),l=n("2ef0"),c=n.n(l);const r=[{field:"Name",display:!0,required:!0,icon:"face"},{field:"Email",display:!0,required:!0,icon:"email"},{field:"Phone",display:!1,required:!1,icon:"phone"},{field:"Address",display:!1,required:!1,icon:"place"},{field:"City",display:!1,required:!1,icon:"place"},{field:"State",display:!1,required:!1,icon:"place"},{field:"Zip",display:!1,required:!1,icon:"place"},{field:"Notes",display:!1,required:!1,icon:"assignment"}],d=[{title:"appointmentType",inputType:"cardList"},{title:"date",inputType:"week",status:"incomplete"},{title:"time",inputType:"cardListByTimeOfDay"},{title:"customerInformation",inputType:"fields"},{title:"confirmation",inputType:"template"}],p=[{title:"appointmentType",inputType:"cardList"},{title:"express",inputType:"default"},{title:"customerInformation",inputType:"fields"},{title:"confirmation",inputType:"template"}],u={editAppointment:{title:"editAppointment",inputType:"template"},formConfirmation:{title:"formConfirmation",inputType:"template"},selectExtras:{title:"extras",inputType:"template"}},m="YYYY-MM-DD",b="YYYY-MM-DD HH:mm:ss",h={"US/Eastern":"US/Eastern (EST/EDT)","US/Central":"US/Central (CST/CDT)","US/Mountain":"US/Mountain (MST/MDT)","US/Pacific":"US/Pacific (PST/PDT)","US/Arizona":"US/Arizona (MST/Mountain)"},y=["EST","PST","CST","MST","EST5EDT","PST8PDT","CST6CDT","MST7MDT"];var f={appointmentAction(e,t){const n=t.urlParams();return Object.prototype.hasOwnProperty.call(n,"appointment_action")&&n.appointment_action?n.appointment_action:null},availabilityWindow(e,t){if(!t.selectedAppointmentType)return;let n=t.selectedAppointmentType,i=o.a.utc(n.availability_start_date);n.availability_start_date&&i.isValid()||(i=o.a.utc());let s=o.a.utc(n.availability_end_date);n.availability_end_date&&s.isValid()||(s=o.a.utc().add(2,"years"));let a=parseInt(n.min_booking_notice),l=parseInt(n.max_booking_notice);l=l||1051200;let c=a?o.a.utc().add(a,"minutes"):o.a.utc(),r=l?o.a.utc().add(l,"minutes"):o.a.utc().add(1,"year");return{start:o.a.max(i,c),end:o.a.min(s,r)}},afterAvailabilityWindow(e,t){if(!t.availabilityWindow)return;let n=o.a.utc();return n.isAfter(t.availabilityWindow.end,"day")},appointmentTypeBySlug:e=>t=>e.appointmentTypes.find(e=>e.slug===t),appointmentTypeById:e=>t=>e.appointmentTypes.find(e=>e.id===t),bookingWindow(e,t){if(!t.selectedAppointmentType)return;let n=t.selectedAppointmentType,i=o.a.utc(n.booking_start_date,e.timestampFormat);i=i.isValid()?i:o.a.utc().subtract(1,"second");let s=o.a.utc(n.booking_end_date,e.timestampFormat);return s=s.isValid()?s:o.a.utc().add(1,"year"),{start:i,end:s}},currentUserCan:e=>t=>!(!e.user||!e.user.capabilities.length)&&e.user.capabilities.includes(t),makeCRCTable:()=>{let e,t=[];for(let n=0;n<256;n++){e=n;for(let t=0;t<8;t++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t},crc32:(e,t)=>e=>{let n=JSON.stringify(e),i=window.crcTable||(window.crcTable=t.makeCRCTable),s=-1;for(let t=0;t<n.length;t++)s=s>>>8^i[255&(s^n.charCodeAt(t))];return(-1^s)>>>0},currentStep(e){if(e.steps.length)return e.steps[e.currentStepInt]},previousStep(e){if(e.steps.length&&0!==e.currentStepInt)return e.steps[e.currentStepInt-1]},stepIndexByTitle:e=>t=>e.steps.findIndex(e=>e.title===t),customerInformationCheck:(e,t)=>n=>{if("undefined"===typeof n)return n;let i=!1;for(let e=0;e<n.length;e++)if(!n[e].custom_customer_information||c.a.isEmpty(n[e].custom_customer_information)){i=!0;break}let s=!1;for(let e=0;e<n.length;e++)if(!n[e].customer_information||c.a.isEmpty(n[e].customer_information)){s=!0;break}return e.settings.installed.license&&i?t.customerInformationUpgrade(n):!e.settings.installed.license&&s?t.customerInformationDowngrade(n):n},customerInformationDowngrade:()=>e=>{let t=r.map(e=>e.field.toLowerCase());return e.map(e=>{e.customer_information=e.customer_information.filter(e=>{let n=e.field.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9]/g,"");return t.includes(n)}),e.customer_information=e.customer_information.map(e=>(delete e["type"],delete e.values,delete e.icon,e.field=e.field.toLowerCase().replace(/ /g,"_").replace(/[^a-zA-Z0-9]/g,""),e));let n=e.customer_information.map(e=>e.field),i=c.a.cloneDeep(r),s=i.map(t=>{let i=n.indexOf(t.field.toLowerCase());if(i>=0){let n=e.customer_information[i],s=n.field;return n.field=s.charAt(0).toUpperCase()+s.slice(1),Object.assign(t,e.customer_information[i])}return t});return e.customer_information=s,e})},customerInformationUpgrade:()=>e=>e.map(e=>(e.custom_customer_information&&!c.a.isEmpty(e.custom_customer_information)||(e.custom_customer_information=e.customer_information.filter(e=>"boolean"===typeof e.display?e.display:"true"===e.display),e.custom_customer_information=e.custom_customer_information.map(e=>(e.type=e.type?e.type:"single-text",e.icon=e.icon?e.icon:"label",e.values=e.values?e.values:[],"boolean"!==typeof e.display&&(e.display="true"===e.display),"boolean"!==typeof e.required&&(e.required="true"===e.required),e))),e)),displayDuration:e=>t=>{let n=parseInt(t,10),i="minute",s=n;n%10080===0?(s=n/10080,i="week"):n%1440===0?(s=n/1440,i="day"):n%60===0&&(s=n/60,i="hour");let a="plural";return 1===s&&(a="singular"),s+" "+e.translations.units[i+"_"+a]},displayPrice:e=>(t,n)=>{let i=parseFloat(t);if((i||0===i)&&navigator.languages[0])return new Intl.NumberFormat(navigator.languages[0],{style:"currency",currency:n}).format(i);{let t=e.settings.global.locale.substring(0,5).replace("_","-");return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(i)}},formatTimezone:e=>t=>{if(t||(t=e.timezone),!t)return"";let n=h[t]||t.replace(/_/g," "),i=n.indexOf("Etc/GMT+")>-1||n.indexOf("Etc/GMT-")>-1;return i&&(n=n.replace("GMT+","UTC-"),n=n.replace("GMT-","UTC+")),n},filteredTimezones:(e,t)=>e=>e.filter(e=>!y.includes(e)).map(e=>"Europe/Kiev"===e?{value:"Europe/Kyiv",label:h[e]||t.formatTimezone(e)}:{value:e,label:h[e]||t.formatTimezone(e)}),inBookingWindow(e,t){if(!t.bookingWindow)return;if(!t.selectedAppointmentType.booking_start_date&&!t.selectedAppointmentType.booking_end_date)return!0;let n=o.a.utc();return n.isSameOrAfter(t.bookingWindow.start)&&n.isSameOrBefore(t.bookingWindow.end)},localTime(e){if(e.appointment||Object.prototype.hasOwnProperty.call(e.appointment,"start_date"))return o.a.utc(e.appointment.start_date,b).tz(e.timezone)},maxDay(e,t){if(t.availabilityWindow)return t.availabilityWindow.end.clone().tz(e.timezone)},minDay(e,t){if(t.availabilityWindow)return t.availabilityWindow.start.clone().tz(e.timezone)},selectedAppointmentType(e){let t=e.appointmentTypes.length,n=Object.prototype.hasOwnProperty.call(e.appointment,"appointment_type_id")&&e.appointment.appointment_type_id;if(!t||!n)return null;let i=e.appointmentTypes.find(t=>t.id===e.appointment.appointment_type_id);return i},displayStartTime(e,t){if(t.localTime&&e.settings.global)return t.localTime.locale("en").format(e.settings.global.date_format_moment+" "+e.settings.global.time_format_moment)},showAddToCalendarButton:(e,t)=>n=>{let i={show:!1,action:"",text:""};return e.settings.installed.google_calendar&&e.settings.google_calendar.enabled&&!c.a.isEmpty(t.selectedAppointmentType.google_calendar_booking)&&"1"==t.selectedAppointmentType.shared_calendar_event?(i.show=!1,i.action="replaceWithText",i.text="invitationHasBeenSent",i):e.settings.installed.google_calendar&&e.settings.google_calendar.enabled&&!c.a.isEmpty(t.selectedAppointmentType.google_calendar_booking)&&"0"==t.selectedAppointmentType.shared_calendar_event&&t.currentUserCan("ssa_manage_appointments")?(i.show=!1,i):Object.prototype.hasOwnProperty.call(n,"gcal")||Object.prototype.hasOwnProperty.call(n,"ics")?(i.show=!0,i):i},showPaymentUI:e=>t=>{if(e.integration)return!1;if(!e.settings.installed.payments)return!1;if(!Object.prototype.hasOwnProperty.call(e.settings,"payments"))return!1;if(!e.settings.payments.enabled)return!1;if(!e.settings.paypal&&!e.settings.stripe&&!e.settings.paypal.enabled&&!e.settings.stripe.enabled)return!1;if(e.modeEdit||e.modeReschedule)return!1;if(e.meprMembershipId)return!1;if(Object.prototype.hasOwnProperty.call(t,"payments")&&Object.prototype.hasOwnProperty.call(t.payments,"payment_methods")){let n=t.payments.payment_methods.filter(t=>!!Object.prototype.hasOwnProperty.call(e.settings,t)&&e.settings[t].enabled);if(!n.length)return!1;if("none"===t.payments.payment_required)return!1}return!!(t.payments&&t.payments.price&&t.payments.currency)},slug:(e,t)=>t.selectedAppointmentType?t.selectedAppointmentType.slug:null,slugify:()=>e=>e.toString().toLowerCase().trim().replace(/&/g,"-and-").replace(/[\s\W-]+/g,"-"),timezoneLocal(){return o.a.tz.guess()},token(e,t){const n=t.urlParams();return Object.prototype.hasOwnProperty.call(n,"appointment_token")&&n.appointment_token?n.appointment_token:null},tzAvailableSlots(e,t){let n=[];return e.availableSlots&&e.availableSlots.length?(e.availableSlots.map(i=>{let s=o.a.utc(i.start_date,b),a=s.clone().add(t.selectedAppointmentType.duration,"minutes"),l=!0;if(t.availabilityWindow&&(l=s.isBetween(t.availabilityWindow.start,t.availabilityWindow.end,void 0,"[]")&&a.isBetween(t.availabilityWindow.start,t.availabilityWindow.end,void 0,"[]")),!l)return;let c=s.tz(e.timezone).format(b),r={start_date:c};Object.prototype.hasOwnProperty.call(i,"capacity_available")&&(r.capacity_available=i.capacity_available),n.push(r)}),n):n},tzDayCheckedFirst(e){if(e.dayCheckedFirst)return e.dayCheckedFirst.utc().tz(e.timezone)},tzDayCheckedLast(e){if(e.dayCheckedLast)return e.dayCheckedLast.utc().tz(e.timezone)},urlParams:()=>e=>{let t=e||window.location,n={},i=document.createElement("a");i.href=t;let s=i.search.substring(1),a=s.split("&");for(var o=0;o<a.length;o++){if(a[o].indexOf("=")<0)continue;let e=a[o].split("=");n[e[0]]=decodeURIComponent(e[1])}return n},validateEmail:()=>e=>{let t=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},visibleAppointmentTypes(e){return e.appointmentTypes.filter(e=>"publish"===e.status)},windowLoadedMessage:e=>()=>{e.api&&setTimeout((function(){window.parent.postMessage({iframe:"loaded"},e.api.home_url)}),150)},appointmentDuration(e,t){return e.appointment&&Object.prototype.hasOwnProperty.call(e.appointment,"start_date")&&Object.prototype.hasOwnProperty.call(e.appointment,"end_date")&&!e.modeReschedule?o()(e.appointment.end_date).diff(o()(e.appointment.start_date),"minutes"):t.selectedAppointmentType.duration},isTeamMembersRequired(e,t){return e.settings.installed.staff&&e.settings.staff.enabled&&!!t.selectedAppointmentType.staff_objects&&t.selectedAppointmentType.staff_objects.length>0&&"user_preference"==t.selectedAppointmentType.staff.required},isResourcesRequired(e,t){return e.settings.installed.resources&&e.settings.resources.enabled&&!!t.selectedAppointmentType.resources_objects&&t.selectedAppointmentType.resources_objects.length>0},shouldDisplayOptinNotifications(e,t){var n,i,s,a,o,l;return(null===(n=t.selectedAppointmentType)||void 0===n||null===(i=n.notifications)||void 0===i||null===(s=i.notifications_opt_in)||void 0===s?void 0:s.enabled)&&(null===(a=t.selectedAppointmentType)||void 0===a||null===(o=a.notifications)||void 0===o||null===(l=o.notifications_opt_in)||void 0===l?void 0:l.label)&&!e.modeEdit&&!e.modeReschedule}},O={actions:{back:"Go back",editTimezone:"Change the timezone.",forward:"Go forward",saveTimezone:"Save timezone",searchCountry:"Search country..."},general:{loadingInitial:"Loading",loadingTypes:"Getting appointment information",loadingAvailableSlots:"Loading Available Appointments",yourTimezone:"Your timezone:",selectTimezone:"Select a timezone",timezoneMismatch:"You are booking an appointment in timezone:",localTime:"Current local time is:",timezoneGuessWrong:"We're having trouble guessing your timezone. Please check to be sure the timezone is correct.",timezoneChangedWrong:"Please check your timezone. For best results, choose a timezone named for your country or region.",confirmSelection:"Confirm Selection"},pageTitles:{book:"Enter your contact information",customerInformation:"Enter your contact information",Booked:"Appointment booked",confirmation:"Appointment booked",bookingDefault:"Select an appointment type",bookingForm:"Select an appointment type",formConfirm:"Appointment date selected",change:"Modify a booked appointment",date:"Select a date",formType:"Select a date",formDate:"Select a date",loadSelected:"Loading appointment",time:"Select a time",formTime:"Select a time",type:"Select an appointment type",appointmentType:"Select an appointment type",view:"View your appointment",express:"Select a date and time"},booking:{back:"Back",booking:"Booking:",appointmentType:"What type of appointment are you booking?",infoHeader:"You are booking: ",confirmHeader:"Thank you! Your appointment is booked: ",when:"When: ",saving:"Saving",processingPayment:{stripe:"Processing payment",paypal:"Pay with PayPal"},paypalMessage:"We'll hold your appointment time for 10 minutes to give you time to complete payment with PayPal",bookingAppointment:"Booking your appointment",calendarSave:"Save to calendar",calendarSaveGoogle:"Google calendar",calendarSaveOther:"Other",invitationHasBeenSent:"A calendar invitation has been sent to your email address",dateSelect:"Select a date",timeSelect:"Select a time on",smsOptIn:"Please remind me about this appointment by text message at this number",bookButton:"Book this appointment",updateButton:"Update this appointment",checkAppointment:"Saving your appointment information",available:"Available: ",redirecting:"Please wait while we redirect you"},suggestFirstAvailable:{next:"Next available appointment",confirm:"Confirm Appointment Time",pickAnother:"Or, pick another time"},change:{changeHeader:"Make a change",canceledIndicator:"Canceled:",canceling:"Canceling appointment",cancelConfirm:"Are you sure you want to cancel?",cancelConfirmCancel:"Keep Appointment",cancelConfirmOkay:"Cancel Appointment",cancelationNote:"Cancelation Note",reschedulingNote:"Rescheduling Note",past:"This appointment is in the past. It cannot be edited.",canceled:"This appointment has been canceled",reschedule:"Reschedule",viewAsAdmin:"View as admin",cancel:"Cancel Appointment",edit:"Edit Information",changeTime:"Change selected time",new:"Schedule a new appointment",next:"What would you like to do next?"},reschedulingDialog:{title:"Would you like to leave a rescheduling note?",text:"This appointment will be rescheduled to",textfieldLabel:"Rescheduling Note",textfieldHelpText:"This note will be visible to your customer and will be sent with any notifications you have set up.",actions:{close:"Close",clearAndClose:"Clear & Close",addNote:"Add Note"},review:{none:"None",screenReader:{edit:"Edit rescheduling note",add:"Add rescheduling note"}}},errors:{heading:"Uh oh.",intro:"We ran into a problem: ",api:"Error loading API",settings:"Unable to get the settings",appointmentTypes:"Unable to get the available appointment types",noAppointmentTypes:"No appointment types have been set up yet.",requiredField:" is required.",fieldRequired:"Field required.",requiredEmail:"A valid email address is required",requiredPhone:"Please enter a valid phone number",outsideBookingWindow:"This appointment type cannot be booked at this time",noAvailableSlots:"There are no available appointment times",noPastAppointments:"You can't book appointments in the past.",timeTaken:"Sorry, that time was just booked and is no longer available. Please choose another time.",pickNewTime:"Pick a new time",pickNewDate:"Pick a new date",retry:"Retry",bookingFailed:"Sorry, we couldn't save your appointment",connectionError:"Connection lost. We're having trouble communicating",noResults:"No results found",noSlotsOnDate:"No available appointments for this date."},day:{night:"Night",morning:"Morning",afternoon:"Afternoon",evening:"Evening"},units:{minute_singular:"minute",minute_plural:"minutes",week_singular:"week",week_plural:"weeks",day_singular:"day",day_plural:"days",hour_singular:"hour",hour_plural:"hours"},appointmentTypes:{customer_information:{Name:"Name",Email:"Email",Phone:"Phone",Address:"Address",City:"City",State:"State",Zip:"Zip",Notes:"Notes"}},payments:{price:"Price",loading:"Loading payment method",paymentMethod:"Payment Method",refundPolicy:"Refund Policy",payLater:"Pay Later",canceled:"No payment was processed. Please try again.",stripe:{bookAndPayLabel:"Confirm and Pay",cancel:"Cancel",processing:"Processing your payment..."},paypal:{bookAndPayLabel:"Confirm and Pay"},stripeLabel:"Book",paymentReceived:"Payment Received:",paymentDue:"Payment Due:",paymentFailed:"Unable to process payment. Please try again.",paymentDelayHeader:"Things are taking longer than expected",paypalDelayText:"PayPal is taking a little longer than usual to process your payment. Don't worry - we'll hold your appointment time for you. This usually resolves within a few minutes, or in rare cases, a few hours. Once your payment is processed, you'll receive an email confirmation of this appointment. If you don't receive that, please get in touch.",stripeDelayText:"Stripe is taking a little longer than usual to process your payment. Don't worry - we'll hold your appointment time for you. This usually resolves within a few minutes, or in rare cases, a few hours. Once your payment is processed, you'll receive an email confirmation of this appointment. If you don't receive that, please get in touch."},resources:{selectResource:"Select a Resource",any:"Any",toBeAssigned:"To be assigned"},teamMembers:{selectTeamMember:"Team Member",any:"Any",toBeAssigned:"To be assigned",selectedMember:"Team Member: "},inputs:{phone:{placeholder:"Enter a phone number"}}},j={clearAvailableSlots(e){e.availableSlots=[]},resetRescheduleAppointment(e){let t=c.a.cloneDeep(e.appointment),n=["appointment_type_id","appointment_type_slug","customer_information","start_date","customer_timezone","allow_sms","mepr_membership","rescheduling_note","selected_resources"],i=Object.keys(t);i.forEach(e=>{n.includes(e)||delete t[e]}),e.appointment=t},setApi(e,t){e.api=t},setUser(e,t){e.user=t},setAppointment(e,t){e.appointment=t},setAppointmentProp(e,t){let n={[t.key]:t.value},i=c.a.cloneDeep(e.appointment);e.appointment=Object.assign({},i,n)},setAppointmentTypeId(e,t){e.appointment={...e.appointment,appointment_type_id:t}},setAppointmentTypes(e,t){e.appointmentTypes=t},setAppointmentTypesChecked(e,t){e.appointmentTypesChecked=t},setAvailableSlots(e,t){let n=e.availableSlots.concat(t);n=c.a.uniqBy(n,"start_date"),n=n.sort((e,t)=>new Date(e.start_date)-new Date(t.start_date)),e.availableSlots=n},setSkippedResources(e,t){e.skippedResources=t},setSkippedDate(e,t){e.skippedDate=t},setSkippedTime(e,t){e.skippedTime=t},setConnectionError(e,t){e.connectionError=t},setDayCheckedFirst(e,t){e.dayCheckedFirst=t},setDayCheckedLast(e,t){e.dayCheckedLast=t},setFrozenType(e,t){e.frozenType=t},setGoogleRefreshed(e,t){e.googleRefreshed=t},setLocale(e,t){e.locale=t},setRtlSupport(e,t){e.rtl=t||!1},setPaymentCanceled(e,t){e.paymentCanceled=t},setModeSchedule(e,t){e.modeSchedule=t},setModeEdit(e,t){e.modeEdit=t},setModeReschedule(e,t){e.modeReschedule=t},setSettings(e,t){e.settings=t},setIntegration(e,t){e.integration=t},setInteraction(e,t){e.interaction=t},setSteps(e,t){e.steps=t},setTelCountryCode(e,t){e.telCountryCode=t},setStepByTitle(e,t){const n=e.steps.findIndex(e=>e.title===t);n>-1&&(e.currentStepInt=n)},handleNextStep(e){e.currentStepInt++},handlePrevStep(e){e.currentStepInt--},setCurrentStepInt(e,t){e.currentStepInt=t},setTimeConflict(e,t){e.timeConflict=t},setTimezone(e,t){e.timezone=t},setTranslations(e,t){let n=c.a.isEmpty(t)?O:t;e.translations=n},setStepLayout(e,t){t.currentStep.inputType=t.layout},setSuggestFirstAvailableFalse(e,t){t.booking_flow_settings.suggest_first_available=!1},setDateLayout(e,t){let n=c.a.cloneDeep(e.steps),i=n.find(e=>"date"===e.title);i.inputType=t,e.steps=n},addTimeStep(e){let t=c.a.cloneDeep(e.steps),n=c.a.cloneDeep(d.find(e=>"time"===e.title)),i=e.steps.findIndex(e=>"date"===e.title),s=e.steps.findIndex(e=>"appointmentType"===e.title);-1!=i?(t.splice(i+=1,0,n),e.steps=t):-1!=s?(t.splice(s+=1,0,n),e.steps=t):(t.splice(0,0,n),e.steps=t)},setTrackingPageview(e,t){e.trackingPageview=t},setTrackingEvent(e,t){e.trackingEvent=t},setAvailabilityCacheQuery(e,t){e.availabilityCacheQuery={period:{startDate:t.startDate+"T00:00:00.000000Z",endDate:t.endDate+"T00:00:00.000000Z"},args:t.args,appointment_type:parseInt(t.appointmentType)}},setReschedulingNote(e,t){e.reschedulingNote=t},clearReschedulingNote(e){e.reschedulingNote=null},setMeprMembershipId(e,t){e.meprMembershipId=t},setNoAvailabilityMsg(e,t){e.noAvailabilityMsg=t},setOptinNotifications(e,t){e.optinNotifications=t}},g=n("1157"),v=n.n(g);const _=e=>{let t=typeof e;switch(t){case"string":{let t=parseInt(e,10);return isNaN(t)?"true"===e:Boolean(t)}case"number":return Boolean(e);case"boolean":return e;default:return!!e}};function k(e,t){let n="unknown_error",i="An unexpected error occurred.",s={};var a;t&&"object"===typeof t?(t.response_code&&"string"===typeof t.response_code?n=t.response_code:null!==(a=t.error)&&void 0!==a&&a.response_code&&"string"===typeof t.error.response_code?n=t.code:t.error&&t.error.code&&"string"===typeof t.error.code?n=t.error.code:t.code&&"string"===typeof t.code&&(n=t.code),t.error&&t.error.message&&"string"===typeof t.error.message?i=t.error.message:t.message&&"string"===typeof t.message?i=t.message:t.error&&"string"===typeof t.error&&(i=t.error),t.data?s=t.data:t.error&&t.error.data&&(s=t.error.data)):"string"===typeof t&&(i=t);e({code:n,message:i,data:s})}var S={callAsync({state:e},t){return new Promise(n=>{let i=null;t&&(i={object_type:"appointment",object_id:t}),v.a.ajax({url:e.api.root+"/async",method:"POST",data:i}).done(()=>{n()})})},callAsyncDelayed({state:e},{id:t,delay:n}){if(!c.a.isEmpty(n))return new Promise(i=>{let s=null;t&&(s={object_type:"appointment",object_id:t}),v.a.ajax({url:e.api.root+"/async?delay="+n,method:"POST",data:s}).done(()=>{i()})})},fetchApi({commit:e}){return new Promise((t,n)=>{v.a.ajax({url:"getApi.php",method:"GET",dataType:"json"}).done(n=>{e("setApi",n.api),e("setUser",n.user),e("setRtlSupport",n.api.is_rtl_support),t()}).fail((e,t,i)=>{k(n,i)})})},fetchAppointment({commit:e,dispatch:t,state:n},i=""){return new Promise((s,a)=>{v.a.ajax({url:n.api.root+"/appointments/"+n.appointment.id,method:"GET",cache:!1,dataType:"json",data:{token:n.appointment.public_token||window.ssa_token,fetch:i},contentType:"application/json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",n.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",n.api.public_nonce)}}).done(n=>{e("setAppointment",n.data),t("maybeSetMeprMembershipId",n.data),s()}).fail((e,t,n)=>{k(a,n)})})},fetchAppointmentMeta({state:e},{appointmentId:t,metaKey:n}){if(!c.a.isEmpty(t)&&!c.a.isEmpty(n))return new Promise((i,s)=>{v.a.ajax({url:e.api.root+"/appointments/"+t+"/meta",method:"GET",cache:!1,dataType:"json",data:{key:n,token:e.appointment.public_token||window.ssa_token},contentType:"application/json",beforeSend:t=>{t.setRequestHeader("X-WP-Nonce",e.api.nonce),t.setRequestHeader("X-PUBLIC-Nonce",e.api.public_nonce)}}).done(e=>{i(e)}).fail((e,t,n)=>{k(s,n)})})},fetchAppointmentSlots({commit:e,state:t,dispatch:n},i){return new Promise((s,a)=>{var l,c=t.appointment.appointment_type_id,r=Object.prototype.hasOwnProperty.call(t.appointment,"id")?t.appointment.id:null,d={};if(r&&(i.excluded_appointment_ids=[r]),i.start_date_min){const e=o()(i.start_date_min).locale("en");i.start_date_min=e.format(m)}if(i.start_date_max){const e=o()(i.start_date_max).locale("en");i.start_date_max=e.format(m)}t.meprMembershipId&&(d.mepr_membership_id=t.meprMembershipId,d.user_id=null===(l=t.user)||void 0===l?void 0:l.user_id);t.appointment.staff_ids&&t.appointment.staff_ids.length>0&&(d.staff_ids_all_required=t.appointment.staff_ids),t.appointment.selected_resources&&t.appointment.selected_resources.length>0&&(d.resources_required=t.appointment.selected_resources),i.query_args=d,v.a.ajax({url:t.api.root+"/appointment_types/"+c+"/availability",method:"GET",dataType:"json",data:i,cache:!1,beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",t.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",t.api.public_nonce)}}).done(t=>{i&&i.replace&&e("clearAvailableSlots"),t.message&&e("setNoAvailabilityMsg",t.message),e("setAvailableSlots",t.data),n("updateCheckedInfo",i),s()}).fail((e,t,n)=>{k(a,n)})})},fetchAppointmentTypes({commit:e,state:t,getters:n}){return new Promise((i,s)=>{v.a.ajax({url:t.api.root+"/appointment_types",method:"GET",cache:!1,data:{fetch:{has_sms:!0}},dataType:"json",contentType:"application/json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",t.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",t.api.public_nonce)}}).done(t=>{e("setAppointmentTypesChecked",!0);let s=n.customerInformationCheck(t.data);e("setAppointmentTypes",s),i()}).fail((e,t,n)=>{k(s,n)})})},fetchSettings({commit:e,state:t}){return new Promise((n,i)=>{v.a.ajax({url:t.api.root+"/settings",method:"GET",cache:!1,dataType:"json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",t.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",t.api.public_nonce)}}).done(t=>{e("setSettings",t.data),n()}).fail((e,t,n)=>{k(i,n)})})},fetchTelCountryCode({commit:e,state:t,dispatch:n}){if(!t.settings.global.country_code)return new Promise((t,i)=>{v.a.ajax({url:"//ip2c.org/s",method:"GET"}).done(i=>{let s=(i||"").toString();s&&"1"===s[0]?e("setTelCountryCode",s.substr(2,2)):n("fetchTelCountryCodeSecondTry"),t()}).fail(e=>{n("fetchTelCountryCodeSecondTry"),k(i,e)})});e("setTelCountryCode",t.settings.global.country_code)},fetchTelCountryCodeSecondTry({commit:e}){return new Promise((t,n)=>{v.a.ajax({url:"//api.country.is",method:"GET",dataType:"json",contentType:"application/json"}).done(n=>{e("setTelCountryCode",n.country),t()}).fail(e=>{k(n,e)})})},resetAppointmentSlots({commit:e}){e("clearAvailableSlots"),e("setDayCheckedFirst",null),e("setDayCheckedLast",null)},saveAppointment({commit:e,state:t,dispatch:n,getters:i},s){if(Object.prototype.hasOwnProperty.call(s,"public_edit_url")){let e=s.public_edit_url,t=i.urlParams(e),n=t.appointment_token,a=n.substring(0,32);s.token=a}let a=["abandoned","canceled","pending_form"];e("setAppointmentProp",{key:"fetch",value:{add_to_calendar_links:!a.includes(s.status)}}),e("setAppointmentProp",{key:"customer_locale",value:t.locale});let o=!Object.prototype.hasOwnProperty.call(s,"update_local")||s.update_local,l={},c=["id","token","customer_information","status","start_date","payment_method","staff_ids","selected_resources","rescheduling_note"];return c.forEach(e=>{Object.prototype.hasOwnProperty.call(s,e)&&(l[e]=s[e])}),new Promise((i,a)=>{v.a.ajax({url:t.api.root+"/appointments/"+l.id,method:"POST",dataType:"json",data:JSON.stringify(l),contentType:"application/json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",t.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",t.api.public_nonce)}}).done(t=>{t.data&&(o&&(t.data.edited=s.edited,e("setAppointment",t.data)),n("callAsync",t.data.id),"booked"===t.data.status&&n("callAsyncDelayed",{id:t.data.id,delay:"7"}),i()),t.error&&k(a,t)}).fail((e,t,n)=>{k(a,n)})})},saveNewAppointment({commit:e,getters:t,state:n,dispatch:i}){let s=["canceled","abandoned","pending_form"];e("setAppointmentProp",{key:"fetch",value:{add_to_calendar_links:!s.includes(n.appointment.status)}}),e("setAppointmentProp",{key:"customer_locale",value:n.locale});const a=window.ssa_booking_url_settings||null;a&&e("setAppointmentProp",{key:"post_information",value:{...a}});const o=t.urlParams(),l=o["booking_post_id"]?"?booking_post_id="+o["booking_post_id"]:"";return new Promise((t,s)=>{v.a.ajax({url:n.api.root+"/appointments"+l,method:"POST",dataType:"json",data:JSON.stringify(n.appointment),contentType:"application/json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",n.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",n.api.public_nonce)}}).done(n=>{n.error?k(s,n):(n.data&&(e("setAppointment",n.data),i("callAsync",n.data.id),"booked"===n.data.status&&i("callAsyncDelayed",{id:n.data.id,delay:"7"})),t(n.data))}).fail((e,t,n)=>{k(s,n)})})},savePayment({state:e,getters:t,dispatch:n},i){const s=t.urlParams(),a=s["booking_post_id"]?"?booking_post_id="+s["booking_post_id"]:"";return new Promise((t,s)=>{v.a.ajax({url:e.api.root+"/payments"+a,method:"POST",dataType:"json",data:JSON.stringify(i),contentType:"application/json",beforeSend:t=>{t.setRequestHeader("X-WP-Nonce",e.api.nonce),t.setRequestHeader("X-PUBLIC-Nonce",e.api.public_nonce)}}).done(e=>{n("callAsync",e.data.appointment_id),e.data&&"succeeded"===e.data.status?t():e.error?k(s,e):s(e.data.payment_meta.outcome.message)}).fail((e,t,n)=>{k(s,n)})})},savePaypalPayment({commit:e,state:t,dispatch:n},i){return new Promise((s,a)=>{v.a.ajax({url:t.api.root+"/payments",method:"POST",dataType:"json",data:JSON.stringify(i),contentType:"application/json",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",t.api.nonce),e.setRequestHeader("X-PUBLIC-Nonce",t.api.public_nonce)}}).done(t=>{t.data&&(n("callAsync",t.data.appointment_id),e("setAppointmentProp",{key:"payment_id",value:t.data.id}),e("setAppointmentProp",{key:"purchase_key",value:t.data.purchase_key}),s()),t.error&&k(a,t)}).fail((e,t,n)=>{k(a,n)})})},createPaymentIntent({state:e,getters:t},n){const i=t.urlParams();return i["booking_post_id"]&&(n.booking_post_id=i["booking_post_id"]),n.appointment_id=e.appointment.id,n.appointment_token=e.appointment.public_token,new Promise((t,i)=>{v.a.ajax({url:e.api.root+"/stripe/create",method:"POST",dataType:"json",data:JSON.stringify(n),contentType:"application/json",beforeSend:t=>{t.setRequestHeader("X-WP-Nonce",e.api.nonce),t.setRequestHeader("X-PUBLIC-Nonce",e.api.public_nonce)}}).done(e=>{e.success?t(e.client_secret):k(i,e)}).fail((e,t,n)=>{k(i,n)})})},updateCheckedInfo({commit:e,state:t},n){let i=o()(n.start_date_min,m),s=o()(n.start_date_max,m);if(n.replace)return e("setDayCheckedFirst",i),void e("setDayCheckedLast",s);!i.isBefore(t.dayCheckedFirst)&&t.dayCheckedFirst||e("setDayCheckedFirst",i),!s.isAfter(t.dayCheckedLast)&&t.dayCheckedLast||e("setDayCheckedLast",s)},detectAppointmentTypeTimezone({state:e,commit:t,getters:n},i){"locked"===i.timezone_style?t("setTimezone",e.settings.global.timezone_string):t("setTimezone",n.timezoneLocal)},selectAppointmentType({state:e,commit:t,dispatch:n},i){if(!i)return;let s=e.appointmentTypes.find(e=>e.id===i);n("detectAppointmentTypeTimezone",s),n("resetAppointmentSlots"),t("setAppointment",{}),t("setAppointmentTypeId",s.id)},initApp({state:e,commit:t,getters:n,dispatch:i},s){let a=c.a.cloneDeep(d);s&&"express"===s&&(a=c.a.cloneDeep(p));const o=n.urlParams(),l=["stripe","paypal"].includes(o["payment_provider"]),r="canceled_payment"===o["view"];if(n.selectedAppointmentType&&"express"!==n.selectedAppointmentType.booking_flow_settings.booking_flow)if(n.isTeamMembersRequired||n.isResourcesRequired){const t=a.findIndex(e=>"appointmentType"===e.title);var m=c.a.clone(e.steps[e.currentStepInt].title);a.splice(t+1,0,u.selectExtras)}else if(-1!==a.findIndex(e=>"extras"===e.title)){const e=a.findIndex(e=>"extras"===e.title);a.splice(e,1)}if(n.selectedAppointmentType&&("express"===n.selectedAppointmentType.booking_flow_settings.booking_flow||"first_available"===n.selectedAppointmentType.booking_flow_settings.booking_flow&&0==n.selectedAppointmentType.booking_flow_settings.suggest_first_available&&"express"===n.selectedAppointmentType.booking_flow_settings.fallback_booking_flow)){const e=a.findIndex(e=>"extras"===e.title);-1!==e&&a.splice(e,1)}if("form"===o.integration){t("setIntegration",!0);const e=a.findIndex(e=>"customerInformation"===e.title);a.splice(e,1);const n=a.findIndex(e=>"confirmation"===e.title);a.splice(n,1),a.push(u.formConfirmation)}else if(e.modeSchedule);else{if("edit"===n.appointmentAction||l){const e=a.findIndex(e=>"appointmentType"===e.title);a.splice(e,1),a.unshift(u.editAppointment),t("setModeEdit",!0)}if(e.modeEdit&&!e.modeReschedule&&!r){const e=a.findIndex(e=>"extras"===e.title);-1!==e&&a.splice(e,1);const t=a.findIndex(e=>"date"===e.title);a.splice(t,1);const n=a.findIndex(e=>"time"===e.title);a.splice(n,1)}}if(i("setStepsAction",a),"formConfirmation"==m){const n=e.steps.findIndex(e=>e.title===m);n>-1&&t("setCurrentStepInt",n)}},saveAppointmentMeta({state:e},{id:t,meta:n}){const i={meta:n,token:e.appointment.public_token||window.ssa_token};return new Promise((n,s)=>{v.a.ajax({url:e.api.root+"/appointments/"+t+"/meta",method:"POST",dataType:"json",data:JSON.stringify(i),contentType:"application/json",beforeSend:t=>{t.setRequestHeader("X-WP-Nonce",e.api.nonce)}}).done(()=>{n()}).fail((e,t,n)=>{k(s,n)})})},maybeSaveReschedulingNote({state:e,commit:t,dispatch:n},i){var s,a,o;if(!e.modeReschedule)return;if(c.a.isEmpty(i))return;const l=null!==(s=null===(a=e.user)||void 0===a?void 0:a.user_id)&&void 0!==s?s:0,r={rescheduled_by_user_id:l};let d=null!==(o=e.appointment.rescheduling_note)&&void 0!==o?o:null;!c.a.isEmpty(d)&&c.a.isEmpty(e.reschedulingNote)?r.rescheduling_note="":c.a.isEmpty(e.reschedulingNote)||(r.rescheduling_note=e.reschedulingNote),n("saveAppointmentMeta",{id:i,meta:r}).then(()=>{t("clearReschedulingNote")})},removeStepByTitle({state:e,commit:t,dispatch:n},i){let s=c.a.cloneDeep(e.steps),a=e.steps[e.currentStepInt].title,o=s.findIndex(e=>e.title===i);if(-1==o)return;s.splice(o,1);const l=s.findIndex(e=>e.title===a);l>-1&&e.currentStepInt>s.length-1&&t("setCurrentStepInt",l),n("setStepsAction",s)},addStepByTitle({state:e,commit:t,dispatch:n},i,s){let a=c.a.cloneDeep(e.steps),o=e.steps[e.currentStepInt].title;const l=s||0;if(-1!==a.findIndex(e=>e.title===i))return;let r=c.a.cloneDeep(d.find(e=>e.title===i));if(r||(r=c.a.cloneDeep(p.find(e=>e.title===i))),r||(r=c.a.cloneDeep(u[i])),!r)return;a.splice(l,0,r);const m=a.findIndex(e=>e.title===o);m>-1&&t("setCurrentStepInt",m),n("setStepsAction",a)},setStepsAction({state:e,commit:t},n){if(e.currentStepInt>=n.length){let i=e.steps[e.currentStepInt].title,s=n.findIndex(e=>e.title===i);s>-1&&t("setCurrentStepInt",s)}t("setSteps",n)},maybeSetMeprMembershipId({state:e,commit:t},n){var i;c.a.isEmpty(e.meprMembershipId)&&!c.a.isEmpty(null===n||void 0===n||null===(i=n.mepr_membership)||void 0===i?void 0:i.id)&&t("setMeprMembershipId",n.mepr_membership.id)}};const x={api:void 0,user:null,appointment:{},appointmentTypes:[],appointmentTypesChecked:!1,connectionError:!1,availableSlots:[],dayCheckedFirst:null,dayCheckedLast:null,frozenType:!0,googleRefreshed:!1,locale:"en_US",rtl:!1,modeSchedule:!1,modeEdit:!1,modeReschedule:!1,paymentCanceled:!1,settings:{},steps:[],timeConflict:!1,timezone:"",skippedDate:!1,skippedResources:!1,skippedTime:!1,telCountryCode:void 0,translations:{},integration:!1,currentStepInt:0,trackingEvent:{},trackingPageview:{},availabilityCacheQuery:{},reschedulingNote:null,meprMembershipId:null,noAvailabilityMsg:null,interaction:!1,optinNotifications:!1};var A=Object(s["a"])({state:x,getters:f,mutations:j,actions:S});function T(e,t,n,s,a,o){var l;const c=Object(i["E"])("foxy-snackbar"),r=Object(i["E"])("foxy-empty"),d=Object(i["E"])("booking-app");return Object(i["y"])(),Object(i["g"])("main",{id:"app",role:"main",class:Object(i["s"])(e.selectedAppointmentType?"appointment-type-"+e.selectedAppointmentType.slug:"no-appointment-type")},[t[1]||(t[1]=Object(i["h"])("div",{style:{position:"relative"}},[Object(i["h"])("div",{id:"ariaLiveFoxyEmpty","aria-live":"assertive","aria-atomic":"true","aria-busy":"false",class:"screen-reader-text"})],-1)),Object(i["h"])("div",{class:Object(i["s"])(["app-wrapper",{rtl_support:null===(l=e.api)||void 0===l?void 0:l.is_rtl_support}])},[Object(i["k"])(c,{modelValue:a.noConnection,"onUpdate:modelValue":t[0]||(t[0]=e=>a.noConnection=e),position:"top center","timeout-ms":1e4,message:e.translations.errors.connectionError},null,8,["modelValue","message"]),a.loading?(Object(i["y"])(),Object(i["e"])(r,{key:0,label:a.loadingMessage,loading:!0},null,8,["label"])):!a.loading&&a.error?(Object(i["y"])(),Object(i["e"])(r,{key:1,label:a.errorHeading,description:a.errorIntro+" "+a.errorMessage},null,8,["label","description"])):(Object(i["y"])(),Object(i["e"])(d,{key:2,"parent-loading":a.loading},null,8,["parent-loading"]))],2)],2)}const w={class:"booking-app"},C={key:0,class:"back-button-wrapper"};function E(e,t,n,s,a,o){const l=Object(i["E"])("foxy-button"),c=Object(i["E"])("foxy-empty"),r=Object(i["E"])("appointment-type"),d=Object(i["E"])("appointment-change"),p=Object(i["E"])("extras"),u=Object(i["E"])("date"),m=Object(i["E"])("Time"),b=Object(i["E"])("express"),h=Object(i["E"])("customer-information"),y=Object(i["E"])("confirmation"),f=Object(i["E"])("form-confirm"),O=Object(i["F"])("a11y");return Object(i["y"])(),Object(i["g"])("div",w,[o.shouldDisplayBackButton?(Object(i["y"])(),Object(i["g"])("div",C,[Object(i["k"])(l,{onClick:o.setPrevStep,mode:"outlined",icon:e.rtl?"keyboard_arrow_right":"keyboard_backspace"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.back),1)]),_:1},8,["onClick","icon"])])):Object(i["f"])("",!0),a.loading?(Object(i["y"])(),Object(i["e"])(c,{key:1,label:e.translations.general.loadingInitial,loading:!0},null,8,["label"])):(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},[n.parentLoading||"appointmentType"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(r,{key:0,step:e.currentStep,onNextStep:e.handleNextStep},null,8,["step","onNextStep"])),[[O,e.translations.pageTitles.appointmentType]]),n.parentLoading||"editAppointment"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(d,{key:1,step:e.currentStep,onNextStep:e.handleNextStep},null,8,["step","onNextStep"])),[[O,e.translations.pageTitles.change]]),n.parentLoading||"extras"!==e.currentStep.title?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["e"])(p,{key:2,step:e.currentStep,onNextStep:e.handleNextStep,onPrevStep:o.setPrevStep},null,8,["step","onNextStep","onPrevStep"])),n.parentLoading||"date"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(u,{key:3,step:e.currentStep,onNextStep:e.handleNextStep,onPrevStep:o.setPrevStep},null,8,["step","onNextStep","onPrevStep"])),[[O,e.translations.pageTitles.date]]),n.parentLoading||"time"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(m,{key:4,step:e.currentStep,onNextStep:e.handleNextStep,onPrevStep:o.setPrevStep},null,8,["step","onNextStep","onPrevStep"])),[[O,e.translations.pageTitles.time]]),n.parentLoading||"express"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(b,{key:5,step:e.currentStep,onNextStep:e.handleNextStep,onPrevStep:o.setPrevStep},null,8,["step","onNextStep","onPrevStep"])),[[O,e.translations.pageTitles.express]]),n.parentLoading||"customerInformation"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(h,{key:6,step:e.currentStep,onNextStep:e.handleNextStep,onPrevStep:o.setPrevStep},null,8,["step","onNextStep","onPrevStep"])),[[O,e.translations.pageTitles.customerInformation]]),n.parentLoading||"confirmation"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(y,{key:7,step:e.currentStep},null,8,["step"])),[[O,e.translations.pageTitles.confirmation]]),n.parentLoading||"formConfirmation"!==e.currentStep.title?Object(i["f"])("",!0):Object(i["W"])((Object(i["y"])(),Object(i["e"])(f,{key:8},null,512)),[[O,e.translations.pageTitles.formConfirm]])],64))])}const I={class:"book-type"},D={class:"booking-header"},P={class:"md-title ssa-type-header focus-target",tabindex:"-1"};function V(e,t,n,s,a,o){const l=Object(i["E"])("card-list");return Object(i["y"])(),Object(i["g"])("div",I,[Object(i["h"])("div",D,[Object(i["h"])("h1",P,Object(i["J"])(e.translations.booking.appointmentType),1)]),"cardList"===n.step.inputType||"cardGrid"===n.step.inputType||"cardColumns"===n.step.inputType?(Object(i["y"])(),Object(i["e"])(l,{key:0,"appointment-types":e.visibleAppointmentTypes,"input-type":n.step.inputType,onUpdate:o.selectAppointmentTypeId},null,8,["appointment-types","input-type","onUpdate"])):Object(i["f"])("",!0)])}n("acef"),n("fa9e"),n("77d9"),n("3c5d");const L={computed:{...Object(s["e"])(["api","settings","trackingEvent","appointment"]),...Object(s["c"])(["selectedAppointmentType"])},methods:{async emitTrackingEvent(e,t){var n;if(!this.settings.tracking||!this.settings.tracking.event_tracking)return;t||(t=this.selectedAppointmentType.title);let s={ssaType:"event",action:e,appointmentType:t};Object.prototype.hasOwnProperty.call(this.selectedAppointmentType,"payments")&&Object.prototype.hasOwnProperty.call(this.selectedAppointmentType.payments,"currency")&&Object.prototype.hasOwnProperty.call(this.selectedAppointmentType.payments,"price")&&"none"!==this.selectedAppointmentType.payments.payment_required&&(s.value={currency:this.selectedAppointmentType.payments.currency,price:parseFloat(this.selectedAppointmentType.payments.price)}),["bookingCompleted"].includes(e)&&this.appointment&&null!==(n=this.appointment.customer_information)&&void 0!==n&&n.Email&&(s.sha256_email_address=await M(this.appointment.customer_information.Email)),this.setTrackingEvent(s);let a=Object(i["L"])(this.trackingEvent);window.parent.postMessage(a,this.api.home_url)},...Object(s["d"])(["setTrackingEvent"])}};async function M(e){const t=new TextEncoder,n=t.encode(e);if("undefined"===typeof crypto||!crypto.subtle)return;const i=await crypto.subtle.digest("SHA-256",n),s=Array.from(new Uint8Array(i)),a=s.map(e=>e.toString(16).padStart(2,"0")).join("");return a}const B={class:"md-title"},R={class:"md-subhead"},N={class:"appointment-duration"},z={key:0};function F(e,t,n,s,a,o){const l=Object(i["E"])("currency-code"),c=Object(i["E"])("foxy-card-header"),r=Object(i["E"])("foxy-card");return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(["booking-cards",{"card-grid":"cardGrid"==n.inputType,"card-columns":"cardColumns"==n.inputType}])},[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.appointmentTypes,s=>(Object(i["y"])(),Object(i["g"])("div",{key:s.id,class:Object(i["s"])(["type-"+s.slug,{"book-type-grid-single":"cardGrid"==n.inputType,"book-type-single":"cardList"==n.inputType,"book-type-double":"cardColumns"==n.inputType}])},[Object(i["k"])(r,{role:"button",class:"selectable","md-with-hover":!0,tabindex:"0",onClick:e=>o.selectType(s.id),onKeypress:e=>o.handleKeyboardSelect(e,s.id)},{default:Object(i["V"])(()=>[Object(i["k"])(c,null,{default:Object(i["V"])(()=>[Object(i["h"])("h2",B,Object(i["J"])(s.title),1),Object(i["h"])("h3",R,[Object(i["h"])("span",N,Object(i["J"])(e.displayDuration(s.duration)),1),e.showPaymentUI(s)?(Object(i["y"])(),Object(i["g"])("span",z,[t[0]||(t[0]=Object(i["h"])("span",{class:"divider"}," - ",-1)),Object(i["k"])(l,{price:parseFloat(s.payments.price),currency:s.payments.currency},null,8,["price","currency"])])):Object(i["f"])("",!0)])]),_:2},1024)]),_:2},1032,["onClick","onKeypress"])],2))),128))],2)}const q={class:"price"},J={key:0,class:"currency-code"};function U(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("span",q,[Object(i["j"])(Object(i["J"])(e.displayPrice(n.price,n.currency))+" ",1),o.isCurrencyCode?(Object(i["y"])(),Object(i["g"])("span",J,Object(i["J"])(n.currency),1)):Object(i["f"])("",!0)])}var H={name:"CurrencyCode",props:{price:{type:Number,default:0},currency:{type:String,default:"USD"}},data(){return{}},computed:{isCurrencyCode(){return!this.displayPrice(this.price,this.currency).includes(this.currency.substring(0,2))},...Object(s["c"])(["displayPrice"])}},$=n("6b0d"),W=n.n($);const G=W()(H,[["render",U]]);var K=G,X={name:"CardList",components:{CurrencyCode:K},props:{inputType:{type:String,default(){return"cardList"}},appointmentTypes:{type:Array,default(){return[]}}},data(){return{}},computed:{...Object(s["c"])(["displayDuration","showPaymentUI","timezoneLocal"])},methods:{handleKeyboardSelect(e,t){let n=e.which;32!==n&&123!==n&&13!==n||this.selectType(t)},selectType(e){this.$emit("update",e)}}};n("0ee9");const Y=W()(X,[["render",F]]);var Q=Y,Z={name:"AppointmentType",components:{CardList:Q},mixins:[L],props:{step:{type:Object,default(){return{}}}},data(){return{}},beforeMount(){this.urlParams()&&this.urlParams().appointment_types_view&&this.setStepLayout({currentStep:this.step,layout:this.urlParams().appointment_types_view})},mounted(){1===this.visibleAppointmentTypes.length&&this.selectAppointmentTypeId(this.visibleAppointmentTypes[0].id)},computed:{...Object(s["e"])(["appointmentTypes","settings","translations"]),...Object(s["c"])(["timezoneLocal","visibleAppointmentTypes","selectedAppointmentType","urlParams"])},methods:{selectAppointmentTypeId(e){e?(this.selectAppointmentType(e),this.emitTrackingEvent("typeSelected",this.selectedAppointmentType.title),this.$emit("nextStep")):this.setAppointmentTypeId(null)},...Object(s["b"])(["resetAppointmentSlots","selectAppointmentType"]),...Object(s["d"])(["setAppointment","setAppointmentTypeId","setStepLayout"])}};const ee=W()(Z,[["render",V]]);var te=ee;const ne={class:"change cust-info"},ie={class:"md-title focus-target",tabindex:"-1"},se={key:0,class:"indicator"},ae={class:"appt-title"},oe={key:0,class:"foxy-banner"},le={class:"banner-icon"},ce={class:"banner-text"},re={class:"md-title"},de={key:0},pe={key:1},ue={key:4,class:"refund-policy_change"};function me(e,t,n,s,a,o){const l=Object(i["E"])("appointment-start-end"),c=Object(i["E"])("foxy-card-header"),r=Object(i["E"])("foxy-icon"),d=Object(i["E"])("foxy-empty"),p=Object(i["E"])("foxy-button"),u=Object(i["E"])("foxy-list-item"),m=Object(i["E"])("foxy-menu"),b=Object(i["E"])("foxy-menu-anchor"),h=Object(i["E"])("foxy-notification"),y=Object(i["E"])("foxy-card-content"),f=Object(i["E"])("appointment-actions"),O=Object(i["E"])("foxy-card-actions"),j=Object(i["E"])("foxy-card"),g=Object(i["E"])("foxy-snackbar");return Object(i["y"])(),Object(i["g"])("div",ne,[Object(i["k"])(j,{class:Object(i["s"])(["edit-appt",{canceled:"canceled"===e.appointment.status}])},{default:Object(i["V"])(()=>[a.loading?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["e"])(c,{key:0},{default:Object(i["V"])(()=>[Object(i["h"])("h1",ie,["canceled"===e.appointment.status?(Object(i["y"])(),Object(i["g"])("span",se,Object(i["J"])(e.translations.change.canceledIndicator),1)):Object(i["f"])("",!0),Object(i["h"])("span",ae,Object(i["J"])(e.selectedAppointmentType.title),1)]),Object(i["k"])(l)]),_:1})),Object(i["k"])(y,null,{default:Object(i["V"])(()=>{var n,s,l;return[a.ipnDelay?(Object(i["y"])(),Object(i["g"])("div",oe,[Object(i["h"])("div",le,[Object(i["k"])(r,{"md-theme":"orange",class:"md-primary md-size-2x"},{default:Object(i["V"])(()=>t[4]||(t[4]=[Object(i["j"])(" warning ",-1)])),_:1,__:[4]})]),Object(i["h"])("div",ce,[Object(i["h"])("h2",re,Object(i["J"])(e.translations.payments.paymentDelayHeader),1),Object(i["h"])("p",null,Object(i["J"])(e.translations.payments[o.paymentProvider+"DelayText"]),1)])])):Object(i["f"])("",!0),a.loading?(Object(i["y"])(),Object(i["e"])(d,{key:1,label:e.translations.general.loadingTypes,type:"inline",loading:!0},null,8,["label"])):(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},[o.displayCancelationNote?(Object(i["y"])(),Object(i["g"])("p",de,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.change.cancelationNote)+": ",1),Object(i["j"])(" "+Object(i["J"])(a.cancelationNote),1)])):Object(i["f"])("",!0),o.displayReschedulingNote?(Object(i["y"])(),Object(i["g"])("p",pe,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.change.reschedulingNote)+": ",1),Object(i["j"])(" "+Object(i["J"])(o.reschedulingNote),1)])):Object(i["f"])("",!0),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.customerInformation,(t,n,s)=>(Object(i["y"])(),Object(i["g"])("p",{key:s,class:Object(i["s"])("confirmation-field-"+e.slugify(n)+"-"+s)},[Object(i["h"])("strong",null,Object(i["J"])(e.translations.appointmentTypes.customer_information[n]?e.translations.appointmentTypes.customer_information[n]:n)+": ",1),"string"===typeof t?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[Object(i["j"])(Object(i["J"])(t),1)],64)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:1},[Object(i["j"])(Object(i["J"])(t.join(", ")),1)],64))],2))),128)),o.displayResources.length>0?(Object(i["y"])(!0),Object(i["g"])(i["a"],{key:2},Object(i["C"])(o.displayResources,t=>(Object(i["y"])(),Object(i["g"])("p",{key:t.id,class:Object(i["s"])("resource-field-"+e.slugify(t.resourceGroup.title)+"-"+t.resourceGroup.id)},[Object(i["h"])("strong",null,Object(i["J"])(t.resourceGroup.title)+Object(i["J"])(": "),1),Object(i["j"])(" "+Object(i["J"])(t.resourceTitle),1)],2))),128)):Object(i["f"])("",!0),e.appointment.staff_ids.length>0?(Object(i["y"])(),Object(i["g"])("p",{key:3,class:Object(i["s"])("confirmation-field-"+e.slugify(e.translations.teamMembers.selectedMember)+"name")},[Object(i["h"])("strong",null,Object(i["J"])(e.translations.teamMembers.selectedMember),1),Object(i["j"])(" "+Object(i["J"])(e.appointment.staff_ids.map(e=>o.getTeamMemberName(e)).join(", ")),1)],2)):Object(i["f"])("",!0),o.showRefundPolicy?(Object(i["y"])(),Object(i["g"])("p",ue,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.payments.refundPolicy)+": ",1),Object(i["h"])("span",null,Object(i["J"])(e.selectedAppointmentType.payments.refund_policy),1)])):Object(i["f"])("",!0),null!==(n=e.showAddToCalendarButton(e.appointment))&&void 0!==n&&n.show?(Object(i["y"])(),Object(i["e"])(b,{key:5},{default:Object(i["V"])(()=>[Object(i["k"])(p,{mode:"raised",class:"calendar-save",onClick:t[0]||(t[0]=e=>a.calendarSaveOpen=!0)},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSave),1)]),_:1}),Object(i["k"])(m,{modelValue:a.calendarSaveOpen,"onUpdate:modelValue":t[1]||(t[1]=e=>a.calendarSaveOpen=e),"single-selection":!0},{default:Object(i["V"])(()=>[Object.prototype.hasOwnProperty.call(e.appointment,"gcal")?(Object(i["y"])(),Object(i["e"])(u,{key:0,href:e.appointment.gcal.customer,target:"_blank"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSaveGoogle),1)]),_:1},8,["href"])):Object(i["f"])("",!0),o.appointmentIcsLink?(Object(i["y"])(),Object(i["e"])(u,{key:1,href:o.appointmentIcsLink,download:""},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSaveOther),1)]),_:1},8,["href"])):Object(i["f"])("",!0)]),_:1},8,["modelValue"])]),_:1})):null!==(s=e.showAddToCalendarButton(e.appointment))&&void 0!==s&&s.show||"replaceWithText"!==(null===(l=e.showAddToCalendarButton(e.appointment))||void 0===l?void 0:l.action)?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["e"])(h,{key:6,icon:"event_available"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking[e.showAddToCalendarButton(e.appointment).text]),1)]),_:1}))],64))]}),_:1}),o.showActions?(Object(i["y"])(),Object(i["e"])(O,{key:1,loading:a.loading,class:"cancellation-actions"},{default:Object(i["V"])(()=>[Object(i["k"])(f,{loading:a.loading,past:o.past,onCancelComplete:o.confirmCancelation,onCancelStart:o.showLoading},null,8,["loading","past","onCancelComplete","onCancelStart"])]),_:1},8,["loading"])):Object(i["f"])("",!0)]),_:1},8,["class"]),Object(i["k"])(g,{modelValue:a.isPast,"onUpdate:modelValue":t[2]||(t[2]=e=>a.isPast=e),position:"top center","timeout-ms":5e3,message:e.translations.change.past},null,8,["modelValue","message"]),Object(i["k"])(g,{modelValue:a.isCanceled,"onUpdate:modelValue":t[3]||(t[3]=e=>a.isCanceled=e),position:"bottom center","timeout-ms":5e3,message:e.translations.change.canceled},null,8,["modelValue","message"])])}const be={key:0,class:"md-subheading"},he={class:"appt-actions-btns-wrapper"};function ye(e,t,n,s,a,o){const l=Object(i["E"])("foxy-button"),c=Object(i["E"])("foxy-dialog-title"),r=Object(i["E"])("appointment-start-end"),d=Object(i["E"])("foxy-dialog-content"),p=Object(i["E"])("foxy-dialog-button"),u=Object(i["E"])("foxy-dialog-footer"),m=Object(i["E"])("foxy-dialog");return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(["appointment-actions",{hasHeadline:n.headline}])},[n.loading?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[n.headline?(Object(i["y"])(),Object(i["g"])("h2",be,Object(i["J"])(e.translations.change.next),1)):Object(i["f"])("",!0),Object(i["h"])("div",he,[o.editable?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[Object(i["k"])(l,{class:"appointment-edit-button",onClick:o.edit},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.edit),1)]),_:1},8,["onClick"]),o.canReschedule?(Object(i["y"])(),Object(i["e"])(l,{key:0,class:"appointment-reschedule-button",onClick:o.reschedule},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.reschedule),1)]),_:1},8,["onClick"])):Object(i["f"])("",!0),Object(i["k"])(l,{class:"appointment-cancel-button",onClick:o.confirmCancel},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.cancel),1)]),_:1},8,["onClick"])],64)):Object(i["f"])("",!0),o.showNew?(Object(i["y"])(),Object(i["e"])(l,{key:1,class:"appointment-book-new-button",onClick:o.scheduleNew},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.new),1)]),_:1},8,["onClick"])):Object(i["f"])("",!0),o.canManageAppointments?(Object(i["y"])(),Object(i["e"])(l,{key:2,class:"appointment-viewAsAdmin-button",href:o.appointmentDetailsAdminURL},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.viewAsAdmin),1)]),_:1},8,["href"])):Object(i["f"])("",!0)])],64)),e.selectedAppointmentType?(Object(i["y"])(),Object(i["e"])(m,{key:1,id:"appointment-cancel-dialog",modelValue:a.cancelOpen,"onUpdate:modelValue":t[0]||(t[0]=e=>a.cancelOpen=e),"onMdcdialog:closing":o.cancelCancel},{default:Object(i["V"])(()=>[Object(i["k"])(c,null,{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.cancelConfirm),1)]),_:1}),Object(i["k"])(d,null,{default:Object(i["V"])(()=>[Object(i["h"])("p",null,Object(i["J"])(e.selectedAppointmentType.title),1),Object(i["k"])(r)]),_:1}),Object(i["k"])(u,null,{default:Object(i["V"])(()=>[Object(i["k"])(p,{action:"dismiss",onClick:o.cancelCancel},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.cancelConfirmCancel),1)]),_:1},8,["onClick"]),Object(i["k"])(p,{action:"accept",onClick:o.cancelAppt,"is-default":""},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.cancelConfirmOkay),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["modelValue","onMdcdialog:closing"])):Object(i["f"])("",!0)],2)}const fe={class:"md-subhead"},Oe={class:"appointment-start-time"},je={class:"appointment-start-d"},ge={class:"appointment-start-t"},ve={class:"appointment-end-time"},_e={key:0,class:"appointment-end-d"},ke={class:"appointment-end-t"},Se={class:"small appointment-timezone"};function xe(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("p",fe,[Object(i["h"])("span",Oe,[Object(i["h"])("span",je,Object(i["J"])(e.localTime.format(e.settings.global.date_format_moment)),1),t[0]||(t[0]=Object(i["j"])()),Object(i["h"])("span",ge,Object(i["J"])(e.localTime.format(e.settings.global.time_format_moment)),1)]),t[2]||(t[2]=Object(i["j"])()),t[3]||(t[3]=Object(i["h"])("span",{class:"appointment-time-divider"},"-",-1)),t[4]||(t[4]=Object(i["j"])()),Object(i["h"])("span",ve,[o.differentEndDate?(Object(i["y"])(),Object(i["g"])("span",_e,Object(i["J"])(o.endDate.format(e.settings.global.date_format_moment)),1)):Object(i["f"])("",!0),t[1]||(t[1]=Object(i["j"])()),Object(i["h"])("span",ke,Object(i["J"])(o.endDate.format(e.settings.global.time_format_moment)),1)]),t[5]||(t[5]=Object(i["j"])()),Object(i["h"])("span",Se,Object(i["J"])(e.formatTimezone()),1)])}var Ae={name:"AppointmentStartEnd",data(){return{moment:o.a}},computed:{differentEndDate(){let e=this.localTime;return!e.isSame(this.endDate,"day")},endDate(){return this.localTime.clone().add(this.appointmentDuration,"minutes")},...Object(s["e"])(["settings"]),...Object(s["c"])(["formatTimezone","localTime","appointmentDuration"])}};const Te=W()(Ae,[["render",xe]]);var we=Te,Ce={name:"AppointmentActions",components:{AppointmentStartEnd:we},mixins:[L],props:{headline:{type:Boolean,default:!1},past:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},data(){return{moment:o.a,cancelOpen:!1}},computed:{editable(){return!Object.prototype.hasOwnProperty.call(this.appointment,"status")||"canceled"!==this.appointment.status&&!this.past},showNew(){return!this.isAppointmentTypeDeleted&&(!(!this.modeEdit||!this.past)||(!this.modeEdit||!this.editable))},canReschedule(){return!this.isAppointmentTypeDeleted},canManageAppointments(){return!!this.currentUserCan("ssa_manage_appointments")},appointmentDetailsAdminURL(){var e,t;if(null!==(e=this.api)&&void 0!==e&&e.admin_url)return(null===(t=this.api)||void 0===t?void 0:t.admin_url)+"admin.php?page=simply-schedule-appointments#/ssa/appointment/"+this.appointment.id},isAppointmentTypeDeleted(){var e,t;return!(null===(e=this.appointment)||void 0===e||null===(t=e.mepr_membership)||void 0===t||!t.type_settings||_(this.appointment.mepr_membership.type_settings.active))||(Object.prototype.hasOwnProperty.call(this.selectedAppointmentType,"status")?"delete"===this.selectedAppointmentType.status:void 0)},...Object(s["e"])(["appointment","frozenType","modeEdit","timezone","translations","api","steps"]),...Object(s["c"])(["selectedAppointmentType","currentUserCan"])},methods:{cancelAppt(){this.cancelOpen=!1,this.$emit("cancelStart");let e={id:this.appointment.id,status:"canceled",public_edit_url:this.appointment.public_edit_url};this.saveAppointment(e).then(()=>{this.emitTrackingEvent("bookingCanceled"),this.$emit("cancelComplete"),this.cancelOpen=!1})},cancelCancel(){this.cancelOpen=!1},confirmCancel(){this.cancelOpen=!0},edit(){this.setModeEdit(!0),this.setModeReschedule(!1),this.setModeSchedule(!1),this.initApp(),this.setCurrentStepInt(1)},reschedule(){var e;this.setModeEdit(!0),this.setModeReschedule(!0),this.setModeSchedule(!1),this.initApp(null===(e=this.selectedAppointmentType.booking_flow_settings)||void 0===e?void 0:e.booking_flow),this.setCurrentStepInt(1)},scheduleNew(){var e;this.setModeEdit(!1),this.setModeReschedule(!1),this.setModeSchedule(!0),this.resetRescheduleAppointment(),this.initApp(null===(e=this.selectedAppointmentType.booking_flow_settings)||void 0===e?void 0:e.booking_flow),this.setCurrentStepInt(1)},...Object(s["d"])(["setAppointmentProp","setModeEdit","setModeReschedule","setModeSchedule","resetRescheduleAppointment","setCurrentStepInt"]),...Object(s["b"])(["saveAppointment","initApp"])}};n("efe0");const Ee=W()(Ce,[["render",ye],["__scopeId","data-v-3cc3137b"]]);var Ie=Ee,De={name:"AppointmentChange",mixins:[L],components:{AppointmentActions:Ie,AppointmentStartEnd:we},data(){return{ipnChecks:0,ipnDelay:!1,isPast:!1,isCanceled:!1,loading:!0,moment:o.a,momentTimestampFormat:b,cancelationNote:null,calendarSaveOpen:!1}},beforeMount(){this.setModeEdit("confirm_payment"!==this.view&&"canceled_payment"!==this.view),this.timezone||this.setTimezone(this.timezoneLocal)},mounted(){Object.prototype.hasOwnProperty.call(this.appointment,"status")&&this.selectedAppointmentType?this.checkAppointment():this.fetchAppointment({add_to_calendar_links:!0}).then(()=>{this.checkAppointment()})},computed:{reschedulingNote(){return this.appointment.rescheduling_note},appointmentIcsLink(){return Object.prototype.hasOwnProperty.call(this.appointment,"ics")?this.appointment.ics.customer+"?token="+this.appointment.public_token:null},view(){return this.urlParams().view},past(){if(!Object.prototype.hasOwnProperty.call(this.appointment,"start_date"))return!1;let e=o.a.utc(this.appointment.start_date,this.momentTimestampFormat),t=o.a.utc();return!!e.isBefore(t)},showActions(){return!this.view||"confirm_payment"!==this.view&&"canceled_payment"!==this.view},customerInformation(){let e={};return this.appointment&&Object.prototype.hasOwnProperty.call(this.appointment,"customer_information")&&Object.keys(this.appointment.customer_information).forEach(t=>{this.appointment.customer_information[t].length&&(e[t]=this.appointment.customer_information[t])}),e},paymentProvider(){let e=this.urlParams().payment_provider;return e||"paypal"},isBooked(){var e;return"booked"===(null===(e=this.appointment)||void 0===e?void 0:e.status)},displayCancelationNote(){var e;return"canceled"===(null===(e=this.appointment)||void 0===e?void 0:e.status)&&!c.a.isEmpty(this.cancelationNote)},displayReschedulingNote(){return!c.a.isEmpty(this.reschedulingNote)&&this.isBooked},displayResources(){let e=[];return this.appointment.selected_resources&&Object.values(this.appointment.selected_resources).forEach(t=>{let n=this.getResourceGroupInformation(t.resource_group_id);if("identifiable"===n.resource_type){let i=this.getResourceTitle(t.resource_id,n.id);e.push({resourceGroup:n,resourceTitle:i})}}),e},showRefundPolicy(){var e,t;const n=null===(e=this.selectedAppointmentType.payments)||void 0===e?void 0:e.refund_policy,i=null===(t=this.selectedAppointmentType.payments)||void 0===t?void 0:t.refund_policy_display_screen;return n&&(null===i||void 0===i?void 0:i.length)&&i.includes("editRescheduleScreen")},...Object(s["e"])(["appointment","translations","timezone"]),...Object(s["c"])(["urlParams","timezoneLocal","selectedAppointmentType","token","showAddToCalendarButton","slugify"])},methods:{checkAppointment(){this.ipnChecks++,"confirm_payment"!==this.view?"canceled_payment"!==this.view?(this.selectedAppointmentType.id?("locked"===this.selectedAppointmentType.timezone_style&&this.setTimezone(this.settings.global.timezone_string),this.loading=!1):this.fetchAppointmentTypes().then(()=>{"locked"===this.selectedAppointmentType.timezone_style&&this.setTimezone(this.settings.global.timezone_string),this.loading=!1}),this.past?this.$nextTick(()=>{this.isPast=!0}):"canceled"===this.appointment.status&&(this.fetchCancelationNote(),this.$nextTick(()=>{this.isCanceled=!0}))):this.handleCancelPaymentView():this.handleConfirmPaymentView()},fetchCancelationNote(){let e=this.appointment.id,t="cancelation_note";this.loading=!0,this.fetchAppointmentMeta({appointmentId:e,metaKey:t}).then(e=>{e.data&&e.data.cancelation_note&&(this.cancelationNote=e.data.cancelation_note),this.loading=!1})},confirmPayment(){this.ipnChecks<4?setTimeout(()=>{this.fetchAppointment().then(()=>{this.ipnChecks++,this.handleConfirmPaymentView()})},5e3):(this.loading=!1,this.ipnDelay=!0,setTimeout(()=>{this.fetchAppointment().then(()=>{this.ipnChecks++,this.handleConfirmPaymentView()})},6e4))},confirmAppointment(){this.emitTrackingEvent("bookingCompleted"),this.initApp(),this.setStepByTitle("confirmation")},confirmCancelation(){this.loading=!1},handleCancelPaymentView(){this.setPaymentCanceled(!0),this.setStepByTitle("customerInformation")},handleConfirmPaymentView(){switch(this.appointment.status){case"booked":this.confirmAppointment();break;case"pending_payment":this.confirmPayment();break;case"abandoned":this.rebookAppointment();break}},rebookAppointment(){this.resetRescheduleAppointment(),this.setModeEdit(!0),this.setModeReschedule(!0),this.setModeSchedule(!1),this.initApp();const e=this.stepIndexByTitle("express"),t=this.stepIndexByTitle("date");t>-1?this.setStepByTitle("date"):e>-1&&this.setStepByTitle("express")},showLoading(){this.loading=!0},getResourceGroupInformation(e){return this.selectedAppointmentType.resources_objects.find(t=>t.id==e)},getResourceTitle(e,t){if(0!=e){let n=this.getResourceGroupInformation(t),i=n.resources.find(t=>t.id==e);return i.title}},getTeamMemberName(e){if(0!=e){let t=this.selectedAppointmentType.staff_objects.find(t=>t.id==e);return null===t||void 0===t?void 0:t.display_name}},...Object(s["d"])(["resetRescheduleAppointment","setPaymentCanceled","setAppointmentProp","setStepByTitle","setModeEdit","setModeReschedule","setModeSchedule","setTimezone"]),...Object(s["b"])(["fetchAppointment","fetchAppointmentTypes","initApp","setAppointmentToken","fetchAppointmentMeta"])}};n("734a");const Pe=W()(De,[["render",me]]);var Ve=Pe;const Le={style:{"text-align":"center"}};function Me(e,t,n,s,a,o){const l=Object(i["E"])("Header"),c=Object(i["E"])("team-members"),r=Object(i["E"])("resources"),d=Object(i["E"])("foxy-button");return Object(i["y"])(),Object(i["g"])("div",null,[o.showHeader?(Object(i["y"])(),Object(i["e"])(l,{key:0})):Object(i["f"])("",!0),e.isTeamMembersRequired?(Object(i["y"])(),Object(i["e"])(c,{key:1,onNextStep:o.handleNextStep,onReloadDate:o.handleReloadDate},null,8,["onNextStep","onReloadDate"])):Object(i["f"])("",!0),e.isResourcesRequired?(Object(i["y"])(),Object(i["e"])(r,{key:2,onNextStep:o.handleNextStep,onReloadDate:o.handleReloadDate},null,8,["onNextStep","onReloadDate"])):Object(i["f"])("",!0),Object(i["h"])("div",Le,[o.showHeader?(Object(i["y"])(),Object(i["e"])(d,{key:0,onClick:t[0]||(t[0]=e=>o.confirmSelection()),mode:"raised"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.general.confirmSelection),1)]),_:1})):Object(i["f"])("",!0)])])}const Be={class:"resources-select"};function Re(e,t,n,s,a,o){const l=Object(i["E"])("resources-selector");return Object(i["y"])(),Object(i["g"])("div",Be,[a.displayResourceGroup.length>0?(Object(i["y"])(!0),Object(i["g"])(i["a"],{key:0},Object(i["C"])(a.displayResourceGroup,e=>(Object(i["y"])(),Object(i["g"])("div",{class:"selectors",key:e.id},[Object(i["k"])(l,{group:e,"display-resource-group":a.displayResourceGroup,onReloadDate:o.handleReloadDate},null,8,["group","display-resource-group","onReloadDate"])]))),128)):Object(i["f"])("",!0)])}const Ne={value:"0",key:"0"},ze=["value"],Fe={key:1,class:"selector"};function qe(e,t,n,s,a,o){const l=Object(i["E"])("foxy-select2"),c=Object(i["E"])("foxy-list-item"),r=Object(i["E"])("foxy-select"),d=Object(i["E"])("foxy-radio");return Object(i["y"])(),Object(i["g"])("div",null,["list"==o.resourcesView?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[n.displayResourceGroup.length>10?(Object(i["y"])(),Object(i["e"])(l,{key:0,style:{width:"auto"},required:"",class:"selector",ref:"resourceSelect",name:"resource"+n.group.id,id:"resource"+n.group.id,label:n.group.title,modelValue:o.resource_id,"onUpdate:modelValue":t[0]||(t[0]=e=>o.resource_id=e)},{default:Object(i["V"])(()=>[Object(i["h"])("option",Ne,Object(i["J"])(e.translations.resources.any),1),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.group.resources,e=>(Object(i["y"])(),Object(i["g"])("option",{value:e.id,key:e.id},Object(i["J"])(e.title),9,ze))),128))]),_:1},8,["name","id","label","modelValue"])):(Object(i["y"])(),Object(i["e"])(r,{key:1,required:"",class:"selector",ref:"resourceSelect",name:"resource"+n.group.id,id:"resource"+n.group.id,label:n.group.title,value:o.resource_id,modelValue:o.resource_id,"onUpdate:modelValue":t[1]||(t[1]=e=>o.resource_id=e)},{default:Object(i["V"])(()=>[Object(i["k"])(c,{"data-value":"0",key:"0",role:"option"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.resources.any),1)]),_:1}),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.group.resources,e=>(Object(i["y"])(),Object(i["e"])(c,{"data-value":e.id,key:e.id,role:"option"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.title),1)]),_:2},1032,["data-value"]))),128))]),_:1},8,["name","id","label","value","modelValue"]))],64)):Object(i["f"])("",!0),"radio"==o.resourcesView?(Object(i["y"])(),Object(i["g"])("fieldset",Fe,[Object(i["h"])("legend",null,Object(i["J"])(n.group.title),1),Object(i["k"])(d,{modelValue:o.resource_id,"onUpdate:modelValue":t[2]||(t[2]=e=>o.resource_id=e),key:"0",name:"resource"+n.group.id,value:"0"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.resources.any),1)]),_:1},8,["modelValue","name"]),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.group.resources,e=>(Object(i["y"])(),Object(i["e"])(d,{modelValue:o.resource_id,"onUpdate:modelValue":t[3]||(t[3]=e=>o.resource_id=e),key:e.id,name:"resource"+n.group.id,value:e.id.toString()},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.title),1)]),_:2},1032,["modelValue","name","value"]))),128))])):Object(i["f"])("",!0)])}var Je={name:"ResourcesSelector",props:{group:{type:Array,required:!0},displayResourceGroup:{type:Array,required:!0}},data(){return{}},computed:{selectedResource(){return this.appointment.selected_resources?this.appointment.selected_resources.find(e=>e.resource_group_id==this.group.id):{resources_group_id:this.group.id,resource_id:0,resource_capacity:0}},resource_id:{get(){return this.selectedResource.resource_id},set(e){this.selectedResource.resource_id=e,this.resetDate()}},resourcesView(){return this.selectedAppointmentType.booking_flow_settings.resources_view?this.selectedAppointmentType.booking_flow_settings.resources_view:"list"},...Object(s["e"])(["translations","appointment"]),...Object(s["c"])(["selectedAppointmentType","currentStep","isTeamMembersRequired"])},methods:{...Object(s["b"])(["resetAppointmentSlots"]),...Object(s["d"])(["setAppointmentProp"]),resetDate(){this.setAppointmentProp({key:"start_date",value:""}),this.setAppointmentProp({key:"selected_date",value:""}),this.resetAppointmentSlots(),this.$emit("reloadDate")}}};const Ue=W()(Je,[["render",qe]]);var He=Ue,$e={name:"Resources",mixins:[L],components:{ResourcesSelector:He},data(){return{displayResourceGroup:[]}},mounted(){this.selectedAppointmentType.resources_settings&&this.selectedAppointmentType.resources_settings.forEach(e=>{if("user_preference"===e.resource_option){const t=this.getResourceInfo(e.resource_group_id);t&&"identifiable"==t.resource_type&&t.resources.length>0&&this.displayResourceGroup.push(t)}}),this.appointment.selected_resources||this.getDefaultResources(),0!=this.displayResourceGroup.length||this.isTeamMembersRequired||"first_available"==this.selectedAppointmentType.booking_flow_settings.booking_flow&&this.selectedAppointmentType.booking_flow_settings.suggest_first_available||(this.setSkippedResources(!0),this.$emit("nextStep"))},computed:{selectedResources(){return this.appointment.selected_resources?this.appointment.selected_resources:[]},...Object(s["e"])(["appointment"]),...Object(s["c"])(["selectedAppointmentType","isTeamMembersRequired"])},methods:{...Object(s["d"])(["setSkippedResources","setAppointmentProp"]),getResourceInfo(e){return this.selectedAppointmentType.resources_objects.find(t=>t.id==e)},getDefaultResources(){let e=[];this.selectedAppointmentType.resources_settings.forEach((t,n)=>{"assigned"===t.resource_option?e[n]={resource_group_id:t.resource_group_id,resource_id:t.assigned_resource_id,resource_quantity:1}:e[n]={resource_group_id:t.resource_group_id,resource_id:"0",resource_quantity:1}}),this.setAppointmentProp({key:"selected_resources",value:e})},handleReloadDate(){this.$emit("reloadDate")}}};n("a241");const We=W()($e,[["render",Re]]);var Ge=We;const Ke={class:"team-members-select"},Xe={class:"selectors"},Ye={value:"0",key:"0"},Qe=["value"],Ze={key:1,class:"selector"};function et(e,t,n,s,a,o){const l=Object(i["E"])("foxy-select2"),c=Object(i["E"])("foxy-list-item"),r=Object(i["E"])("foxy-select"),d=Object(i["E"])("foxy-radio");return Object(i["y"])(),Object(i["g"])("div",Ke,[Object(i["h"])("div",Xe,["list"==o.teamMembersView?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[e.selectedAppointmentType.staff_objects.length>10?(Object(i["y"])(),Object(i["e"])(l,{key:0,style:{width:"auto"},required:"",class:"selector",ref:"teamMembersSelect",name:"teamMember",id:"teamMember",label:e.translations.teamMembers.selectTeamMember,modelValue:o.selectedTeamMember,"onUpdate:modelValue":t[0]||(t[0]=e=>o.selectedTeamMember=e)},{default:Object(i["V"])(()=>[Object(i["h"])("option",Ye,Object(i["J"])(e.translations.teamMembers.any),1),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(e.selectedAppointmentType.staff_objects,e=>(Object(i["y"])(),Object(i["g"])("option",{value:e.id,key:e.id},Object(i["J"])(e.display_name),9,Qe))),128))]),_:1},8,["label","modelValue"])):(Object(i["y"])(),Object(i["e"])(r,{key:1,required:"",class:"selector",ref:"teamMembersSelect",name:"teamMember",id:"teamMember",label:e.translations.teamMembers.selectTeamMember,value:o.selectedTeamMember,modelValue:o.selectedTeamMember,"onUpdate:modelValue":t[1]||(t[1]=e=>o.selectedTeamMember=e)},{default:Object(i["V"])(()=>[Object(i["k"])(c,{"data-value":"0",key:"0",role:"option"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.teamMembers.any),1)]),_:1}),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(e.selectedAppointmentType.staff_objects,e=>(Object(i["y"])(),Object(i["e"])(c,{"data-value":e.id,key:e.id,role:"option"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.display_name),1)]),_:2},1032,["data-value"]))),128))]),_:1},8,["label","value","modelValue"]))],64)):Object(i["f"])("",!0),"radio"==o.teamMembersView?(Object(i["y"])(),Object(i["g"])("fieldset",Ze,[Object(i["h"])("legend",null,Object(i["J"])(e.translations.teamMembers.selectTeamMember),1),Object(i["k"])(d,{modelValue:o.selectedTeamMember,"onUpdate:modelValue":t[2]||(t[2]=e=>o.selectedTeamMember=e),key:"0",name:e.teamMember,value:"0"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.teamMembers.any),1)]),_:1},8,["modelValue","name"]),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(e.selectedAppointmentType.staff_objects,e=>(Object(i["y"])(),Object(i["e"])(d,{modelValue:o.selectedTeamMember,"onUpdate:modelValue":t[3]||(t[3]=e=>o.selectedTeamMember=e),key:e.id,name:"teamMember",value:e.id.toString()},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.display_name),1)]),_:2},1032,["modelValue","value"]))),128))])):Object(i["f"])("",!0)])])}var tt={name:"TeamMembers",mixins:[L],mounted(){this.appointment.staff_ids||(this.selectTeamMember>"0"?this.setAppointmentProp({key:"staff_ids",value:[this.selectTeamMember]}):this.setAppointmentProp({key:"staff_ids",value:[]})),document.body.classList.add("min-h-400")},beforeUnmount(){document.body.classList.remove("min-h-400")},computed:{selectedTeamMember:{get(){return this.appointment.staff_ids&&this.appointment.staff_ids.length>0?this.appointment.staff_ids[0]:"0"},set(e){"0"==e?this.setAppointmentProp({key:"staff_ids",value:[]}):this.setAppointmentProp({key:"staff_ids",value:[e]}),this.resetDate()}},...Object(s["e"])(["translations","appointment"]),...Object(s["c"])(["selectedAppointmentType","currentStep"]),teamMembersView(){return this.selectedAppointmentType.booking_flow_settings.team_view?this.selectedAppointmentType.booking_flow_settings.team_view:"list"}},methods:{...Object(s["b"])(["resetAppointmentSlots"]),...Object(s["d"])(["setAppointmentProp"]),getResourceInfo(e){return this.selectedAppointmentType.staff_objects.find(t=>t.id==e)},resetDate(){this.setAppointmentProp({key:"start_date",value:""}),this.setAppointmentProp({key:"selected_date",value:""}),this.resetAppointmentSlots(),this.$emit("reloadDate")}}};n("ec63");const nt=W()(tt,[["render",et]]);var it=nt;const st={key:0,class:"booking-header"},at={class:"md-layout md-alignment-top-space-between"},ot={class:"md-layout-item md-small-size-100"},lt=["tabindex"],ct={key:0,class:"md-subheading"},rt={class:"appointment-duration"},dt={key:0},pt={key:0,class:"md-layout-item md-small-size-100"};function ut(e,t,n,s,a,o){const l=Object(i["E"])("currency-code"),c=Object(i["E"])("timezone-locked"),r=Object(i["E"])("timezone-select");return e.selectedAppointmentType?(Object(i["y"])(),Object(i["g"])("div",st,[Object(i["h"])("div",at,[Object(i["h"])("div",ot,[Object(i["h"])("h1",{class:Object(i["s"])(["md-title ssa-type-header",{"focus-target":"express"===e.currentStep.title}]),tabindex:"express"===e.currentStep.title?"-1":null},Object(i["J"])(e.selectedAppointmentType.title),11,lt),e.selectedAppointmentType.duration?(Object(i["y"])(),Object(i["g"])("h2",ct,[Object(i["h"])("span",rt,Object(i["J"])(e.displayDuration(e.selectedAppointmentType.duration)),1),e.showPaymentUI(e.selectedAppointmentType)?(Object(i["y"])(),Object(i["g"])("span",dt,[t[0]||(t[0]=Object(i["h"])("span",{class:"divider"}," - ",-1)),Object(i["k"])(l,{price:parseFloat(e.selectedAppointmentType.payments.price),currency:e.selectedAppointmentType.payments.currency},null,8,["price","currency"])])):Object(i["f"])("",!0)])):Object(i["f"])("",!0)]),e.selectedAppointmentType?(Object(i["y"])(),Object(i["g"])("div",pt,["locked"===e.selectedAppointmentType.timezone_style?(Object(i["y"])(),Object(i["e"])(c,{key:0})):(Object(i["y"])(),Object(i["e"])(r,{key:1}))])):Object(i["f"])("",!0)])])):Object(i["f"])("",!0)}const mt={class:"timezone-local md-body-2"};function bt(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",mt,[e.timezoneLocal!==e.timezone?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[Object(i["h"])("strong",null,Object(i["J"])(e.translations.general.timezoneMismatch),1),Object(i["j"])(" "+Object(i["J"])(e.formatTimezone())+" ",1),Object(i["h"])("div",null,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.general.localTime),1),Object(i["j"])(" "+Object(i["J"])(a.localTime),1)])],64)):Object(i["f"])("",!0)])}var ht={name:"TimezoneLocked",data(){return{localTime:"",moment:o.a}},mounted(){this.timezone||this.setTimezone(this.settings.global.timezone_string),this.localTime=o.a.tz(this.timezone).format(this.settings.global.date_format_moment+" "+this.settings.global.time_format_moment)},computed:{...Object(s["e"])(["settings","timezone","translations"]),...Object(s["c"])(["formatTimezone","timezoneLocal"])},methods:{...Object(s["d"])(["setTimezone"])}};n("ef21");const yt=W()(ht,[["render",bt]]);var ft=yt;const Ot={class:"timezone",style:{"text-align":"right"}},jt=["value"],gt={class:"screen-reader-text"},vt={class:"timezone-selection-wrapper"},_t={class:"screen-reader-text"};function kt(e,t,n,s,a,o){const l=Object(i["E"])("foxy-select2"),c=Object(i["E"])("foxy-icon"),r=Object(i["E"])("foxy-icon-button");return Object(i["y"])(),Object(i["g"])("div",Ot,[a.editing?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[Object(i["k"])(l,{ref:"timezoneSelect",name:"timezone",id:"timezone",label:e.translations.general.selectTimezone,modelValue:o.tz,"onUpdate:modelValue":t[0]||(t[0]=e=>o.tz=e)},{default:Object(i["V"])(()=>[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(e.filteredTimezones(a.timezones),e=>(Object(i["y"])(),Object(i["g"])("option",{value:e.value,key:e.value},Object(i["J"])(e.label),9,jt))),128))]),_:1},8,["label","modelValue"]),Object(i["k"])(r,{onClick:o.stopEditTimezone},{default:Object(i["V"])(()=>[Object(i["k"])(c,{icon:"save"}),Object(i["h"])("span",gt,Object(i["J"])(e.translations.actions.saveTimezone),1)]),_:1},8,["onClick"])],64)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:1},[Object(i["h"])("span",vt,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.general.yourTimezone),1),Object(i["h"])("span",null,Object(i["J"])(e.formatTimezone(e.timezone)),1)]),Object(i["k"])(r,{onClick:o.editTimezone},{default:Object(i["V"])(()=>[Object(i["k"])(c,{icon:"edit"}),Object(i["h"])("span",_t,Object(i["J"])(e.translations.actions.editTimezone),1)]),_:1},8,["onClick"])],64))])}var St={name:"TimezoneSelect",data(){return{moment:o.a,editing:!1,timezones:o.a.tz.names()}},mounted(){this.timezone||this.setTimezone(this.timezoneLocal)},computed:{tz:{get(){return this.timezone},set(e){this.setTimezone(e)}},...Object(s["e"])(["timezone","translations"]),...Object(s["c"])(["formatTimezone","timezoneLocal","filteredTimezones"])},methods:{editTimezone(){this.editing=!0,this.$nextTick(()=>{setTimeout(()=>{this.$refs.timezoneSelect.$el.focus()},0)})},stopEditTimezone(){this.editing=!1},...Object(s["d"])(["setTimezone"])}};n("0813");const xt=W()(St,[["render",kt]]);var At=xt,Tt={name:"Header",components:{TimezoneLocked:ft,TimezoneSelect:At,CurrencyCode:K},data(){return{}},computed:{...Object(s["c"])(["currentStep","displayDuration","selectedAppointmentType","showPaymentUI"])}};n("0da1");const wt=W()(Tt,[["render",ut]]);var Ct=wt,Et={name:"ExtrasWrapper",mixins:[L],components:{Resources:Ge,TeamMembers:it,Header:Ct},mounted(){"first_available"==this.selectedAppointmentType.booking_flow_settings.booking_flow&&this.selectedAppointmentType.booking_flow_settings.suggest_first_available&&(this.setSkippedResources(!0),this.confirmSelection())},computed:{showHeader(){return!!_(this.selectedAppointmentType.suggest_first_available)||("first_available"!=this.selectedAppointmentType.booking_flow_settings.booking_flow||"express"!=this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow)&&"express"!=this.selectedAppointmentType.booking_flow_settings.booking_flow},...Object(s["e"])(["appointment","settings","translations"]),...Object(s["c"])(["currentStep","selectedAppointmentType","isResourcesRequired","isTeamMembersRequired"])},methods:{confirmSelection(){this.isResourcesRequired&&this.emitTrackingEvent("resourceSelected"),this.isTeamMembersRequired&&this.emitTrackingEvent("teamMembersSelected"),this.$emit("nextStep")},handleNextStep(){this.$emit("nextStep")},handleReloadDate(){this.$emit("reloadDate")},...Object(s["d"])(["setSkippedResources"])}};const It=W()(Et,[["render",Me]]);var Dt=It;const Pt={class:"booking"},Vt={class:"md-headline date-select-headline focus-target",tabindex:"-1",key:"dateSelect"};function Lt(e,t,n,s,a,o){const l=Object(i["E"])("Header"),c=Object(i["E"])("foxy-snackbar"),r=Object(i["E"])("foxy-empty"),d=Object(i["E"])("first-available"),p=Object(i["E"])("shortly"),u=Object(i["E"])("monthly"),m=Object(i["E"])("only-available"),b=Object(i["E"])("weekly");return Object(i["y"])(),Object(i["g"])("div",Pt,[o.showHeader?(Object(i["y"])(),Object(i["e"])(l,{key:0})):Object(i["f"])("",!0),Object(i["h"])("div",{class:Object(i["s"])(["appt-select","appt-type-"+e.slug])},[Object(i["k"])(c,{modelValue:a.timeTaken,"onUpdate:modelValue":t[0]||(t[0]=e=>a.timeTaken=e),position:"top center","timeout-ms":5e3,message:e.translations.errors.timeTaken},null,8,["modelValue","message"]),a.loading?(Object(i["y"])(),Object(i["e"])(r,{label:e.translations.general.loadingAvailableSlots,loading:!0,key:"loading"},null,8,["label"])):a.error?(Object(i["y"])(),Object(i["e"])(r,{label:a.errorMessage,key:"bookingError"},null,8,["label"])):(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},["firstAvailable"!=e.currentStep.inputType?(Object(i["y"])(),Object(i["g"])("h1",Vt,Object(i["J"])(e.translations.booking.dateSelect),1)):Object(i["f"])("",!0),"firstAvailable"===e.currentStep.inputType?(Object(i["y"])(),Object(i["e"])(d,{key:"firstAvailable","suggest-within":e.selectedAppointmentType.booking_flow_settings.suggest_first_available_within_minutes,onConfirmAppointment:o.confirmAppointment,onRegularView:o.regularView},null,8,["suggest-within","onConfirmAppointment","onRegularView"])):"short"===e.currentStep.inputType&&"express"!==e.selectedAppointmentType.booking_flow_settings.booking_flow?(Object(i["y"])(),Object(i["e"])(p,{key:"shortly",onSelectDate:o.selectDate,onSkipDate:o.handleSkipDate},null,8,["onSelectDate","onSkipDate"])):"month"===o.view?(Object(i["y"])(),Object(i["e"])(u,{"disable-prev":o.disablePrev,"disable-next":o.disableNext,onPrev:o.navPrev,onNext:o.navNext,onSelectDate:o.selectDate,onSkipDate:o.handleSkipDate,date:a.date,key:"monthly"},null,8,["disable-prev","disable-next","onPrev","onNext","onSelectDate","onSkipDate","date"])):"only_available"===o.view?(Object(i["y"])(),Object(i["e"])(m,{page:a.page,onPrev:o.navPrevOnlyAvailable,onNext:o.navNextOnlyAvailable,onSelectDate:o.selectDate,key:"onlyAvailable"},null,8,["page","onPrev","onNext","onSelectDate"])):(Object(i["y"])(),Object(i["e"])(b,{date:a.date,"disable-prev":o.disablePrev,"disable-next":o.disableNext,onPrev:o.navPrev,onNext:o.navNext,onSelectDate:o.selectDate,key:"weekly"},null,8,["date","disable-prev","disable-next","onPrev","onNext","onSelectDate"]))],64))],2)])}const Mt={class:"calendar shortly"},Bt={class:"calendar-days"};function Rt(e,t,n,s,a,o){const l=Object(i["E"])("day");return Object(i["y"])(),Object(i["g"])("div",Mt,[Object(i["h"])("div",Bt,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.days,(e,t)=>(Object(i["y"])(),Object(i["e"])(l,{day:e,key:t,onSelectDate:o.selectDate},null,8,["day","onSelectDate"]))),128))])])}const Nt=["disabled","aria-label"],zt={key:0,class:"md-body-1"},Ft={class:"md-title"},qt={class:"md-body-1"};function Jt(e,t,n,s,a,o){var l;return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(["book-day",o.isSamsungInternet&&"samsung-internet"])},[Object(i["h"])("button",{disabled:!n.day.hasSlots||n.day.passiveDay,class:Object(i["s"])(["md-whiteframe",{selectable:n.day.hasSlots&&!n.day.passiveDay,disabled:!n.day.hasSlots,passive:n.day.passiveDay,"md-elevation-0":!n.day.hasSlots,"md-elevation-2":n.day.hasSlots,"md-whiteframe-0dp":!n.day.hasSlots,"md-whiteframe-2dp":n.day.hasSlots,selected:e.appointment.selected_date==n.day.date.format(a.momentDateFormat)&&!n.day.passiveDay,today:o.isToday()}]),onClick:t[0]||(t[0]=e=>o.selectDate(n.day.date,n.day.hasSlots)),"aria-label":null===(l=n.day.date)||void 0===l?void 0:l.locale(e.locale).format("dddd MMMM Do YYYY")},[n.simple?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[n.day.passiveDay?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])("div",zt,[Object(i["h"])("span",null,Object(i["J"])(n.day.date.format("D")),1)]))],64)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:1},[Object(i["h"])("div",Ft,Object(i["J"])(n.day.date.format("ddd")),1),Object(i["h"])("div",qt,Object(i["J"])(n.day.date.format(e.settings.global.date_format_moment)),1)],64))],10,Nt)],2)}var Ut={name:"Day",props:{day:{type:Object,default:null},simple:{type:Boolean,default:!1}},data(){return{momentDateFormat:m}},computed:{isSamsungInternet(){var e,t,n;return null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.match(/SamsungBrowser/i)},...Object(s["e"])(["settings","translations","appointment","locale"])},methods:{selectDate(e,t){t&&this.$emit("selectDate",e.locale("en").format(this.momentDateFormat))},isToday(){return this.day.date.isSame(o.a.utc(),"day")}}};const Ht=W()(Ut,[["render",Jt]]);var $t=Ht,Wt={name:"Shortly",components:{Day:$t},data(){return{moment:o.a,momentDateFormat:m}},mounted(){let e=this.getDates();1===e.length&&this.tzAvailableSlots.length&&this.$emit("skipDate",e[0].locale("en").format(this.momentDateFormat))},computed:{days(){let e=this.getDates(),t=e.map(e=>{let t=e.format(this.momentDateFormat),n={};n.date=e;let i=this.tzAvailableSlots.findIndex(e=>{let n=e.start_date.substr(0,10);return t===n});return n.hasSlots=i>=0,n});return t.filter(e=>e.hasSlots)},...Object(s["e"])(["appointment","timezone"]),...Object(s["c"])(["availabilityWindow","tzAvailableSlots"])},methods:{getDates(){let e=this.availabilityWindow.start.clone().tz(this.timezone),t=this.availabilityWindow.end.clone().tz(this.timezone).subtract(1,"minute");if(t.isBefore(e))return[];let n=[e];while(e.isBefore(t,"day"))e=e.clone().add(1,"day"),n.push(e);return n},selectDate(e){this.$emit("selectDate",e)}}};const Gt=W()(Wt,[["render",Rt]]);var Kt=Gt;const Xt={class:"calendar weekly"},Yt={class:"prev"},Qt={class:"screen-reader-text"},Zt={class:"next"},en={class:"screen-reader-text"},tn={class:"calendar-days"};function nn(e,t,n,s,a,o){const l=Object(i["E"])("foxy-icon"),c=Object(i["E"])("foxy-icon-button"),r=Object(i["E"])("day");return Object(i["y"])(),Object(i["g"])("div",Xt,[Object(i["h"])("div",Yt,[Object(i["k"])(c,{disabled:n.disablePrev,onClick:o.goPrev},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_right":"keyboard_arrow_left"},null,8,["icon"]),Object(i["h"])("span",Qt,Object(i["J"])(e.translations.actions.back),1)]),_:1},8,["disabled","onClick"])]),Object(i["h"])("div",Zt,[Object(i["k"])(c,{disabled:n.disableNext,onClick:o.goNext},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_left":"keyboard_arrow_right"},null,8,["icon"]),Object(i["h"])("span",en,Object(i["J"])(e.translations.actions.forward)+" "+Object(i["J"])(o.nextWeek),1)]),_:1},8,["disabled","onClick"])]),Object(i["h"])("div",tn,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.days,(e,t)=>(Object(i["y"])(),Object(i["e"])(r,{day:e,key:t,onSelectDate:o.selectDate},null,8,["day","onSelectDate"]))),128))])])}var sn={name:"Weekly",components:{Day:$t},props:{date:{type:String,default:""},disablePrev:{type:Boolean},disableNext:{type:Boolean}},data(){return{moment:o.a,momentDateFormat:m}},computed:{firstDay(){return this.date?o()(this.date,this.momentDateFormat):o()()},days(){let e=this.getDates(this.firstDay),t=e.map(e=>{let t={};t.date=e;let n=e.format(this.momentDateFormat),i=this.tzAvailableSlots.findIndex(e=>{let t=e.start_date.substr(0,10);return n===t});return t.hasSlots=i>=0,t.passiveDay=!1,t});return t},nextWeek(){return this.firstDay.clone().add(7,"days").format(this.settings.global.date_format_moment)},previousWeek(){return this.firstDay.clone().subtract(7,"days").format(this.settings.global.date_format_moment)},...Object(s["e"])(["appointment","settings","translations","rtl"]),...Object(s["c"])(["tzAvailableSlots"])},methods:{getDates(e){let t=e.clone().add(6,"days"),n=[e],i=e.clone();while(i.isBefore(t))i=i.clone().add(1,"day"),n.push(i);return n},goNext(){this.disableNext||this.$emit("next")},goPrev(){this.disablePrev||this.$emit("prev")},selectDate(e){this.$emit("selectDate",e)}}};const an=W()(sn,[["render",nn]]);var on=an;const ln={class:"monthly"},cn={class:"title monthly"},rn={class:"md-title monthly-title"},dn={class:"prev"},pn={class:"screen-reader-text"},un={class:"next"},mn={class:"screen-reader-text"},bn={class:"calendar monthly"},hn={class:"calendar-wrap monthly"},yn={class:"week"},fn={class:"calendar-days monthly"};function On(e,t,n,s,a,o){const l=Object(i["E"])("foxy-icon"),c=Object(i["E"])("foxy-icon-button"),r=Object(i["E"])("day");return Object(i["y"])(),Object(i["g"])("div",ln,[Object(i["h"])("div",cn,[Object(i["h"])("h2",rn,Object(i["J"])(this.firstDay.format("MMMM YYYY")),1),Object(i["h"])("div",dn,[Object(i["k"])(c,{disabled:n.disablePrev,onClick:o.goPrev},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_right":"keyboard_arrow_left"},null,8,["icon"]),Object(i["h"])("span",pn,Object(i["J"])(e.translations.actions.back)+" "+Object(i["J"])(o.previousMonth),1)]),_:1},8,["disabled","onClick"])]),Object(i["h"])("div",un,[Object(i["k"])(c,{disabled:n.disableNext,onClick:o.goNext},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_left":"keyboard_arrow_right"},null,8,["icon"]),Object(i["h"])("span",mn,Object(i["J"])(e.translations.actions.forward)+" "+Object(i["J"])(o.nextMonth),1)]),_:1},8,["disabled","onClick"])])]),Object(i["h"])("div",bn,[Object(i["h"])("div",hn,[Object(i["h"])("ul",yn,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.week,e=>(Object(i["y"])(),Object(i["g"])("li",{key:e},Object(i["J"])(e),1))),128))]),Object(i["h"])("div",fn,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.days,(e,t)=>(Object(i["y"])(),Object(i["e"])(r,{simple:!0,day:e,key:t,onSelectDate:o.selectDate},null,8,["day","onSelectDate"]))),128))])])])])}var jn={name:"Monthly",components:{Day:$t},props:{date:{type:String,default:""},disablePrev:{type:Boolean},disableNext:{type:Boolean}},data(){return{moment:o.a,momentDateFormat:m}},mounted(){let e=this.getAvailableDates();1===e.length&&this.tzAvailableSlots.length&&this.$emit("skipDate",e[0].format(this.momentDateFormat))},computed:{days(){let e=this.getDates(this.firstDay),t=e.map(e=>{let t={};t.date=e;let n=this.tzAvailableSlots.findIndex(t=>{let n=e.format(this.momentDateFormat),i=t.start_date.substr(0,10);return n===i});return t.hasSlots=n>=0,t.passiveDay=!e.isSame(this.firstDay,"month"),t});return t},firstDay(){return this.date?o()(this.date,m):o()()},nextMonth(){return this.firstDay.clone().add(1,"month").format("MMMM YYYY")},previousMonth(){return this.firstDay.clone().subtract(1,"month").format("MMMM YYYY")},startOfWeek(){return parseInt(this.settings.global.start_of_week,10)},week(){let e=this.rtl?o.a.weekdays():o.a.weekdaysMin(!1);if(this.startOfWeek>0){let t=e.slice(0,this.startOfWeek),n=e.slice(this.startOfWeek);e=[...n,...t]}return e},...Object(s["e"])(["appointment","settings","translations","timezone","rtl"]),...Object(s["c"])(["availabilityWindow","tzAvailableSlots","urlParams"])},methods:{getDates(e){let t=[],n=e.daysInMonth();for(let a=1;a<=n;++a)t.push(o()(e).date(a));let i=o()(e).date(1).day();i=0===i?7:i,i=this.startOfWeek>i?i+7:i;for(let a=0;a<i-this.startOfWeek;a++)t.unshift(o()(e).date(1).subtract(a+1,"days"));let s=7-t.length%7;for(let a=1;a<=s;a++)t.push(o()(e).add(1,"months").date(a));return t},getAvailableDates(){let e=this.availabilityWindow.start.clone().tz(this.timezone),t=this.availabilityWindow.end.clone().tz(this.timezone).subtract(1,"minute");if(t.isBefore(e))return[];let n=[e];while(e.isBefore(t,"day"))e=e.clone().add(1,"day"),n.push(e);return n},goNext(){this.disableNext||this.$emit("next")},goPrev(){this.disablePrev||this.$emit("prev")},selectDate(e){this.$emit("selectDate",e)}}};const gn=W()(jn,[["render",On]]);var vn=gn;const _n={class:"md-title focus-target",tabindex:"-1"};function kn(e,t,n,s,a,o){const l=Object(i["E"])("foxy-button");return Object(i["y"])(),Object(i["g"])("div",null,[Object(i["h"])("h2",_n,Object(i["J"])(e.translations.suggestFirstAvailable.next)+": "+Object(i["J"])(o.selectDateTime),1),Object(i["k"])(l,{onClick:o.confirmAppointment,mode:"raised"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.suggestFirstAvailable.confirm),1)]),_:1},8,["onClick"]),Object(i["h"])("button",{class:"regular-view",onClick:t[0]||(t[0]=(...e)=>o.regularView&&o.regularView(...e))},Object(i["J"])(e.translations.suggestFirstAvailable.pickAnother),1)])}var Sn={name:"FirstAvailable",props:{suggestWithin:{type:String,default:""}},data(){return{momentDateFormat:m,momentTimestampFormat:b}},mounted(){var e=o.a.tz(this.tzAvailableSlots[0].start_date,b,this.timezone).utc(),t=o()().utc(),n=o.a.duration(e.diff(t)).asMinutes();n>this.suggestWithin&&null!=this.suggestWithin&&this.regularView()},computed:{selectDateTime(){var e=o.a.tz(this.tzAvailableSlots[0].start_date,b,this.timezone).utc();return this.setAppointmentProp({key:"selected_date",value:o()(this.tzAvailableSlots[0].start_date).format(this.momentDateFormat)}),this.setAppointmentProp({key:"start_date",value:e.format(b)}),this.setAppointmentProp({key:"customer_timezone",value:this.timezone}),e.tz(this.timezone).format(" MMMM, DD YYYY hh:mm A")+` ${this.timezone} `},...Object(s["e"])(["timezone","translations"]),...Object(s["c"])(["tzAvailableSlots","availabilityWindow"])},methods:{confirmAppointment(){this.$emit("confirmAppointment")},regularView(){this.$emit("regularView")},...Object(s["d"])(["setAppointmentProp","setSkippedTime"])}};n("8628");const xn=W()(Sn,[["render",kn]]);var An=xn;const Tn={class:"calendar weekly"},wn={class:"prev"},Cn={class:"screen-reader-text"},En={class:"next"},In={class:"screen-reader-text"},Dn={class:"calendar-days"};function Pn(e,t,n,s,a,o){const l=Object(i["E"])("foxy-icon"),c=Object(i["E"])("foxy-icon-button"),r=Object(i["E"])("day");return Object(i["y"])(),Object(i["g"])("div",Tn,[Object(i["h"])("div",wn,[Object(i["k"])(c,{disabled:o.disablePrev,onClick:o.goPrev},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_right":"keyboard_arrow_left"},null,8,["icon"]),Object(i["h"])("span",Cn,Object(i["J"])(e.translations.actions.back),1)]),_:1},8,["disabled","onClick"])]),Object(i["h"])("div",En,[Object(i["k"])(c,{disabled:o.disableNext,onClick:o.goNext},{default:Object(i["V"])(()=>[Object(i["k"])(l,{"aria-hidden":"true",icon:e.rtl?"keyboard_arrow_left":"keyboard_arrow_right"},null,8,["icon"]),Object(i["h"])("span",In,Object(i["J"])(e.translations.actions.forward),1)]),_:1},8,["disabled","onClick"])]),Object(i["h"])("div",Dn,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.days,(e,t)=>(Object(i["y"])(),Object(i["e"])(r,{day:e,key:t,onSelectDate:o.selectDate},null,8,["day","onSelectDate"]))),128))])])}var Vn={name:"OnlyAvailable",components:{Day:$t},props:{page:{type:Number,default:1}},data(){return{moment:o.a,momentDateFormat:m}},computed:{days(){let e=this.getDates(),t=e.map(e=>{let t={};t.date=e;let n=e.format(this.momentDateFormat),i=this.tzAvailableSlots.findIndex(e=>{let t=e.start_date.substr(0,10);return n===t});return t.hasSlots=i>=0,t.passiveDay=!1,t});return this.disableNext?t.slice(5*(this.page-1)):t.slice(5*(this.page-1),5*this.page)},lastPage(){return Math.ceil(this.getDates().length/5)},disablePrev(){return 1==this.page},disableNext(){return this.lastPage==this.page},...Object(s["e"])(["appointment","settings","translations","rtl"]),...Object(s["c"])(["tzAvailableSlots","availabilityWindow","minDay","maxDay"])},methods:{getDates(){let e=[],t=this.availabilityWindow.start.clone();while(t.isBefore(this.availabilityWindow.end)){if(0==this.tzAvailableSlots.length)break;let n=t.format(this.momentDateFormat),i=this.tzAvailableSlots.findIndex(e=>{let t=e.start_date.substr(0,10);return n===t});if(i>=0&&e.push(t),t=t.clone().add(1,"day"),t.isAfter(this.maxDay))break}return e},goNext(){this.disableNext||this.$emit("next",this.days[this.days.length-1].date)},goPrev(){this.disablePrev||this.$emit("prev",this.days[0].date)},selectDate(e){this.$emit("selectDate",e)}}};const Ln=W()(Vn,[["render",Pn]]);var Mn=Ln,Bn={name:"Date",mixins:[L],props:{step:{type:Object,default(){return{}}}},components:{Header:Ct,Monthly:vn,Shortly:Kt,Weekly:on,FirstAvailable:An,OnlyAvailable:Mn},data(){return{date:null,error:!1,errorMessage:"",timeTaken:!1,forwarded:!1,loading:!0,moment:o.a,momentDateFormat:m,momentTimestampFormat:b,expressSteps:p,page:1,fetchSlotsArgs:{},fetchDateBoundaries:{start_date_min:null,start_date_max:null}}},beforeMount(){if(Object.prototype.hasOwnProperty.call(this.appointment,"start_date")&&this.appointment.start_date&&(this.setAppointmentProp({key:"start_date",value:""}),this.resetAppointmentSlots()),this.inBookingWindow&&(this.visibleLast.isBefore(this.minDay,"day")||this.visibleFirst.isAfter(this.maxDay,"day"))){let e=this.visibleLast.isBefore(this.minDay,"day")?this.minDay.clone():this.maxDay.clone().subtract(this.dayBase-1,"days");this.jumpToDate(e),this.forwarded=this.diff>7}"date"==this.currentStep.title&&(_(this.selectedAppointmentType.booking_flow_settings.suggest_first_available)?(this.setDateLayout("firstAvailable"),this.removeStepByTitle("time")):this.diff<8?this.setDateLayout("short"):this.selectedAppointmentType.booking_layout?this.setDateLayout(this.selectedAppointmentType.booking_layout):this.setDateLayout("week"))},mounted(){return this.appointment.selected_date&&this.jumpToDate(o()(this.appointment.selected_date,this.momentTimestampFormat)),this.timeConflict&&this.$nextTick(()=>{this.timeTaken=!0,this.setTimeConflict(!1)}),this.inBookingWindow?this.afterAvailabilityWindow?(this.loading=!1,this.errorMessage=this.translations.errors.noAvailableSlots,void(this.error=!0)):this.forwarded||this.tzAvailableSlots.length&&!this.modeEdit&&!this.visibleFirst.isBefore(this.tzDayCheckedFirst,"day")&&!this.visibleLast.isAfter(this.tzDayCheckedLast,"day")?void this.maybeFastForward():(this.fetchSlotsArgs={start_date_min:this.queryFirst.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.queryLast.clone().tz(this.timezone).utc().format(this.momentDateFormat)},this.updateFetchDatesBoundaries(this.fetchSlotsArgs.start_date_min,this.fetchSlotsArgs.start_date_max),void this.loadAvailableSlots()):(this.loading=!1,this.errorMessage=this.translations.errors.outsideBookingWindow,void(this.error=!0))},watch:{date(e){if(e)return(this.visibleFirst.isBefore(this.tzDayCheckedFirst,"day")||this.visibleLast.isAfter(this.tzDayCheckedLast,"day")&&this.visibleLast.isBefore(this.maxDay,"day"))&&(this.loading=!0),this.visibleLast&&this.triggerNext&&this.tzDayCheckedLast&&this.maxDay&&this.visibleLast.isSameOrAfter(this.triggerNext,"day")&&this.tzDayCheckedLast.isBefore(this.maxDay,"day")?(this.fetchSlotsArgs={start_date_min:this.tzDayCheckedLast.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.queryLast.clone().tz(this.timezone).utc().format(this.momentDateFormat)},void this.loadAvailableSlots()):this.visibleFirst&&this.triggerPrev&&this.tzDayCheckedFirst&&this.minDay&&this.visibleFirst.isSameOrBefore(this.triggerPrev,"day")&&this.tzDayCheckedFirst.isAfter(this.minDay,"day")?(this.fetchSlotsArgs={start_date_min:this.queryFirst.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.tzDayCheckedFirst.clone().tz(this.timezone).utc().format(this.momentDateFormat)},void this.loadAvailableSlots()):this.forwarded&&(!this.tzAvailableSlots.length||this.modeEdit||this.visibleFirst.isBefore(this.tzDayCheckedFirst,"day")||this.visibleLast.isAfter(this.tzDayCheckedLast,"day"))?(this.fetchSlotsArgs={start_date_min:this.queryFirst.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.queryLast.clone().tz(this.timezone).utc().format(this.momentDateFormat)},(this.modeEdit||this.tzDayCheckedFirst&&this.visibleFirst.isBefore(this.tzDayCheckedFirst)||this.tzDayCheckedLast&&this.visibleLast.isAfter(this.tzDayCheckedLast))&&(this.fetchSlotsArgs.refresh=!0),this.loading=!0,void this.loadAvailableSlots()):void(this.loading&&this.tzAvailableSlots.length&&(this.loading=!1))},fetchSlotsArgs:{deep:!0,handler(e){c.a.isEmpty(e)||c.a.isEmpty(e.start_date_min)||c.a.isEmpty(e.start_date_max)||this.updateFetchDatesBoundaries(e.start_date_min,e.start_date_max)}}},computed:{dayBase(){let e=7;return"month"===this.view&&(e=Math.floor(this.visibleFirst.daysInMonth()/4)),e},diffCacheTimeStamp(){let e=o.a.utc();return o.a.duration(e.diff(o.a.utc(window.ssa_availability_edge_cache_timestamp))).asSeconds()},diff(){return this.minDay&&this.maxDay?o.a.duration(this.maxDay.diff(this.minDay)).asDays():10},disableNext(){return"short"===this.view||this.visibleLast.isSameOrAfter(this.maxDay,"day")},disablePrev(){return"short"===this.view||("month"===this.view?this.prev.isBefore(this.minDay,"month"):this.prev.clone().add(6,"days").isBefore(this.minDay,"day"))},next(){let e=7;return"month"===this.view?this.visibleFirst.clone().add(1,"month").endOf("month"):this.visibleFirst.clone().add(e,"days")},prev(){let e=7;return"month"===this.view&&(e=this.visibleFirst.clone().subtract(1,"month").daysInMonth()),this.visibleFirst.clone().subtract(e,"days")},queryFirst(){let e=this.disablePrev?this.visibleFirst.clone():this.visibleFirst.clone().subtract(5*this.dayBase,"days"),t=o.a.max(e,this.minDay);switch(this.view){case"month":t=t.clone().startOf("month");break;case"week":t=this.setWeekStart(t.clone());break;default:t=t.clone()}return t.subtract(1,"day")},queryLast(){let e=this.disableNext?this.visibleLast.clone():this.visibleLast.clone().add(5*this.dayBase,"days");return e=e.isSameOrBefore(this.queryFirst)?this.queryFirst.clone().add(5*this.dayBase,"days"):e,o.a.min(e,this.maxDay).clone().add(1,"day")},triggerNext(){let e=this.tzDayCheckedLast?this.tzDayCheckedLast:this.visibleLast;return this.disableNext?this.visibleLast.clone():e.clone().subtract(2*this.dayBase,"days")},triggerPrev(){var e=this.tzDayCheckedFirst?this.tzDayCheckedFirst:this.visibleFirst;return this.disablePrev?this.visibleFirst.clone():e.clone().add(2*this.dayBase,"days")},visibleFirst(){if(!this.date)return o()();switch(this.view){case"month":return o()(this.date,this.momentDateFormat).startOf("month");case"short":return this.minDay.clone();default:return o()(this.date,this.momentDateFormat)}},visibleLast(){switch(this.view){case"month":case"only_available":return this.visibleFirst.clone().endOf("month");case"short":return this.maxDay.clone();default:return this.visibleFirst.clone().add(6,"days")}},view(){let e="week";return this.currentStep.inputType&&(e=this.currentStep.inputType),this.diff<8&&(e="short"),("express"==this.selectedAppointmentType.booking_flow_settings.booking_flow||"express"==this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow&&"first_available"==this.selectedAppointmentType.booking_flow_settings.booking_flow)&&(e="month"),e},showHeader(){return!!_(this.selectedAppointmentType.booking_flow_settings.suggest_first_available)||("first_available"!=this.selectedAppointmentType.booking_flow_settings.booking_flow||"express"!=this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow)&&"express"!=this.selectedAppointmentType.booking_flow_settings.booking_flow},noAvailableSlotsMsg(){return this.noAvailabilityMsg?this.noAvailabilityMsg:this.translations.errors.noAvailableSlots},isOkToReturn(){return"only_available"!==this.view||(!!this.secondCheck||this.tzAvailableSlots.length>12)},...Object(s["e"])(["appointment","googleRefreshed","modeEdit","settings","timeConflict","timezone","translations","availabilityCacheQuery","noAvailabilityMsg","steps"]),...Object(s["c"])(["afterAvailabilityWindow","inBookingWindow","maxDay","minDay","selectedAppointmentType","slug","tzAvailableSlots","tzDayCheckedFirst","tzDayCheckedLast","currentStep","urlParams","crc32"])},methods:{checkAvailableSlots(){if(this.tzAvailableSlots.length&&this.isOkToReturn)this.loading=!1;else{if(this.secondCheck&&!this.tzAvailableSlots.length||this.tzDayCheckedLast&&this.tzDayCheckedLast.isSameOrAfter(this.maxDay)&&!this.tzAvailableSlots.length)return this.loading=!1,this.errorMessage=this.noAvailableSlotsMsg,void(this.error=!0);this.loading=!0,this.secondCheck=!0,this.fetchSlotsArgs={start_date_min:this.queryFirst.clone().add(4*this.dayBase,"days").tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.queryFirst.clone().add(1,"year").tz(this.timezone).utc().format(this.momentDateFormat)},this.loadAvailableSlots()}},handleSkipDate(e){this.setAppointmentProp({key:"selected_date",value:e}),this.$emit("nextStep"),this.setSkippedDate(!0)},jumpToDate(e){let t;t="month"===this.view?e.clone().startOf("month"):this.setWeekStart(e),this.date=t.format(this.momentDateFormat)},loadAvailableSlots(){var e,t;let n=this.fetchSlotsArgs;if(c.a.isEmpty(n))return void console.error("Call to loadAvailableSlots when fetchSlotsArgs object is empty");let i=n.start_date_min,s=n.start_date_max,a=window.ssa_availability_query_args?window.ssa_availability_query_args:{};const l=o()().subtract(1,"days").tz(this.timezone).utc();o()(n.start_date_min).isBefore(l)&&(i=l.format(this.momentDateFormat)),o()(n.start_date_max).isBefore(n.start_date_min)&&(s=n.start_date_min),this.appointment.staff_ids&&this.appointment.staff_ids.length>0?a.staff_ids_all_required=this.appointment.staff_ids:"user_preference"===(null===(e=this.selectedAppointmentType.staff)||void 0===e?void 0:e.required)&&a.staff_ids_all_required&&(a.staff_ids_all_required=[]),this.appointment.selected_resources&&this.appointment.selected_resources.length>0&&(a.resources_required=this.appointment.selected_resources),this.setAvailabilityCacheQuery({startDate:i,endDate:s,appointmentType:this.selectedAppointmentType.id,args:a});const r=this.crc32(this.availabilityCacheQuery);window.ssa_availability_edge_cache&&window.ssa_availability_edge_cache[r]&&this.diffCacheTimeStamp<60&&(null===(t=this.appointment.mepr_membership)||void 0===t||!t.id)?(n&&n.replace&&this.clearAvailableSlots(),this.setAvailableSlots(window.ssa_availability_edge_cache[r]),this.updateCheckedInfo(n),this.maybeFastForward(),this.triggerGoogleRefresh(),this.checkAvailableSlots()):this.fetchAppointmentSlots(n).then(()=>{this.maybeFastForward(),this.triggerGoogleRefresh(),this.checkAvailableSlots()}).catch(e=>{console.log(e),this.setConnectionError(!0)})},maybeFastForward(){if(!this.tzAvailableSlots.length)return;let e=o()(this.tzAvailableSlots[0].start_date,this.momentTimestampFormat);e.isAfter(this.visibleLast,"day")?this.jumpToDate(e):this.loading=!1},navNext(){this.date=this.next.format(this.momentDateFormat)},navPrev(){this.date=this.prev.format(this.momentDateFormat)},navNextOnlyAvailable(e){this.page++,this.date=e.clone().format(this.momentDateFormat)},navPrevOnlyAvailable(e){this.page--,this.date=e.clone().format(this.momentDateFormat)},selectDate(e){this.setAppointmentProp({key:"selected_date",value:e}),this.emitTrackingEvent("dateSelected"),this.$emit("nextStep")},setWeekStart(e){let t=o()(),n=t.isoWeekday(),i=e.isoWeekday();return n<=i?e.isoWeekday(n):e.clone().subtract(1,"week").isoWeekday(n)},confirmAppointment(){this.$emit("nextStep")},regularView(){this.setAppointmentProp({key:"start_date",value:""}),this.setAppointmentProp({key:"selected_date",value:""}),this.setSuggestFirstAvailableFalse(this.selectedAppointmentType),"express"==this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow?"form"===this.urlParams().integration?this.initApp("express"):this.setSteps(c.a.cloneDeep(p)):(this.addTimeStep(),this.diff<8?this.setDateLayout("short"):this.setDateLayout(this.selectedAppointmentType.booking_layout));const e=this.steps.findIndex(e=>"appointmentType"===e.title);this.setCurrentStepInt(e+1)},triggerGoogleRefresh(){this.tzAvailableSlots.length&&(this.googleRefreshed||this.settings.installed.google_calendar&&(this.settings.google_calendar&&!this.settings.google_calendar.enabled||(this.setGoogleRefreshed(!0),this.callAsync().then(()=>{let e={start_date_min:this.fetchDateBoundaries.start_date_min,start_date_max:this.fetchDateBoundaries.start_date_max};if(c.a.isEmpty(e.start_date_min)||c.a.isEmpty(e.start_date_max))return void console.error("Call to triggerGoogleRefresh when fetchDateBoundaries object is empty");let t={replace:!0};e&&(t=Object.assign({},e,t)),this.fetchAppointmentSlots(t).then(()=>{this.callAsync()})}))))},reloadDate(){this.fetchSlotsArgs={start_date_min:this.queryFirst.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.queryLast.clone().tz(this.timezone).utc().format(this.momentDateFormat)},this.loading=!0,this.error=!1,this.errorMessage="",this.loadAvailableSlots()},updateFetchDatesBoundaries(e,t){c.a.isEmpty(e)||c.a.isEmpty(t)||((!this.fetchDateBoundaries.start_date_min||e<this.fetchDateBoundaries.start_date_min)&&(this.fetchDateBoundaries.start_date_min=e),(!this.fetchDateBoundaries.start_date_max||t>this.fetchDateBoundaries.start_date_max)&&(this.fetchDateBoundaries.start_date_max=t))},...Object(s["b"])(["callAsync","initApp","removeStepByTitle","fetchAppointmentSlots","setAppointmentToken","updateCheckedInfo","resetAppointmentSlots"]),...Object(s["d"])(["clearAvailableSlots","setAppointmentProp","setConnectionError","setGoogleRefreshed","setTimeConflict","setSkippedDate","setDateLayout","setSuggestFirstAvailableFalse","addTimeStep","setSteps","setAvailableSlots","setAvailabilityCacheQuery","setCurrentStepInt"])}};n("8c6c");const Rn=W()(Bn,[["render",Lt]]);var Nn=Rn;const zn={class:"booking"},Fn={class:"md-headline time-select-headline"},qn={class:"md-layout md-align-center time-selection-cols"},Jn={class:"md-headline time-select-headline"},Un={class:"md-layout md-align-center time-selection-cols flex-direction-column"},Hn={class:"md-headline time-select-headline"},$n={class:"md-layout md-align-center time-selection-cols display-block"},Wn={class:"md-headline focus-target",tabindex:"-1"},Gn={class:"md-layout md-align-center time-selection-cols"};function Kn(e,t,n,s,a,o){const l=Object(i["E"])("Header"),c=Object(i["E"])("foxy-empty"),r=Object(i["E"])("foxy-button"),d=Object(i["E"])("time-list");return Object(i["y"])(),Object(i["g"])("div",zn,[o.showHeader?(Object(i["y"])(),Object(i["e"])(l,{key:0})):Object(i["f"])("",!0),Object(i["h"])("div",{class:Object(i["s"])(["time-select","appt-type-"+e.slug])},[a.loading?(Object(i["y"])(),Object(i["e"])(c,{key:0,label:e.translations.general.loadingAvailableSlots,loading:!0},null,8,["label"])):o.timeSlots.night.length||o.timeSlots.morning.length||o.timeSlots.afternoon.length||o.timeSlots.evening.length?"single_column"==o.timeView?(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},[Object(i["h"])("h2",Fn,Object(i["J"])(e.translations.booking.timeSelect)+" "+Object(i["J"])(o.momentDate.format(e.settings.global.date_format_moment)),1),Object(i["h"])("div",qn,[o.allTimeSlots.length?(Object(i["y"])(),Object(i["e"])(d,{key:0,icon:" ",list:o.allTimeSlots,onSelectTime:o.selectTime},null,8,["list","onSelectTime"])):Object(i["f"])("",!0)])],64)):"rows"==o.timeView?(Object(i["y"])(),Object(i["g"])(i["a"],{key:3},[Object(i["h"])("h2",Jn,Object(i["J"])(e.translations.booking.timeSelect)+" "+Object(i["J"])(o.momentDate.format(e.settings.global.date_format_moment)),1),Object(i["h"])("div",Un,[o.timeSlots.night.length?(Object(i["y"])(),Object(i["e"])(d,{key:0,list:o.timeSlots.night,icon:"night",title:e.translations.day.night,rows:"rows",onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.morning.length?(Object(i["y"])(),Object(i["e"])(d,{key:1,list:o.timeSlots.morning,icon:"morning",title:e.translations.day.morning,rows:"rows",onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.afternoon.length?(Object(i["y"])(),Object(i["e"])(d,{key:2,list:o.timeSlots.afternoon,icon:"afternoon",title:e.translations.day.afternoon,rows:"rows",onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.evening.length?(Object(i["y"])(),Object(i["e"])(d,{key:3,list:o.timeSlots.evening,icon:"evening",title:e.translations.day.evening,rows:"rows",onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0)])],64)):"block"==o.timeView?(Object(i["y"])(),Object(i["g"])(i["a"],{key:4},[Object(i["h"])("h2",Hn,Object(i["J"])(e.translations.booking.timeSelect)+" "+Object(i["J"])(o.momentDate.format(e.settings.global.date_format_moment)),1),Object(i["h"])("div",$n,[o.allTimeSlots.length?(Object(i["y"])(),Object(i["e"])(d,{key:0,icon:" ",list:o.allTimeSlots,block:"block",onSelectTime:o.selectTime},null,8,["list","onSelectTime"])):Object(i["f"])("",!0)])],64)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:5},[Object(i["h"])("h2",Wn,Object(i["J"])(e.translations.booking.timeSelect)+" "+Object(i["J"])(o.momentDate.format(e.settings.global.date_format_moment)),1),Object(i["h"])("div",Gn,[o.timeSlots.night.length?(Object(i["y"])(),Object(i["e"])(d,{key:0,list:o.timeSlots.night,icon:"night",title:e.translations.day.night,onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.morning.length?(Object(i["y"])(),Object(i["e"])(d,{key:1,list:o.timeSlots.morning,icon:"morning",title:e.translations.day.morning,onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.afternoon.length?(Object(i["y"])(),Object(i["e"])(d,{key:2,list:o.timeSlots.afternoon,icon:"afternoon",title:e.translations.day.afternoon,onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0),o.timeSlots.evening.length?(Object(i["y"])(),Object(i["e"])(d,{key:3,list:o.timeSlots.evening,icon:"evening",title:e.translations.day.evening,onSelectTime:o.selectTime},null,8,["list","title","onSelectTime"])):Object(i["f"])("",!0)])],64)):(Object(i["y"])(),Object(i["e"])(c,{key:1,label:o.momentDate.format(e.settings.global.date_format_moment),description:e.translations.errors.noSlotsOnDate},{default:Object(i["V"])(()=>[Object(i["k"])(r,{mode:"raised",onClick:o.handlePickNewDate},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.errors.pickNewDate),1)]),_:1},8,["onClick"])]),_:1},8,["label","description"]))],2)])}const Xn={class:"md-layout md-column-center md-column md-flex-25 md-flex-xsmall-50 time-selection-col"},Yn={class:"md-subheading time-selection-col-header"},Qn={key:0};function Zn(e,t,n,s,a,o){const l=Object(i["E"])("icon"),c=Object(i["E"])("foxy-button");return Object(i["y"])(),Object(i["g"])("div",Xn,[" "!=n.icon?(Object(i["y"])(),Object(i["e"])(l,{key:0,icon:n.icon},null,8,["icon"])):Object(i["f"])("",!0),Object(i["h"])("h2",Yn,Object(i["J"])(n.title),1),Object(i["h"])("ul",{class:Object(i["s"])(["time-listing",["rows"===n.rows?"time-listing-rows":"","block"===n.block?"time-listing-block":""]])},[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.list,(t,s)=>(Object(i["y"])(),Object(i["g"])("li",{key:s,class:Object(i["s"])("block"===n.block?"inline-display":"")},[Object(i["k"])(c,{class:"time-select",mode:"hover",onClick:e=>o.selectTime(t.start_date)},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(a.moment(t.start_date).format(e.settings.global.time_format_moment))+" ",1),o.showEndTime?(Object(i["y"])(),Object(i["g"])("span",Qn," - "+Object(i["J"])(o.endDate(a.moment(t.start_date)).format(e.settings.global.time_format_moment)),1)):Object(i["f"])("",!0)]),_:2},1032,["onClick"])],2))),128))],2)])}const ei={class:"time-section-col-icon"},ti=["width","height"],ni={class:"icon-path"};function ii(e,t,n,s,a,o){const l=Object(i["E"])("afternoon"),c=Object(i["E"])("evening"),r=Object(i["E"])("morning"),d=Object(i["E"])("night");return Object(i["y"])(),Object(i["g"])("div",ei,[(Object(i["y"])(),Object(i["g"])("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,viewBox:"0 0 100 100",role:"presentation",class:"time-listing-icon"},[Object(i["h"])("g",ni,["afternoon"===n.icon?(Object(i["y"])(),Object(i["e"])(l,{key:0})):"evening"===n.icon?(Object(i["y"])(),Object(i["e"])(c,{key:1})):"morning"===n.icon?(Object(i["y"])(),Object(i["e"])(r,{key:2})):(Object(i["y"])(),Object(i["e"])(d,{key:3}))])],8,ti))])}const si={d:"M50 26c1.104 0 2-.896 2-2V12.006 12c0-1.103-.895-2-2-2s-2.002.897-2.002 2v12c0 1.105.897 2 2 2zM26 50c0-1.104-.895-2-2-2H12.003 12c-1.104 0-2 .895-2 2s.896 2 2 2h12c1.105 0 2-.895 2-2zM88 48H76.05h-.005c-1.104 0-2 .895-2 2s.896 2 2 2H88c1.105 0 2-.895 2-2 0-1.104-.895-2-2-2zM50.002 73.91c-1.105 0-2 .896-2 2V88c0 1.103.895 2 2 2s2-.897 2-2V75.91c0-1.104-.897-2-2-2zM69.796 33.03l8.483-8.482c0-.002.002-.002.002-.003.78-.78.78-2.046 0-2.828-.78-.78-2.046-.78-2.827 0L66.97 30.2c-.78.783-.78 2.048 0 2.83.78.78 2.047.78 2.826 0zM30.2 33.03c.78.78 2.046.78 2.827 0 .78-.782.78-2.047 0-2.83l-8.48-8.48-.004-.003c-.78-.78-2.047-.782-2.828 0-.78.78-.78 2.047 0 2.828L30.2 33.03zM69.832 67.004l-.002-.002c-.78-.78-2.046-.78-2.827 0-.78.783-.78 2.05 0 2.83l8.452 8.452c.782.782 2.048.782 2.83 0 .78-.78.78-2.046 0-2.828l-8.453-8.452zM30.264 66.908l-8.545 8.544-.005.004c-.78.78-.78 2.047 0 2.828.783.78 2.047.78 2.828 0l8.55-8.546c.78-.78.78-2.047 0-2.828-.78-.783-2.048-.783-2.83-.002zM50.125 30.003V30h-.248v.003C38.88 30.07 30 38.986 30 50c0 11.012 8.88 19.93 19.877 19.996V70h.248v-.004C61.123 69.93 70.003 61.014 70.003 50s-8.88-19.93-19.878-19.997zm-.105 35.995h-.035c-8.836-.01-15.982-7.16-15.982-15.998 0-8.837 7.146-15.99 15.98-16h.036C58.853 34.01 66 41.164 66 50c0 8.838-7.146 15.988-15.98 15.998z"};function ai(e,t){return Object(i["y"])(),Object(i["g"])("path",si)}const oi={},li=W()(oi,[["render",ai]]);var ci=li;function ri(e,t){return Object(i["y"])(),Object(i["g"])("g",null,t[0]||(t[0]=[Object(i["h"])("path",{d:"M97.5 75.71v-.052h-95v.053c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5h95c1.38 0 2.5-1.118 2.5-2.5s-1.12-2.5-2.5-2.5zM49.998 38.082c1.38 0 2.498-1.12 2.498-2.498V20.597c0-.002.003-.003.003-.005 0-1.38-1.122-2.5-2.5-2.5-1.383 0-2.502 1.12-2.502 2.5v14.993c0 1.378 1.12 2.497 2.5 2.497zM2.52 70.566h14.993c1.38 0 2.5-1.117 2.5-2.498s-1.12-2.5-2.5-2.5H2.52c-1.378 0-2.498 1.12-2.498 2.5s1.12 2.498 2.5 2.498zM82.54 65.568c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.498 2.5 2.498h14.937c1.382 0 2.498-1.117 2.498-2.498 0-1.38-1.116-2.5-2.498-2.5H82.54zM74.732 46.863l10.6-10.596.002-.004c.977-.975.977-2.557 0-3.533-.975-.976-2.557-.976-3.532 0L71.2 43.33c-.976.978-.976 2.56 0 3.533.977.978 2.558.978 3.532 0zM25.262 46.863c.975.978 2.556.978 3.533 0 .975-.975.975-2.556 0-3.532L18.197 32.735l-.003-.004c-.977-.976-2.558-.977-3.533 0-.977.977-.975 2.558 0 3.533l10.602 10.6zM25.135 70.566h5.047c-.104-.822-.172-1.65-.172-2.498 0-11.043 8.93-19.98 19.97-19.99h.042c11.037.012 19.97 8.947 19.97 19.99 0 .848-.07 1.676-.173 2.498h5.046c.08-.822.123-1.656.123-2.498 0-13.762-11.095-24.902-24.836-24.984v-.005h-.312v.004c-13.738.082-24.83 11.225-24.83 24.984 0 .842.04 1.676.123 2.498z"},null,-1),Object(i["h"])("path",{d:"M48.015 73.65v.002h.004c.007.01.018.014.025.023.11.107.227.203.354.29.06.04.124.066.188.102.08.044.157.093.242.128.08.033.162.05.242.074.076.022.148.05.225.065.232.045.467.048.703.027.71.062 1.44-.168 1.98-.71l7.062-7.065.004-.002c.977-.977.977-2.56 0-3.535s-2.56-.975-3.533 0l-3.23 3.23V51.894c0-1.38-1.118-2.498-2.5-2.498-1.378 0-2.497 1.12-2.497 2.498v13.96l-2.803-2.804c-.977-.976-2.557-.976-3.533 0-.975.978-.976 2.558 0 3.536l7.065 7.064z"},null,-1)]))}const di={},pi=W()(di,[["render",ri]]);var ui=pi;function mi(e,t){return Object(i["y"])(),Object(i["g"])("g",null,t[0]||(t[0]=[Object(i["h"])("path",{d:"M97.5 75.71v-.052h-95v.053c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5h95c1.38 0 2.5-1.118 2.5-2.5s-1.12-2.5-2.5-2.5zM49.998 38.082c1.38 0 2.5-1.12 2.5-2.5V20.598l.002-.005c0-1.38-1.12-2.5-2.5-2.5s-2.5 1.12-2.5 2.5v14.992c0 1.38 1.118 2.498 2.498 2.498zM2.522 70.566h14.992c1.38 0 2.5-1.117 2.5-2.498s-1.12-2.5-2.5-2.5H2.527h-.005c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.498 2.5 2.498zM82.54 65.568c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.498 2.5 2.498h14.937c1.382 0 2.498-1.117 2.498-2.498 0-1.38-1.116-2.5-2.498-2.5H82.54zM74.732 46.864l10.6-10.597c0-.002.002-.002.002-.003.977-.975.977-2.557 0-3.534-.975-.975-2.557-.975-3.532 0L71.2 43.33c-.976.978-.976 2.558 0 3.534.977.977 2.558.977 3.532 0zM25.262 46.864c.975.977 2.556.977 3.533 0 .975-.976.976-2.556 0-3.533L18.198 32.735l-.003-.004c-.977-.975-2.558-.977-3.533 0-.977.977-.976 2.558 0 3.534l10.6 10.6zM25.135 70.566h5.047c-.103-.822-.17-1.65-.17-2.498 0-11.043 8.928-19.978 19.968-19.99h.042c11.038.012 19.97 8.947 19.97 19.99 0 .848-.07 1.676-.173 2.498h5.046c.08-.822.123-1.656.123-2.498 0-13.762-11.095-24.902-24.836-24.985v-.004h-.31v.003c-13.74.083-24.832 11.225-24.832 24.985 0 .842.04 1.676.123 2.498z"},null,-1),Object(i["h"])("path",{d:"M51.985 50.122v-.002h-.004c-.007-.01-.018-.014-.025-.023-.11-.107-.227-.204-.354-.29-.06-.04-.124-.067-.188-.103-.08-.044-.157-.092-.242-.127-.08-.033-.162-.05-.243-.075-.076-.023-.148-.052-.224-.066-.233-.046-.467-.048-.703-.028-.71-.062-1.44.168-1.98.71l-7.063 7.065-.004.002c-.977.977-.977 2.56 0 3.535.977.977 2.56.975 3.534 0l3.228-3.23v14.386c0 1.38 1.12 2.498 2.5 2.498s2.5-1.12 2.5-2.498V57.918l2.802 2.803c.977.978 2.557.978 3.533 0 .975-.976.976-2.556 0-3.534l-7.065-7.064z"},null,-1)]))}const bi={},hi=W()(bi,[["render",mi]]);var yi=hi;const fi={d:"M74.3 72.11c-.16-.69-.685-1.193-1.32-1.373-.105-.018-.207-.04-.312-.06-.223-.043-.445-.082-.667-.13-9.597-2.084-17.62-9.493-19.998-19.704h.002c-2.377-10.208 1.544-20.395 9.23-26.506.207-.166.424-.324.64-.483.005-.006.014-.012.02-.018.584-.432.885-1.18.71-1.93-.16-.687-.678-1.188-1.306-1.37-.126-.024-.254-.044-.38-.066-.204-.037-.408-.078-.614-.11-3.656-.573-7.48-.482-11.31.393v-.004l-.323.075.002.004C32.63 24.664 22.692 40.71 26.442 56.8l.004.006c3.748 16.087 19.752 26.09 35.837 22.444v.004l.15-.034.027-.008.013-.003c.01-.004.02-.005.03-.008l.104-.023v-.005c3.82-.91 7.294-2.518 10.322-4.647.212-.15.42-.307.627-.463l.044-.03c.575-.432.875-1.177.7-1.924zM61.76 75.53l-.002-.006-.175.04C47.46 78.838 33.378 70.07 30.088 55.95l.004-.002c-3.277-14.07 5.407-28.106 19.43-31.477l.002.004.185-.043c2.208-.513 4.416-.734 6.58-.684-7.028 7.08-10.365 17.502-7.932 27.947l.005.006c2.433 10.444 10.034 18.318 19.47 21.562-1.883.983-3.915 1.754-6.072 2.268z"};function Oi(e,t){return Object(i["y"])(),Object(i["g"])("path",fi)}const ji={},gi=W()(ji,[["render",Oi]]);var vi=gi,_i={props:{height:{type:[Number,String],default:100},icon:{type:String,default:"morning"},width:{type:[Number,String],default:100}},components:{Afternoon:ci,Evening:ui,Morning:yi,Night:vi}};const ki=W()(_i,[["render",ii]]);var Si=ki,xi={name:"TimeList",mixins:[L],props:{icon:{type:String,default:""},list:{type:Array,default:()=>[]},title:{type:String,default:""},block:{type:String,default:""},rows:{type:String,default:""}},components:{Icon:Si},data(){return{moment:o.a}},computed:{showEndTime(){var e,t;return!(null===(e=this.selectedAppointmentType)||void 0===e||null===(t=e.booking_flow_settings)||void 0===t||!t.show_end_time)&&this.selectedAppointmentType.booking_flow_settings.show_end_time},...Object(s["e"])(["settings"]),...Object(s["c"])(["selectedAppointmentType","appointmentDuration"])},methods:{selectTime(e){this.emitTrackingEvent("timeSelected"),this.$emit("selectTime",e)},endDate(e){return e.clone().add(this.appointmentDuration,"minutes")}}};const Ai=W()(xi,[["render",Zn]]);var Ti=Ai,wi={name:"Time",components:{Header:Ct,TimeList:Ti},data(){return{loading:!1,moment:o.a,momentDateFormat:m,momentTimestampFormat:b,timeOfDaySlots:{}}},beforeMount(){this.selectedAppointmentType.booking_flow_settings.time_view?this.setStepLayout({currentStep:this.currentStep,layout:this.selectedAppointmentType.booking_flow_settings.time_view}):this.setStepLayout({currentStep:this.currentStep,layout:"time_of_day_columns"})},mounted(){this.maybeSkipTimeSelection()},computed:{momentDate(){let e;return Object.prototype.hasOwnProperty.call(this.appointment,"selected_date")&&this.appointment.selected_date&&(e=this.appointment.selected_date),Object.prototype.hasOwnProperty.call(this.appointment,"start_date")&&this.appointment.start_date&&(e=o.a.utc(this.appointment.start_date).tz(this.timezone).locale("en").format(b)),o()(e,[m,b])},timeSlots(){let e={night:[],morning:[],afternoon:[],evening:[]};return this.tzAvailableSlots.forEach(t=>{let n=o()(t.start_date,b).locale("en");if(this.momentDate.isSame(n,"day")){let i=parseInt(n.format("HH"),10);c.a.inRange(i,0,6)&&e.night.push(t),c.a.inRange(i,6,12)&&e.morning.push(t),c.a.inRange(i,12,18)&&e.afternoon.push(t),c.a.inRange(i,18,24)&&e.evening.push(t)}}),e},allTimeSlots(){let e=[];return this.tzAvailableSlots.forEach(t=>{let n=o()(t.start_date,b).locale("en");this.momentDate.isSame(n,"day")&&e.push(t)}),e},showHeader(){return!!_(this.selectedAppointmentType.suggest_first_available)||("first_available"!=this.selectedAppointmentType.booking_flow_settings.booking_flow||"express"!=this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow)&&"express"!=this.selectedAppointmentType.booking_flow_settings.booking_flow},timeView(){const e=this.selectedAppointmentType.booking_flow_settings.time_view;if("express"!==e)return e;{const e=this.currentStep.inputType;return e}},...Object(s["e"])(["appointment","settings","timezone","translations"]),...Object(s["c"])(["slug","selectedAppointmentType","tzAvailableSlots","urlParams","currentStep"])},methods:{handlePickNewDate(){this.$emit("prevStep")},selectTime(e){var t=o.a.tz(e,b,this.timezone).utc().locale("en").format(b);this.setAppointmentProp({key:"start_date",value:t}),this.setAppointmentProp({key:"customer_timezone",value:this.timezone}),this.$emit("nextStep")},maybeSkipTimeSelection(){let e=this.selectedAppointmentType;if(Object.prototype.hasOwnProperty.call(e,"availability_type")&&"start_times"===e.availability_type){let t=this.momentDate.clone().locale("en").format("dddd");if(1===e.availability[t].length){const e=Object.values(this.timeSlots).find(e=>e.length);this.setSkippedTime(!0),this.selectTime(e[0]["start_date"])}}},...Object(s["d"])(["setAppointmentProp","setSkippedTime","setStepLayout"])}};n("a953");const Ci=W()(wi,[["render",Kn]]);var Ei=Ci;const Ii={class:"booking"},Di={class:"col"},Pi={class:"col"};function Vi(e,t,n,s,a,o){const l=Object(i["E"])("Header"),c=Object(i["E"])("extras"),r=Object(i["E"])("date"),d=Object(i["E"])("Time");return Object(i["y"])(),Object(i["g"])("div",Ii,[Object(i["k"])(l),Object(i["h"])("div",{class:Object(i["s"])(["grid",{"time-cols":"time_of_day_columns"==e.selectedAppointmentType.booking_flow_settings.time_view}])},[e.isTeamMembersRequired||e.isResourcesRequired?(Object(i["y"])(),Object(i["g"])("div",{key:0,class:Object(i["s"])({extrasCol:e.isTeamMembersRequired||e.isResourcesRequired&&o.isResourcesUserPreference})},[Object(i["k"])(c,{class:"extras",step:e.currentStep,onReloadDate:o.handleReloadDate},null,8,["step","onReloadDate"])],2)):Object(i["f"])("",!0),Object(i["h"])("div",Di,[Object(i["k"])(r,{ref:"date",class:"date",step:e.currentStep},null,8,["step"])]),Object(i["h"])("div",Pi,[e.appointment.selected_date?(Object(i["y"])(),Object(i["e"])(d,{key:0,class:"time",step:e.currentStep,onNextStep:e.handleNextStep},null,8,["step","onNextStep"])):Object(i["f"])("",!0)])],2)])}var Li={name:"Express",components:{Header:Ct,Date:Nn,Time:Ei,Extras:Dt},data(){return{}},computed:{isResourcesUserPreference(){return!!this.selectedAppointmentType.resources_settings&&this.selectedAppointmentType.resources_settings.some(e=>"user_preference"===e.resource_option)},...Object(s["e"])(["appointment","settings","translations"]),...Object(s["c"])(["currentStep","isResourcesRequired","isTeamMembersRequired","selectedAppointmentType"])},methods:{handleReloadDate(){this.$refs.date.reloadDate()},...Object(s["d"])(["handleNextStep"])}};n("c7b8");const Mi=W()(Li,[["render",Vi]]);var Bi=Mi;const Ri={class:"basic customer-information-container"};function Ni(e,t,n,s,a,o){const l=Object(i["E"])("foxy-phone-field"),c=Object(i["E"])("foxy-textfield");return Object(i["y"])(),Object(i["g"])("div",Ri,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.fields,(t,n)=>(Object(i["y"])(),Object(i["g"])("div",{class:"form-field",key:n},["Phone"===t.field?(Object(i["y"])(),Object(i["e"])(l,{key:0,modelValue:a.information[t.field],"onUpdate:modelValue":e=>a.information[t.field]=e,label:e.translations.appointmentTypes.customer_information[t.field]?e.translations.appointmentTypes.customer_information[t.field]:t.field,"input-options":{id:e.slugify(t.field)},"leading-icon":t.icon,helptext:t.helptext,"helptext-persistent":t.error,"helptext-validation":t.error,required:t.required,placeholder:e.translations.inputs.phone.placeholder,onValidate:e=>o.validatePhone(t.field,t.required,e)},null,8,["modelValue","onUpdate:modelValue","label","input-options","leading-icon","helptext","helptext-persistent","helptext-validation","required","placeholder","onValidate"])):(Object(i["y"])(),Object(i["e"])(c,{key:1,modelValue:a.information[t.field],"onUpdate:modelValue":e=>a.information[t.field]=e,valid:!t.error,label:e.translations.appointmentTypes.customer_information[t.field],"leading-icon":t.icon,required:t.required,helptext:t.helptext,"helptext-persistent":t.error,"helptext-validation":t.error,multiline:"Notes"===t.field,name:e.slugify(t.field),onBlur:o.validate},null,8,["modelValue","onUpdate:modelValue","valid","label","leading-icon","required","helptext","helptext-persistent","helptext-validation","multiline","name","onBlur"]))]))),128))])}var zi={name:"CustomerInformationBasic",props:{fields:{type:Array,default:()=>[]}},data(){return{information:{},wpAccountInfo:window.ssa_customer_information_defaults?window.ssa_customer_information_defaults:null}},watch:{information:{handler(){this.setAppointmentProp({key:"customer_information",value:this.information})},deep:!0}},beforeMount(){let e;this.appointment.customer_information&&(e=c.a.cloneDeep(this.appointment.customer_information)),this.fields.forEach(t=>{let n="";e&&Object.prototype.hasOwnProperty.call(e,t.field)&&(n=e[t.field]),this.information[t.field]=n}),this.wpAccountInfo&&!this.modeEdit&&Object.keys(this.wpAccountInfo).map(e=>{Object.prototype.hasOwnProperty.call(this.information,e)&&!this.information[e]&&(this.information=Object.assign({},c.a.cloneDeep(this.information),{[e]:this.wpAccountInfo[e]}))}),this.setAppointmentProp({key:"customer_information",value:this.information})},computed:{...Object(s["e"])(["appointment","modeEdit","translations"]),...Object(s["c"])(["selectedAppointmentType","slugify"])},methods:{validate(){this.$emit("validate")},validatePhone(e,t,n){let i={field:e,valid:n};t&&this.information[e]||(i.valid=!0),this.$emit("validatePhone",i)},...Object(s["d"])(["setAppointmentProp"])}};const Fi=W()(zi,[["render",Ni]]);var qi=Fi;const Ji={class:"plus customer-information-container"};function Ui(e,t,n,s,a,o){const l=Object(i["E"])("foxy-textfield"),c=Object(i["E"])("foxy-phone-field"),r=Object(i["E"])("foxy-checkbox"),d=Object(i["E"])("foxy-fieldset"),p=Object(i["E"])("foxy-radio");return Object(i["y"])(),Object(i["g"])("div",Ji,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.fields,(n,s)=>(Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(["form-field","field-"+e.slugify(n.field)+"-"+s]),key:s},["single-text"===n.type||"multi-text"===n.type?(Object(i["y"])(),Object(i["e"])(l,{key:0,modelValue:a.information[n.field],"onUpdate:modelValue":e=>a.information[n.field]=e,label:e.translations.appointmentTypes.customer_information[n.field]?e.translations.appointmentTypes.customer_information[n.field]:n.field,"leading-icon":n.icon,multiline:"multi-text"===n.type,required:n.required,helptext:n.helptext,"helptext-persistent":n.error,"helptext-validation":n.error,valid:!n.error,id:e.slugify(n.field),name:e.slugify(n.field),onBlur:o.validate},null,8,["modelValue","onUpdate:modelValue","label","leading-icon","multiline","required","helptext","helptext-persistent","helptext-validation","valid","id","name","onBlur"])):Object(i["f"])("",!0),"phone"===n.type?(Object(i["y"])(),Object(i["e"])(c,{key:1,modelValue:a.information[n.field],"onUpdate:modelValue":e=>a.information[n.field]=e,label:e.translations.appointmentTypes.customer_information[n.field]?e.translations.appointmentTypes.customer_information[n.field]:n.field,"input-options":{id:e.slugify(n.field)},"leading-icon":n.icon?n.icon:"phone",helptext:n.helptext,"helptext-persistent":n.error,"helptext-validation":n.error,required:n.required,placeholder:e.translations.inputs.phone.placeholder,onValidate:e=>o.validatePhone(n.field,n.required,e)},null,8,["modelValue","onUpdate:modelValue","label","input-options","leading-icon","helptext","helptext-persistent","helptext-validation","required","placeholder","onValidate"])):Object(i["f"])("",!0),o.firstPhoneIndex===s?(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},[o.displayAllowSms?(Object(i["y"])(),Object(i["e"])(r,{key:0,id:"allow-sms",name:"allow-sms",modelValue:o.allow_sms,"onUpdate:modelValue":t[0]||(t[0]=e=>o.allow_sms=e),label:e.translations.booking.smsOptIn,style:{"margin-top":"0","margin-left":"36px"}},null,8,["modelValue","label"])):Object(i["f"])("",!0)],64)):Object(i["f"])("",!0),"checkboxes"===n.type?(Object(i["y"])(),Object(i["e"])(d,{key:3,content:"checkbox-list",legend:n.field,icon:n.icon,helptext:n.helptext,required:n.required,invalid:n.error},{default:Object(i["V"])(()=>[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.values,(e,t)=>(Object(i["y"])(),Object(i["e"])(r,{key:t,modelValue:a.information[n.field],"onUpdate:modelValue":e=>a.information[n.field]=e,value:e,label:e,onChange:o.validate},null,8,["modelValue","onUpdate:modelValue","value","label","onChange"]))),128))]),_:2},1032,["legend","icon","helptext","required","invalid"])):Object(i["f"])("",!0),"radios"===n.type?(Object(i["y"])(),Object(i["e"])(d,{key:4,content:"radio-list",legend:n.field,icon:n.icon,helptext:n.helptext,required:n.required,invalid:n.error},{default:Object(i["V"])(()=>[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(n.values,(e,t)=>(Object(i["y"])(),Object(i["e"])(p,{key:t,modelValue:a.information[n.field],"onUpdate:modelValue":e=>a.information[n.field]=e,value:e,label:e,name:n.field,onChange:o.validate},null,8,["modelValue","onUpdate:modelValue","value","label","name","onChange"]))),128))]),_:2},1032,["legend","icon","helptext","required","invalid"])):Object(i["f"])("",!0)],2))),128)),e.settings.installed.mailchimp&&e.settings.mailchimp.enabled&&e.selectedAppointmentType.mailchimp.optin_list?(Object(i["y"])(),Object(i["e"])(r,{key:0,modelValue:o.mailchimp_list_id,"onUpdate:modelValue":t[1]||(t[1]=e=>o.mailchimp_list_id=e),name:"mailchimp-optin",id:"mailchimp-optin",value:e.selectedAppointmentType.mailchimp.optin_list,label:e.selectedAppointmentType.mailchimp.optin_text},null,8,["modelValue","value","label"])):Object(i["f"])("",!0)])}var Hi={name:"CustomerInformationPlus",props:{fields:{type:Array,default:()=>[]}},data(){return{information:{},wpAccountInfo:window.ssa_customer_information_defaults?window.ssa_customer_information_defaults:void 0,phone:""}},watch:{information:{handler(){this.setAppointmentProp({key:"customer_information",value:this.information})},deep:!0}},beforeMount(){let e;this.appointment.customer_information&&(e=c.a.cloneDeep(this.appointment.customer_information)),this.modeEdit&&(this.information=e),this.fields.forEach(t=>{let n="checkboxes"===t.type?[]:"";e&&Object.prototype.hasOwnProperty.call(e,t.field)&&(n=e[t.field]),this.information[t.field]=n}),this.wpAccountInfo&&Object.keys(this.wpAccountInfo).map(e=>{Object.prototype.hasOwnProperty.call(this.information,e)&&!this.information[e]&&(this.information=Object.assign({},c.a.cloneDeep(this.information),{[e]:this.wpAccountInfo[e]}))}),this.setAppointmentProp({key:"customer_information",value:this.information})},mounted(){Object.prototype.hasOwnProperty.call(this.settings,"sms")&&!1===_(this.settings.sms.opt_in)&&this.setAppointmentProp({key:"allow_sms",value:!0}),this.shouldDisplayOptinNotifications&&this.setAppointmentProp({key:"allow_sms",value:!0})},computed:{allow_sms:{get(){return this.appointment.allow_sms},set(e){this.setAppointmentProp({key:"allow_sms",value:e})}},displayAllowSms(){return!!this.selectedAppointmentType.has_sms&&(!this.selectedAppointmentType.notifications.notifications_opt_in.enabled||!this.selectedAppointmentType.notifications.notifications_opt_in.label)},firstPhoneIndex(){if(!this.selectedAppointmentType.has_sms)return-1;let e=this.selectedAppointmentType.custom_customer_information;return e.findIndex(e=>"phone"===e.type)},mailchimp_list_id:{get(){return this.appointment.mailchimp_list_id},set(e){this.setAppointmentProp({key:"mailchimp_list_id",value:e})}},...Object(s["e"])(["appointment","settings","translations"]),...Object(s["c"])(["selectedAppointmentType","slugify","shouldDisplayOptinNotifications"])},methods:{validate(){this.$emit("validate")},validatePhone(e,t,n){let i={field:e,valid:n};t&&this.information[e]||(i.valid=!0),this.$emit("validatePhone",i)},...Object(s["d"])(["setAppointmentProp"])}};n("002f");const $i=W()(Hi,[["render",Ui],["__scopeId","data-v-678494af"]]);var Wi=$i;function Gi(e,t,n,s,a,o){const l=Object(i["E"])("foxy-empty");return Object(i["y"])(),Object(i["g"])("div",null,["stripe"===o.payment_method?(Object(i["y"])(),Object(i["e"])(l,{key:0,label:n.message,loading:!0},null,8,["label"])):(Object(i["y"])(),Object(i["e"])(l,{key:1,label:n.message,loading:!0,description:e.translations.booking.paypalMessage},null,8,["label","description"]))])}var Ki={name:"PaymentProcessing",props:{message:{type:String,default:""}},data(){return{}},computed:{payment_method(){return this.appointment.payment_method.toLowerCase()},...Object(s["e"])(["appointment","translations"])}};const Xi=W()(Ki,[["render",Gi]]);var Yi=Xi;const Qi={class:"payment-options"},Zi={class:"price-row"},es={class:"label"},ts={class:"value"},ns={class:"price-row"},is={class:"label"},ss={class:"value"},as={class:"payment-description",id:"payment-description"},os={key:0,class:"price-row"},ls={class:"label"},cs={class:"value"},rs={key:0},ds={key:0,class:"policy-box_error-message",id:"refund-policy-error"};function ps(e,t,n,s,a,o){const l=Object(i["E"])("currency-code"),c=Object(i["E"])("foxy-radio"),r=Object(i["E"])("foxy-fieldset"),d=Object(i["E"])("foxy-checkbox");return Object(i["y"])(),Object(i["g"])("div",Qi,[Object(i["h"])("div",Zi,[Object(i["h"])("div",es,Object(i["J"])(e.translations.payments.price),1),Object(i["h"])("div",ts,[Object(i["k"])(l,{price:parseFloat(e.selectedAppointmentType.payments.price),currency:e.selectedAppointmentType.payments.currency},null,8,["price","currency"])])]),Object(i["h"])("div",ns,[Object(i["h"])("div",is,Object(i["J"])(e.translations.payments.paymentMethod),1),Object(i["h"])("div",ss,[Object(i["k"])(r,{content:"radio-list",legend:e.translations.payments.paymentMethod,"legend-classes":"screen-reader-text",required:!0},{default:Object(i["V"])(()=>[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.enabled_payment_methods,(n,s)=>(Object(i["y"])(),Object(i["e"])(c,{modelValue:o.payment_method,"onUpdate:modelValue":t[0]||(t[0]=e=>o.payment_method=e),id:"payment_method_"+s,key:n,name:"payment_method",value:n,"aria-describedby":"payment-description"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.settings[n].title),1)]),_:2},1032,["modelValue","id","value"]))),128)),"optional"===e.selectedAppointmentType.payments.payment_required?(Object(i["y"])(),Object(i["e"])(c,{key:0,modelValue:o.payment_method,"onUpdate:modelValue":t[1]||(t[1]=e=>o.payment_method=e),id:"pay_later",name:"payment_method",value:"pay_later"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.payments.payLater),1)]),_:1},8,["modelValue"])):Object(i["f"])("",!0),Object(i["h"])("p",as,Object(i["J"])(o.payment_method_description),1)]),_:1},8,["legend"])])]),e.selectedAppointmentType.payments.refund_policy?(Object(i["y"])(),Object(i["g"])("div",os,[Object(i["h"])("div",ls,Object(i["J"])(e.translations.payments.refundPolicy),1),Object(i["h"])("div",cs,[Object(i["h"])("span",null,Object(i["J"])(e.selectedAppointmentType.payments.refund_policy),1),o.refundPolicyRequired?(Object(i["y"])(),Object(i["g"])("div",rs,[Object(i["k"])(d,{id:"refund_policy_required",name:"refund_policy_required",modelValue:a.isRefundPolicyChecked,"onUpdate:modelValue":t[2]||(t[2]=e=>a.isRefundPolicyChecked=e),label:e.selectedAppointmentType.payments.refund_policy_checkbox_label+"*","aria-required":"true","aria-describedby":"refund-policy-error"},null,8,["modelValue","label"]),a.displayPolicyRequiredError?(Object(i["y"])(),Object(i["g"])("p",ds,Object(i["J"])(e.translations.errors.fieldRequired),1)):Object(i["f"])("",!0)])):Object(i["f"])("",!0)])])):Object(i["f"])("",!0)])}var us={name:"PaymentOptions",components:{CurrencyCode:K},data(){return{valid:!0,displayPolicyRequiredError:!1,isRefundPolicyChecked:!1}},mounted(){this.setAppointmentProp({key:"payment_method",value:this.appointment.payment_method?this.appointment.payment_method:this.enabled_payment_methods[0]})},computed:{payment_method:{get(){return this.appointment.payment_method},set(e){this.setAppointmentProp({key:"payment_method",value:e})}},payment_method_description(){var e,t;let n=this.appointment.payment_method;if(n&&"pay-later"!==n)return null===(e=this.settings)||void 0===e||null===(t=e[n])||void 0===t?void 0:t.description},enabled_payment_methods(){return this.selectedAppointmentType.payments.payment_methods.filter(e=>this.settings[e].enabled)},refundPolicyRequired(){var e;return!(null===(e=this.selectedAppointmentType.payments)||void 0===e||!e.refund_policy_required)&&_(this.selectedAppointmentType.payments.refund_policy_required)},...Object(s["e"])(["appointment","settings","translations"]),...Object(s["c"])(["displayPrice","selectedAppointmentType"])},methods:{validate(){return this.refundPolicyRequired&&(this.valid=this.isRefundPolicyChecked,this.displayPolicyRequiredError=!this.valid),this.valid},...Object(s["d"])(["setAppointmentProp"])}};n("8217");const ms=W()(us,[["render",ps]]);var bs=ms;const hs=["src"];function ys(e,t,n,s,a,o){const l=Object(i["E"])("foxy-button"),c=Object(i["E"])("foxy-empty"),r=Object(i["E"])("foxy-dialog-title"),d=Object(i["E"])("foxy-notification"),p=Object(i["E"])("foxy-dialog-content"),u=Object(i["E"])("foxy-dialog-footer"),m=Object(i["E"])("foxy-dialog");return Object(i["y"])(),Object(i["g"])("div",null,[Object(i["k"])(l,{mode:"raised",disabled:n.processing,onClick:o.checkFields},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.payments.stripe.bookAndPayLabel),1)]),_:1},8,["disabled","onClick"]),Object(i["k"])(m,{modelValue:a.isOpen,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isOpen=e),ref:"paymentForm",class:"ssa-stripe-dialog"},{default:Object(i["V"])(()=>[a.loading?(Object(i["y"])(),Object(i["e"])(c,{key:0,class:"ssa-stripe-loading",loading:!0,label:o.loadingMessage},null,8,["label"])):Object(i["f"])("",!0),Object(i["h"])("form",{class:Object(i["s"])(["ssa-stripe-form",{hidden:a.loading}])},[Object(i["h"])("img",{src:o.stripe_image_url,class:"ssa-stripe-logo"},null,8,hs),Object(i["k"])(r,null,{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(o.stripe_description),1)]),_:1}),Object(i["k"])(p,null,{default:Object(i["V"])(()=>[a.error?(Object(i["y"])(),Object(i["e"])(d,{key:0,icon:"error",theme:"red"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(a.error),1)]),_:1})):Object(i["f"])("",!0),t[1]||(t[1]=Object(i["h"])("div",{id:"ssa-stripe-payment"},null,-1))]),_:1,__:[1]}),Object(i["k"])(u,{class:"ssa-stripe-actions"},{default:Object(i["V"])(()=>[Object(i["k"])(l,{class:"ssa-stripe-cancel-btn",onClick:Object(i["Y"])(o.closeHandler,["prevent"])},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.payments.stripe.cancel),1)]),_:1},8,["onClick"]),Object(i["k"])(l,{mode:"raised",onClick:Object(i["Y"])(o.validateThenProcessPayment,["prevent"]),class:"ssa-stripe-confirm-btn"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.payments.stripeLabel),1)]),_:1},8,["onClick"])]),_:1})],2)]),_:1},8,["modelValue"])])}var fs={name:"PaymentStripe",mixins:[L],props:{valid:Boolean,processing:Boolean},data(){return{token:"",paymentEl:null,stripe:null,elements:null,error:null,secret:null,loading:!1,loaded:!1,confirming:!1,isOpen:!1}},mounted(){this.stripe=window.Stripe(this.publishable_key),window.addEventListener("popstate",this.closeHandler);const e=window.innerHeight,t=document.getElementById("ssa-booking-app").clientHeight;if(t-e>100){const e=document.querySelector(".mdc-dialog__container");e.style.alignItems="flex-end",e.style.paddingBottom="50px"}},beforeDestroy(){this.paymentEl&&this.paymentEl.destroy(),window.removeEventListener("popstate",this.closeHandler)},computed:{publishable_key(){return this.settings.stripe.test_mode_enabled?this.settings.stripe.test_publishable_key:this.settings.stripe.publishable_key},stripe_image_url(){return this.api.site_icon_url?this.api.site_icon_url:this.api.booking_static_url+"/images/payments/stripe.png"},stripe_name(){return this.settings.global.company_name},stripe_description(){return this.selectedAppointmentType.title+" "+this.displayStartTime+" "+this.formatTimezone()},stripe_price(){return"JPY"===this.selectedAppointmentType.payments.currency?this.selectedAppointmentType.payments.price:100*this.selectedAppointmentType.payments.price},stripe_currency(){return this.selectedAppointmentType.payments.currency},loadingMessage(){return this.confirming?this.translations.payments.stripe.processing:this.translations.payments.loading},...Object(s["e"])(["api","appointment","settings","translations"]),...Object(s["c"])(["selectedAppointmentType","displayStartTime","formatTimezone"])},methods:{stripe_return_url(){if(!this.appointment.public_edit_url)return;let e=new URL(window.top.location.href);return window.ssa_embed_settings&&window.ssa_embed_settings.redirect_url&&(e=new URL(window.ssa_embed_settings.redirect_url)),e.searchParams.append("appointment_token",this.appointment.public_token+this.appointment.id),e.href.includes("wp-admin")&&(e=new URL(this.appointment.public_edit_url)),e.searchParams.append("stripe_payment",1),e["href"]},openHandler(){this.isOpen=!0,this.$nextTick(()=>{this.initializePaymentForm()})},checkAppointment(){let e=Object.prototype.hasOwnProperty.call(this.appointment,"id")&&this.appointment.id;this.$emit("checkAppointment"),this.emitTrackingEvent("paymentInitiated"),e?this.saveAppointment(this.appointment).then(()=>{this.$emit("appointmentSaved"),this.openHandler()}).catch(e=>{console.log(e),this.$emit("bookingError",e)}):this.saveNewAppointment().then(()=>{this.$emit("appointmentSaved"),this.openHandler()}).catch(e=>{console.log(e),this.$emit("bookingError",e)})},checkFields(e){this.$emit("validate"),this.$nextTick(()=>{this.valid&&(this.checkAppointment(),e.preventDefault())})},closeHandler(){this.isOpen=!1},initializePaymentForm(){this.loading=!0,this.createPaymentIntent({receipt_email:this.appointment.customer_information.Email,price:this.stripe_price,currency:this.stripe_currency,description:this.stripe_description,name:this.stripe_name}).then(e=>{this.secret=e,this.elements=this.stripe.elements({clientSecret:e}),this.paymentEl=this.elements.create("payment"),this.loading=!1,window.parent.postMessage(`[iFrameSizer]iFrameResizer0:${window.document.body.scrollHeight}:${window.document.body.scrollWidth}:stripeModalOpened`,this.api.home_url),this.$nextTick(()=>{this.paymentEl.mount("#ssa-stripe-payment")})})},validateThenProcessPayment(){this.elements.submit().then(e=>{e.error||this.processPayment()})},processPayment(){this.loading=!0,this.confirming=!0,this.error=null,this.stripe.confirmPayment({elements:this.elements,confirmParams:{return_url:this.stripe_return_url()},redirect:"if_required"}).then(e=>{if(e.error){var t;"card_error"===e.error.type||"validation_error"===e.error.type?this.error=e.error.message:this.error=this.translations.payments.paymentFailed,this.savePayment({appointment_id:this.appointment.id,appointment_token:this.appointment.public_token,gateway:"stripe",gateway_payload:e}),this.checkPayment(null===(t=e.error)||void 0===t?void 0:t.payment_intent)}else{const t=e.paymentIntent;this.closeHandler(),this.checkPayment(t)}this.loading=!1,this.confirming=!1})},checkPayment(e){switch(null===e||void 0===e?void 0:e.status){case"succeeded":case"processing":this.$emit("processPayment"),this.savePayment({appointment_id:this.appointment.id,appointment_token:this.appointment.public_token,gateway:"stripe",gateway_payload:e}).then(()=>{this.$emit("paymentSuccessful")}).catch(e=>{this.$emit("paymentFailed",e)});break;case"requires_payment_method":this.$emit("paymentFailed","Your payment was not successful, please try again");break;default:this.$emit("paymentFailed","Something went wrong.");break}},...Object(s["b"])(["saveNewAppointment","saveAppointment","savePayment","createPaymentIntent"])}};n("6230");const Os=W()(fs,[["render",ys]]);var js=Os;const gs=["action"],vs=["value"],_s=["value"],ks=["value"],Ss=["value"],xs=["value"],As=["value"],Ts=["value"],ws=["value"],Cs=["value"],Es=["value"],Is=["value"];function Ds(e,t,n,s,a,o){const l=Object(i["E"])("foxy-button");return Object(i["y"])(),Object(i["g"])("form",{action:o.paypal_form_url,novalidate:"",method:"post",onSubmit:t[0]||(t[0]=Object(i["Y"])((...e)=>o.validate&&o.validate(...e),["stop","prevent"])),ref:"paypal_form",target:"_parent"},[t[1]||(t[1]=Object(i["h"])("input",{type:"hidden",name:"SOLUTIONTYPE",value:"Sole"},null,-1)),t[2]||(t[2]=Object(i["h"])("input",{type:"hidden",name:"cmd",value:"_xclick"},null,-1)),t[3]||(t[3]=Object(i["h"])("input",{type:"hidden",name:"upload",value:"1"},null,-1)),Object(i["h"])("input",{type:"hidden",name:"business",value:e.settings.paypal.email},null,8,vs),Object(i["h"])("input",{type:"hidden",name:"currency_code",value:o.paypal_currency},null,8,_s),Object(i["h"])("input",{type:"hidden",name:"item_name",value:o.paypal_item_name},null,8,ks),Object(i["h"])("input",{type:"hidden",name:"amount",value:o.paypal_price},null,8,Ss),Object(i["h"])("input",{type:"hidden",name:"item_number",value:e.appointment.id},null,8,xs),Object(i["h"])("input",{type:"hidden",name:"custom",value:"ssa_"+e.appointment.payment_id},null,8,As),Object(i["h"])("input",{type:"hidden",name:"return",value:o.paypal_success_return_url},null,8,Ts),Object(i["h"])("input",{type:"hidden",name:"cancel_return",value:o.paypal_cancel_return_url},null,8,ws),Object(i["h"])("input",{type:"hidden",name:"notify_url",value:e.settings.paypal.ipn_url},null,8,Cs),Object(i["h"])("input",{type:"hidden",name:"email",value:e.appointment.customer_information.Email},null,8,Es),Object(i["h"])("input",{type:"hidden",name:"invoice",value:e.appointment.purchase_key},null,8,Is),Object(i["k"])(l,{type:"submit",mode:"raised"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.payments.paypal.bookAndPayLabel),1)]),_:1})],40,gs)}var Ps={name:"PaymentPaypal",mixins:[L],props:{valid:Boolean,processing:Boolean},data(){return{}},computed:{paypal_item_name(){return this.selectedAppointmentType.title+" "+this.displayStartTime+" "+this.formatTimezone()},paypal_price(){return this.selectedAppointmentType.payments.price},paypal_currency(){return this.selectedAppointmentType.payments.currency},paypal_form_url(){return this.settings.paypal.sandbox_enabled?"https://www.sandbox.paypal.com/cgi-bin/webscr":"https://www.paypal.com/cgi-bin/webscr"},paypal_success_return_url(){if(!this.appointment.public_edit_url)return;let e=new URL(window.top.location.href);return window.ssa_embed_settings&&window.ssa_embed_settings.redirect_url&&(e=new URL(window.ssa_embed_settings.redirect_url)),e.searchParams.append("appointment_token",this.appointment.public_token+this.appointment.id),e.href.includes("wp-admin")&&(e=new URL(this.appointment.public_edit_url)),e.searchParams.append("paypal_success",1),e.searchParams.append("paypal_payment",1),e},paypal_cancel_return_url(){if(!this.appointment.public_edit_url)return;let e=new URL(this.appointment.public_edit_url);return e.searchParams.delete("appointment_action"),e.searchParams.append("paypal_cancel",1),e},...Object(s["e"])(["appointment","settings","translations"]),...Object(s["c"])(["selectedAppointmentType","displayStartTime","formatTimezone"])},methods:{validate(){this.$emit("validate"),this.$nextTick(()=>{this.valid&&this.checkAppointment()})},checkAppointment(){let e=Object.prototype.hasOwnProperty.call(this.appointment,"id")&&this.appointment.id;this.$emit("checkAppointment"),this.emitTrackingEvent("paymentInitiated"),e?this.saveAppointment(this.appointment).then(()=>{this.$emit("appointmentSaved"),this.sendPayment()}).catch(e=>{console.log(e),this.$emit("bookingError",e)}):this.saveNewAppointment().then(()=>{this.$emit("appointmentSaved"),this.sendPayment()}).catch(e=>{console.log(e),this.$emit("bookingError",e)})},sendPayment(){this.$emit("processPayment"),this.savePaypalPayment({appointment_id:this.appointment.id,appointment_token:this.appointment.public_token,gateway:"paypal"}).then(()=>{this.$nextTick(()=>{this.$refs["paypal_form"].submit()})}).catch(e=>{this.$emit("paymentFailed",e)})},...Object(s["b"])(["saveNewAppointment","savePaypalPayment","saveAppointment"])}};const Vs=W()(Ps,[["render",Ds]]);var Ls=Vs;const Ms={class:"note-review"},Bs={class:"note-review-title"},Rs={class:"note-review-actions"},Ns={class:"screen-reader-text"},zs={key:0};function Fs(e,t,n,s,a,o){const l=Object(i["E"])("foxy-icon"),c=Object(i["E"])("foxy-icon-button"),r=Object(i["E"])("foxy-dialog-title"),d=Object(i["E"])("appointment-start-end"),p=Object(i["E"])("foxy-textfield"),u=Object(i["E"])("foxy-dialog-content"),m=Object(i["E"])("foxy-dialog-button"),b=Object(i["E"])("foxy-dialog-footer"),h=Object(i["E"])("foxy-dialog");return Object(i["y"])(),Object(i["g"])("div",null,[Object(i["h"])("div",Ms,[Object(i["h"])("span",Bs,Object(i["J"])(e.translations.reschedulingDialog.textfieldLabel)+": ",1),Object(i["h"])("span",{class:Object(i["s"])({"note-review-text-fade":!e.reschedulingNote})},Object(i["J"])(o.noteReview),3),Object(i["h"])("div",Rs,[Object(i["k"])(c,{onClick:o.openReschedulingNoteDialog},{default:Object(i["V"])(()=>[Object(i["k"])(l,{icon:e.reschedulingNote?"edit":"add_circle"},null,8,["icon"]),Object(i["h"])("span",Ns,Object(i["J"])(e.reschedulingNote?e.translations.reschedulingDialog.review.screenReader.edit:e.translations.reschedulingDialog.review.screenReader.add),1)]),_:1},8,["onClick"])])]),a.showDialog?(Object(i["y"])(),Object(i["g"])("div",zs,[Object(i["k"])(h,{id:"rescheduling-note-dialog",modelValue:a.showDialog,"onUpdate:modelValue":t[1]||(t[1]=e=>a.showDialog=e),"onMdcdialog:closing":o.closeNoteDialog},{default:Object(i["V"])(()=>[Object(i["k"])(r,null,{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.reschedulingDialog.title),1)]),_:1}),Object(i["k"])(u,null,{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.reschedulingDialog.text)+": ",1),Object(i["k"])(d),Object(i["k"])(p,{modelValue:a.note,"onUpdate:modelValue":t[0]||(t[0]=e=>a.note=e),label:e.translations.reschedulingDialog.textfieldLabel,helptext:e.translations.reschedulingDialog.textfieldHelpText,"helptext-persistent":"",multiline:"",cols:"60",rows:"3",fullwidth:""},null,8,["modelValue","label","helptext"])]),_:1}),Object(i["k"])(b,null,{default:Object(i["V"])(()=>[Object(i["k"])(m,{onClick:o.clearAndClose,onKeydown:Object(i["X"])(o.clearAndClose,["enter"]),action:"accept"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(""!==a.note?e.translations.reschedulingDialog.actions.clearAndClose:e.translations.reschedulingDialog.actions.close),1)]),_:1},8,["onClick","onKeydown"]),Object(i["k"])(m,{action:"accept",mode:"raised",onClick:o.addNote,onKeydown:Object(i["X"])(o.addNote,["enter"])},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.reschedulingDialog.actions.addNote),1)]),_:1},8,["onClick","onKeydown"])]),_:1})]),_:1},8,["modelValue","onMdcdialog:closing"])])):Object(i["f"])("",!0)])}var qs={name:"ReschedulingNoteDialog",components:{AppointmentStartEnd:we},data(){return{showDialog:!1,note:"",modalHasOpened:!1}},mounted(){this.reschedulingNote||this.openReschedulingNoteDialog()},computed:{noteReview(){return this.reschedulingNote?this.reschedulingNote:this.translations.reschedulingDialog.review.none},...Object(s["e"])(["translations","reschedulingNote","appointment"])},methods:{addNote(){this.setReschedulingNote(this.note.trim()),this.showDialog=!1},clearAndClose(){this.setReschedulingNote(""),this.closeNoteDialog()},closeNoteDialog(){this.note="",this.showDialog=!1},openReschedulingNoteDialog(){c.a.isEmpty(this.reschedulingNote)?c.a.isEmpty(this.appointment.rescheduling_note)||this.modalHasOpened||(this.note=this.appointment.rescheduling_note,this.setReschedulingNote(this.note.trim()),this.modalHasOpened=!0):this.note=this.reschedulingNote,this.showDialog=!0},...Object(s["d"])(["setReschedulingNote"])}};n("55c1");const Js=W()(qs,[["render",Fs],["__scopeId","data-v-29d8f01b"]]);var Us=Js;const Hs={class:"resource-group-title"},$s={class:"resource-title"};function Ws(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",null,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(a.displayResources,e=>(Object(i["y"])(),Object(i["g"])("p",{class:"md-subhead",key:e.id},[Object(i["h"])("span",Hs,Object(i["J"])(e.resourceGroup.title)+Object(i["J"])(": "),1),Object(i["h"])("span",$s,Object(i["J"])(e.resourceTitle),1)]))),128))])}var Gs={name:"AppointmentBookedResources",data(){return{displayResources:[]}},mounted(){Object.values(this.appointment.selected_resources).forEach(e=>{let t=this.getResourceGroupInformation(e.resource_group_id);if("identifiable"===t.resource_type){let n=this.getResourceTitle(e.resource_id,t.id);this.displayResources.push({resourceGroup:t,resourceTitle:n})}})},computed:{...Object(s["e"])(["appointment","translations"]),...Object(s["c"])(["selectedAppointmentType"])},methods:{getResourceGroupInformation(e){return this.selectedAppointmentType.resources_objects.find(t=>t.id==e)},getResourceTitle(e,t){if(0!=e){let n=this.getResourceGroupInformation(t),i=n.resources.find(t=>t.id==e);return i.title}return this.translations.resources.toBeAssigned}}};const Ks=W()(Gs,[["render",Ws]]);var Xs=Ks;const Ys={key:0,class:"md-subhead"},Qs={class:"team-member-label"},Zs={class:"team-member-name"},ea={class:"team-member-label"},ta={class:"team-member-name"};function na(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",null,[e.appointment.staff_ids.length||"user_preference"!=e.selectedAppointmentType.staff.required?(Object(i["y"])(!0),Object(i["g"])(i["a"],{key:1},Object(i["C"])(e.appointment.staff_ids,t=>(Object(i["y"])(),Object(i["g"])("p",{class:"md-subhead",key:t},[Object(i["h"])("span",ea,Object(i["J"])(e.translations.teamMembers.selectedMember),1),Object(i["h"])("span",ta,Object(i["J"])(o.getTeamMemberName(t)),1)]))),128)):(Object(i["y"])(),Object(i["g"])("p",Ys,[Object(i["h"])("span",Qs,Object(i["J"])(e.translations.teamMembers.selectedMember),1),Object(i["h"])("span",Zs,Object(i["J"])(e.translations.teamMembers.toBeAssigned),1)]))])}var ia={name:"AppointmentBookedTeamMember",computed:{...Object(s["e"])(["appointment","translations"]),...Object(s["c"])(["selectedAppointmentType"])},methods:{getTeamMemberName(e){if(0!=e){let t=this.selectedAppointmentType.staff_objects.find(t=>t.id==e);return null===t||void 0===t?void 0:t.display_name}return this.translations.teamMembers.toBeAssigned}}};const sa=W()(ia,[["render",na]]);var aa=sa;const oa={class:"confirm customer-information"},la={class:"md-card-header-text"},ca={class:"md-title focus-target",tabindex:"-1"},ra={key:0},da={key:1,class:"md-subheading"},pa={key:0,novalidate:""},ua={key:2},ma={key:3,class:"opt-in-settings"},ba={id:"notifications-optin-desc"};var ha={__name:"CustomerInformation",emits:["nextStep","prevStep"],setup(e,{emit:t}){var n,a;const l=Object(s["f"])(),r=t,d=Object(i["c"])(()=>l.state.translations),p=Object(i["c"])(()=>l.state.settings),u=Object(i["c"])(()=>l.state.appointment),b=Object(i["c"])(()=>l.getters.selectedAppointmentType),h=Object(i["B"])({}),y=Object(i["c"])(()=>l.getters.isResourcesRequired),f=Object(i["c"])(()=>l.getters.isTeamMembersRequired),O=Object(i["c"])(()=>l.state.paymentCanceled),j=Object(i["B"])(l.state.optinNotifications),g=Object(i["c"])(()=>l.getters.shouldDisplayOptinNotifications);function v(){let e=Object.prototype.hasOwnProperty.call(l.state.appointment,"id")&&l.state.appointment.id;q(),N.value?(D.value=d.value.booking.saving,I.value=!0,w.value||A.value||e?T():l.dispatch("saveNewAppointment").then(()=>{r("nextStep")}).catch(e=>{M(e)})):B()}function k(){let e=o.a.utc(),t=o.a.utc(l.state.appointment.start_date,m).startOf("day").locale("en"),n=t.clone().subtract(15,"days").startOf("day").locale("en"),i=o.a.max(e,n).locale("en"),s=i.clone().add(30,"days");h.value={start_date_min:i.clone().locale("en").format(m),start_date_max:s.clone().locale("en").format(m)}}Object(i["U"])(()=>j.value,e=>{l.commit("setAppointmentProp",{key:"opt_in_notifications",value:e}),l.commit("setOptinNotifications",e)},{immediate:!0});const S=Object(i["c"])(()=>l.state.meprMembershipId);!c.a.isEmpty(S.value)&&c.a.isEmpty(null===(n=u.value)||void 0===n||null===(a=n.mepr_membership)||void 0===a?void 0:a.id)&&l.commit("setAppointmentProp",{key:"mepr_membership",value:{id:S,title:""}});const x=Object(i["B"])([]);Object(i["w"])(()=>{if(p.value.installed.license){let e=c.a.cloneDeep(b.value.custom_customer_information);return void(x.value=e.map(e=>(e.error=!1,e.helptext=e.instructions||"",e)))}let e=c.a.cloneDeep(b.value.customer_information.filter(e=>e.display));x.value=e.map(e=>(e.error=!1,e.helptext="",e))});const A=Object(i["c"])(()=>l.state.modeEdit);function T(){l.commit("setAppointmentProp",{key:"edited",value:A.value}),l.dispatch("maybeSaveReschedulingNote",u.value.id),l.dispatch("saveAppointment",u.value).then(()=>{r("nextStep")}).catch(e=>{console.log(e),I.value=!1,P.value=!0,V.value=l.state.translations.errors.bookingFailed})}const w=Object(i["c"])(()=>l.state.modeReschedule),C=l.getters.currentUserCan("ssa_manage_appointments"),E=Object(i["c"])(()=>w.value&&C),I=Object(i["B"])(!1),D=Object(i["B"])(""),P=Object(i["B"])(!1),V=Object(i["B"])(""),L=Object(i["B"])(!1);function M(e){e.message?(V.value=e.message,"appointment_unavailable"===e.code&&(L.value=!0,l.commit("resetRescheduleAppointment"))):V.value=l.state.translations.errors.intro+e,I.value=!1,P.value=!0}async function B(){await Object(i["r"])();let e=document.querySelector(".mdc-text-field--invalid, .mdc-fieldset--invalid");if(!e)return;let t=e.querySelector('input:not([type="search"]), textarea');t&&t.focus()}function R(){I.value=!0,D.value=l.state.translations.general.loadingAvailableSlots,k(),l.dispatch("resetAppointmentSlots"),l.dispatch("callAsync").then(()=>{l.dispatch("fetchAppointmentSlots",h.value).then(()=>{I.value=!1,r("prevStep")}).catch(e=>{console.log(e),I.value=!1,l.commit("setConnectionError",!0)})})}const N=Object(i["B"])(!0);function z(e){let t=x.value.find(t=>t.field===e.field);t.error=!e.valid}function F(){N.value||q()}function q(){N.value=!0,x.value.forEach(e=>{let t=u.value.customer_information[e.field];"string"===typeof t&&(t=t.trim());let n=_(e.required);if(n){let n=!0;"Email"===e.field&&(n=l.getters.validateEmail(t));let i=!0;if("phone"===e.type||!Object.prototype.hasOwnProperty.call(e,"type")&&"Phone"===e.field){let n=!e.error;i=n&&t}if(t&&t.length&&n&&i)e.error=!1,e.helptext=e.instructions||"";else{N.value=!1,e.error=!0;let t=l.state.translations.appointmentTypes.customer_information[e.field]?l.state.translations.appointmentTypes.customer_information[e.field]:e.field;e.helptext=n?i?t+" "+l.state.translations.errors.requiredField:l.state.translations.errors.requiredPhone:l.state.translations.errors.requiredEmail}}if(H.value&&X.value){let e=X.value.validate();e||(N.value=e)}})}const J=Object(i["B"])(!1),U=Object(i["B"])(""),H=Object(i["c"])(()=>l.getters.showPaymentUI(b.value)),$=Object(i["B"])(""),W=Object(i["B"])(!1),G=Object(i["c"])(()=>{var e;return null===(e=l.state.appointment.payment_method)||void 0===e?void 0:e.toLowerCase()}),X=Object(i["B"])(null);function Y(){U.value=l.state.translations.booking.checkAppointment,J.value=!0}function Q(){U.value=l.state.translations.booking.bookingAppointment,l.dispatch("fetchAppointment",{add_to_calendar_links:!0}).then(()=>{J.value=!1,"booked"===u.value.status&&l.commit("setStepByTitle","confirmation")}).catch(e=>{console.log(e),l.commit("setConnectionError",!0)})}function Z(e){l.dispatch("fetchAppointment").then(()=>{J.value=!1,$.value="failed"===e?l.state.translations.payments.paymentFailed:e,W.value=!0}).catch(e=>{console.log(e),l.commit("setConnectionError",!0)})}function ee(){U.value=l.state.translations.booking.processingPayment[G.value],J.value=!0}function te(){I.value=!0}function ne(){J.value=!1}return(e,t)=>{const n=Object(i["E"])("foxy-empty"),s=Object(i["E"])("foxy-button"),a=Object(i["E"])("foxy-card-header"),o=Object(i["E"])("foxy-checkbox"),l=Object(i["E"])("foxy-card-content"),c=Object(i["E"])("foxy-card-actions"),r=Object(i["E"])("foxy-card"),m=Object(i["E"])("foxy-snackbar");return Object(i["y"])(),Object(i["g"])("div",oa,[I.value?(Object(i["y"])(),Object(i["e"])(n,{key:0,label:D.value,loading:!0},null,8,["label"])):P.value?(Object(i["y"])(),Object(i["e"])(n,{key:1,label:d.value.errors.heading,description:V.value},{default:Object(i["V"])(()=>[Object(i["k"])(s,{mode:"raised",onClick:R},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(d.value.errors.pickNewTime),1)]),_:1})]),_:1},8,["label","description"])):(Object(i["y"])(),Object(i["e"])(r,{key:2},{default:Object(i["V"])(()=>[Object(i["k"])(a,null,{default:Object(i["V"])(()=>[Object(i["h"])("div",la,[Object(i["h"])("h1",ca,Object(i["J"])(d.value.booking.infoHeader)+" "+Object(i["J"])(b.value.title),1),Object(i["k"])(we),y.value?(Object(i["y"])(),Object(i["e"])(Object(i["O"])(Xs),{key:0})):Object(i["f"])("",!0),f.value?(Object(i["y"])(),Object(i["e"])(Object(i["O"])(aa),{key:1})):Object(i["f"])("",!0)])]),_:1}),Object(i["k"])(l,null,{default:Object(i["V"])(()=>[E.value?(Object(i["y"])(),Object(i["g"])("div",ra,[Object(i["k"])(Us)])):Object(i["f"])("",!0),b.value.instructions?(Object(i["y"])(),Object(i["g"])("p",da,Object(i["J"])(b.value.instructions),1)):Object(i["f"])("",!0),J.value?(Object(i["y"])(),Object(i["e"])(Yi,{key:2,message:U.value},null,8,["message"])):Object(i["f"])("",!0),J.value?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])(i["a"],{key:3},[x.value.length?(Object(i["y"])(),Object(i["g"])("form",pa,[p.value.installed.license?(Object(i["y"])(),Object(i["e"])(Wi,{key:0,fields:x.value,onValidate:F,onValidatePhone:z},null,8,["fields"])):(Object(i["y"])(),Object(i["e"])(qi,{key:1,fields:x.value,onValidate:F,onValidatePhone:z},null,8,["fields"]))])):Object(i["f"])("",!0),H.value?(Object(i["y"])(),Object(i["e"])(bs,{key:1,ref_key:"_paymentOptions",ref:X},null,512)):Object(i["f"])("",!0),A.value&&parseFloat(u.value.payment_received)?(Object(i["y"])(),Object(i["g"])("p",ua,[Object(i["h"])("strong",null,Object(i["J"])(d.value.payments.paymentReceived),1),u.value.payment_received?(Object(i["y"])(),Object(i["e"])(K,{key:0,price:parseFloat(u.value.payment_received),currency:b.value.payments.currency},null,8,["price","currency"])):Object(i["f"])("",!0)])):Object(i["f"])("",!0),g.value?(Object(i["y"])(),Object(i["g"])("div",ma,[Object(i["k"])(o,{id:"opt_in_notifications",name:"opt_in_notifications",modelValue:j.value,"onUpdate:modelValue":t[0]||(t[0]=e=>j.value=e),label:b.value.notifications.notifications_opt_in.label,"aria-describedby":"notifications-optin-desc"},null,8,["modelValue","label"]),Object(i["h"])("p",ba,Object(i["J"])(b.value.notifications.notifications_opt_in.description),1)])):Object(i["f"])("",!0)],64))]),_:1}),Object(i["k"])(c,null,{default:Object(i["V"])(()=>[A.value||w.value?(Object(i["y"])(),Object(i["e"])(s,{key:0,onClick:v,mode:"raised"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(d.value.booking.updateButton),1)]),_:1})):H.value&&"stripe"===u.value.payment_method?(Object(i["y"])(),Object(i["e"])(js,{key:1,onValidate:q,onPaymentSuccessful:Q,onPaymentFailed:Z,onProcessPayment:ee,onCheckAppointment:Y,onAppointmentSaved:ne,onBookingError:M,valid:N.value,processing:J.value},null,8,["valid","processing"])):H.value&&"paypal"===u.value.payment_method?(Object(i["y"])(),Object(i["e"])(Ls,{key:2,onValidate:q,onSavePayment:te,onProcessPayment:ee,onCheckAppointment:Y,onAppointmentSaved:ne,onBookingError:M,valid:N.value,processing:J.value},null,8,["valid","processing"])):(Object(i["y"])(),Object(i["e"])(s,{key:3,mode:"raised",onClick:v},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(d.value.booking.bookButton),1)]),_:1}))]),_:1})]),_:1})),Object(i["k"])(m,{modelValue:W.value,"onUpdate:modelValue":t[1]||(t[1]=e=>W.value=e),position:"top center","timeout-ms":5e3,message:$.value},null,8,["modelValue","message"]),Object(i["k"])(m,{modelValue:O.value,"onUpdate:modelValue":t[2]||(t[2]=e=>O.value=e),position:"top center","timeout-ms":5e3,message:d.value.payments.canceled},null,8,["modelValue","message"])])}}};n("4486");const ya=ha;var fa=ya;const Oa={key:0,class:"confirm cust-info"},ja={class:"md-card-header-text"},ga={class:"md-title focus-target",tabindex:"-1"},va={key:0,class:"md-subheading"},_a=["innerHTML"],ka={key:0},Sa={key:1},xa={key:2,class:"refund-policy_confirmation"};function Aa(e,t,n,s,a,o){const l=Object(i["E"])("appointment-start-end"),c=Object(i["E"])("foxy-card-header"),r=Object(i["E"])("foxy-empty"),d=Object(i["E"])("currency-code"),p=Object(i["E"])("foxy-button"),u=Object(i["E"])("foxy-list-item"),m=Object(i["E"])("foxy-menu"),b=Object(i["E"])("foxy-menu-anchor"),h=Object(i["E"])("foxy-notification"),y=Object(i["E"])("foxy-card-content"),f=Object(i["E"])("appointment-actions"),O=Object(i["E"])("foxy-card-actions"),j=Object(i["E"])("foxy-card");return a.shouldRenderComponent?(Object(i["y"])(),Object(i["g"])("div",Oa,[a.redirecting?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["e"])(j,{key:0},{default:Object(i["V"])(()=>[Object(i["k"])(c,null,{default:Object(i["V"])(()=>[Object(i["h"])("div",ja,[Object(i["h"])("h1",ga,Object(i["J"])(e.translations.booking.confirmHeader)+" "+Object(i["J"])(e.selectedAppointmentType.title),1),Object(i["k"])(l)])]),_:1}),Object(i["k"])(y,null,{default:Object(i["V"])(()=>{var n,s,l,c;return[a.loading?(Object(i["y"])(),Object(i["e"])(r,{key:0,label:e.translations.change.canceling,loading:!0},null,8,["label"])):(Object(i["y"])(),Object(i["g"])(i["a"],{key:1},[e.selectedAppointmentType.instructions?(Object(i["y"])(),Object(i["g"])("p",va,Object(i["J"])(e.selectedAppointmentType.instructions),1)):Object(i["f"])("",!0),(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(o.customerInformationValues,(t,n,s)=>(Object(i["y"])(),Object(i["g"])("p",{key:s,class:Object(i["s"])("confirmation-field-"+e.slugify(n)+"-"+s)},[Object(i["h"])("strong",null,Object(i["J"])(e.translations.appointmentTypes.customer_information[n]?e.translations.appointmentTypes.customer_information[n]:n)+": ",1),"string"===typeof t?(Object(i["y"])(),Object(i["g"])("span",{key:0,innerHTML:t},null,8,_a)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:1},[Object(i["j"])(Object(i["J"])(t.join(", ")),1)],64))],2))),128)),a.displayResources.length>0?(Object(i["y"])(!0),Object(i["g"])(i["a"],{key:1},Object(i["C"])(a.displayResources,t=>(Object(i["y"])(),Object(i["g"])("p",{key:t.id,class:Object(i["s"])("resource-field-"+e.slugify(t.resourceGroup.title)+"-"+t.resourceGroup.id)},[Object(i["h"])("strong",null,Object(i["J"])(t.resourceGroup.title)+Object(i["J"])(": "),1),Object(i["j"])(" "+Object(i["J"])(t.resourceTitle),1)],2))),128)):Object(i["f"])("",!0),null!==(n=e.appointment.staff_ids)&&void 0!==n&&n.length&&e.appointment.staff_ids.length>0?(Object(i["y"])(),Object(i["g"])("p",{key:2,class:Object(i["s"])("confirmation-field-"+e.slugify(e.translations.teamMembers.selectedMember)+"name")},[Object(i["h"])("strong",null,Object(i["J"])(e.translations.teamMembers.selectedMember),1),Object(i["j"])(" "+Object(i["J"])(e.appointment.staff_ids.map(e=>o.getTeamMemberName(e)).join(", ")),1)],2)):Object(i["f"])("",!0),e.showPaymentUI(e.selectedAppointmentType)?(Object(i["y"])(),Object(i["g"])(i["a"],{key:3},[parseFloat(e.appointment.payment_received)?(Object(i["y"])(),Object(i["g"])("p",ka,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.payments.paymentReceived),1),Object(i["k"])(d,{price:parseFloat(e.appointment.payment_received),currency:e.selectedAppointmentType.payments.currency},null,8,["price","currency"])])):Object(i["f"])("",!0),parseFloat(e.appointment.payment_received)||"optional"!=e.selectedAppointmentType.payments.payment_required?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])("p",Sa,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.payments.paymentDue),1),Object(i["k"])(d,{price:e.selectedAppointmentType.payments.price,currency:e.selectedAppointmentType.payments.currency},null,8,["price","currency"])])),o.showRefundPolicy?(Object(i["y"])(),Object(i["g"])("p",xa,[Object(i["h"])("strong",null,Object(i["J"])(e.translations.payments.refundPolicy)+": ",1),Object(i["h"])("span",null,Object(i["J"])(e.selectedAppointmentType.payments.refund_policy),1)])):Object(i["f"])("",!0)],64)):Object(i["f"])("",!0),null!==(s=e.showAddToCalendarButton(e.appointment))&&void 0!==s&&s.show?(Object(i["y"])(),Object(i["e"])(b,{key:4},{default:Object(i["V"])(()=>[Object(i["k"])(p,{mode:"raised",class:"calendar-save",onClick:t[0]||(t[0]=e=>a.calendarSaveOpen=!0)},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSave),1)]),_:1}),Object(i["k"])(m,{modelValue:a.calendarSaveOpen,"onUpdate:modelValue":t[1]||(t[1]=e=>a.calendarSaveOpen=e),"single-selection":!0},{default:Object(i["V"])(()=>[Object.prototype.hasOwnProperty.call(e.appointment,"gcal")?(Object(i["y"])(),Object(i["e"])(u,{key:0,href:e.appointment.gcal.customer,target:"_blank"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSaveGoogle),1)]),_:1},8,["href"])):Object(i["f"])("",!0),o.appointmentIcsLink?(Object(i["y"])(),Object(i["e"])(u,{key:1,href:o.appointmentIcsLink,download:""},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking.calendarSaveOther),1)]),_:1},8,["href"])):Object(i["f"])("",!0)]),_:1},8,["modelValue"])]),_:1})):null!==(l=e.showAddToCalendarButton(e.appointment))&&void 0!==l&&l.show||"replaceWithText"!==(null===(c=e.showAddToCalendarButton(e.appointment))||void 0===c?void 0:c.action)?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["e"])(h,{key:5,icon:"event_available"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.booking[e.showAddToCalendarButton(e.appointment).text]),1)]),_:1}))],64))]}),_:1}),Object(i["k"])(O,null,{default:Object(i["V"])(()=>[Object(i["k"])(f,{headline:!0,loading:a.loading,onCancelComplete:o.confirmCancelation},null,8,["loading","onCancelComplete"])]),_:1})]),_:1})),a.redirecting?(Object(i["y"])(),Object(i["e"])(r,{key:1,label:e.translations.booking.redirecting,loading:!0},null,8,["label"])):Object(i["f"])("",!0)])):Object(i["f"])("",!0)}var Ta={name:"Confirmation",components:{AppointmentActions:Ie,AppointmentStartEnd:we,CurrencyCode:K},mixins:[L],props:{step:{type:Object,default(){return{}}}},data(){return{redirecting:!1,calendarSaveOpen:!1,loading:!1,moment:o.a,momentDateFormat:m,shouldRenderComponent:!1,displayResources:[]}},beforeMount(){c.a.isEmpty(this.appointment)?this.setCurrentStepInt(0):this.shouldRenderComponent=!0},mounted(){this.setModeEdit(!1),this.setModeReschedule(!1),this.setModeSchedule(!1),this.windowLoadedMessage();let e=this.appointment.status;switch(e){case"canceled":this.emitTrackingEvent("bookingCanceled");break;case"booked":this.appointment.edited?this.emitTrackingEvent("bookingEdited"):"0"!==this.appointment.rescheduled_from_appointment_id?this.emitTrackingEvent("bookingRescheduled"):this.emitTrackingEvent("bookingCompleted");break}if(window.ssa_embed_settings&&window.ssa_embed_settings.redirect_url){this.showRedirecting();const e=window.ssa_embed_settings.redirect_url.concat("?appointment_action=edit&appointment_token=",this.appointment.public_token,this.appointment.id);window.top.location.href=e}this.appointment.selected_resources&&Object.values(this.appointment.selected_resources).forEach(e=>{let t=this.getResourceGroupInformation(e.resource_group_id);if("identifiable"===t.resource_type){let n=this.getResourceTitle(e.resource_id,t.id);this.displayResources.push({resourceGroup:t,resourceTitle:n})}})},computed:{appointmentIcsLink(){return Object.prototype.hasOwnProperty.call(this.appointment,"ics")?this.appointment.ics.customer+"?token="+this.appointment.public_token:null},customerInformationValues(){let e={};for(const t in this.appointment.customer_information)this.appointment.customer_information[t].length&&(e[t]=this.appointment.customer_information[t]);return e},showRefundPolicy(){var e,t;const n=null===(e=this.selectedAppointmentType.payments)||void 0===e?void 0:e.refund_policy,i=null===(t=this.selectedAppointmentType.payments)||void 0===t?void 0:t.refund_policy_display_screen;return n&&(!(null!==i&&void 0!==i&&i.length)||i.includes("confirmationScreen"))},...Object(s["e"])(["steps","appointment","timezone","translations"]),...Object(s["c"])(["showPaymentUI","minDay","selectedAppointmentType","urlParams","windowLoadedMessage","stepIndexByTitle","slugify","showAddToCalendarButton"])},methods:{confirmCancelation(){this.loading=!1,this.windowLoadedMessage();const e=this.stepIndexByTitle("confirmation");this.addStepByTitle("editAppointment",e),this.setStepByTitle("editAppointment"),this.removeStepByTitle("confirmation")},resetAvailabilityCache(){let e="month"===this.selectedAppointmentType.booking_layout?75:55;this.fetchAppointmentSlots({start_date_min:this.minDay.clone().tz(this.timezon).utc().format(this.momentDateFormat),start_date_max:this.minDay.clone().add(e,"days").tz(this.timezone).utc().format(this.momentDateFormat)}).then(()=>{}).catch(e=>{console.log(e)})},showLoading(){this.loading=!0},showRedirecting(){this.redirecting=!0},getResourceGroupInformation(e){return this.selectedAppointmentType.resources_objects.find(t=>t.id==e)},getResourceTitle(e,t){if(0!=e){let n=this.getResourceGroupInformation(t),i=n.resources.find(t=>t.id==e);return i.title}},getTeamMemberName(e){if(0!=e){let t=this.selectedAppointmentType.staff_objects.find(t=>t.id==e);return null===t||void 0===t?void 0:t.display_name}},...Object(s["d"])(["setModeEdit","setModeReschedule","setModeSchedule","setCurrentStepInt","setStepByTitle"]),...Object(s["b"])(["addStepByTitle","removeStepByTitle","fetchAppointmentSlots"])}};n("f410");const wa=W()(Ta,[["render",Aa]]);var Ca=wa;const Ea={class:"confirm booking-form-integration"},Ia={class:"md-title focus-target",tabindex:"-1",style:{"margin-bottom":"0"}};function Da(e,t,n,s,a,o){const l=Object(i["E"])("foxy-empty"),c=Object(i["E"])("foxy-button"),r=Object(i["E"])("booking-error"),d=Object(i["E"])("appointment-start-end");return Object(i["y"])(),Object(i["g"])("div",Ea,[a.saving?(Object(i["y"])(),Object(i["e"])(l,{key:0,label:a.savingMessage,loading:!0},null,8,["label"])):a.error?(Object(i["y"])(),Object(i["e"])(r,{key:1,label:e.translations.errors.heading,description:e.errorMesssage},{default:Object(i["V"])(()=>[Object(i["k"])(c,{mode:"raised",onClick:o.pickNewTime},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.errors.pickNewTime),1)]),_:1},8,["onClick"])]),_:1},8,["label","description"])):(Object(i["y"])(),Object(i["g"])(i["a"],{key:2},[Object(i["h"])("p",Ia,Object(i["J"])(e.selectedAppointmentType.title),1),Object(i["k"])(d),"pending_form"===this.appointment.status?(Object(i["y"])(),Object(i["e"])(c,{key:0,onClick:o.editAppointment,mode:"raised",style:{"margin-left":"0"}},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.translations.change.changeTime),1)]),_:1},8,["onClick"])):Object(i["f"])("",!0)],64))])}const Pa={class:"empty-state"},Va={class:"empty-state-container"},La=["src"],Ma={key:1,class:"empty-state-label focus-target",tabindex:"-1"},Ba={key:2,class:"empty-state-description"};function Ra(e,t,n,s,a,o){return Object(i["y"])(),Object(i["e"])(i["b"],{name:"empty-state"},{default:Object(i["V"])(()=>[Object(i["h"])("div",Pa,[Object(i["h"])("div",Va,[n.icon?(Object(i["y"])(),Object(i["g"])("img",{key:0,src:n.icon,class:"empty-state-image"},null,8,La)):Object(i["f"])("",!0),n.label?(Object(i["y"])(),Object(i["g"])("h3",Ma,Object(i["J"])(n.label),1)):Object(i["f"])("",!0),n.description?(Object(i["y"])(),Object(i["g"])("p",Ba,Object(i["J"])(n.description),1)):Object(i["f"])("",!0),Object(i["D"])(e.$slots,"default")])])]),_:3})}var Na={name:"Error",props:{icon:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""}},data(){return{}}};const za=W()(Na,[["render",Ra]]);var Fa=za,qa={name:"FormConfirm",components:{BookingError:Fa,AppointmentStartEnd:we},data(){return{error:!1,errorMessage:"",fetchArgs:{},momentDateFormat:m,saving:!0,savingMessage:"",timeUnavailable:!1}},beforeMount(){(c.a.isEmpty(this.appointment)||c.a.isEmpty(this.selectedAppointmentType.title))&&this.setCurrentStepInt(0)},mounted(){this.setModeEdit(!1),this.setModeSchedule(!1),this.savingMessage=this.translations.booking.saving,this.handleSaveAppointment(),this.resetAvailabilityCache()},computed:{...Object(s["c"])(["minDay","selectedAppointmentType","stepIndexByTitle"]),...Object(s["e"])(["api","appointment","appointmentTypes","frozenType","timeConflict","timezone","translations"])},methods:{setStepToDateTime(){const e=this.stepIndexByTitle("date"),t=this.stepIndexByTitle("express");e>=0?this.setStepByTitle("date"):t>=0?this.setStepByTitle("express"):this.setCurrentStepInt(0)},editAppointment(){this.saving=!0,this.setAppointmentProp({key:"status",value:"abandoned"}),window.parent.postMessage({ssaType:"appointment",id:null},this.api.home_url),this.handleClearAppointment().then(()=>{this.saving=!1,this.setStepToDateTime()})},handleBookingError(e){e.message?(this.errorMessage=e.message,"appointment_unavailable"===e.code&&(this.timeUnavailable=!0,this.resetRescheduleAppointment(),this.setTimeConflict(!0),this.setStepToDateTime())):"string"===typeof e&&(this.errorMessage=this.translations.errors.intro+e),this.error=!0},handleClearAppointment(){return new Promise((e,t)=>{this.setAppointmentProp({key:"update_local",value:!1}),this.saveAppointment(this.appointment).then(()=>{var t,n;let i={},s=!1;i.appointment_type_id=this.appointment.appointment_type_id,"user_preference"==(null===(t=this.selectedAppointmentType.staff)||void 0===t?void 0:t.required)&&(i.staff_ids=this.appointment.staff_ids,s=!0),null!==(n=this.selectedAppointmentType)&&void 0!==n&&n.resources_settings.some(e=>"user_preference"===e.resource_option)&&(i.selected_resources=this.appointment.selected_resources,s=!0),this.setAppointment(i),s&&this.resetDate(),e()}).catch(e=>{console.log(e),t(e)})})},resetDate(){this.setAppointmentProp({key:"start_date",value:""}),this.setAppointmentProp({key:"selected_date",value:""}),this.resetAppointmentSlots(),this.$emit("reloadDate")},handleSaveAppointment(){Object.prototype.hasOwnProperty.call(this.appointment,"id")?this.saveAppointment(this.appointment).then(()=>{this.saving=!1,window.parent.postMessage({ssaType:"appointment",id:this.appointment.id,start_date:this.appointment.start_date},this.api.home_url)}).catch(e=>{console.log(e),this.saving=!1,this.error=!0,this.errorMessage=this.translations.errors.bookingFailed}):(this.setAppointmentProp({key:"status",value:"pending_form"}),this.saveNewAppointment().then(()=>{this.saving=!1,window.parent.postMessage({ssaType:"appointment",id:this.appointment.id,start_date:this.appointment.start_date},this.api.home_url)}).catch(e=>{this.handleBookingError(e)}))},pickNewTime(){this.saving=!0,this.savingMessage=this.translations.general.loadingAvailableSlots,this.resetAppointmentSlots(),this.refreshArgs(),this.callAsync().then(()=>{this.fetchAppointmentSlots(this.fetchArgs).then(()=>{this.saving=!1,this.setStepToDateTime()}).catch(e=>{console.log(e),this.saving=!1,this.setConnectionError(!0)})})},refreshArgs(){let e=o.a.utc(),t=o.a.utc(this.appointment.start_date,this.momentDateFormat).startOf("day"),n=t.clone().subtract(15,"days").startOf("day"),i=o.a.max(e,n),s=i.clone().add(30,"days");this.fetchArgs={start_date_min:i.format(this.momentDateFormat),start_date_max:s.format(this.momentDateFormat)}},resetAvailabilityCache(){let e="month"===this.selectedAppointmentType.booking_layout?75:55;this.fetchAppointmentSlots({start_date_min:this.minDay.clone().tz(this.timezone).utc().format(this.momentDateFormat),start_date_max:this.minDay.clone().add(e,"days").tz(this.timezone).utc().format(this.momentDateFormat)}).then(()=>{}).catch(e=>{console.log(e)})},...Object(s["b"])(["callAsync","fetchAppointmentSlots","saveAppointment","saveNewAppointment","resetAppointmentSlots"]),...Object(s["d"])(["resetRescheduleAppointment","setAppointment","setAppointmentTypeId","setStepByTitle","setAppointmentProp","setConnectionError","setModeEdit","setModeSchedule","setTimeConflict","setCurrentStepInt"])}};const Ja=W()(qa,[["render",Da]]);var Ua=Ja,Ha={name:"BookingAppContainer",props:{parentLoading:{type:Boolean,default:!1}},data(){return{loading:!0}},components:{AppointmentType:te,AppointmentChange:Ve,Confirmation:Ca,CustomerInformation:fa,Date:Nn,FormConfirm:Ua,Time:Ei,Express:Bi,Extras:Dt},watch:{frozenType(){this.manageSelectAppointmentType()},selectedAppointmentType(){this.maybeAdjustStepsExpress()}},mounted(){this.maybeAdjustStepsExpress(),this.manageSelectAppointmentType()},computed:{shouldDisplayBackButton(){return this.modeEdit?this.currentStepInt>1&&!["confirmation","formConfirmation"].includes(this.currentStep.title):!(this.currentStepInt>0&&1===this.visibleAppointmentTypes.length&&("time"===this.currentStep.title&&this.skippedDate||this.skippedDate&&this.skippedTime&&"customerInformation"===this.currentStep.title||"extras"===this.currentStep.title||"express"===this.currentStep.title||"date"===this.currentStep.title&&!this.steps.some(e=>"extras"===e.title)||"date"===this.currentStep.title&&this.skippedResources||"date"===this.currentStep.title&&_(this.selectedAppointmentType.booking_flow_settings.suggest_first_available)))&&(this.currentStepInt>0&&!["confirmation","formConfirmation"].includes(this.currentStep.title))},...Object(s["e"])(["appointmentTypes","frozenType","steps","currentStepInt","skippedResources","skippedDate","skippedTime","modeEdit","modeReschedule","translations","rtl"]),...Object(s["c"])(["currentStep","previousStep","urlParams","appointmentAction","stepIndexByTitle","selectedAppointmentType","visibleAppointmentTypes"])},methods:{manageSelectAppointmentType(){let e=this.steps.findIndex(e=>"appointmentType"===e.title);this.frozenType&&e>=0&&this.removeStepByTitle("appointmentType"),!this.frozenType&&-1===e&&this.appointmentTypes.length>1&&!this.modeEdit&&this.addStepByTitle("appointmentType",0)},setPrevStep(){if(this.skippedDate&&this.skippedTime){this.setSkippedDate(!1),this.setSkippedTime(!1);const e=this.stepIndexByTitle("appointmentType");e>=0?this.setStepByTitle("appointmentType"):this.handlePrevStep()}else if(this.skippedDate&&"date"===this.previousStep.title){this.setSkippedDate(!1);const e=this.stepIndexByTitle("appointmentType");e>=0?this.setStepByTitle("appointmentType"):this.handlePrevStep()}else if(this.skippedTime&&"time"===this.previousStep.title){this.setSkippedTime(!1);const e=this.stepIndexByTitle("date"),t=this.stepIndexByTitle("express");e>=0?this.setStepByTitle("date"):t>=0?this.setStepByTitle("express"):this.handlePrevStep()}else this.skippedResources&&"extras"===this.previousStep.title?(this.setSkippedResources(!1),this.setStepByTitle("appointmentType")):this.handlePrevStep()},maybeAdjustStepsExpress(){this.modeEdit?this.loading=!1:this.selectedAppointmentType?(this.loading=!0,"express"==this.selectedAppointmentType.booking_flow_settings.booking_flow||"express"==this.selectedAppointmentType.booking_flow_settings.fallback_booking_flow&&"first_available"==this.selectedAppointmentType.booking_flow_settings.booking_flow&&!_(this.selectedAppointmentType.booking_flow_settings.suggest_first_available)?this.initApp("express"):this.initApp(),this.loading=!1):this.loading=!1},...Object(s["b"])(["initApp","addStepByTitle","removeStepByTitle"]),...Object(s["d"])(["handleNextStep","handlePrevStep","setStepByTitle","setSkippedResources","setSkippedDate","setSkippedTime","setSteps"])}};n("643c");const $a=W()(Ha,[["render",E]]);var Wa=$a,Ga={name:"App",store:A,components:{BookingApp:Wa},data(){var e;return{error:!1,errorHeading:"",errorIntro:"",errorMessage:"",loading:!0,loadingMessage:"",noConnection:!1,localApi:window.ssa&&window.ssa.api?window.ssa.api:{},user:window.ssa&&window.ssa.user?window.ssa.user:null,localAppointmentTypes:window.ssa_appointment_types?window.ssa_appointment_types:[],localLocale:window.ssa&&window.ssa.locale?window.ssa.locale:"",localIsRtlSupport:window.ssa&&null!==(e=window.ssa.api)&&void 0!==e&&e.is_rtl_support?window.ssa.api.is_rtl_support:null,localSettings:window.ssa_settings?window.ssa_settings:{},preSelectAppointmentType:window.apptTypeId?window.apptTypeId:null,wpTranslations:{}}},beforeCreate(){this.wpTranslations=window.ssa_translations?window.ssa_translations:{},this.$store.commit("setTranslations",this.wpTranslations)},beforeMount(){window.addEventListener("message",this.setAppointmentId,!1)},beforeUnmounted(){window.removeEventListener("message",this.setAppointmentId,!1)},mounted(){this.loadingMessage=this.translations.general.loadingInitial,this.errorHeading=this.translations.errors.heading,this.errorIntro=this.translations.errors.intro,this.initApp(),this.init()},watch:{connection(e){e&&(this.noConnection=!0)},currentStep(e){e&&this.maybeTrackPageview()}},computed:{connection(){return this.connectionError},test_underscore(){let e="hello";return e},...Object(s["e"])(["api","appointment","appointmentTypes","appointmentTypesChecked","connectionError","settings","translations","integration","frozenType","trackingPageview"]),...Object(s["c"])(["appointmentTypeBySlug","appointmentTypeById","selectedAppointmentType","urlParams","currentStep"])},methods:{init(){if("undefined"===typeof this.api&&!c.a.isEmpty(this.localApi))return this.setUser(this.user),this.setApi(this.localApi),this.setRtlSupport(this.localIsRtlSupport),void this.init();if("undefined"===typeof this.api)return this.loading=!0,void this.fetchApi().then(()=>this.init()).catch((e,t)=>{console.log(t),this.showError(this.translations.errors.api)});if(c.a.isEmpty(this.settings)&&!c.a.isEmpty(this.localSettings)){this.setSettings(this.localSettings);let e=this.localLocale?this.localLocale:this.settings.global.locale;return this.setLocale(e),o.a.locale(e),void this.init()}if(c.a.isEmpty(this.settings))return this.loading=!0,this.loadingMessage=this.translations.general.loadingTypes,void this.fetchSettings().then(()=>{this.init();let e=this.localLocale?this.localLocale:this.settings.global.locale;o.a.locale(e)}).catch(e=>{console.log(e),this.showError(this.translations.errors.settings)});if(!this.appointmentTypesChecked&&!c.a.isEmpty(this.localAppointmentTypes))return this.setAppointmentTypesChecked(!0),this.setAppointmentTypes(this.localAppointmentTypes),this.checkAppointmentTypeStep(),void this.init();if(!this.appointmentTypesChecked)return this.loading=!0,void this.fetchAppointmentTypes().then(()=>{this.appointmentTypes.length?(this.checkAppointmentTypeStep(),this.init()):this.showError(this.translations.errors.noAppointmentTypes)}).catch(e=>{console.log(e),this.showError(this.translations.errors.appointmentTypes)});this.urlParams().type||this.preSelectAppointmentType||this.setFrozenType(!1),this.urlParams().types&&this.setFrozenType(!this.urlParams().types.includes(","));const e=this.urlParams();if(e.appointment_token)if(e.appointment_token.length>32){let t=e.appointment_token.substring(0,32),n=e.appointment_token.substring(32);this.setAppointmentProp({key:"id",value:n}),this.setAppointmentProp({key:"public_token",value:t})}else this.setAppointmentProp({key:"id",value:this.token});if(e.integration&&"form"===e.integration&&e.edit){if(!Object.prototype.hasOwnProperty.call(this.appointment,"status"))return this.setAppointmentProp({key:"id",value:Number(e.edit)}),e.token&&this.setAppointmentProp({key:"public_token",value:e.token}),void this.fetchAppointment().then(()=>{this.init()}).catch(e=>{console.log(e),this.returnToSelect()});"pending_form"===this.appointment.status||"booked"===this.appointment.status?this.showConfirmation():this.returnToSelect()}e.mepr_membership_id&&(this.setMeprMembershipId(e.mepr_membership_id),this.setAppointmentProp({key:"mepr_membership",value:{id:e.mepr_membership_id,title:""}})),"undefined"===typeof this.$store.state.telCountryCode&&this.$store.dispatch("fetchTelCountryCode"),this.loading=!1,this.maybeTrackPageview(),this.callAsync()},returnToSelect(){"abandoned"===this.appointment.status&&window.parent.postMessage({ssaType:"appointment",id:null});const e=this.stepIndexByTitle("date"),t=this.stepIndexByTitle("express");this.frozenType&&e>=0?this.setStepByTitle("date"):this.frozenType&&t>=0?this.setStepByTitle("express"):this.setCurrentStepInt(0)},showConfirmation(){this.timezone||this.setTimezone(this.appointment.customer_timezone),this.setStepByTitle("formConfirmation")},checkAppointmentTypeStep(){const e=this.urlParams();if(e.type&&"undefined"!==e.type){let t;t=isNaN(parseInt(e.type))||parseInt(e.type)!=e.type?this.appointmentTypeBySlug(e.type):this.appointmentTypeById(e.type),t?(this.selectAppointmentType(t.id),this.removeStepByTitle("appointmentType")):this.showError(this.translations.errors.noAppointmentTypes)}else this.preSelectAppointmentType?(this.setAppointmentId(this.preSelectAppointmentType),this.removeStepByTitle("appointmentType")):1===this.appointmentTypes.length&&(this.selectAppointmentType(this.appointmentTypes[0].id),this.removeStepByTitle("appointmentType"))},setAppointmentId(e){"object"===typeof e.data&&Object.prototype.hasOwnProperty.call(e.data,"ssaAppointmentId")&&e.data.ssaAppointmentId},showError(e){this.loading=!1,this.errorMessage=e,this.error=!0},maybeTrackPageview(){if(!this.settings.tracking||!this.settings.tracking.page_tracking)return;let e="/ssa";switch(this.currentStep.title){case"appointmentType":e="/ssa/select-appointment-type";break;case"date":e="/ssa/select-date";break;case"time":e="/ssa/select-time";break;case"customerInformation":e="/ssa/booking-form";break;case"confirmation":e="/ssa/booked";break;case"change":e="/ssa/modify-appointment";break}let t={ssaType:"page",name:this.currentStep.title,path:e,url:this.api.home_url+e};this.translations.pageTitles[this.currentStep.title]&&(t.title=this.translations.pageTitles[this.currentStep.title]),Object.prototype.hasOwnProperty.call(this.trackingPageview,"url")&&(t.referrer=this.trackingPageview.url),this.setTrackingPageview(t);let n=Object(i["L"])(this.trackingPageview);window.parent.postMessage(n,this.api.home_url)},...Object(s["c"])(["stepIndexByTitle"]),...Object(s["b"])(["callAsync","fetchApi","fetchAppointmentTypes","fetchAppointment","setAppointmentToken","fetchSettings","selectAppointmentType","initApp","removeStepByTitle"]),...Object(s["d"])(["setApi","setUser","setRtlSupport","setAppointmentProp","setTimezone","setAppointmentTypes","setAppointmentTypesChecked","setConnectionError","setCurrentStepInt","setStepByTitle","setFrozenType","setLocale","setSettings","setTranslations","setTrackingPageview","setMeprMembershipId"])}};n("46b0");const Ka=W()(Ga,[["render",T]]);var Xa=Ka;function Ya(e){return{version:"__VERSION__",install:t=>{Object.entries(e).forEach(([e,n])=>{const i=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=t._context.components[i];s||t.component(i,n)})},components:e}}function Qa(e,t,n,i=!1){if(e){t=t.toLowerCase();const s="function"===typeof CustomEvent?new CustomEvent(t,{detail:n,bubbles:i}):Za(t,i,n);e.dispatchEvent(s)}}const Za=(e,t,n)=>{const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t,!1,n)},eo={name:"custom-link",props:{tag:String,to:[String,Object]},setup(e,{slots:t,attrs:n}){return()=>{var s,a;const{to:o,href:l}=e,c=Object(i["G"])("router-link");if(o&&c){var r;const s=null!==(r=e.tag)&&void 0!==r?r:"a";return Object(i["n"])(c,{custom:!0,...n,to:o},{default:e=>{var a;return Object(i["n"])(s,{...n,onClick:t=>{t.__itemId=n.itemId,e.navigate(t)}},null===(a=t.default)||void 0===a?void 0:a.call(t))}})}const d=l?"a":null!==(s=e.tag)&&void 0!==s?s:"a",p=l?"link":"button"!==d?"button":null,u=null===(a=t.default)||void 0===a?void 0:a.call(t);return Object(i["n"])(d,{...n,role:p},{default:()=>u})}}},to={class:"mdc-touch-target-wrapper md-button"},no={class:"material-icons mdc-button__icon","aria-hidden":"true"},io={class:"mdc-button__label"},so={class:"material-icons mdc-button__icon","aria-hidden":"true"},ao={key:2,class:"indicator"};function oo(e,t){const n=Object(i["E"])("foxy-progress-circular"),s=Object(i["E"])("custom-link");return Object(i["y"])(),Object(i["g"])("div",to,[Object(i["h"])("div",{onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},[Object(i["k"])(s,{ref:"root",class:Object(i["s"])(e.classes),style:Object(i["u"])(e.styles),tag:e.tag,href:e.href,to:e.to,target:e.target,disabled:e.disabled,"aria-disabled":e.disabled,type:e.type},{default:Object(i["V"])(()=>[e.haveIcon?Object(i["D"])(e.$slots,"icon",{key:0},()=>[Object(i["h"])("i",no,Object(i["J"])(e.icon),1)]):Object(i["f"])("",!0),Object(i["h"])("span",io,[Object(i["D"])(e.$slots,"default")]),e.haveTrailingIcon?Object(i["D"])(e.$slots,"trailingIcon",{key:1},()=>[Object(i["h"])("i",so,Object(i["J"])(e.trailingIcon),1)]):Object(i["f"])("",!0),t[1]||(t[1]=Object(i["h"])("div",{class:"mdc-button__ripple"},null,-1)),e.indicator?(Object(i["y"])(),Object(i["g"])("span",ao)):Object(i["f"])("",!0),e.progressCircular?(Object(i["y"])(),Object(i["e"])(n,{key:3,theme:e.theme,indeterminate:"",medium:""},null,8,["theme"])):Object(i["f"])("",!0)]),_:3,__:[1]},8,["class","style","tag","href","to","target","disabled","aria-disabled","type"])])])}var lo=n("9373"),co=n("d87f"),ro=n("4303"),po=n("1dfc");class uo extends ro["a"]{constructor(e,t,{unbounded:n=!1,...i}={}){var s;const a=null!==(s=e.$el)&&void 0!==s?s:e;super({addClass:e=>{t?t.classes={...t.classes,[e]:!0}:a.classList.add(e)},browserSupportsCssVars:()=>Object(po["b"])(window),computeBoundingRect:()=>a.getBoundingClientRect(),containsEventTarget:e=>a.contains(e),deregisterDocumentInteractionHandler:(e,t)=>document.documentElement.removeEventListener(e,t,Object(lo["a"])()),deregisterInteractionHandler:(e,t)=>a.removeEventListener(e,t,Object(lo["a"])()),deregisterResizeHandler:e=>window.removeEventListener("resize",e),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>Object(co["b"])(a,":active"),isSurfaceDisabled:()=>!1,isUnbounded:()=>this.unbounded_,registerDocumentInteractionHandler:(e,t)=>document.documentElement.addEventListener(e,t,Object(lo["a"])()),registerInteractionHandler:(e,t)=>{a.addEventListener(e,t,Object(lo["a"])())},registerResizeHandler:e=>window.addEventListener("resize",e),removeClass:e=>{if(t){const{[e]:n,...i}=t.classes;t.classes=i}else a.classList.remove(e)},updateCssVariable:(e,n)=>{t?t.styles={...t.styles,[e]:n}:a.style.setProperty(e,n)},...i}),this.unbounded_=n}get unbounded(){return this.unbounded_}set unbounded(e){this.unbounded_=Boolean(e),this.setUnbounded(this.unbounded_)}}function mo(e,t){const n=Object(i["B"])(null),s=Object(i["H"])({classes:{},styles:{}}),a=()=>{var e;return null===(e=n.value)||void 0===e?void 0:e.activate()},o=()=>{var e;return null===(e=n.value)||void 0===e?void 0:e.deactivate()};return Object(i["w"])(()=>{n.value=new uo(e.value,s,t),n.value.init()}),Object(i["v"])(()=>{n.value.destroy()}),{...Object(i["N"])(s),activate:a,deactivate:o}}var bo={name:"foxy-button",props:{icon:String,trailingIcon:String,theme:{type:String,default:"default"},mode:{type:String,default:""},disabled:{type:Boolean,default:!1},indicator:{type:Boolean,default:!1},progressCircular:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_blank"},to:{type:String,default:""},type:{type:String,default:""}},components:{CustomLink:eo},setup(e,{slots:t}){const n=Object(i["B"])(null),s=Object(i["c"])(()=>""!==e.href?"a":"button"),a=Object(i["c"])(()=>""!==e.type?e.type:"button"===s.value?"button":""),{classes:o,styles:l}=mo(n),c=Object(i["B"])(e.theme),r=Object(i["o"])("foxyTheme",Object(i["B"])(null));Object(i["U"])(r,t=>{t&&"default"===e.theme&&(c.value=t)},{immediate:!0});const d=Object(i["c"])(()=>({...o.value,"mdc-button":!0,"md-raised":"raised"===e.mode,"mdc-button--raised":"raised"===e.mode,"mdc-button--unelevated":"unelevated"===e.mode,"mdc-button--outlined":"outlined"===e.mode,"mdc-button--hover":"hover"===e.mode,"mdc-button--secondary":"secondary"===e.mode,"foxy-indicator-button":!0===e.indicator,"foxy-progress":!0===e.progressCircular,["mdc-theme-name--"+c.value]:!0})),p=Object(i["c"])(()=>{var n;return null!==(n=t.icon)&&void 0!==n?n:e.icon}),u=Object(i["c"])(()=>{var n;return null!==(n=t.trailingIcon)&&void 0!==n?n:e.trailingIcon}),m=Object(i["c"])(()=>e.disabled),b=e=>{m.value&&e.stopPropagation()};return{styles:l,classes:d,root:n,haveIcon:p,haveTrailingIcon:u,handleClick:b,tag:s,type:a}}};n("03f3");const ho=W()(bo,[["render",oo]]);var yo=ho,fo=Ya({foxyButton:yo}),Oo={name:"foxy-card",props:{class:String,mdWithHover:Boolean,outlined:Boolean,theme:{type:String,default:"default"}},setup(e,{attrs:t,slots:n}){return()=>{var s;const{outlined:a}=e,{mdWithHover:o}=e;return Object(i["n"])("div",{class:[{"mdc-card":1,"md-card":1,"mdc-card--outlined":a,"md-with-hover":o,["mdc-theme-name--"+e.theme]:1,[""+e.class]:1}],...t},null===(s=n.default)||void 0===s?void 0:s.call(n))}}};n("82ee");const jo=Oo;var go=jo,vo={name:"foxy-card-header",setup(e,{attrs:t,slots:n}){return()=>{var e;return Object(i["n"])("div",{class:[{"mdc-card-header":1,"md-card-header":1}],...t},null===(e=n.default)||void 0===e?void 0:e.call(n))}}};n("4881");const _o=vo;var ko=_o,So={name:"foxy-card-content",setup(e,{attrs:t,slots:n}){return()=>{var e;return Object(i["n"])("div",{class:[{"mdc-card-content":1,"md-card-content":1}],...t},null===(e=n.default)||void 0===e?void 0:e.call(n))}}};n("7908");const xo=So;var Ao=xo,To={name:"foxy-card-actions",props:{fullBleed:Boolean},setup(e,{slots:t}){return()=>{var n;return Object(i["n"])("div",{class:[{"mdc-card__actions":1,"mdc-card__actions--full-bleed":e.fullBleed}]},null===(n=t.default)||void 0===n?void 0:n.call(t))}}};n("ec94");const wo=To;var Co=wo,Eo=Ya({foxyCard:go,foxyCardHeader:ko,foxyCardContent:Ao,foxyCardActions:Co});function Io(e,t){return Object(i["y"])(),Object(i["g"])("span",{ref:"root",class:Object(i["s"])(e.labelClasses)},[Object(i["D"])(e.$slots,"default")],2)}var Do=n("540b"),Po={name:"foxy-floating-label",props:{required:{type:Boolean}},setup(e){const t=Object(i["A"])({labelClasses:{"mdc-floating-label":!0,"mdc-floating-label--required":e.required},root:null});let n;const s={addClass:e=>t.labelClasses={...t.labelClasses,[e]:!0},removeClass:e=>{const{[e]:n,...i}=t.labelClasses;t.labelClasses=i},getWidth:()=>t.root.scrollWidth,registerInteractionHandler:(e,n)=>{t.root.addEventListener(e,n)},deregisterInteractionHandler:(e,n)=>{t.root.removeEventListener(e,n)}},a=()=>n.getWidth(),o=e=>n.setRequired(e),l=e=>{n.float(e)},c=e=>{n.shake(e)};return Object(i["w"])(()=>{n=new Do["a"](s),n.init()}),Object(i["v"])(()=>{n.destroy()}),{...Object(i["N"])(t),getWidth:a,float:l,shake:c,setRequired:o}}};n("9983");const Vo=W()(Po,[["render",Io]]);var Lo=Vo;Ya({foxyFloatingLabel:Lo});function Mo(e,t){return Object(i["y"])(),Object(i["g"])("span",{class:Object(i["s"])(e.lineClasses),style:Object(i["u"])(e.lineStyles),onTransitionend:t[0]||(t[0]=(...t)=>e.onTransitionEnd&&e.onTransitionEnd(...t))},null,38)}var Bo=n("c38c"),Ro={name:"foxy-line-ripple",setup(){const e=Object(i["A"])({lineClasses:{"mdc-line-ripple":1},lineStyles:{}});let t;const n={addClass:t=>e.lineClasses={...e.lineClasses,[t]:!0},removeClass:t=>{const{[t]:n,...i}=e.lineClasses;e.lineClasses=i},hasClass:t=>Boolean(e.lineClasses[t]),setStyle:(t,n)=>e.lineStyles={...e.lineStyles,[t]:n}},s=e=>{t.setRippleCenter(e)},a=()=>{t.activate()},o=()=>{t.deactivate()},l=e=>t.handleTransitionEnd(e);return Object(i["w"])(()=>{t=new Bo["a"](n),t.init()}),Object(i["v"])(()=>{t.destroy()}),{...Object(i["N"])(e),setRippleCenter:s,activate:a,deactivate:o,onTransitionEnd:l}}};n("42d4");const No=W()(Ro,[["render",Mo]]);var zo=No,Fo=Ya({foxyLineRipple:zo});function qo(e,t){const n=Object(i["E"])("foxy-floating-label");return Object(i["y"])(),Object(i["g"])("span",{ref:"outlined",class:Object(i["s"])(e.outlinedClasses)},[t[0]||(t[0]=Object(i["h"])("span",{class:"mdc-notched-outline__leading"},null,-1)),Object(i["h"])("span",{class:"mdc-notched-outline__notch",style:Object(i["u"])(e.notchStyles)},[e.$slots.default?(Object(i["y"])(),Object(i["e"])(n,{key:0,ref:"labelEl"},{default:Object(i["V"])(()=>[Object(i["D"])(e.$slots,"default")]),_:3},512)):Object(i["f"])("",!0)],4),t[1]||(t[1]=Object(i["h"])("span",{class:"mdc-notched-outline__trailing"},null,-1))],2)}var Jo=n("9b18");const{cssClasses:Uo}=Jo["a"];var Ho={name:"foxy-notched-outline",components:{foxyFloatingLabel:Lo},setup(e,{slots:t}){const n=Object(i["A"])({outlinedClasses:{"mdc-notched-outline":!0},notchStyles:{},labelEl:null});let s;const a={addClass:e=>n.outlinedClasses={...n.outlinedClasses,[e]:!0},removeClass:e=>{const{[e]:t,...i}=n.outlinedClasses;n.outlinedClasses=i},setNotchWidthProperty:e=>n.notchStyles={...n.notchStyles,width:e+"px"},removeNotchWidthProperty:()=>{const{width:e,...t}=n.notchStyles;n.notchStyles=t}},o=e=>{s.notch(e)},l=()=>{s.closeNotch()},c=e=>{var t;null===(t=n.labelEl)||void 0===t||t.float(e)},r=e=>{var t;null===(t=n.labelEl)||void 0===t||t.shake(e)},d=()=>{var e;return null===(e=n.labelEl)||void 0===e?void 0:e.getWidth()};return Object(i["w"])(()=>{s=new Jo["a"](a),s.init();const e=t.default?Uo.OUTLINE_UPGRADED:Uo.NO_LABEL;n.outlinedClasses={...n.outlinedClasses,[e]:!0}}),Object(i["v"])(()=>{s.destroy()}),{...Object(i["N"])(n),getWidth:d,shake:r,float:c,closeNotch:l,notch:o}}};n("3837");const $o=W()(Ho,[["render",qo]]);var Wo=$o,Go=Ya({foxyNotchedOutline:Wo});const Ko={class:"mdc-text-field-character-counter"};function Xo(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",Ko,Object(i["J"])(e.textContent),1)}var Yo=n("248e"),Qo={name:"foxy-character-counter",setup(){const e=Object(i["A"])({textContent:"",foundation:{}}),t={setContent:t=>{e.textContent=t}};return Object(i["w"])(()=>{e.foundation=new Yo["a"](t),e.foundation.init()}),Object(i["v"])(()=>{e.foundation.destroy()}),{...Object(i["N"])(e)}}};const Zo=W()(Qo,[["render",Xo]]);var el=Zo;const tl=["innerHTML"];function nl(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",Object(i["q"])({class:e.classes},e.rootAttrs,{innerHTML:e.helpertext}),null,16,tl)}var il=n("aac8"),sl={name:"foxy-textfield-helper-text",props:{persistent:Boolean,validation:Boolean,helptext:String},setup(e){const t=Object(i["A"])({classes:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":e.persistent,"mdc-text-field-helper-text--validation-msg":e.validation},rootAttrs:{"aria-hidden":!0},helpertext:e.helptext,foundation:{}}),n={addClass:e=>t.classes={...t.classes,[e]:!0},removeClass:e=>{const{[e]:n,...i}=t.classes;t.classes=i},hasClass:e=>Boolean(t.classes[e]),getAttr:e=>t.rootAttrs[e],setAttr:(e,n)=>t.rootAttrs={...t.rootAttrs,[e]:n},removeAttr:e=>{const{[e]:n,...i}=t.rootAttrs;t.rootAttrs=i},setContent:e=>t.helpertext=e};return Object(i["U"])(()=>e.persistent,e=>t.foundation.setPersistent(e)),Object(i["U"])(()=>e.validation,e=>t.foundation.setValidation(e)),Object(i["U"])(()=>e.helptext,e=>t.foundation.setContent(e)),Object(i["w"])(()=>{t.foundation=new il["a"](n),t.foundation.init()}),Object(i["v"])(()=>{t.foundation.destroy()}),{...Object(i["N"])(t)}}};const al=W()(sl,[["render",nl]]);var ol=al;function ll(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("i",Object(i["q"])({ref:"root",class:["material-icons",e.classes]},e.rootAttrs),[Object(i["D"])(e.$slots,"default")],16)}var cl=n("188b");const{strings:rl}=cl["a"];var dl={name:"textfield-icon",props:{disabled:Boolean,trailing:Boolean,trailingIcon:Boolean},setup(e,{emit:t}){const n=Object(i["A"])({classes:{"mdc-text-field__icon":1,["mdc-text-field__icon--"+(e.trailing||e.trailingIcon?"trailing":"leading")]:1},rootAttrs:{tabindex:"-1",role:void 0},root:void 0,foundation:{}}),s={getAttr:e=>n.rootAttrs[e],setAttr:(e,t)=>n.rootAttrs={...n.rootAttrs,[e]:t},removeAttr:e=>{const{[e]:t,...i}=n.rootAttrs;n.rootAttrs=i},setContent:()=>{},registerInteractionHandler:(e,t)=>n.root.addEventListener(e,t),deregisterInteractionHandler:(e,t)=>n.root.removeEventListener(e,t),notifyIconAction:()=>{Qa(n.root,rl.ICON_EVENT,{},!0),t("click")}};return Object(i["w"])(()=>{n.foundation=new cl["a"](s),n.foundation.init()}),Object(i["v"])(()=>{n.foundation.destroy()}),{...Object(i["N"])(n)}}};const pl=W()(dl,[["render",ll]]);var ul=pl;const ml={key:0,class:"mdc-text-field__ripple"},bl={key:4,class:"mdc-text-field__affix mdc-text-field__affix--prefix"},hl=["type","minlength","maxlength","aria-label","aria-controls","aria-labelledby","aria-describedby"],yl={key:5,class:"mdc-text-field__affix mdc-text-field__affix--suffix"},fl={key:2,class:"mdc-text-field__resizer"},Ol=["minlength","maxlength","aria-label","aria-controls","cols","rows"],jl=["minlength","maxlength","aria-label","aria-controls","cols","rows"],gl={key:2,class:"mdc-text-field-helper-line"};function vl(e,t){const n=Object(i["E"])("foxy-textfield-icon"),s=Object(i["E"])("foxy-floating-label"),a=Object(i["E"])("foxy-notched-outline"),o=Object(i["E"])("foxy-line-ripple"),l=Object(i["E"])("foxy-character-counter"),c=Object(i["E"])("foxy-textfield-helper-text");return Object(i["y"])(),Object(i["g"])("div",{ref:"wrapper",class:Object(i["s"])(["textfield-container md-input-container",e.$attrs.class])},[e.multiline?(Object(i["y"])(),Object(i["g"])("label",{key:1,ref:"root",class:Object(i["s"])(e.classes),style:{"padding-right":"0px"}},[e.hasLabel?(Object(i["y"])(),Object(i["e"])(s,{key:0,ref:"labelEl",id:e.labelId,required:e.required,style:{left:"0",display:"inline-flex","align-items":"center"}},{default:Object(i["V"])(()=>[Object(i["k"])(n,null,{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.leadingIcon),1)]),_:1}),Object(i["j"])(" "+Object(i["J"])(e.label),1)]),_:1},8,["id","required"])):Object(i["f"])("",!0),e.outline?(Object(i["y"])(),Object(i["e"])(a,{key:1,ref:"labelEl"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.label),1)]),_:1},512)):Object(i["f"])("",!0),e.resizer?(Object(i["y"])(),Object(i["g"])("span",fl,[Object(i["h"])("textarea",Object(i["q"])({placeholder:" ",ref:"input",class:e.inputClasses},e.inputAttrs,{minlength:e.minlength,maxlength:e.maxlength,"aria-label":e.label,"aria-controls":e.inputAriaControls,cols:e.cols,rows:e.rows},Object(i["K"])(e.inputListeners,!0),{style:{"margin-top":"30px"},onFocusin:t[2]||(t[2]=(...t)=>e.onFocusIn&&e.onFocusIn(...t)),onFocusout:t[3]||(t[3]=(...t)=>e.onFocusOut&&e.onFocusOut(...t))}),null,16,Ol)])):(Object(i["y"])(),Object(i["g"])("textarea",Object(i["q"])({key:3,ref:"input",class:e.inputClasses},e.inputAttrs,{minlength:e.minlength,maxlength:e.maxlength,"aria-label":e.label,"aria-controls":e.inputAriaControls,cols:e.cols,rows:e.rows},Object(i["K"])(e.inputListeners,!0),{onFocusin:t[4]||(t[4]=(...t)=>e.onFocusIn&&e.onFocusIn(...t)),onFocusout:t[5]||(t[5]=(...t)=>e.onFocusOut&&e.onFocusOut(...t))}),null,16,jl)),e.internalCharacterCounter?(Object(i["y"])(),Object(i["e"])(l,{key:4,ref:"characterCounterEl"},null,512)):Object(i["f"])("",!0)],2)):(Object(i["y"])(),Object(i["g"])("label",{key:0,ref:"root",class:Object(i["s"])(e.rootClasses),style:Object(i["u"])(e.rippleStyles)},[e.outline?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])("span",ml)),e.leadingIcon?(Object(i["y"])(),Object(i["e"])(n,{key:1},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.leadingIcon),1)]),_:1})):Object(i["f"])("",!0),e.hasLabel?(Object(i["y"])(),Object(i["e"])(s,{key:2,ref:"labelEl",id:e.labelId,required:e.required},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.label),1)]),_:1},8,["id","required"])):Object(i["f"])("",!0),e.outline?(Object(i["y"])(),Object(i["e"])(a,{key:3,ref:"labelEl"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.label),1)]),_:1},512)):Object(i["f"])("",!0),e.prefix?(Object(i["y"])(),Object(i["g"])("span",bl,Object(i["J"])(e.prefix),1)):Object(i["f"])("",!0),Object(i["h"])("input",Object(i["q"])({ref:"input",class:e.inputClasses},e.inputAttrs,{type:e.type,minlength:e.minlength,maxlength:e.maxlength,"aria-label":e.label,"aria-controls":e.inputAriaControls,"aria-labelledby":e.labelId,"aria-describedby":e.inputAriaControls},Object(i["K"])(e.inputListeners,!0),{onFocusin:t[0]||(t[0]=(...t)=>e.onFocusIn&&e.onFocusIn(...t)),onFocusout:t[1]||(t[1]=(...t)=>e.onFocusOut&&e.onFocusOut(...t))}),null,16,hl),e.suffix?(Object(i["y"])(),Object(i["g"])("span",yl,Object(i["J"])(e.suffix),1)):Object(i["f"])("",!0),e.trailingIcon?(Object(i["y"])(),Object(i["e"])(n,{key:6},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.trailingIcon),1)]),_:1})):Object(i["f"])("",!0),e.hasLineRipple?(Object(i["y"])(),Object(i["e"])(o,{key:7,ref:"lineRippleEl"},null,512)):Object(i["f"])("",!0)],6)),e.hasHelpline?(Object(i["y"])(),Object(i["g"])("div",gl,[e.helptext?(Object(i["y"])(),Object(i["e"])(c,{key:0,ref:"helpertext",id:e.helpTextId,helptext:e.helptext,persistent:e.helptextPersistent,validation:e.helptextValidation},null,8,["id","helptext","persistent","validation"])):Object(i["f"])("",!0),e.helperCharacterCounter?(Object(i["y"])(),Object(i["e"])(l,{key:1,ref:"characterCounterEl"},null,512)):Object(i["f"])("",!0)])):Object(i["f"])("",!0)],2)}var _l=n("d257");let kl=0;const Sl=e=>e.map(e=>e.attributeName);var xl={name:"foxy-textfield",inheritAttrs:!1,props:{modelValue:[String,Number],type:{type:String,default:"text",validator:function(e){return["text","email","search","password","tel","url","number"].includes(e)}},label:String,outline:Boolean,disabled:Boolean,required:Boolean,valid:{type:Boolean,default:void 0},multiline:Boolean,size:{type:[Number,String],default:20},minlength:{type:[Number,String],default:void 0},maxlength:{type:[Number,String],default:void 0},rows:{type:[Number,String],default:2},cols:{type:[Number,String],default:40},id:{type:String},helptext:String,helptextPersistent:Boolean,helptextValidation:Boolean,resizer:{type:Boolean,default:()=>!0},prefix:String,suffix:String,characterCounter:Boolean,characterCounterInternal:Boolean,leadingIcon:{type:String,default:""},trailingIcon:{type:String,default:""}},setup(e,{emit:t,slots:n,attrs:s}){const a=Object(i["A"])({text:e.modelValue,classes:{"mdc-textfield":!0,"md-input":!0,"mdc-text-field":!0,"mdc-text-field--upgraded":!0,"mdc-text-field--disabled":e.disabled,"mdc-text-field--textarea":e.multiline,"mdc-text-field--outlined":!e.fullwidth&&e.outline,"mdc-text-field--with-leading-icon":e.leadingIcon,"mdc-text-field--with-trailing-icon":e.trailingIcon,"mdc-text-field--filled":Boolean(!e.outline),"mdc-text-field--no-label":!e.label},inputClasses:{"mdc-text-field__input":!0},inputAttrs:{},labelClasses:{"mdc-floating-label":!0},lineRippleClasses:{"mdc-line-ripple":!0},lineRippleStyles:{},outlineClasses:{},notchStyles:{},helpTextId:"mcw-help-"+kl++,labelId:"mcw-label-"+kl,root:void 0,wrapper:void 0,helpertext:void 0,input:void 0,labelEl:void 0,lineRippleEl:void 0,characterCounterEl:void 0,helpertextEl:void 0});let o,l,c;if(!e.multiline&&!e.outline){const{classes:e,styles:t}=mo(Object(i["M"])(a,"root"));l=e,c=t}const r=Object(i["c"])(()=>e.helptext?a.helpTextId:void 0),d=Object(i["c"])(()=>!e.outline&&e.label),p=Object(i["c"])(()=>e.outline&&e.label),u=Object(i["c"])(()=>!(e.outline||e.multiline)),m=Object(i["c"])(()=>n.helpText||e.helptext),b=Object(i["c"])(()=>e.characterCounter&&e.characterCounterInternal),h=Object(i["c"])(()=>e.characterCounter&&!(e.multiline&&e.characterCounterInternal)),y=Object(i["c"])(()=>e.helptext||h.value),f=Object(i["c"])(()=>({...l,...a.classes})),O={input:({target:{value:e}})=>t("update:modelValue",e)},j=()=>{var e;return null===(e=a.input)||void 0===e?void 0:e.focus()},g=Object(i["B"])(!1),v=()=>{g.value=!0},_=()=>{g.value=!1},k=()=>o.isValid(),S=Object(i["c"])(()=>{const{class:e,...t}=s;return{...t,...a.inputAttrs}}),x={addClass:e=>a.classes={...a.classes,[e]:!0},removeClass:e=>{const{[e]:t,...n}=a.classes;a.classes=n},hasClass:e=>Boolean(a.classes[e]),registerTextFieldInteractionHandler:(e,t)=>{a.root.addEventListener(e,t)},deregisterTextFieldInteractionHandler:(e,t)=>{a.root.removeEventListener(e,t)},isFocused:()=>g.value,registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver(t=>e(Sl(t))),n=a.input,i={attributes:!0};return t.observe(n,i),t},deregisterValidationAttributeChangeHandler:e=>{e.disconnect()},registerInputInteractionHandler:(e,t)=>{a.input.addEventListener(e,t,Object(lo["a"])())},deregisterInputInteractionHandler:(e,t)=>{a.input.removeEventListener(e,t,Object(lo["a"])())},getNativeInput:()=>a.input,setInputAttr:(e,t)=>{a.inputAttrs={...a.inputAttrs,[e]:t}},removeInputAttr:e=>{const{[e]:t,...n}=a.inputAttrs;a.inputAttrs=n},shakeLabel:e=>{var t;null===(t=a.labelEl)||void 0===t||t.shake(e)},floatLabel:e=>{var t;null===(t=a.labelEl)||void 0===t||t.float(e)},hasLabel:()=>!!a.labelEl||!!a.notchedEl,getLabelWidth:()=>a.labelEl.getWidth(),deactivateLineRipple:()=>{var e;return null===(e=a.lineRippleEl)||void 0===e?void 0:e.deactivate()},activateLineRipple:()=>{var e;return null===(e=a.lineRippleEl)||void 0===e?void 0:e.activate()},setLineRippleTransformOrigin:e=>{var t;return null===(t=a.lineRippleEl)||void 0===t?void 0:t.setRippleCenter(e)},hasOutline:()=>!!e.outline,notchOutline:(e,t)=>a.labelEl.notch(e,t),closeOutline:()=>a.labelEl.closeNotch()};Object(i["U"])(()=>e.disabled,e=>{var t;return null===(t=o)||void 0===t?void 0:t.setDisabled(e)}),Object(i["U"])(()=>e.required,e=>{a.input&&(a.input.required=e)}),Object(i["U"])(()=>e.valid,e=>{var t;"undefined"!==typeof e&&(null===(t=o)||void 0===t||t.setValid(e))}),Object(i["U"])(()=>g.value,t=>{var n;"undefined"!==typeof t&&("undefined"!==typeof e.valid&&(null===(n=o)||void 0===n||n.setValid(e.valid)))}),Object(i["U"])(()=>e.modelValue,e=>{o&&e!==o.getValue()&&o.setValue(e)});const A=Object(i["c"])(()=>{if(!a.input)return;const t=parseFloat(getComputedStyle(a.input).lineHeight);return e.rows*t}),T=()=>{if(!A.value)return;a.input.style.height="auto";const e=Math.max(a.input.scrollHeight,A.value);a.input.style.height=e+"px"};return Object(i["U"])(()=>e.modelValue,()=>{e.multiline&&T()}),Object(i["w"])(()=>{var t,n;o=new _l["a"]({...x},{characterCounter:null===(t=a.characterCounterEl)||void 0===t?void 0:t.foundation,helperText:null===(n=a.helpertext)||void 0===n?void 0:n.foundation}),o.init(),o.setValue(e.modelValue),e.disabled&&o.setDisabled(e.disabled),a.input&&(a.input.required=e.required),"undefined"!==typeof e.valid&&o.setValid(e.valid),e.multiline&&a.input.value&&T()}),Object(i["v"])(()=>{o.destroy()}),{...Object(i["N"])(a),inputAriaControls:r,hasLabel:d,hasOutlineLabel:p,inputListeners:O,hasLineRipple:u,hasHelptext:m,hasHelpline:y,focus:j,helperCharacterCounter:h,internalCharacterCounter:b,rootClasses:f,rippleStyles:c,isValid:k,inputAttrs:S,onFocusIn:v,onFocusOut:_}},components:{foxyLineRipple:zo,foxyNotchedOutline:Wo}};n("6b25");const Al=W()(xl,[["render",vl]]);var Tl=Al,wl=Ya({foxyTextfield:Tl,foxyTextfieldIcon:ul,foxyCharacterCounter:el,foxyTextfieldHelperText:ol,foxyLineRipple:zo,foxyNotchedOutline:Wo,foxyFloatingLabel:Lo});const Cl=["id","name","value"],El=["for"];function Il(e,t){return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(e.formFieldClasses)},[Object(i["h"])("div",{ref:"root",class:Object(i["s"])(e.rootClasses),style:Object(i["u"])(e.styles)},[Object(i["h"])("input",{id:e.checkboxId,ref:"control",name:e.name,value:e.value,type:"checkbox",class:"mdc-checkbox__native-control",onChange:t[0]||(t[0]=(...t)=>e.onChange&&e.onChange(...t))},null,40,Cl),t[1]||(t[1]=Object(i["i"])('<div class="mdc-checkbox__background"><svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24"><path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path></svg><div class="mdc-checkbox__mixedmark"></div></div><div class="mdc-checkbox__ripple"></div>',2))],6),Object(i["h"])("label",{ref:"labelEl",for:e.checkboxId},[Object(i["D"])(e.$slots,"default",{},()=>[Object(i["j"])(Object(i["J"])(e.label),1)])],8,El)],2)}var Dl=n("43e5"),Pl=n("e9ac"),Vl=n("c915");const Ll=["checked"];let Ml=0;var Bl={name:"foxy-checkbox",props:{modelValue:[Boolean,Array],disabled:Boolean,label:String,alignEnd:Boolean,value:{type:[String,Number],default(){return"on"}},name:String},setup(e,{emit:t,slots:n}){const s=Object(i["A"])({classes:{"mdc-checkbox":1,"md-checkbox":1},control:void 0,labelEl:void 0,root:void 0});let a,o;const l="__mcw-checkbox-"+Ml++,{classes:c,styles:r,activate:d,deactivate:p}=mo(Object(i["M"])(s,"root"),{isUnbounded:()=>!0,isSurfaceActive:()=>Object(co["b"])(s.control,":active"),registerInteractionHandler:(e,t)=>{s.control.addEventListener(e,t,Object(lo["a"])())},deregisterInteractionHandler:(e,t)=>{s.control.removeEventListener(e,t,Object(lo["a"])())},computeBoundingRect:()=>s.root.getBoundingClientRect()}),u=Object(i["c"])(()=>({...c.value,...s.classes})),m=Object(i["c"])(()=>{var t;return null!==(t=e.label)&&void 0!==t?t:n.default}),b=Object(i["c"])(()=>({"mdc-form-field":m.value,"mdc-form-field--align-end":m.value&&e.alignEnd,"mdc-touch-target-wrapper":1})),h=({target:{checked:n}})=>{if(Array.isArray(e.modelValue)){const i=e.modelValue.indexOf(e.value);n?i<0&&t("update:modelValue",[...e.modelValue,e.value]):i>-1&&t("update:modelValue",[...e.modelValue.slice(0,i),...e.modelValue.slice(i+1)])}else Qa(s.root,"mdccheckbox:change",{},!0),t("update:modelValue",n)},y=()=>s.control.checked,f={addClass:e=>s.classes={...s.classes,[e]:!0},forceLayout:()=>s.root.offsetWidth,hasNativeControl:()=>!0,isAttachedToDOM:()=>!0,isChecked:()=>s.control.checked,removeClass:e=>{const{[e]:t,...n}=s.classes;s.classes=n},removeNativeControlAttr:e=>{s.control.removeAttribute(e)},setNativeControlAttr:(e,t)=>{s.control.setAttribute(e,t)},setNativeControlDisabled:e=>s.control.disabled=e},O=()=>a.handleAnimationEnd(),j=t=>{s.control.checked=Array.isArray(t)?t.includes(e.value):t},g=()=>{const e=s.control,t=Object.getPrototypeOf(e);for(const n of Ll){const i=Object.getOwnPropertyDescriptor(t,n);if(Rl(i)){const t={get:i.get,set:t=>{i.set.call(e,t),a.handleChange()},configurable:i.configurable,enumerable:i.enumerable};Object.defineProperty(e,n,t)}}},v=()=>{const e=s.control,t=Object.getPrototypeOf(e);for(const n of Ll){const i=Object.getOwnPropertyDescriptor(t,n);Rl(i)&&Object.defineProperty(e,n,i)}};return Object(i["U"])(()=>e.disabled,(e,t)=>{var n;e!=t&&(null===(n=a)||void 0===n||n.setDisabled(e))}),Object(i["U"])(()=>e.modelValue,(e,t)=>{e!=t&&j(e)}),Object(i["w"])(()=>{a=new Pl["a"](f),s.root.addEventListener(Object(Dl["a"])(window,"animationend"),O),g(),m.value&&(o=new Vl["a"]({registerInteractionHandler:(e,t)=>{s.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{s.labelEl.removeEventListener(e,t)},activateInputRipple:()=>{d()},deactivateInputRipple:()=>{p()}}),o.init()),a.init(),j(e.modelValue),a.setDisabled(e.disabled)}),Object(i["v"])(()=>{var e;s.root.removeEventListener(Object(Dl["a"])(window,"animationend"),O),null===(e=o)||void 0===e||e.destroy(),v(),a.destroy()}),{...Object(i["N"])(s),rootClasses:u,formFieldClasses:b,onChange:h,styles:r,hasLabel:m,setChecked:j,isChecked:y,checkboxId:l}}};function Rl(e){return!!e&&"function"===typeof e.set}n("99e8");const Nl=W()(Bl,[["render",Il]]);var zl=Nl,Fl=Ya({foxyCheckbox:zl}),ql={name:"foxy-dialog-button",props:{action:String,isDefault:Boolean,isInitialFocus:Boolean},setup(e,{attrs:t,slots:n}){return()=>Object(i["n"])(Object(i["E"])("foxy-button"),{...t,class:["mdc-button","mdc-dialog__button","md-button"],"data-mdc-dialog-action":e.action,"data-mdc-dialog-button-default":e.isDefault,"data-mdc-dialog-initial-focus":e.isInitialFocus},{default:()=>{var e;return null===(e=n.default)||void 0===e?void 0:e.call(n)}})}},Jl={name:"foxy-dialog-content",props:{tag:{type:String,default(){return"div"}}},setup(e,{slots:t}){return()=>{var n;return Object(i["n"])(e.tag,{class:["mdc-dialog__content","md-dialog-content"]},null===(n=t.default)||void 0===n?void 0:n.call(t))}}},Ul={name:"foxy-dialog-footer",props:{tag:{type:String,default(){return"div"}}},setup(e,{slots:t}){return()=>{var n;return Object(i["n"])(e.tag,{class:["mdc-dialog__actions","md-dialog-actions"]},null===(n=t.default)||void 0===n?void 0:n.call(t))}}},Hl={name:"foxy-dialog-title",props:{tag:{type:String,default(){return"h2"}}},setup(e,{slots:t}){return()=>{var n;return Object(i["n"])(e.tag,{class:["mdc-dialog__title","md-dialog-title","md-title"]},null===(n=t.default)||void 0===n?void 0:n.call(t))}}};const $l={ref:"container",class:"mdc-dialog__container"},Wl=["aria-labelledby","aria-describedby"];function Gl(e,t,n,s,a,o){return Object(i["y"])(),Object(i["g"])("div",{ref:"root",class:Object(i["s"])(e.classes),style:Object(i["u"])(e.styles),onClick:t[0]||(t[0]=(...t)=>e.onClick&&e.onClick(...t)),onKeydown:t[1]||(t[1]=(...t)=>e.onKeydown&&e.onKeydown(...t))},[Object(i["h"])("div",$l,[Object(i["h"])("div",{ref:"surface",class:"mdc-dialog__surface",role:"alertdialog","aria-modal":"true","aria-labelledby":e.ariaLabelledby,"aria-describedby":e.ariaDescribedby},[Object(i["D"])(e.$slots,"default")],8,Wl)],512),t[2]||(t[2]=Object(i["h"])("div",{class:"mdc-dialog__scrim"},null,-1))],38)}var Kl=n("bfa6"),Xl=n("7ab9"),Yl=n("6bd6");const{cssClasses:Ql,strings:Zl}=Kl["a"],ec=["resize","orientationchange"],tc=()=>document.querySelector(`[${Zl.INITIAL_FOCUS_ATTRIBUTE}]`),nc=(e,t)=>new Yl["a"](e,t);var ic={name:"foxy-dialog",props:{autoStackButtons:Boolean,escapeKeyAction:String,scrollable:Boolean,modelValue:Boolean,role:String,scrimClickAction:{type:String,default:"close"},tag:{type:String,default:"div"},ariaLabelledby:String,ariaDescribedby:String},setup(e,{emit:t}){const n=Object(i["A"])({classes:{"mdc-dialog":1,"md-dialog":1},styles:{},container:void 0,root:void 0});let s,a,o,l,c;const r=()=>{s.layout()},d=e=>{s.handleDocumentKeydown(e)},p=e=>{s.handleClick(e)},u=e=>{s.handleKeydown(e)},m=e=>{e?(n.container&&(l=Xl["b"](n.root,nc,tc()||void 0)),s.open()):s.close()},b={addClass:e=>n.classes={...n.classes,[e]:!0},removeClass:e=>{const{[e]:t,...i}=n.classes;n.classes=i},hasClass:e=>n.root.classList.contains(e),addBodyClass:e=>document.body.classList.add(e),removeBodyClass:e=>document.body.classList.remove(e),eventTargetMatches:(e,t)=>Object(co["b"])(e,t),trapFocus:()=>{var e;return null===(e=l)||void 0===e?void 0:e.trapFocus()},releaseFocus:()=>{var e;return null===(e=l)||void 0===e?void 0:e.releaseFocus()},getInitialFocusEl:()=>tc(),isContentScrollable:()=>Xl["c"](a),areButtonsStacked:()=>Xl["a"](o),getActionFromEvent:e=>{const t=Object(co["a"])(e.target,`[${Zl.ACTION_ATTRIBUTE}]`);return null===t||void 0===t?void 0:t.getAttribute(Zl.ACTION_ATTRIBUTE)},clickDefaultButton:()=>{var e;null===(e=c)||void 0===e||e.click()},reverseButtons:()=>{const e=o;return e&&e.reverse().forEach(e=>{var t;return null===(t=e.parentElement)||void 0===t?void 0:t.appendChild(e)})},notifyOpening:()=>{t("mdcdialog:opening",{});for(const e of ec)window.addEventListener(e,r);document.addEventListener("keydown",d)},notifyOpened:()=>t("mdcdialog:opened",{}),notifyClosing:e=>{t("update:modelValue",!1),t("mdcdialog:closing",e?{action:e}:{});for(const t of ec)window.removeEventListener(t,r);document.removeEventListener("keydown",d)},notifyClosed:e=>{t("mdcdialog:closed",e?{action:e}:{})}};return Object(i["U"])(()=>e.modelValue,e=>{m(e)}),Object(i["w"])(()=>{const{modelValue:t,autoStackButtons:i,escapeKeyAction:l,scrimClickAction:r}=e;o=Array.prototype.slice.call(n.root.querySelectorAll(Ql.BUTTON)),c=n.root.querySelector(`[${Zl.BUTTON_DEFAULT_ATTRIBUTE}]`);const d=n.root.querySelector(Zl.CONTAINER_SELECTOR);if(!d)throw new Error(`Dialog component requires a ${Zl.CONTAINER_SELECTOR} container element`);a=n.root.querySelector(Zl.CONTENT_SELECTOR),s=new Kl["a"](b),s.init(),i||s.setAutoStackButtons(i),"string"===typeof l&&s.setEscapeKeyAction(l),"string"===typeof r&&s.setScrimClickAction(r),m(t)}),Object(i["v"])(()=>{s.destroy()}),{...Object(i["N"])(n),handleLayout:r,handleDocumentKeyDown:d,onKeydown:u,onClick:p}}};n("2be9");const sc=W()(ic,[["render",Gl]]);var ac=sc,oc=Ya({foxyDialog:ac,foxyDialogButton:ql,foxyDialogContent:Jl,foxyDialogFooter:Ul,foxyDialogTitle:Hl});const lc={class:"md-empty-state-container"},cc={key:1,class:"md-empty-state-label",tabindex:"-1"},rc={key:2,class:"md-empty-state-description",tabindex:"-1"};function dc(e,t){const n=Object(i["E"])("foxy-progress-circular");return Object(i["y"])(),Object(i["e"])(i["b"],{name:"empty-state",appear:""},{default:Object(i["V"])(()=>[Object(i["h"])("div",Object(i["q"])({class:e.classes,ref:"root"},e.rootAttrs),[Object(i["h"])("div",lc,[e.loading?(Object(i["y"])(),Object(i["e"])(n,{key:0,indeterminate:!0,theme:e.theme},null,8,["theme"])):Object(i["f"])("",!0),e.label?(Object(i["y"])(),Object(i["g"])("strong",cc,Object(i["J"])(e.label),1)):Object(i["f"])("",!0),e.description?(Object(i["y"])(),Object(i["g"])("p",rc,Object(i["J"])(e.description),1)):Object(i["f"])("",!0),Object(i["D"])(e.$slots,"default")])],16)]),_:3})}let pc=1;var uc={name:"foxy-empty",components:{progressCircular:_d},props:{rounded:Boolean,size:{type:Number,default:420},label:String,loading:{type:Boolean,default:!1},description:String,theme:{type:String,default:"default"},type:{type:String,default:"block"}},setup(e){const t=Object(s["f"])();let n=Object(i["c"])(()=>t.state.interaction);const a=Object(i["A"])({classes:{"md-rounded":e.rounded,"md-empty-state":!0,["mdc-theme-name--"+e.theme]:!0},rootAttrs:{style:{maxWidth:"inline"===e.type?null:e.size+"px",height:"inline"===e.type?null:e.size+"px"}},root:null}),o=()=>{const t=document.getElementById("ariaLiveFoxyEmpty");if(t){t.innerHTML="",e.label&&(t.textContent=e.label),e.description&&(t.textContent+=" ",t.textContent+=e.description);for(let e=0;e<pc;e++)t.textContent+="";pc++}};return Object(i["w"])(()=>{null!==n&&void 0!==n&&n.value&&o()}),Object(i["U"])(()=>null===n||void 0===n?void 0:n.value,e=>{e&&o()}),Object(i["U"])(()=>e.label,(e,t)=>{e!==t&&null!==n&&void 0!==n&&n.value&&o()}),Object(i["U"])(()=>e.description,(e,t)=>{e!==t&&null!==n&&void 0!==n&&n.value&&o()}),Object(i["v"])(()=>{const e=document.getElementById("ariaLiveFoxyEmpty");e&&(e.innerHTML="")}),{...Object(i["N"])(a)}}};n("4e31");const mc=W()(uc,[["render",dc]]);var bc=mc,hc=Ya({foxyEmpty:bc});const yc=["aria-describedby"],fc={class:"foxy-fieldset-legend"},Oc=["id","innerHTML"];function jc(e,t){const n=Object(i["E"])("foxy-icon");return Object(i["y"])(),Object(i["g"])("fieldset",{class:Object(i["s"])(e.classes)},[e.legend?(Object(i["y"])(),Object(i["g"])("legend",{key:0,class:Object(i["s"])(e.legendClasses),"aria-describedby":e.helpTextId},[Object(i["h"])("span",fc,[e.icon?(Object(i["y"])(),Object(i["e"])(n,{key:0,icon:e.icon},null,8,["icon"])):Object(i["f"])("",!0),Object(i["j"])(" "+Object(i["J"])(e.legend),1)]),e.helptext?(Object(i["y"])(),Object(i["g"])("span",{key:0,id:e.helpTextId,class:"foxy-fieldset-helptext",innerHTML:e.helptext},null,8,Oc)):Object(i["f"])("",!0)],10,yc)):Object(i["f"])("",!0),Object(i["h"])("div",{class:Object(i["s"])(e.containerClasses)},[Object(i["D"])(e.$slots,"default")],2)],2)}let gc=0;var vc={name:"foxy-fieldset",props:{content:String,helptext:String,icon:String,invalid:{type:Boolean,default:!1},legend:String,legendClasses:{type:String,default:"md-subheading"},outlined:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},setup(e){const t=Object(i["c"])(()=>({"foxy-fieldset":!0,"foxy-list-options":"checkbox-list"===e.content||"radio-list"===e.content,"mdc-card--outlined":e.outlined,"mdc-fieldset--required":e.required,"mdc-fieldset--invalid":e.invalid,"has-icon":e.icon})),n=Object(i["c"])(()=>e.helptext?"foxy-fieldset-help-"+gc++:null),s=Object(i["c"])(()=>({"foxy-list-options__checkbox-group":"checkbox-list"===e.content,"foxy-list-options__radio-group":"radio-list"===e.content}));return{classes:t,containerClasses:s,helpTextId:n}}};n("b1e3");const _c=W()(vc,[["render",jc]]);var kc=_c,Sc=Ya({foxyFieldset:kc}),xc={name:"foxy-icon",props:{icon:String,tag:{type:String,default:"i"},theme:{type:String,default:"default"}},setup(e,{attrs:t}){return()=>Object(i["n"])(e.tag,{class:[{"material-icons":1,"md-icon":1,["mdc-theme-name--"+e.theme]:1}],...t},e.icon)}};n("69bc");const Ac=xc;var Tc=Ac,wc=Ya({foxyIcon:Tc});const Cc={class:"mdc-touch-target-wrapper"};function Ec(e,t){return Object(i["y"])(),Object(i["g"])("div",Cc,[(Object(i["y"])(),Object(i["e"])(Object(i["G"])(e.tag),{class:Object(i["s"])(e.classes),style:Object(i["u"])(e.styles),ref:"root",onClick:e.onClick,"aria-pressed":"false",disabled:e.disabled},{default:Object(i["V"])(()=>[t[0]||(t[0]=Object(i["h"])("div",{class:"mdc-icon-button__ripple"},null,-1)),Object(i["D"])(e.$slots,"default")]),_:3,__:[0]},8,["class","style","onClick","disabled"]))])}var Ic=n("6046"),Dc={name:"foxy-icon-button",props:{modelValue:Boolean,disabled:Boolean,theme:{type:String,default:"default"}},setup(e,{emit:t,attrs:n}){const s=Object(i["A"])({classes:{"mdc-icon-button":1,"md-button":1,"md-icon-button":1,"material-icons":1,["mdc-theme-name--"+e.theme]:!0}}),a=Object(i["B"])(),{CHANGE_EVENT:o}=Ic["a"].strings,{classes:l,styles:c}=mo(a,{isUnbounded:()=>!0});let r;const d={addClass:e=>s.classes={...s.classes,[e]:!0},removeClass:e=>{const{[e]:t,...n}=s.classes;s.classes=n},hasClass:e=>Boolean(s.classes[e]),setAttr:(e,t)=>a.value.setAttribute(e,t),getAttr:e=>a.value.getAttribute(e),notifyChange:e=>{t(o,e),t("update:modelValue",e.isOn)}},p=Object(i["c"])(()=>({...l.value,...s.classes}));Object(i["U"])(()=>e.modelValue,e=>{r.toggle(e)});const u=Object(i["c"])(()=>{const e=Boolean(n.href);return e?"a":"button"}),m=e=>r.handleClick(e);return Object(i["w"])(()=>{r=new Ic["a"](d),r.init(),r.toggle(e.modelValue)}),Object(i["v"])(()=>{r.destroy()}),{...Object(i["N"])(s),classes:p,styles:c,root:a,tag:u,onClick:m}}};n("d8ca");const Pc=W()(Dc,[["render",Ec]]);var Vc=Pc,Lc=Ya({foxyIconButton:Vc});const Mc={key:0,class:"material-icons"},Bc={key:1,class:"mdc-deprecated-list-item__graphic"},Rc={key:2,class:"mdc-deprecated-list-item__graphic"},Nc={class:"mdc-radio"},zc=["name","checked"],Fc={key:3,class:"mdc-deprecated-list-item__text"},qc={class:"mdc-deprecated-list-item__primary-text"},Jc={class:"mdc-deprecated-list-item__secondary-text"},Uc={key:4,class:"mdc-deprecated-list-item__text"},Hc={key:5,class:"mdc-deprecated-list-item__meta"},$c={class:"mdc-radio"},Wc=["name","checked"],Gc={key:6,class:"mdc-deprecated-list-item__meta"},Kc={key:7,class:"mdc-deprecated-list-item__meta"};function Xc(e,t){const n=Object(i["E"])("custom-link");return Object(i["y"])(),Object(i["g"])("li",{class:Object(i["s"])(e.classes)},[Object(i["k"])(n,Object(i["q"])({ref:"root"},e.myAttrs,{tag:"a","data-myItemId":e.myItemId}),{default:Object(i["V"])(()=>[t[4]||(t[4]=Object(i["h"])("span",{class:"mdc-deprecated-list-item__ripple"},null,-1)),e.needGraphic?(Object(i["y"])(),Object(i["g"])("span",{key:0,class:Object(i["s"])(["mdc-deprecated-list-item__graphic",e.groupClasses])},[Object(i["D"])(e.$slots,"graphic",{},()=>[e.listIcon?(Object(i["y"])(),Object(i["g"])("i",Mc,Object(i["J"])(e.listIcon),1)):Object(i["f"])("",!0)])],2)):e.checkbox?(Object(i["y"])(),Object(i["g"])("span",Bc,[Object(i["D"])(e.$slots,"graphic",{},()=>[t[0]||(t[0]=Object(i["h"])("div",{class:"mdc-checkbox"},[Object(i["h"])("input",{type:"checkbox",class:"mdc-checkbox__native-control"}),Object(i["h"])("div",{class:"mdc-checkbox__background"},[Object(i["h"])("svg",{class:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},[Object(i["h"])("path",{class:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})]),Object(i["h"])("div",{class:"mdc-checkbox__mixedmark"})])],-1))])])):e.radio?(Object(i["y"])(),Object(i["g"])("span",Rc,[Object(i["D"])(e.$slots,"graphic",{},()=>[Object(i["h"])("div",Nc,[Object(i["h"])("input",{class:"mdc-radio__native-control",type:"radio",value:"1",name:e.name,checked:e.radioChecked},null,8,zc),t[1]||(t[1]=Object(i["h"])("div",{class:"mdc-radio__background"},[Object(i["h"])("div",{class:"mdc-radio__outer-circle"}),Object(i["h"])("div",{class:"mdc-radio__inner-circle"})],-1))])])])):Object(i["f"])("",!0),e.isTwoLine?(Object(i["y"])(),Object(i["g"])("span",Fc,[Object(i["h"])("span",qc,[Object(i["D"])(e.$slots,"default")]),Object(i["h"])("span",Jc,[Object(i["D"])(e.$slots,"secondary-text",{},()=>[Object(i["j"])(Object(i["J"])(e.twoLine),1)])])])):(Object(i["y"])(),Object(i["g"])("span",Uc,[Object(i["D"])(e.$slots,"default")])),e.trailingRadio?(Object(i["y"])(),Object(i["g"])("span",Hc,[Object(i["D"])(e.$slots,"meta",{},()=>[Object(i["h"])("div",$c,[Object(i["h"])("input",{class:"mdc-radio__native-control",type:"radio",value:"1",name:e.name,checked:e.radioChecked},null,8,Wc),t[2]||(t[2]=Object(i["h"])("div",{class:"mdc-radio__background"},[Object(i["h"])("div",{class:"mdc-radio__outer-circle"}),Object(i["h"])("div",{class:"mdc-radio__inner-circle"})],-1))])])])):e.trailingCheckbox?(Object(i["y"])(),Object(i["g"])("span",Gc,[Object(i["D"])(e.$slots,"meta",{},()=>[t[3]||(t[3]=Object(i["h"])("div",{class:"mdc-checkbox"},[Object(i["h"])("input",{type:"checkbox",class:"mdc-checkbox__native-control"}),Object(i["h"])("div",{class:"mdc-checkbox__background"},[Object(i["h"])("svg",{class:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},[Object(i["h"])("path",{class:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})]),Object(i["h"])("div",{class:"mdc-checkbox__mixedmark"})])],-1))])])):e.$slots.meta?(Object(i["y"])(),Object(i["g"])("span",Kc,[Object(i["D"])(e.$slots,"meta")])):Object(i["f"])("",!0)]),_:3,__:[4]},16,["data-myItemId"])],2)}let Yc=0;var Qc={name:"foxy-list-item",inheritAttrs:!1,props:{twoLine:String,disabled:Boolean,icon:[String,Boolean],groupIcon:String,name:String,trailing:Boolean},components:{CustomLink:eo},setup(e,{slots:t,attrs:n}){const s=Object(i["B"])(null),a=Yc++,o=Object(i["A"])({classes:{"mdc-deprecated-list-item":1,"mdc-deprecated-list-item--disabled":e.disabled},attrs:{}});n.class&&(o.classes[n.class]=1);const l=Object(i["o"])("registerListItem"),c=Object(i["c"])(()=>"true"==n["aria-checked"]),r=Object(i["c"])(()=>!e.trailing&&"checkbox"==n.role),d=Object(i["c"])(()=>!e.trailing&&"radio"==n.role),p=Object(i["c"])(()=>e.trailing&&"radio"==n.role),u=Object(i["c"])(()=>e.trailing&&"checkbox"==n.role),{classes:m,styles:b}=mo(s),h=Object(i["c"])(()=>e.twoLine||t["secondary-text"]),y=Object(i["c"])(()=>({"mdc-menu__selection-group-icon":e.groupIcon})),f=Object(i["c"])(()=>"string"==typeof e.icon||!!e.groupIcon),O=Object(i["c"])(()=>"string"===typeof e.icon&&e.icon||e.groupIcon),j=()=>{var e;(null!==(e=s.value.$el)&&void 0!==e?e:s.value).focus()},g=Object(i["c"])(()=>({...n,class:{...m.value},style:b.value,...o.attrs})),v=e=>{o.classes={...o.classes,[e]:!0}},_=e=>{const{[e]:t,...n}=o.classes;o.classes=n},k=e=>{const{[e]:t,...n}=o.attrs;o.attrs=n},S=(e,t)=>{o.attrs={...o.attrs,[e]:t}},x=e=>g.value[e],A={add:v,remove:_,contains:e=>!!o.classes[e]};return l({itemId:a,removeAttribute:k,setAttribute:S,getAttribute:x,classList:A}),{...Object(i["N"])(o),focus:j,root:s,isTwoLine:h,needGraphic:f,listIcon:O,groupClasses:y,checkbox:r,radio:d,radioChecked:c,myAttrs:g,trailingRadio:p,trailingCheckbox:u,myItemId:a}}};const Zc=W()(Qc,[["render",Xc]]);var er=Zc;function tr(e,t){return Object(i["y"])(),Object(i["e"])(Object(i["G"])(e.tag),Object(i["q"])({ref:"listRoot",class:e.classes},Object(i["K"])(e.rootListeners),e.rootAttrs),{default:Object(i["V"])(()=>[Object(i["D"])(e.$slots,"default")]),_:3},16,["class"])}var nr=n("f981"),ir=n("4bf3");const{strings:sr,cssClasses:ar}=nr["a"];var or={name:"foxy-list",props:{nonInteractive:{type:Boolean,default:!1},dense:Boolean,avatarList:Boolean,twoLine:Boolean,singleSelection:Boolean,wrapFocus:Boolean,textualList:Boolean,modelValue:{type:[String,Number,Array]},tag:{type:String,default:"ul"},ariaOrientation:{type:String,default:"vertical"},thumbnailList:Boolean,iconList:Boolean,videoList:Boolean,typeAhead:Boolean},setup(e,{emit:t}){const n=Object(i["A"])({classes:{"mdc-deprecated-list--dense":e.dense,"mdc-deprecated-list--avatar-list":e.avatarList,"mdc-deprecated-list--two-line":e.twoLine,"mdc-deprecated-list--non-interactive":e.nonInteractive,"mdc-deprecated-list--textual-list":e.textualList,"mdc-deprecated-list--icon-list":e.iconList,"mdc-deprecated-list":1,"mdc-deprecated-list--thumbnail-list":e.thumbnailList,"mdc-deprecated-list--video-list":e.videoList},rootAttrs:{"aria-orientation":e.ariaOrientation},listn:0,listRoot:null}),s=Object(i["B"])(e.singleSelection);let a,o;s.value&&(n.rootAttrs.role="listbox");const l=Object(i["B"])({}),c=e=>{l.value[e.itemId]=e};Object(i["z"])("registerListItem",c);const r=e=>{s.value=e,a.setSingleSelection(e)},d=e=>{a.setSelectedIndex(e)},p=()=>a.getSelectedIndex(),u=Object(i["B"])([]),m=()=>{const e=[].slice.call(n.listRoot.querySelectorAll("."+ir["b"][ar.LIST_ITEM_CLASS]));u.value=e},b=e=>{const t=u.value[e];if(t){const e=t.dataset.myitemid;return l.value[e]}},h=e=>{const t=e.target.dataset.myitemid;if(void 0!==t){const e=u.value.findIndex(({dataset:{myitemid:e}})=>e===t);return e}const n=e.target,i=Object(co["a"])(n,`.${ir["b"][ar.LIST_ITEM_CLASS]}, .${ir["b"][ar.ROOT]}`);return i&&Object(co["b"])(i,"."+ir["b"][ar.LIST_ITEM_CLASS])?u.value.indexOf(i):-1},y=()=>{a.setVerticalOrientation("vertical"==e.ariaOrientation),[].slice.call(n.listRoot.querySelectorAll(`.${ir["b"][ar.LIST_ITEM_CLASS]}:not([tabindex])`)).forEach(e=>{e.setAttribute("tabindex",-1)}),[].slice.call(n.listRoot.querySelectorAll(sr.FOCUSABLE_CHILD_ELEMENTS)).forEach(e=>e.setAttribute("tabindex",-1)),a.layout()},f=()=>{const e=n.listRoot.querySelectorAll(sr.ARIA_ROLE_CHECKBOX_SELECTOR),t=n.listRoot.querySelector(sr.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){const e=n.listRoot.querySelectorAll(sr.ARIA_CHECKED_CHECKBOX_SELECTOR);d([].map.call(e,e=>u.value.indexOf(e)))}else t&&d(u.value.indexOf(t))},O=e=>{const t=e.querySelector("."+ir["b"][ar.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(t)return t.textContent||"";const n=e.querySelector("."+ir["b"][ar.LIST_ITEM_TEXT_CLASS]);return n&&n.textContent||""},j=(e,t)=>{a.setEnabled(e,t)},g=(e,t)=>a.typeaheadMatchItem(e,t,!0),v=e=>{const t=h(e);a.handleFocusIn(e,t)},_=e=>{const t=h(e);a.handleFocusOut(e,t)},k=e=>{const t=h(e),n=e.target;if("Enter"===e.key){let e=n.querySelector("a");e&&e.click()}a.handleKeydown(e,n.classList.contains(ir["b"][ar.LIST_ITEM_CLASS]),t)},S=e=>{const t=h(e),n=e.target;let i=n.querySelector("a");i&&i.click();const s=!Object(co["b"])(n,sr.CHECKBOX_RADIO_SELECTOR);a.handleClick(t,s)},x={click:e=>S(e),focusin:e=>{v(e)},focusout:e=>{_(e)},keydown:e=>k(e)},A=()=>a.isTypeaheadInProgress(),T={addClassForElementIndex:(e,t)=>{const n=b(e);null===n||void 0===n||n.classList.add(t)},focusItemAtIndex:e=>{const t=u.value[e];t&&t.focus()},getAttributeForElementIndex:(e,t)=>{const n=b(e);return null===n||void 0===n?void 0:n.getAttribute(t)},getFocusedElementIndex:()=>u.value.indexOf(document.activeElement),getListItemCount:()=>u.value.length,getPrimaryTextAtIndex:e=>O(u.value[e]),hasCheckboxAtIndex:e=>{const t=u.value[e];return t&&!!t.querySelector(sr.CHECKBOX_SELECTOR)},hasRadioAtIndex:e=>{const t=u.value[e];return t&&!!t.querySelector(sr.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:e=>{const t=u.value[e],n=t.querySelector(sr.CHECKBOX_SELECTOR);return n.checked},isFocusInsideList:()=>{const e=n.listRoot;return e&&e!==document.activeElement&&e.contains(document.activeElement)},isRootFocused:()=>document.activeElement===n.listRoot,listItemAtIndexHasClass:(e,t)=>{const n=b(e);null===n||void 0===n||n.classList.contains(t)},notifyAction:i=>{Qa(n.listRoot,sr.ACTION_EVENT,{index:i},!0),Array.isArray(e.modelValue)?t("update:modelValue",a.getSelectedIndex()):t("update:modelValue",i)},removeClassForElementIndex:(e,t)=>{const n=b(e);null===n||void 0===n||n.classList.remove(t)},setAttributeForElementIndex:(e,t,n)=>{const i=b(e);null===i||void 0===i||i.setAttribute(t,n)},setCheckedCheckboxOrRadioAtIndex:(e,t)=>{const n=u.value[e],i=n.querySelector(sr.CHECKBOX_RADIO_SELECTOR);i&&(i.checked=t);const s=document.createEvent("Event");s.initEvent("update:modelValue",!0,!0),null===i||void 0===i||i.dispatchEvent(s)},setTabIndexForListItemChildren:(e,t)=>{const n=u.value[e],i=[].slice.call(n.querySelectorAll(sr.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX));i.forEach(e=>{var n;const i=null!==(n=l.value[e.dataset.myitemid])&&void 0!==n?n:e;i.setAttribute("tabindex",t)})}};return Object(i["U"])(()=>e.modelValue,t=>{(Array.isArray(t)||e.modelValue!=t)&&a.setSelectedIndex(t)}),Object(i["U"])(()=>e.wrapFocus,e=>a.setWrapFocus(e)),Object(i["U"])(()=>e.ariaOrientation,e=>a.setVerticalOrientation("vertical"===e)),Object(i["U"])(()=>e.typeAhead,e=>a.setHasTypeahead(e)),Object(i["w"])(()=>{if(m(),a=new nr["a"](T),a.init(),s.value&&"number"===typeof e.modelValue&&!isNaN(e.modelValue)){const t=e.modelValue,n=T.listItemAtIndexHasClass(t,ir["b"][ar.LIST_ITEM_SELECTED_CLASS]),i=T.listItemAtIndexHasClass(t,ir["b"][ar.LIST_ITEM_ACTIVATED_CLASS]);n||i||T.addClassForElementIndex(e.modelValue,ir["b"][ar.LIST_ITEM_SELECTED_CLASS]),T.setAttributeForElementIndex(t,"tabindex",0),a.setSingleSelection(!0),a.setSelectedIndex(t)}y(),f(),a.setWrapFocus(e.wrapFocus),a.setVerticalOrientation("vertical"===e.ariaOrientation),e.typeAhead&&a.setHasTypeahead(e.typeAhead),o=new MutationObserver(()=>{m()}),o.observe(n.listRoot,{childList:!0})}),Object(i["v"])(()=>{o.disconnect(),a.destroy()}),{...Object(i["N"])(n),listItems:l,listElements:u,rootListeners:x,layout:y,setEnabled:j,typeaheadMatchItem:g,typeaheadInProgress:A,getSelectedIndex:p,setSelectedIndex:d,getPrimaryText:O,setSingleSelection:r}}};n("f324");const lr=W()(or,[["render",tr]]);var cr=lr,rr=Ya({foxyList:cr,foxyListItem:er}),dr={name:"foxy-menu-anchor",setup(e,{slots:t}){return()=>{var e;return Object(i["n"])("div",{class:{"mdc-menu-surface--anchor":1}},null===(e=t.default)||void 0===e?void 0:e.call(t))}}},pr={name:"foxy-menu-item",props:{disabled:Boolean},setup(e,{slots:t}){return()=>{var n;return Object(i["n"])("li",{class:{"mdc-menu-divider":1,"mdc-list-divider":1},tabindex:e.disabled?"-1":"0","aria-disabled":e.disabled,role:"menuitem"},null===(n=t.default)||void 0===n?void 0:n.call(t))}}};function ur(e,t){return Object(i["y"])(),Object(i["g"])("div",Object(i["q"])({ref:"root",class:e.classes},Object(i["K"])(e.rootListeners,!0)),[Object(i["D"])(e.$slots,"default")],16)}var mr=n("bba7");const{cssClasses:br,strings:hr}=mr["a"];var yr={name:"foxy-menu-surface",props:{modelValue:[Boolean,Object],"quick-open":Boolean,"anchor-corner":[String,Number],"anchor-margin":Object},setup(e,{emit:t}){const n=Object(i["A"])({classes:{"mdc-menu-surface":1},root:null});let s,a,o;const l=e=>{s.handleBodyClick(e)},c=()=>{document.body.addEventListener("click",l)},r=()=>{document.body.removeEventListener("click",l)},d=e=>{s.handleKeydown(e)},p=()=>({isFocused:()=>document.activeElement===n.root,saveFocus:()=>{o=document.activeElement},restoreFocus:()=>{n.root.contains(document.activeElement)&&o&&o.focus&&o.focus()}}),u=()=>({getInnerDimensions:()=>({width:n.root.offsetWidth,height:n.root.offsetHeight}),getAnchorDimensions:()=>a?a.getBoundingClientRect():null,getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{n.root.style.left="left"in e?e.left+"px":null,n.root.style.right="right"in e?e.right+"px":null,n.root.style.top="top"in e?e.top+"px":null,n.root.style.bottom="bottom"in e?e.bottom+"px":null},setMaxHeight:e=>{n.root.style.maxHeight=e}}),m={keydown:e=>d(e)},b=e=>{const t=e?"open":"close";s[t]()},h=e=>{s.setIsHoisted(e)},y=()=>{document.body.appendChild(n.root.parentElement.removeChild(n.root)),h(!0)},f=e=>{if(e)n.classes={...n.classes,[br.FIXED]:!0};else{const{[br.FIXED]:e,...t}=n.classes;n.classes=t}s.setFixedPosition(e)},O=(e,t)=>{s.setAbsolutePosition(e,t),h(!0)},j=e=>{s.setAnchorCorner(e)},g=e=>{s.setAnchorMargin(e)},v=e=>{a=e},_=e=>{s.open(e)},k=(e=!1)=>{s.close(e)},S=()=>{k()},x=()=>!!s&&s.isOpen(),A={addClass:e=>n.classes={...n.classes,[e]:!0},removeClass:e=>{const{[e]:t,...i}=n.classes;n.classes=i},hasClass:e=>n.root.classList.contains(e),hasAnchor:()=>!!a,notifyClose:()=>{n.root&&Qa(n.root,hr.CLOSED_EVENT,{}),r(),t("mdcmenusurface:closed"),t("update:modelValue",!1)},notifyOpen:()=>{Qa(n.root,hr.OPENED_EVENT,{}),c(),t("mdcmenusurface:opened"),t("update:modelValue",!0)},isElementInContainer:e=>{var t;return null===(t=n.root)||void 0===t?void 0:t.contains(e)},isRtl:()=>"rtl"===getComputedStyle(n.root).getPropertyValue("direction"),setTransformOrigin:e=>{n.root.style.setProperty(Object(Dl["b"])(window,"transform")+"-origin",e)}};return Object(i["U"])(()=>e.modelValue,e=>b(e)),Object(i["U"])(()=>e.quickOpen,e=>s.setQuickOpen(e)),Object(i["w"])(()=>{s=new mr["a"]({...A,...p(),...u()}),s.init(),n.root.parentElement&&n.root.parentElement.classList.contains(br.ANCHOR)&&(a=n.root.parentElement)}),Object(i["v"])(()=>{o=null,s.destroy()}),{...Object(i["N"])(n),rootListeners:m,hoistMenuToBody:y,setFixedPosition:f,setAbsolutePosition:O,setAnchorCorner:j,setAnchorMargin:g,setMenuSurfaceAnchorElement:v,show:_,hide:S,isOpen:x,close:k}}};const fr=W()(yr,[["render",ur]]);var Or=fr;function jr(e,t){const n=Object(i["E"])("foxy-list"),s=Object(i["E"])("foxy-menu-surface");return Object(i["y"])(),Object(i["e"])(s,{ref:"menuSurface",class:"mdc-menu","quick-open":e.quickOpen,modelValue:e.menuOpen,onKeydown:e.handleKeydown,"onUpdate:modelValue":e.onChange,"onMdcmenusurface:opened":e.handleMenuSurfaceOpened,"onMdcmenusurface:closed":e.handleMenuSurfaceClosed},{default:Object(i["V"])(()=>[Object(i["k"])(n,{ref:"list",role:"menu","aria-hidden":"true","wrap-focus":e.myWrapFocus,"onUpdate:modelValue":e.handleAction,tabindex:"-1","type-ahead":e.typeAhead,"single-selection":e.singleSelection},{default:Object(i["V"])(()=>[Object(i["D"])(e.$slots,"default")]),_:3},8,["wrap-focus","onUpdate:modelValue","type-ahead","single-selection"])]),_:3},8,["quick-open","modelValue","onKeydown","onUpdate:modelValue","onMdcmenusurface:opened","onMdcmenusurface:closed"])}var gr=n("9f68");const{cssClasses:vr,strings:_r}=gr["a"],kr={NONE:0,LIST_ROOT:1,FIRST_ITEM:2,LAST_ITEM:3};var Sr={name:"foxy-menu",props:{modelValue:[Boolean,Object],quickOpen:Boolean,anchorCorner:[String,Number],anchorMargin:Object,fixed:Boolean,absolutePosition:Array,typeAhead:Boolean,singleSelection:Boolean,defaultFocusState:{type:String,default:()=>"LIST_ROOT"}},setup(e,{emit:t}){const n=Object(i["A"])({classes:{},styles:{},menuOpen:!1,myWrapFocus:!0,menuSurface:null,list:null});let s,a;const o=Object(i["c"])(()=>{var e,t;return null!==(e=null===(t=n.list)||void 0===t?void 0:t.listElements)&&void 0!==e?e:[]}),l=Object(i["c"])(()=>{var e;return null!==(e=n.list.listItems)&&void 0!==e?e:[]}),c=e=>{const t=o.value[e],n=t.dataset.myitemid;return l.value[n]},r=Object(i["c"])({get(){return n.menuOpen},set(e){n.menuOpen=e}}),d=Object(i["c"])({get(){return n.myWrapFocus},set(e){n.myWrapFocus=e}}),p=()=>{var e;return null===(e=n.list)||void 0===e?void 0:e.layout()},u=e=>{s.handleItemAction(o.value[e])},m=e=>s.handleKeydown(e),b=()=>{s.handleMenuSurfaceOpened(),t("mdcmenusurface:opened")},h=()=>{t("mdcmenusurface:closed")},y=e=>{n.menuOpen=e,t("update:modelValue",e)},f=e=>{"string"==typeof e&&(e=kr[e]),s.setDefaultFocusState(e)},O=e=>{n.menuSurface.setAnchorCorner(e)},j=e=>{n.menuSurface.setMenuSurfaceAnchorElement(e)},g=e=>{var t;return null===(t=n.list)||void 0===t?void 0:t.setSelectedIndex(e)},v=()=>{var e,t;return null!==(e=null===(t=n.list)||void 0===t?void 0:t.getSelectedIndex())&&void 0!==e?e:-1},_=e=>{n.menuSurface.setAnchorMargin(e)},k=e=>{const t=o.value;return e<t.length?t[e]:null},S=e=>{const t=k(e);return t&&n.list&&n.list.getPrimaryText(t)||""},x=e=>{n.menuSurface.setFixedPosition(e)},A=()=>{n.menuSurface.hoistMenuToBody()},T=e=>{n.menuSurface.setIsHoisted(e)},w=(e,t)=>{n.menuSurface.setAbsolutePosition(e,t)},C=()=>{var e;return null!==(e=n.list.typeAheadInProgress)&&void 0!==e&&e},E=(e,t)=>n.list?n.list.typeaheadMatchItem(e,t):-1,I=e=>{var t;return null===(t=n.list)||void 0===t?void 0:t.setSingleSelection(e)},D={addClassToElementAtIndex:(e,t)=>{const n=c(e);n.classList.add(t)},removeClassFromElementAtIndex:(e,t)=>{const n=c(e);n.classList.remove(t)},addAttributeToElementAtIndex:(e,t,n)=>{const i=c(e);i.setAttribute(t,n)},removeAttributeFromElementAtIndex:(e,t)=>{const n=c(e);n.removeAttribute(t)},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:e=>{n.menuSurface.close(e),t("update:modelValue",!1)},getElementIndex:e=>o.value.findIndex(t=>t==e),notifySelected:e=>{Qa(a,_r.SELECTED_EVENT,{index:e.index,item:o.value[e.index]}),t("select",{index:e.index,item:o.value[e.index]})},getMenuItemCount:()=>o.value.length,focusItemAtIndex:e=>o.value[e].focus(),focusListRoot:()=>{n.menuSurface.$el.querySelector(_r.LIST_SELECTOR).focus()},isSelectableItemAtIndex:e=>!!Object(co["a"])(o.value[e],"."+vr.MENU_SELECTION_GROUP),getSelectedSiblingOfItemAtIndex:e=>{const t=Object(co["a"])(o.value[e],"."+vr.MENU_SELECTION_GROUP),n=t.querySelector("."+vr.MENU_SELECTED_LIST_ITEM);return n?o.value.findIndex(e=>e==n):-1}};return Object(i["U"])(()=>e.modelValue,e=>{n.menuOpen=e}),Object(i["w"])(()=>{if(a=n.menuSurface.$el,n.menuOpen=e.modelValue,s=new gr["a"](D),s.init(),e.fixed&&n.menuSurface.setFixedPosition(e.fixed),e.absolutePosition){const[t,i]=e.absolutePosition;n.menuSurface.setAbsolutePosition(t,i)}}),Object(i["v"])(()=>{s.destroy()}),{...Object(i["N"])(n),handleAction:u,handleKeydown:m,onChange:y,handleMenuSurfaceOpened:b,handleMenuSurfaceClosed:h,setAbsolutePosition:w,setIsHoisted:T,hoistMenuToBody:A,setFixedPosition:x,getOptionByIndex:k,setAnchorMargin:_,setAnchorElement:j,setAnchorCorner:O,getSelectedIndex:v,setSelectedIndex:g,setDefaultFocusState:f,wrapFocus:d,surfaceOpen:r,layout:p,getPrimaryTextAtIndex:S,items:o,typeaheadInProgress:C,typeaheadMatchItem:E,setSingleSelection:I}}};n("2e5a");const xr=W()(Sr,[["render",jr]]);var Ar=xr,Tr=Ya({foxyMenu:Ar,foxyMenuSurface:Or,foxyMenuItem:pr,foxyMenuAnchor:dr,foxyList:cr});const wr={class:"notification-text md-body-2"};function Cr(e,t){const n=Object(i["E"])("foxy-icon");return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(e.classes)},[e.icon?(Object(i["y"])(),Object(i["e"])(n,{key:0,icon:e.icon,"foxy-theme":e.theme},null,8,["icon","foxy-theme"])):Object(i["f"])("",!0),Object(i["h"])("div",wr,[Object(i["D"])(e.$slots,"default")])],2)}var Er={name:"foxy-notification",components:{icon:wc},props:{icon:{type:String,default:null},theme:{type:String,default:"blue"}},setup(e){const t=Object(i["A"])({classes:{"md-notification":!0,["md-theme-"+e.theme]:!0,["mdc-theme-"+e.theme]:!0},root:null});return{...Object(i["N"])(t)}}};n("8fd7");const Ir=W()(Er,[["render",Cr]]);var Dr=Ir,Pr=Ya({foxyNotification:Dr});const Vr=["for"],Lr={class:"vue-tel-input-container"},Mr={"data-type":"ssa-tel-input-anchor"},Br=["aria-controls","aria-expanded"],Rr={class:"vti__selection"},Nr=["id"],zr={class:"vue-tel-input-dropdown__search"},Fr={class:"screen-reader-text"},qr=["placeholder","aria-controls"],Jr=["id"],Ur={role:"presentation"},Hr={role:"group"},$r=["id","data-country-iso2","data-country-name","data-country-dial-code","onClick"],Wr={class:"vti__name"},Gr={class:"vti__dial-code"},Kr={key:0,class:"mdc-text-field-helper-line"};function Xr(e,t){const n=Object(i["E"])("foxy-textfield-icon"),s=Object(i["E"])("foxy-icon"),a=Object(i["E"])("vue-tel-input"),o=Object(i["E"])("foxy-textfield-helper-text");return Object(i["y"])(),Object(i["g"])("div",null,[Object(i["h"])("div",{ref:"wrapper",class:Object(i["s"])(["textfield-container md-input-container foxy-phone-container",e.classes])},[t[11]||(t[11]=Object(i["h"])("div",{class:"mdc-text-field__ripple"},null,-1)),Object(i["h"])("label",{for:e.normalizedInputOptions.id,class:Object(i["s"])(e.labelClasses)},Object(i["J"])(e.label),11,Vr),Object(i["h"])("div",Lr,[e.leadingIcon?(Object(i["y"])(),Object(i["e"])(n,{key:0},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.leadingIcon),1)]),_:1})):Object(i["f"])("",!0),Object(i["h"])("div",Mr,[Object(i["h"])("button",{onClick:t[0]||(t[0]=(...t)=>e.anchorClick&&e.anchorClick(...t)),onKeydown:t[1]||(t[1]=Object(i["X"])((...t)=>e.anchorClick&&e.anchorClick(...t),["down"])),"aria-controls":"ssa_vti__dropdown"+e.uid,"aria-haspopup":"dialog","aria-expanded":e.isMenuOpen.toString(),type:"button",ref:"ssaTelInputAnchorRef"},[Object(i["h"])("span",Rr,[t[9]||(t[9]=Object(i["h"])("span",{"aria-hidden":"true",class:"vti__flag"},null,-1)),Object(i["h"])("span",{"aria-hidden":"true",class:Object(i["s"])(["vti__dropdown-arrow",e.isMenuOpen?"open":""])},"▲",2)]),t[10]||(t[10]=Object(i["h"])("span",{class:"screen-reader-text"},null,-1))],40,Br),Object(i["W"])(Object(i["h"])("div",{ref:"ssaTelInputDropdownRef","data-type":"ssa-tel-input-dropdown",role:"dialog",tabindex:"-1",id:"ssa_vti__dropdown"+e.uid,class:"vue-tel-input-dropdown"},[Object(i["h"])("div",null,[Object(i["h"])("div",zr,[Object(i["k"])(s,{"aria-hidden":"true",icon:"search",theme:"grey"}),Object(i["h"])("label",null,[Object(i["h"])("span",Fr,Object(i["J"])(e.searchInputPlaceholder),1),Object(i["W"])(Object(i["h"])("input",{type:"search",name:"ssa_vti__search","onUpdate:modelValue":t[2]||(t[2]=t=>e.searchQuery=t),ref:"ssaTelInputInputRef",class:"ssa_vti__search",placeholder:e.searchInputPlaceholder,role:"combobox","aria-controls":"listbox-"+e.uid,onKeydown:[t[3]||(t[3]=Object(i["X"])((...t)=>e.handleSearchEscape&&e.handleSearchEscape(...t),["escape"])),t[4]||(t[4]=Object(i["X"])((...t)=>e.handleSearchDown&&e.handleSearchDown(...t),["down"])),t[5]||(t[5]=Object(i["X"])((...t)=>e.handleSearchUp&&e.handleSearchUp(...t),["up"])),t[6]||(t[6]=Object(i["X"])((...t)=>e.handleSearchEnter&&e.handleSearchEnter(...t),["enter"])),t[7]||(t[7]=Object(i["X"])((...t)=>e.handleSearchTab&&e.handleSearchTab(...t),["tab"]))],"aria-activedescendant":""},null,40,qr),[[i["S"],e.searchQuery]])])]),Object(i["h"])("div",{role:"listbox",id:"listbox-"+e.uid,tabindex:"-1",class:"vue-tel-input-dropdown__countries"},[Object(i["h"])("div",Ur,[Object(i["h"])("div",Hr,[(Object(i["y"])(!0),Object(i["g"])(i["a"],null,Object(i["C"])(e.filteredCountries,(t,n)=>(Object(i["y"])(),Object(i["g"])("div",{key:t.iso2,role:"option",id:`vti__country-${t.iso2}-${e.uid}`,"data-country-iso2":t.iso2.toLowerCase(),"data-country-name":t.name,"data-country-dial-code":t.dialCode,class:Object(i["s"])(["ssa_vti__country vti__country vti__dropdown-item",0===n?"vti__country--highlighted":""]),onClick:n=>e.onCountryClick(t)},[Object(i["h"])("span",{class:Object(i["s"])(["vti__flag",t.iso2.toLowerCase()])},null,2),Object(i["h"])("span",Wr,Object(i["J"])(t.name),1),Object(i["h"])("span",Gr,Object(i["J"])(t.dialCode),1)],10,$r))),128)),Object(i["W"])(Object(i["h"])("div",{class:"vti__no-results"},Object(i["J"])(e.noResultsText),513),[[i["T"],!e.filteredCountries.length]])])])],8,Jr)])],8,Nr),[[i["T"],e.isMenuOpen]])]),Object(i["k"])(a,{modelValue:e.phoneNumberVal,"onUpdate:modelValue":t[8]||(t[8]=t=>e.phoneNumberVal=t),ref:"refRoot","auto-format":e.autoFormat,"auto-default-country":!1,"default-country":e.telCountryCode,"input-options":e.normalizedInputOptions,"dropdown-options":e.normalizedDropdownOptions,disabled:e.disabled,mode:e.mode,validCharactersOnly:!0,onFocus:e.handleFocus,onBlur:e.handleBlur,onValidate:e.validate,onOnInput:e.handleInput,onCountryChanged:e.onCountryChange},null,8,["modelValue","auto-format","default-country","input-options","dropdown-options","disabled","mode","onFocus","onBlur","onValidate","onOnInput","onCountryChanged"]),e.trailingIcon?(Object(i["y"])(),Object(i["e"])(n,{key:1},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.trailingIcon),1)]),_:1})):Object(i["f"])("",!0)])],2),e.hasHelpline?(Object(i["y"])(),Object(i["g"])("div",Kr,[e.helptext?(Object(i["y"])(),Object(i["e"])(o,{key:0,ref:"helperText",id:e.helpTextId,helptext:e.helptext,persistent:e.helptextPersistent,validation:e.helptextValidation},null,8,["id","helptext","persistent","validation"])):Object(i["f"])("",!0)])):Object(i["f"])("",!0)])}var Yr=n("9998"),Qr=n("fb67");let Zr=0;var ed={name:"foxy-phone-field",props:{autoFormat:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},dropdownOptions:{type:Object,default:()=>({})},helptext:String,helptextPersistent:Boolean,helptextValidation:Boolean,placeholder:{type:String,default:""},leadingIcon:{type:String,default:""},trailingIcon:{type:String,default:""},inputOptions:{type:Object,default:()=>({})},label:String,mode:{type:String,default:"international"},modelValue:String,outline:Boolean,required:Boolean},setup(e,{emit:t}){var n,a,o;const l=Object(s["f"])(),c=null!==(n=null===Qr["a"]||void 0===Qr["a"]||null===(a=Qr["a"].props)||void 0===a||null===(o=a.allCountries)||void 0===o?void 0:o.default())&&void 0!==n?n:[],r=Object(i["B"])(null),d=Object(i["B"])(null),p=Object(i["B"])(null),u=Object(i["B"])(null),m=Object(i["B"])(null),b=Object(i["B"])(""),h=Object(i["B"])(!1),y=Object(i["P"])(),f=l.state.translations.actions.searchCountry||"Search country",O=l.state.translations.errors.noResults||"No results found!",j=Object(i["c"])(()=>{if(!b.value)return c||[];const e=b.value.toLowerCase();return(null===c||void 0===c?void 0:c.filter(t=>t.name.toLowerCase().includes(e)||t.dialCode.includes(e)||t.iso2.toLowerCase().includes(e)))||[]}),g=Object(i["B"])(l.state.telCountryCode),v=Object(i["A"])({classes:{"mdc-textfield":!0,"md-input":!0,"mdc-text-field":!0,"mdc-text-field--upgraded":!0,"mdc-text-field--disabled":e.disabled,"mdc-text-field--outlined":e.outline,"mdc-text-field--filled":Boolean(!e.outline),"mdc-text-field--no-label":!e.label,"mdc-text-field--with-leading-icon":!!e.leadingIcon,"mdc-text-field--with-trailing-icon":!!e.trailingIcon,"ssa-phone-field--rtl":l.state.rtl},labelClasses:{"mdc-floating-label":!0,"mdc-floating-label--required":e.required,"mdc-floating-label--float-above":!0},helpTextId:"mcw-help-"+Zr++,labelId:"mcw-label-"+Zr}),_=Object(i["B"])(null),k=Object(i["c"])({get:()=>e.modelValue,set:e=>t("update:modelValue",e)}),S=Object(i["c"])(()=>e.helptext);Object(i["U"])(()=>e.helptextValidation,e=>v.classes["mdc-text-field--invalid"]=e);const x=Object(i["c"])(()=>{let t={autocomplete:"on",autofocus:!1,"aria-describedby":"",id:"",maxlength:25,name:"telephone",placeholder:e.placeholder,showDialCode:!1,readonly:!1,required:!1,tabindex:0,type:"tel",styleClasses:""};return S&&(t["aria-describedby"]=v.helpTextId),Object.keys(e.inputOptions).length?Object.assign({},t,e.inputOptions):Object.assign({},t)}),A=Object(i["c"])(()=>{let t={disabled:!1,showDialCodeInList:!0,showDialCodeInSelection:!1,showFlags:!0,showSearchBox:!1,tabindex:0,width:"390px"};return Object.keys(e.dropdownOptions).length?Object.assign({},t,e.dropdownOptions):Object.assign({},t)}),T=Object(i["c"])(()=>l.state.settings),w=e=>{if("object"!=typeof e)return console.error("foxyCustomIsValid expects param object!"),!1;if(!Object.prototype.hasOwnProperty.call(e,"valid")||!Object.prototype.hasOwnProperty.call(e,"number"))return!1;if(!1===Boolean(e.valid))return!1;if("ZA"===e.countryCode){const t=/^(?:\+27|27|0)(75[0-9]{7})$/;if(t.test(e.number))return!0}return!1!==Boolean(Object(Yr["a"])(e.number))},C=n=>{let i=!0;i=e.required?!!n.formatted.length&&w(n):!(!n.formatted||0!==n.formatted.length)||w(n),t("validate",i)},E=()=>{v.classes["mdc-text-field--focused"]=!1,e.helptextPersistent||_&&_._value&&_._value.foundation&&_._value.foundation.adapter&&_._value.foundation.adapter.setAttr("aria-hidden",!0)},I=()=>{v.classes["mdc-text-field--focused"]=!0,_&&_._value&&_._value.foundation&&_._value.foundation.adapter&&_._value.foundation.adapter.removeAttr("aria-hidden")},D=(e,n)=>{C(n),w(n)&&t("update:modelValue",n.formatted)},P=()=>{if(!p.value)return void console.warn("SSA Tel Input Anchor is not set, cannot proceed with anchor functionality.");const e=p.value,t=d.value;if(!t)return;const n=t.querySelector(".vue-tel-input"),i=n.querySelector(".vti__dropdown");if(i)return[i,e];console.warn("Original anchor element not found, cannot proceed with anchor functionality.")},V=()=>{Object(i["r"])(()=>{var e;if(!p.value)return;const[t,n]=null!==(e=P())&&void 0!==e?e:[],i=t.querySelector(".vti__flag"),s=n.querySelector(".vti__flag");s.className=i.className,p.value.querySelector(".screen-reader-text").textContent=n.getAttribute("data-country-name")||"Select country"})},L=e=>{if(!p.value)return void console.warn("SSA Tel Input Anchor is not set, cannot proceed with anchor functionality.");const t=p.value;t.setAttribute("data-country-code",e.iso2),t.setAttribute("data-country-name",e.name),t.setAttribute("data-dial-code",e.dialCode),g.value=e.iso2,M(e)},M=e=>{var t;const[n,s]=null!==(t=P())&&void 0!==t?t:[];if(!n||!s)return void console.warn("Original or SSA Tel Input Anchor elements not found, cannot proceed with mock user selection.");n.click();const a=d.value;a&&Object(i["r"])(()=>{const t=a.querySelector(".vue-tel-input"),n=t.querySelector("li .vti__flag."+e.iso2.toLowerCase());n?n.click():console.warn(`Country element with code ${e.iso2} not found, cannot proceed with mock user selection.`)})},B=()=>{const e=u.value;if(!e)return;const t=m.value.querySelector(".ssa_vti__country.vti__country.vti__dropdown-item.vti__country--highlighted");t?e.setAttribute("aria-activedescendant",t.id):e.removeAttribute("aria-activedescendant")},R=()=>{Object(i["r"])(()=>{const e=p.value.getBoundingClientRect(),t=l.state.rtl,n=240,i=190,s=27,a=i+s;if(t)m.value.style.left="auto",m.value.style.right="0px";else{const t=window.innerWidth-e.right;if(t<n){const t=e.left-8;m.value.style.left=`-${t}px`}else m.value.style.left="0px",m.value.style.right="auto"}if(window.innerHeight-e.bottom<a){const e=a;m.value.style.top=`-${e}px`}else m.value.style.top=s+"px"})},N=()=>{const e=h.value;if(h.value=!h.value,!e){R();const e=u.value;if(!e)return;Object(i["r"])(()=>{e.focus(),B()})}},z=()=>{if("international"!==e.mode)return;if(!p.value)return void console.warn("SSA Tel Input Anchor is not set, cannot proceed with anchor functionality.");const t=p.value,n=d.value;if(!n)return;const i=n.querySelector(".vue-tel-input"),s=i.querySelector(".vti__dropdown");s?(s.setAttribute("tabindex","-1"),t.id="ssa-tel-input-anchor-"+y):console.warn("Original anchor element not found, cannot proceed with anchor functionality.")};Object(i["w"])(()=>{document.addEventListener("click",U),z()});const F=()=>{const e=m.value.querySelector(".ssa_vti__country.vti__country.vti__dropdown-item.vti__country--highlighted");if(e){const t=c.find(t=>t.iso2.toLowerCase()===e.dataset.countryIso2.toLowerCase());t&&(L(t),setTimeout(()=>{G()},80))}},q=()=>{h.value=!0},J=()=>{Object(i["r"])(()=>{h.value=!1})},U=e=>{const t=e.target;t&&(t.closest('[data-type="ssa-tel-input-anchor"]')||h.value&&(h.value=!1))},H=()=>{h.value&&(b.value&&b.value.length>0||G())},$=()=>{if(!h.value)return;const e=m.value.querySelector(".ssa_vti__country.vti__country.vti__dropdown-item.vti__country--highlighted"),t=e?e.nextElementSibling:null;t&&(e.classList.remove("vti__country--highlighted"),t.classList.add("vti__country--highlighted"),B(),t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))},W=()=>{if(!h.value)return;const e=m.value.querySelector(".ssa_vti__country.vti__country.vti__dropdown-item.vti__country--highlighted"),t=e?e.previousElementSibling:null;t&&(e.classList.remove("vti__country--highlighted"),t.classList.add("vti__country--highlighted"),B(),t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))},G=()=>{h.value=!1;const e=p.value;e.focus()};return Object(i["U"])(j,()=>{Object(i["r"])(()=>{B()})}),Object(i["x"])(()=>{document.removeEventListener("click",U)}),{...Object(i["N"])(v),handleBlur:E,handleFocus:I,handleInput:D,hasHelpline:S,helperText:_,normalizedInputOptions:x,normalizedDropdownOptions:A,phoneNumberVal:k,ssaTelInputAnchorRef:p,ssaTelInputInputRef:u,refRoot:r,onCountryChange:V,onCountryClick:L,ssaTelInputDropdownRef:m,wrapper:d,settings:T,telCountryCode:g,isMenuOpen:h,anchorClick:N,validate:C,handleSearchEnter:F,handleSearchFocus:q,handleSearchTab:J,filteredCountries:j,searchQuery:b,searchInputPlaceholder:f,noResultsText:O,clickedOutside:U,handleSearchEscape:H,handleSearchDown:$,handleSearchUp:W,uid:y}},components:{foxyLineRipple:zo}};n("d6b7");const td=W()(ed,[["render",Xr]]);var nd=td,id=Ya({foxyPhoneField:nd});const sd={class:"md-spinner mdc-circular-progress__determinate-container"},ad=["viewBox"],od={class:"md-spinner mdc-circular-progress__indeterminate-container"},ld={class:"mdc-circular-progress__spinner-layer"},cd={class:"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"},rd=["viewBox"],dd={class:"mdc-circular-progress__gap-patch"},pd=["viewBox"],ud={class:"mdc-circular-progress__circle-clipper mdc-circular-progress__circle-right"},md=["viewBox"];function bd(e,t){return Object(i["y"])(),Object(i["g"])("div",Object(i["q"])({ref:"root",class:e.classes,role:"progressbar"},e.rootAttrs),[Object(i["h"])("div",sd,[(Object(i["y"])(),Object(i["g"])("svg",{class:"md-spinner-draw mdc-circular-progress__determinate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[Object(i["h"])("circle",Object(i["q"])({class:"mdc-circular-progress__determinate-track"},e.trackAttrs),null,16),Object(i["h"])("circle",Object(i["q"])({class:"mdc-circular-progress__determinate-circle"},e.circleAttrs),null,16)],8,ad))]),Object(i["h"])("div",od,[Object(i["h"])("div",ld,[Object(i["h"])("div",cd,[(Object(i["y"])(),Object(i["g"])("svg",{class:"md-spinner-draw mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[Object(i["h"])("circle",Object(i["t"])(Object(i["m"])(e.indeterminateAttrs)),null,16)],8,rd))]),Object(i["h"])("div",dd,[(Object(i["y"])(),Object(i["g"])("svg",{class:"mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[Object(i["h"])("circle",Object(i["t"])(Object(i["m"])(e.indeterminateAttrs)),null,16)],8,pd))]),Object(i["h"])("div",ud,[(Object(i["y"])(),Object(i["g"])("svg",{class:"mdc-circular-progress__indeterminate-circle-graphic",viewBox:e.viewbox,xmlns:"http://www.w3.org/2000/svg"},[Object(i["h"])("circle",Object(i["t"])(Object(i["m"])(e.indeterminateAttrs)),null,16)],8,md))])])])],16)}var hd=n("ae51");const yd={type:[Number,String],validator(e){return Number(e)>=0&&Number(e)<=1}};var fd={name:"foxy-progress-circular",props:{open:{type:Boolean,default:!0},indeterminate:Boolean,medium:Boolean,progress:yd,tag:{type:String,default:"div"},theme:{type:String,default:"default"}},setup(e){const t=Object(i["A"])({classes:{"mdc-circular-progress":1,"mdc-circular-progress--medium":e.medium,"mdc-circular-progress--large":!e.medium,["mdc-theme-name--"+e.theme]:!0},rootAttrs:e.medium?{style:{width:"36px",height:"36px"}}:{style:{width:"48px",height:"48px"}},circleAttrs:Od(e.medium,!1),trackAttrs:jd(e.medium,!1),indeterminateAttrs:Od(e.medium,!0),viewbox:e.medium?"0 0 36 36":"0 0 48 48",root:null});let n;const s={addClass:e=>{t.classes={...t.classes,[e]:!0}},getDeterminateCircleAttribute:e=>t.circleAttrs[e],hasClass:e=>t.root.classList.contains(e),removeClass:e=>{const{[e]:n,...i}=t.classes;t.classes=i},removeAttribute:e=>{const{[e]:n,...i}=t.rootAttrs;t.rootAttrs=i},setAttribute:(e,n)=>{t.rootAttrs={...t.rootAttrs,[e]:n}},setDeterminateCircleAttribute:(e,n)=>t.circleAttrs={...t.circleAttrs,[e]:n}};return Object(i["U"])(()=>e.open,e=>{e?n.open():n.close()}),Object(i["U"])(()=>e.progress,e=>{n.setProgress(Number(e))}),Object(i["U"])(()=>e.indeterminate,e=>{n.setDeterminate(!e)}),Object(i["w"])(()=>{n=new hd["a"](s),n.init(),n.setProgress(Number(e.progress)),n.setDeterminate(!e.indeterminate),e.open?n.open():n.close()}),Object(i["v"])(()=>n.destroy()),{...Object(i["N"])(t)}}};function Od(e=!1,t=!0){return e?{cx:"16",cy:"16",r:"12.5","stroke-dasharray":"78.54","stroke-dashoffset":t?"39.27":"78.54","stroke-width":"3"}:{cx:"24",cy:"24",r:"18","stroke-dasharray":"113.097","stroke-dashoffset":t?"56.549":"113.097","stroke-width":"4"}}function jd(e=!1){const{["stroke-dasharray"]:t,["stroke-dashoffset"]:n,...i}=Od(e);return i}n("7c00");const gd=W()(fd,[["render",bd]]);var vd=gd,_d=Ya({foxyProgressCircular:vd});const kd=["id","name","value","checked","disabled"],Sd=["for"];function xd(e,t){return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(e.formFieldClasses)},[Object(i["h"])("div",{ref:"root",class:Object(i["s"])(e.rootClasses),style:Object(i["u"])(e.styles)},[Object(i["h"])("input",Object(i["q"])({id:e.radioId,ref:"controlEl",name:e.name,value:e.value,type:"radio",class:"mdc-radio__native-control",onChange:t[0]||(t[0]=(...t)=>e.onChange&&e.onChange(...t))},e.$attrs,{checked:e.modelValue==e.value,disabled:e.disabled}),null,16,kd),t[2]||(t[2]=Object(i["h"])("div",{class:"mdc-radio__background"},[Object(i["h"])("div",{class:"mdc-radio__outer-circle"}),Object(i["h"])("div",{class:"mdc-radio__inner-circle"})],-1)),t[3]||(t[3]=Object(i["h"])("div",{class:"mdc-radio__ripple"},null,-1))],6),Object(i["h"])("label",{ref:"labelEl",for:e.radioId,onClick:t[1]||(t[1]=(...t)=>e.onChange&&e.onChange(...t))},[Object(i["D"])(e.$slots,"default",{},()=>[Object(i["j"])(Object(i["J"])(e.label),1)])],8,Sd)],2)}var Ad=n("1418");let Td=0;var wd={name:"foxy-radio",props:{label:String,alignEnd:Boolean,radioClasses:String,name:{type:String,required:!0},id:{type:String},value:String,modelValue:String,disabled:Boolean,checked:Boolean},setup(e,{emit:t}){var n;const s=Object(i["A"])({classes:{"mdc-radio":1,"md-radio":1},controlEl:void 0,labelEl:void 0,root:void 0}),{classes:a,styles:o,activate:l,deactivate:c}=mo(Object(i["M"])(s,"root"),{isUnbounded:()=>!0,isSurfaceActive:()=>!1,registerInteractionHandler:(e,t)=>{s.controlEl.addEventListener(e,t,Object(lo["a"])())},deregisterInteractionHandler:(e,t)=>{s.controlEl.removeEventListener(e,t,Object(lo["a"])())},computeBoundingRect:()=>s.root.getBoundingClientRect()});let r,d;const p=null!==(n=e.id)&&void 0!==n?n:"__mcw-radio-"+Td++,u=Object(i["c"])(()=>({...a.value,...s.classes,...e.radioClasses})),m=Object(i["c"])(()=>({"mdc-form-field":1,"mdc-form-field--align-end":e.alignEnd})),b=()=>{const n=s.controlEl.value;n!=e.modelValue&&t("update:modelValue",s.controlEl.value)},h=e=>{s.controlEl.checked=e},y=e=>{h(e==s.controlEl.value)},f={addClass:e=>s.classes={...s.classes,[e]:!0},removeClass:e=>{const{[e]:t,...n}=s.classes;s.classes=n},setNativeControlDisabled:e=>s.controlEl&&s.controlEl.disabled==e};return Object(i["U"])(()=>e.checked,e=>{h(e)}),Object(i["U"])(()=>e.disabled,e=>{r.setDisabled(e)}),Object(i["U"])(()=>e.modelValue,e=>{y(e)}),Object(i["w"])(()=>{r=new Ad["a"](f),d=new Vl["a"]({registerInteractionHandler:(e,t)=>{var n;return null===(n=s.labelEl)||void 0===n?void 0:n.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{var n;return null===(n=s.labelEl)||void 0===n?void 0:n.removeEventListener(e,t)},activateInputRipple:()=>{l()},deactivateInputRipple:()=>{c()}}),r.init(),d.init();const{checked:t,disabled:n,modelValue:i,value:a}=e;r.setDisabled(n),h(t||i==a),t&&b()}),Object(i["v"])(()=>{r.destroy(),d.destroy()}),{...Object(i["N"])(s),rootClasses:u,formFieldClasses:m,styles:o,onChange:b,onPicked:y,setChecked:h,radioId:p}}};n("0fa7");const Cd=W()(wd,[["render",xd]]);var Ed=Cd,Id=Ya({foxyRadio:Ed});const Dd={class:"select-wrapper"},Pd=["aria-required"],Vd={key:1,class:"mdc-select__ripple"},Ld={class:"mdc-select__selected-text-container"},Md={class:"mdc-select__selected-text"};function Bd(e,t){const n=Object(i["E"])("select-icon"),s=Object(i["E"])("foxy-notched-outline"),a=Object(i["E"])("foxy-floating-label"),o=Object(i["E"])("foxy-line-ripple"),l=Object(i["E"])("foxy-menu"),c=Object(i["E"])("select-helper-text");return Object(i["y"])(),Object(i["g"])("div",Dd,[Object(i["h"])("div",Object(i["q"])({ref:"root"},e.$attrs,{class:e.rootClasses}),[Object(i["h"])("div",Object(i["q"])({ref:"anchorEl",class:["mdc-select__anchor",e.rippleClasses],style:e.rippleStyles,onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t)),onKeydown:t[1]||(t[1]=(...t)=>e.handleKeydown&&e.handleKeydown(...t)),onFocus:t[2]||(t[2]=(...t)=>e.handleFocus&&e.handleFocus(...t)),onBlur:t[3]||(t[3]=(...t)=>e.handleBlur&&e.handleBlur(...t))},e.selectAnchorAttrs,{role:"button","aria-haspopup":"listbox","aria-required":e.required}),[e.leadingIcon?(Object(i["y"])(),Object(i["e"])(n,{key:0,ref:"leadingIconEl",icon:e.leadingIcon},null,8,["icon"])):Object(i["f"])("",!0),e.outlined?Object(i["f"])("",!0):(Object(i["y"])(),Object(i["g"])("span",Vd)),Object(i["h"])("span",Ld,[Object(i["h"])("span",Md,Object(i["J"])(e.selectedTextContent),1)]),t[4]||(t[4]=Object(i["h"])("span",{class:"mdc-select__dropdown-icon"},[Object(i["h"])("svg",{class:"mdc-select__dropdown-icon-graphic",viewBox:"7 10 10 5"},[Object(i["h"])("polygon",{class:"mdc-select__dropdown-icon-inactive",stroke:"none","fill-rule":"evenodd",points:"7 10 12 15 17 10"}),Object(i["h"])("polygon",{class:"mdc-select__dropdown-icon-active",stroke:"none","fill-rule":"evenodd",points:"7 15 12 10 17 15"})])],-1)),e.outlined?(Object(i["y"])(),Object(i["e"])(s,{key:2,ref:"outlineEl"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.label),1)]),_:1},512)):(Object(i["y"])(),Object(i["g"])(i["a"],{key:3},[Object(i["k"])(a,{ref:"labelEl"},{default:Object(i["V"])(()=>[Object(i["j"])(Object(i["J"])(e.label),1)]),_:1},512),Object(i["k"])(o,{ref:"lineRippleEl"},null,512)],64))],16,Pd),Object(i["k"])(l,{ref:"menu",class:Object(i["s"])(["mdc-select__menu",e.menuClasses]),"onUpdate:modelValue":e.handleChange,onSelect:e.handleMenuItemAction,"onMdcMenuSurface:opened":e.handleMenuOpened,"onMdcMenuSurface:closed":e.handleMenuClosed,role:"listbox","type-ahead":!0},{default:Object(i["V"])(()=>[Object(i["D"])(e.$slots,"default")]),_:3},8,["class","onUpdate:modelValue","onSelect","onMdcMenuSurface:opened","onMdcMenuSurface:closed"])],16),e.helptext?(Object(i["y"])(),Object(i["e"])(c,{key:0,ref:"helperTextEl",id:e.helpId,helptextPersistent:e.helptextPersistent,helptextValidation:e.helptextValidation,helptext:e.helptext},null,8,["id","helptextPersistent","helptextValidation","helptext"])):Object(i["f"])("",!0)])}var Rd=n("8a56");function Nd(e,t){return Object(i["y"])(),Object(i["g"])("p",{class:Object(i["s"])(e.classes)},Object(i["J"])(e.myHelptext),3)}var zd=n("1493"),Fd={name:"select-helper-text",props:{helptextPersistent:Boolean,helptextValidation:Boolean,helptext:String},setup(e){const t=Object(i["A"])({classes:{"mdc-select-helper-text":!0,"mdc-select-helper-text--persistent":e.helptextPersistent,"mdc-select-helper-text--validation-msg":e.helptextValidation},attrs:{"aria-hidden":"true"},myHelptext:e.helptext,foundation:{}}),n={addClass:e=>t.classes={...t.classes,[e]:!0},removeClass:e=>{const{[e]:n,...i}=t.classes;t.classes=i},hasClass:e=>Boolean(t.classes[e]),setAttr:(e,n)=>t.attrs={...t.attrs,[e]:n},removeAttr:e=>{const{[e]:n,...i}=t.attrs;t.attrs=i},setContent:e=>{t.myHelptext=e}};return Object(i["U"])(()=>e.helptextPersistent,e=>t.foundation.setPersistent(e)),Object(i["U"])(()=>e.helptextValidation,e=>t.foundation.setValidation(e)),Object(i["U"])(()=>e.helptext,e=>t.myHelptext=e),Object(i["w"])(()=>{t.foundation=new zd["a"](n),t.foundation.init()}),Object(i["v"])(()=>{t.foundation.destroy()}),{...Object(i["N"])(t)}}};const qd=W()(Fd,[["render",Nd]]);var Jd=qd;function Ud(e,t){return Object(i["y"])(),Object(i["g"])("i",Object(i["q"])({ref:"root",class:e.classes,style:e.styles},Object(i["K"])(e.rootListeners,!0),e.rootAttrs),Object(i["J"])(e.icon),17)}var Hd=n("c0f9");const{strings:$d}=Hd["a"];var Wd={name:"select-icon",props:{icon:String},setup(e,{emit:t,attrs:n}){const s=Object(i["A"])({classes:{"material-icons":!0,"mdc-select__icon":!0},styles:{},root:null,rootAttrs:{},rootListeners:{},foundation:{}}),a=Object(i["c"])(()=>({...n,...s.rootListeners})),o={getAttr:e=>s.rootAttrs[e],setAttr:(e,t)=>s.rootAttrs={...s.rootAttrs,[e]:t},removeAttr:e=>{const{[e]:t,...n}=s.rootAttrs;s.rootAttrs=n},setContent:e=>{s.root.textContent=e},registerInteractionHandler:(e,t)=>s.rootListeners={...s.rootListeners,[e.toLowerCase()]:t},deregisterInteractionHandler:e=>{const{[e]:t,...n}=s.rootListeners;s.rootListeners=n},notifyIconAction:()=>{t("click"),Qa(s.root,$d.ICON_EVENT,{},!0)}};return Object(i["w"])(()=>{s.foundation=new Hd["a"](o),s.foundation.init()}),Object(i["v"])(()=>{s.foundation.destroy()}),{...Object(i["N"])(s),listeners:a}}};const Gd=W()(Wd,[["render",Ud]]);var Kd=Gd;const{strings:Xd}=Rd["a"];let Yd=0;var Qd={name:"foxy-select",inheritAttrs:!1,props:{modelValue:String,helptext:String,leadingIcon:String,helptextPersistent:Boolean,helptextValidation:Boolean,disabled:Boolean,label:String,outlined:Boolean,required:Boolean,menuFullwidth:{type:Boolean,default:()=>!0},theme:{type:String,default:"default"}},setup(e,{emit:t}){const n=Object(i["A"])({styles:{},classes:{},selectedTextContent:"",selTextAttrs:{},selectAnchorAttrs:{},helpId:"help-mcw-select-"+Yd++,menuClasses:{"mdc-menu-surface--fullwidth":e.menuFullwidth},root:null,helperTextEl:null,leadingIconEl:null,lineRippleEl:null,outlineEl:null,labelEl:null,menu:null,anchorEl:null});let s,a;if(e.outlined){const{classes:e,styles:t}=mo(Object(i["M"])(n,"anchorEl"),{registerInteractionHandler:(e,t)=>{n.anchorEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{n.anchorEl.removeEventListener(e,t)}});s=e,a=t}const o=Object(i["c"])(()=>({"mdc-select":1,"mdc-select--required":e.required,"mdc-select--filled":!e.outlined,"mdc-select--outlined":e.outlined,"mdc-select--with-leading-icon":e.leadingIcon,"mdc-select--disabled":e.disabled,"mdc-select--no-label":!e.label,["mdc-theme-name--"+e.theme]:!0,...n.classes})),l=Object(i["c"])(()=>{var e;return null===(e=n.menu)||void 0===e?void 0:e.items}),c=Object(i["c"])(()=>{var e;return null===(e=n.menu)||void 0===e?void 0:e.items.map(e=>e.querySelector('[role="option"]'))});let r,d;const p=()=>r.handleFocus(),u=()=>r.handleBlur(),m=e=>{n.anchorEl.focus(),p(),r.handleClick(Zd(e))},b=e=>r.handleKeydown(e),h=e=>r["handleMenu"+(e?"Opened":"Closed")](),y=()=>r.layout(),f=()=>r.handleMenuOpened(),O=()=>r.handleMenuClosed(),j=({index:e})=>r.handleMenuItemAction(e),g=()=>{r.layoutOptions(),n.menu.layout()},v=Object(i["c"])(()=>{const t={...n.selTextAttrs};return e.helptext&&(t["aria-controls"]=n.helpId,t["aria-describedBy"]=n.helpId),t}),_={getMenuItemAttr:(e,t)=>e.getAttribute(t),setSelectedText:e=>{n.selectedTextContent=e},isSelectAnchorFocused:()=>document.activeElement===n.anchorEl,getSelectAnchorAttr:e=>n.selectAnchorAttrs[e],setSelectAnchorAttr:(e,t)=>n.selectAnchorAttrs={...n.selectAnchorAttrs,[e]:t},removeSelectAnchorAttr:e=>{const{[e]:t,...i}=n.selectAnchorAttrs;n.selectAnchorAttrs=i},addMenuClass:e=>n.menuClasses={...n.menuClasses,[e]:!0},removeMenuClass:e=>{const{[e]:t,...i}=n.menuClasses;n.menuClasses=i},openMenu:()=>n.menu.surfaceOpen=!0,closeMenu:()=>n.menu.surfaceOpen=!1,getAnchorElement:()=>n.anchorEl,setMenuAnchorElement:e=>n.menu.setAnchorElement(e),setMenuAnchorCorner:e=>n.menu.setAnchorCorner(e),getSelectedIndex:()=>{var e,t;const i=null!==(e=null===(t=n.menu)||void 0===t?void 0:t.getSelectedIndex())&&void 0!==e?e:-1;return i instanceof Array?i[0]:i},setSelectedIndex:e=>{n.menu.setSelectedIndex(e)},focusMenuItemAtIndex:e=>l.value[e].focus(),getMenuItemCount:()=>l.value.length,getMenuItemValues:()=>c.value.map(e=>e.getAttribute(Xd.VALUE_ATTR)||""),getMenuItemTextAtIndex:e=>l.value[e].textContent,isTypeaheadInProgress:()=>n.menu.typeaheadInProgress(),typeaheadMatchItem:(e,t)=>{var i;return null===(i=n.menu)||void 0===i?void 0:i.typeaheadMatchItem(e,t)},addClass:e=>n.classes={...n.classes,[e]:!0},removeClass:e=>{const{[e]:t,...i}=n.classes;n.classes=i},hasClass:e=>Boolean(o.value[e]),setRippleCenter:e=>{var t;return null===(t=n.lineRippleEl)||void 0===t?void 0:t.setRippleCenter(e)},activateBottomLine:()=>{var e;return null===(e=n.lineRippleEl)||void 0===e?void 0:e.activate()},deactivateBottomLine:()=>{var e;return null===(e=n.lineRippleEl)||void 0===e?void 0:e.deactivate()},notifyChange:i=>{const s=r.getSelectedIndex();Qa(n.root,Xd.CHANGE_EVENT,{value:i,index:s},!0),i!=e.modelValue&&t("update:modelValue",i)},hasOutline:()=>e.outlined,notchOutline:e=>{var t;return null===(t=n.outlineEl)||void 0===t?void 0:t.notch(e)},closeOutline:()=>{var e;return null===(e=n.outlineEl)||void 0===e?void 0:e.closeNotch()},hasLabel:()=>!!e.label,floatLabel:e=>{var t;return null===(t=n.labelEl||n.outlineEl)||void 0===t?void 0:t.float(e)},getLabelWidth:()=>{var e,t,i,s;return null!==(e=null!==(t=null===(i=n.labelEl)||void 0===i?void 0:i.getWidth())&&void 0!==t?t:null===(s=d)||void 0===s?void 0:s.scrollWidth)&&void 0!==e?e:0},setLabelRequired:e=>{var t;return null===(t=n.labelEl)||void 0===t?void 0:t.setRequired(e)}},k=e=>n.menu.setFixedPosition(e),S=()=>{var t;if(null===(t=c.value)||void 0===t||!t.length)return;const i=c.value.map(e=>e.getAttribute(Xd.VALUE_ATTR)||""),s=i.findIndex(t=>e.modelValue==t);return n.menu.setSelectedIndex(s),s},x=()=>{setTimeout(()=>{const e=S();e&&-1!=e&&r.setSelectedIndex(e)},100)};return Object(i["U"])(()=>e.disabled,e=>{var t;return null===(t=r)||void 0===t?void 0:t.updateDisabledStyle(e)}),Object(i["U"])(()=>e.modelValue,()=>{const e=S();r.setSelectedIndex(e)}),Object(i["w"])(()=>{var e,t;n.menu.hasTypeahead=!0,n.menu.setSingleSelection=!0,r=new Rd["a"](_,{helperText:null===(e=n.helperTextEl)||void 0===e?void 0:e.foundation,leadingIcon:null===(t=n.leadingIconEl)||void 0===t?void 0:t.foundation}),r=new Rd["a"](_),r.init(),d=n.root.querySelector(".mdc-floating-label"),x();const i=S();r.setSelectedIndex(i)}),Object(i["v"])(()=>{r.destroy()}),{...Object(i["N"])(n),rootClasses:o,handleBlur:u,handleFocus:p,handleClick:m,handleChange:h,handleKeydown:b,layout:y,layoutOptions:g,rippleClasses:s,rippleStyles:a,selectedTextAttrs:v,handleMenuItemAction:j,refreshIndex:S,setFixedPosition:k,handleMenuOpened:f,handleMenuClosed:O}},components:{SelectHelperText:Jd,SelectIcon:Kd}};function Zd(e){const t=e.target.getBoundingClientRect(),n=e.clientX;return n-t.left}n("aa4f");const ep=W()(Qd,[["render",Bd]]);var tp=ep,np=Ya({foxySelect:tp,foxyNotchedOutline:Wo,foxyLineRipple:zo,foxyFloatingLabel:Lo});const ip=["for"],sp=["name","id"];function ap(e,t){return Object(i["y"])(),Object(i["g"])("div",{class:Object(i["s"])(e.rootClasses)},[e.label?(Object(i["y"])(),Object(i["g"])("label",{key:0,for:e.id},Object(i["J"])(e.label),9,ip)):Object(i["f"])("",!0),Object(i["h"])("select",{name:e.name,id:e.id,ref:"select2",style:{width:"100%"},class:Object(i["s"])({ModeMultiple:e.multiple})},[Object(i["D"])(e.$slots,"default")],10,sp)],2)}n("0e33");var op={name:"foxy-select2",props:{modelValue:{type:String},placeholder:{type:String,default:""},allowClear:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String},id:{type:String},label:{type:String},theme:{type:String,default:"light-green"}},data(){return{}},watch:{modelValue(e,t){if(JSON.stringify(e)===JSON.stringify(t))return;let n=v()(this.$refs.select2);n.val(e).trigger("change")}},mounted(){let e=this,t=v()(e.$refs.select2);t.select2({allowClear:this.allowClear,placeholder:this.placeholder,multiple:this.multiple,selectionCssClass:"md-theme-"+this.theme,dropdownCssClass:"md-theme-"+this.theme}).val(this.modelValue).trigger("change").on("change",(function(){e.$emit("update:modelValue",t.val())})).on("select2:open",(function(){v()(".select2-search__field")[0].focus()})),this.checkHelperText()},beforeUnmount(){v()(this.$refs.select2).off().select2("destroy")},computed:{rootClasses(){return{"mdc-select2":1,"md-select2":1,"mdc-select2--no-label":!this.label,"mdc-select2--has-value":this.modelValue,"select2-selection--multiple":this.multiple}}},methods:{checkHelperText(){let e=this.$refs.select2.parentElement;while(e&&!e.classList.contains("mdc-select2"))e=e.parentElement;const t=e.nextElementSibling;t&&t.classList.contains("md-helper-text")&&e.classList.add("has-helper-text")}}};n("af39");const lp=W()(op,[["render",ap]]);var cp=lp,rp=Ya({foxySelect2:cp});const dp={ref:"labelEl",class:"mdc-snackbar__label md-snackbar-content","aria-atomic":"false"},pp={key:1,style:{display:"inline-block",width:"0",height:"'1px'"}},up={class:"mdc-snackbar__actions","aria-atomic":"true"},mp={key:0,ref:"actionEl",type:"button",class:"mdc-button mdc-snackbar__action"},bp={class:"mdc-button__label"},hp={key:1,type:"button",class:"mdc-icon-button mdc-snackbar__dismiss material-icons",title:"Dismiss"};function yp(e,t){return Object(i["y"])(),Object(i["g"])("aside",{class:Object(i["s"])(e.rootClasses)},[Object(i["h"])("div",{class:"mdc-snackbar__surface md-snackbar-container",onClick:t[0]||(t[0]=(...t)=>e.surfaceClickHandler&&e.surfaceClickHandler(...t)),role:"status","aria-relevant":"additions"},[Object(i["h"])("div",dp,[e.showMessage?(Object(i["y"])(),Object(i["g"])(i["a"],{key:0},[Object(i["j"])(Object(i["J"])(e.message),1)],64)):(Object(i["y"])(),Object(i["g"])("span",pp," "))],512),Object(i["h"])("div",up,[e.actionText?(Object(i["y"])(),Object(i["g"])("button",mp,[t[1]||(t[1]=Object(i["h"])("div",{class:"mdc-button__ripple"},null,-1)),Object(i["h"])("span",bp,Object(i["J"])(e.actionText),1)],512)):Object(i["f"])("",!0),e.showDismissAction?(Object(i["y"])(),Object(i["g"])("button",hp," close ")):Object(i["f"])("",!0)])])],2)}var fp=n("dd65");const{strings:Op,numbers:jp}=fp["a"];var gp={name:"foxy-snackbar",props:{modelValue:Boolean,stacked:Boolean,leading:Boolean,message:String,actionText:String,timeoutMs:[String,Number],closeOnEscape:{type:Boolean,default:!0},dismissAction:{type:[String,Boolean],default:!0},reason:String,position:String},setup(e,{emit:t}){const n=Object(i["A"])({classes:{},hidden:!1,actionHidden:!1,showMessage:!0,labelEl:void 0});let s;const a=Object(i["c"])(()=>{var t,i,s,a,o,l,c,r,d,p,u,m;return{"mdc-snackbar":1,"md-snackbar":1,"mdc-snackbar--leading":e.leading,"mdc-snackbar--stacked":e.stacked,"mdc-snackbar--position-top-center":(null===(t=e.position)||void 0===t?void 0:t.includes("top"))&&(null===(i=e.position)||void 0===i?void 0:i.includes("center")),"mdc-snackbar--position-top-left":(null===(s=e.position)||void 0===s?void 0:s.includes("top"))&&(null===(a=e.position)||void 0===a?void 0:a.includes("left")),"mdc-snackbar--position-top-right":(null===(o=e.position)||void 0===o?void 0:o.includes("top"))&&(null===(l=e.position)||void 0===l?void 0:l.includes("right")),"mdc-snackbar--position-bottom-center":(null===(c=e.position)||void 0===c?void 0:c.includes("bottom"))&&(null===(r=e.position)||void 0===r?void 0:r.includes("center")),"mdc-snackbar--position-bottom-left":(null===(d=e.position)||void 0===d?void 0:d.includes("bottom"))&&(null===(p=e.position)||void 0===p?void 0:p.includes("left")),"mdc-snackbar--position-bottom-right":(null===(u=e.position)||void 0===u?void 0:u.includes("bottom"))&&(null===(m=e.position)||void 0===m?void 0:m.includes("right")),...n.classes}}),o=Object(i["c"])(()=>"string"===typeof e.dismissAction?"false"!=e.dismissAction:e.dismissAction),l=e=>s.handleKeyDown(e),c=(t,i=t)=>{const s=t.getAttribute("aria-live"),a=e.message;a&&(t.setAttribute("aria-live","off"),n.showMessage=!1,i.setAttribute(Op.ARIA_LIVE_LABEL_TEXT_ATTR,e.message),setTimeout(()=>{t.setAttribute("aria-live",s),i.removeAttribute(Op.ARIA_LIVE_LABEL_TEXT_ATTR),n.showMessage=!0},jp.ARIA_LIVE_DELAY_MS))},r={addClass:e=>n.classes={...n.classes,[e]:!0},announce:()=>c(n.labelEl),notifyClosed:e=>{t(Op.CLOSED_EVENT.toLowerCase(),e?{reason:e}:{}),t("update:modelValue",!1),t("hide")},notifyClosing:e=>{t(Op.CLOSING_EVENT,e?{reason:e}:{}),t("update:reason",e)},notifyOpened:()=>{t(Op.OPENED_EVENT.toLowerCase(),{}),t("update:modelValue",!0),t("show",{})},notifyOpening:()=>t(Op.OPENING_EVENT,{}),removeClass:e=>{const{[e]:t,...i}=n.classes;n.classes=i}},d=e=>{vp(e.target)?s.handleActionButtonClick(e):_p(e.target)&&s.handleActionIconClick(e)};return Object(i["U"])(()=>e.modelValue,t=>{t?s.open():s.close(e.reason?e.reason:"")}),Object(i["U"])(()=>e.timeoutMs,e=>{void 0!==e&&s.setTimeoutMs(e)}),Object(i["U"])(()=>e.closeOnEscape,e=>s.setCloseOnEscape(e)),Object(i["w"])(()=>{window.addEventListener("keydown",l),s=new fp["a"](r),s.init(),void 0!==e.timeoutMs&&s.setTimeoutMs(e.timeoutMs),s.setCloseOnEscape(e.closeOnEscape)}),Object(i["v"])(()=>{window.removeEventListener("keydown",l),s.destroy()}),{...Object(i["N"])(n),rootClasses:a,showDismissAction:o,surfaceClickHandler:d}}};function vp(e){return Boolean(Object(co["a"])(e,Op.ACTION_SELECTOR))}function _p(e){return Boolean(Object(co["a"])(e,Op.DISMISS_SELECTOR))}n("5da7");const kp=W()(gp,[["render",yp]]);var Sp=kp,xp=Ya({foxySnackbar:Sp}),Ap={install(e){e.use(fo),e.use(Eo),e.use(Fl),e.use(oc),e.use(hc),e.use(Sc),e.use(wc),e.use(Lc),e.use(Fo),e.use(rr),e.use(Tr),e.use(Go),e.use(Pr),e.use(id),e.use(_d),e.use(Id),e.use(np),e.use(rp),e.use(xp),e.use(wl)}},Tp=(n("bf68"),n("13d5"),n("3f4e"));const wp="vuex bindings",Cp="vuex:mutations",Ep="vuex:actions",Ip="vuex";let Dp=0;function Pp(e,t){Object(Tp["setupDevtoolsPlugin"])({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wp]},n=>{n.addTimelineLayer({id:Cp,label:"Vuex Mutations",color:Lp}),n.addTimelineEvent({layerId:"test",event:{time:1,data:void 0}}),n.addTimelineLayer({id:Ep,label:"Vuex Actions",color:Lp}),n.addInspector({id:Ip,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(n=>{if(n.app===e&&n.inspectorId===Ip)if(n.filter){const e=[];Fp(e,t._modules.root,n.filter,""),n.rootNodes=e}else n.rootNodes=[zp(t._modules.root,"")]}),n.on.getInspectorState(n=>{if(n.app===e&&n.inspectorId===Ip){const e=n.nodeId;Vp(t,e),n.state=qp(Jp(t._modules,e),t._makeLocalGettersCache,e)}}),n.on.editInspectorState(n=>{if(n.app===e&&n.inspectorId===Ip){const e=n.nodeId;let i=n.path;"root"!==e&&(i=[...e.split("/").filter(Boolean),...i]),t._withCommit(()=>{n.set(t._state.data,i,n.state.value)})}}),t.subscribe((e,t)=>{const i={};e.payload&&(i.payload=e.payload),i.state=JSON.parse(JSON.stringify(t)),n.notifyComponentUpdate(),n.sendInspectorTree(Ip),n.sendInspectorState(Ip),n.addTimelineEvent({layerId:Cp,event:{time:Date.now(),title:e.type,data:i}})}),t.subscribeAction({before:(e,t)=>{const i={};e.payload&&(i.payload=e.payload),e._id=Dp++,e._time=Date.now(),i.state=JSON.parse(JSON.stringify(t)),n.addTimelineEvent({layerId:Ep,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:i}})},after:(e,t)=>{const i={},s=Date.now()-e._time;i.duration={_custom:{type:"duration",display:s+"ms",tooltip:"Action duration",value:s}},e.payload&&(i.payload=e.payload),i.state=JSON.parse(JSON.stringify(t)),n.addTimelineEvent({layerId:Ep,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:i}})}})})}function Vp(e,t){if(!e._makeLocalGettersCache[t]){const n={},i="root"!==t?t.length:0;Object.keys("root"!==t?e.getters:e._modules.root._rawModule.getters).forEach(s=>{if("root"!==t&&s.slice(0,i)!==t)return;const a=s.slice(i);Object.defineProperty(n,a,{get:()=>e.getters[s],enumerable:!0})}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}const Lp=8702998,Mp=6710886,Bp=16777215,Rp={label:"namespaced",textColor:Bp,backgroundColor:Mp};function Np(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function zp(e,t){return{id:t||"root",label:Np(t),tags:e.namespaced?[Rp]:[],children:Object.keys(e._children).map(n=>zp(e._children[n],t+n+"/"))}}function Fp(e,t,n,i){i.includes(n)&&e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[Rp]:[]}),Object.keys(t._children).forEach(s=>{Fp(e,t._children[s],n,i+s+"/")})}function qp(e,t,n){t="root"===n?t:t[n];const i=Object.keys(t),s={state:Object.keys(e.state).map(t=>({key:t,editable:!0,value:e.state[t]}))};return i.length&&(s.getters=i.map(e=>({key:e.endsWith("/")?Np(e):e,editable:!1,value:t[e]}))),s}function Jp(e,t){const n=t.split("/").filter(e=>e);return n.reduce((e,i,s)=>{const a=e[i];if(!a)throw new Error(`Missing module "${i}" for path "${t}".`);return s===n.length-1?a:a._children},"root"===t?e:e.root._children)}const Up=Object(i["d"])(Xa).use(A).use(Ap).use(Qr["b"]);function Hp(){A.commit("setInteraction",!0),document.removeEventListener("click",Hp),document.removeEventListener("focusin",Hp)}Up.directive("a11y",{mounted(e,t){e.classList.add("current"),document.title=t.value;let n=document.querySelector(".focus-target");n&&A.state.interaction&&n.focus()}}),Up.mount("#ssa-booking-app"),Pp(Up,A),document.addEventListener("click",Hp),document.addEventListener("focusin",Hp)},"5da7":function(e,t,n){"use strict";n("82ba")},6230:function(e,t,n){"use strict";n("4299")},"637c":function(e,t,n){},"643c":function(e,t,n){"use strict";n("d58c")},"678d":function(e,t,n){},"69bc":function(e,t,n){"use strict";n("06b4")},"6b25":function(e,t,n){"use strict";n("25a3")},"6e16":function(e,t,n){},7231:function(e,t,n){},"734a":function(e,t,n){"use strict";n("153c")},"74e2":function(e,t,n){},7762:function(e,t,n){},"778e":function(e,t,n){},7908:function(e,t,n){"use strict";n("3a3b")},"7c00":function(e,t,n){"use strict";n("e51d")},8217:function(e,t,n){"use strict";n("87fb")},"82ba":function(e,t,n){},"82ee":function(e,t,n){"use strict";n("9b04")},"83b9":function(e,t,n){},8628:function(e,t,n){"use strict";n("4c24")},"87fb":function(e,t,n){},"8c6c":function(e,t,n){"use strict";n("678d")},"8ee5":function(e,t,n){},"8fd7":function(e,t,n){"use strict";n("0b59")},"94c6":function(e,t,n){},9983:function(e,t,n){"use strict";n("42b2")},"99e8":function(e,t,n){"use strict";n("f07e")},"9b04":function(e,t,n){},a241:function(e,t,n){"use strict";n("8ee5")},a38c:function(e,t,n){},a953:function(e,t,n){"use strict";n("a38c")},aa4f:function(e,t,n){"use strict";n("7231")},ae0c:function(e,t,n){},af39:function(e,t,n){"use strict";n("e59a")},b1e3:function(e,t,n){"use strict";n("fbcc")},c7b8:function(e,t,n){"use strict";n("f097")},c80e:function(e,t,n){},cbc8:function(e,t,n){},cc76:function(e,t,n){},cfcf:function(e,t,n){},d58c:function(e,t,n){},d6b7:function(e,t,n){"use strict";n("94c6")},d8ca:function(e,t,n){"use strict";n("7762")},e51d:function(e,t,n){},e59a:function(e,t,n){},e816:function(e,t,n){},ec63:function(e,t,n){"use strict";n("fb22")},ec94:function(e,t,n){"use strict";n("c80e")},ef21:function(e,t,n){"use strict";n("778e")},efe0:function(e,t,n){"use strict";n("2c97")},f07e:function(e,t,n){},f097:function(e,t,n){},f324:function(e,t,n){"use strict";n("cbc8")},f410:function(e,t,n){"use strict";n("6e16")},f54b:function(e,t,n){},fb22:function(e,t,n){},fbcc:function(e,t,n){}});
|
||
//# sourceMappingURL=app.js.map
|