(window.webpackJsonp=window.webpackJsonp||[]).push([[1,18,27,28],{1008:function(t,e,r){var content=r(1022);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(7).default)("465bfe1c",content,!0,{sourceMap:!1})},1013:function(t,e,r){var content=r(1028);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(7).default)("52c89d2a",content,!0,{sourceMap:!1})},1021:function(t,e,r){"use strict";r(1008)},1022:function(t,e,r){var n=r(6)((function(i){return i[1]}));n.push([t.i,".button-container--disabled[data-v-30c19ab7]{border:2px solid #bdbdbd!important;padding:0}.button-container--button[data-v-30c19ab7]{border:2px solid var(--v-primary-base)!important;padding:0}.button-container--button-added[data-v-30c19ab7]{background:var(--v-primary-base)!important;border:2px solid var(--v-primary-base)}.v-btn .v-icon[data-v-30c19ab7]{color:var(--v-primary-base)!important}.v-btn .v-icon.added[data-v-30c19ab7]{color:var(--v-primary-text-base)!important}",""]),n.locals={},t.exports=n},1025:function(t,e,r){"use strict";r.r(e);var n=r(403),o=r(218),l=(r(53),{data:function(){return{isAddedProduct:!1}},props:{type:{type:String,required:!0},isAdded:{type:Boolean},disabled:{type:Boolean},overrideUrl:{required:!1,default:null},overrideText:{required:!1,default:null}},computed:{isDraft:function(){return this.$store.getters["cmsConfigHomepage/isDraftMode"]}},methods:{addToCart:function(){var t=this;"T"==this.type&&("P"==this.type&&(this.isAddedProduct=!0,setTimeout((function(){t.isAddedProduct=!1}),1e3)),this.$emit("clickButton",{type:this.type}))},overrideRedirect:function(){this.overrideUrl&&""!=this.overrideUrl&&window.open(this.overrideUrl,"_self")}}}),c=(r(1021),r(3)),component=Object(c.a)(l,(function(){var t=this,e=t._self._c;return e("div",[null===t.overrideUrl?e(n.a,{class:[t.isAddedProduct||t.isAdded&&"T"==t.type?"button-container--button-added":t.disabled?"button-container--disabled":"button-container--button"],attrs:{icon:"",disabled:t.disabled,outlined:"",large:""},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.addToCart.apply(null,arguments)}}},[t.isAddedProduct||t.isAdded&&"T"==t.type?e(o.a,{staticClass:"added",attrs:{size:"24"}},[t._v("fxt-check")]):e(o.a,{attrs:{size:"24"}},[t._v("fxt-plus")])],1):e(n.a,{staticStyle:{"text-transform":"none"},attrs:{disabled:""==t.overrideUrl||""==t.overrideText,color:"primary",elevation:"0",rounded:""},on:{click:function(e){e.stopPropagation(),e.preventDefault(),!t.isDraft&&t.overrideRedirect()}}},[t._v("\n    "+t._s(t.overrideText?t.overrideText:"Bestill time")+"\n  ")])],1)}),[],!1,null,"30c19ab7",null);e.default=component.exports},1027:function(t,e,r){"use strict";r(1013)},1028:function(t,e,r){var n=r(6)((function(i){return i[1]}));n.push([t.i,".fxt-info-container[data-v-4ff19d55]{bottom:-6px;left:-6px;position:absolute}.fxt-info-container[data-v-4ff19d55]:before{display:none}.fxt-info-container .white-outline[data-v-4ff19d55]{background-color:#fff;border-radius:50px;height:36px;left:-2px;position:absolute;top:-2px;width:36px;z-index:1}.fxt-info-container .disable[data-v-4ff19d55]:hover{cursor:auto;pointer-events:auto}.fxt-info-container .disable[data-v-4ff19d55]:focus:before,.fxt-info-container .disable[data-v-4ff19d55]:hover:before{opacity:0}",""]),n.locals={},t.exports=n},1029:function(t,e,r){var content=r(1055);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(7).default)("470a64da",content,!0,{sourceMap:!1})},1044:function(t,e,r){"use strict";r.r(e);var n=r(403),o=r(218),l={props:{color:{default:"primary"},background:{default:"white"},border:{default:null},disableClick:{default:!1}}},c=(r(1027),r(3)),component=Object(c.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"fxt-info-container"},[e(n.a,{class:t.disableClick?"disable":"",staticStyle:{position:"relative","z-index":"20"},attrs:{ripple:!t.disableClick,elevation:"0",color:t.background,"x-small":"",fab:""},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("toggle-description")}}},[e(o.a,{style:"".concat(null!==t.border?"border: 2px solid "+t.border+" !important;":""," border-radius: 50px !important; width: 32px; height: 32px; box-sizing: border-box;"),attrs:{size:"24",color:t.color}},[t._v("\n            fxt-info\n          ")])],1),t._v(" "),e("div",{staticClass:"white-outline"})],1)}),[],!1,null,"4ff19d55",null);e.default=component.exports},1054:function(t,e,r){"use strict";r(1029)},1055:function(t,e,r){var n=r(6)((function(i){return i[1]}));n.push([t.i,".treatment[data-v-498163fe]{transition:background-color .3s}.treatment__img[data-v-498163fe]{position:relative}.treatment__text[data-v-498163fe]{font-size:14px;font-weight:700;line-height:14px}.treatment__price--from[data-v-498163fe]{font-size:13px;font-weight:700;letter-spacing:-.5px;line-height:15px}.treatment__price--number[data-v-498163fe]{font-size:18px;font-weight:700;letter-spacing:0;line-height:20px}.treatment[data-v-498163fe]:hover{background-color:var(--v-primary-opacity-12);cursor:pointer}.description[data-v-498163fe]{width:100%}.description__text[data-v-498163fe]{cursor:pointer;font-size:14px;font-weight:400;line-height:16px;width:100%}.description__truncated[data-v-498163fe]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.read-more[data-v-498163fe]{font-size:14px;width:100%}.read-more[data-v-498163fe]:hover{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}",""]),n.locals={},t.exports=n},1070:function(t,e,r){"use strict";r.r(e);var n=r(570),o=(r(10),r(49),r(40)),l=(r(46),r(4),r(33),r(19),r(13),r(27),r(226),r(35),r(15),r(26),r(229)),c=r(1044),d=r(1025),f=r(92),m={components:{CartFavoriteIcon:l.default,AddToCartBtn:d.default,CartInfoIcon:c.default},props:{treatment:{type:Object,default:null,required:!0}},data:function(){return{showDescription:!1,showFullDescription:!1,salon:null}},computed:{chainAppointmentButtonOverrideUrl:function(){return this.$store.getters["cmsConfigHomepage/getAppointmentButtonOverrideUrl"]},bookingActive:function(){return this.$store.getters["salon/bookingEnabledForSite"](this.$store.getters["cart/getSelectedSalon"])},chainAppointmentButtonOverrideText:function(){return this.$store.getters["cmsConfigHomepage/getAppointmentButtonOverrideText"]},showReadMoreButton:function(){return this.treatment.description&&(this.treatment.description.length>150||this.treatment.description.split("\n",4).length>=3)},selectedSalon:function(){var t=this.$route.query.department;return t&&"string"==typeof t&&(t=[t]),t&&1===t.length?(this.selectedDepartment=+t[0],this.$store.getters["salon/getSalonById"](+t[0])):null},showPrice:function(){if(this.selectedSalon)return!0;var t,e=null===(t=this.$store.getters["cmsConfigHomepage/getModules"].find((function(t){return t.moduleId==f.b.PRICES})))||void 0===t?void 0:t.visible,r=!0;return null!=e&&null!=e&&(r=e),r},selectedSalonPrice:function(){var t=this.selectedSalon&&this.selectedSalon.siteId?this.selectedSalon.siteId:this.$store.getters["cart/getSelectedSalon"],e=this.treatment.pricePerSite.find((function(e){return e.siteId==t}));return e?e.price:0},overrideUrl:function(){return this.selectedSalon&&this.selectedSalon.appointmentButtonOverrideUrl?this.selectedSalon.appointmentButtonOverrideUrl:this.chainAppointmentButtonOverrideUrl?this.chainAppointmentButtonOverrideUrl:null},overrideText:function(){return this.selectedSalon&&this.selectedSalon.appointmentButtonOverrideText?this.selectedSalon.appointmentButtonOverrideText:this.chainAppointmentButtonOverrideText?this.chainAppointmentButtonOverrideText:null}},methods:{formatPrice:function(t){var e;return this.showPrice&&!this.selectedSalon?null!=t&&t.pricePerSite?Math.min.apply(Math,Object(o.a)(null==t||null===(e=t.pricePerSite)||void 0===e?void 0:e.map((function(t){return t.price})))):"thumbnailImageUrl"in t?t.price:-1:this.showPrice&&this.selectedSalon?this.selectedSalonPrice:void 0},treatmentRedirect:function(t){this.$router.push("behandlinger/".concat(t.urlSafeTreatmentName,"/").concat(t.urlSafe))},formatDescription:function(text){return null==text?void 0:text.replace(new RegExp("\n","g"),"</br>")},formatTreatmentDuration:function(t){var e=Math.floor(t/60),r=t%60;return(e>0?"".concat(e+"t "):"")+(r>0?r+" min":"")},isFavorite:function(t){return this.$store.getters["treatments/getFavoriteTreatments"].map((function(t){return t.treatmentId})).includes(t.treatmentId)},treatmentIsInCart:function(t){return this.$store.getters["cart/treatmentIsInCart"](t.treatmentId)},toggleDescription:function(){this.treatment.showDescriptionDefault||(this.showDescription=!this.showDescription)}},mounted:function(){this.treatment.showDescriptionDefault&&(this.showDescription=!0)}},v=(r(1054),r(3)),component=Object(v.a)(m,(function(){var t,e=this,r=e._self._c;return r("div",[r("div",{staticClass:"treatment row align-center my-0",class:e.showDescription?"treatment__focused":"",on:{click:function(t){return e.treatmentRedirect(e.treatment)}}},[r("div",{staticClass:"py-2",class:e.$vuetify.breakpoint.mdAndDown?"col-7":"col-6"},[r("div",{staticClass:"d-flex no-wrap align-center"},[r("div",{staticClass:"treatment__img pr-2"},[r(n.a,{attrs:{src:"thumbnailImageUrl"in e.treatment?e.treatment.thumbnailImageUrl:e.treatment.ftcCategoryImgUrlsThumbnails?e.treatment.ftcCategoryImgUrlsThumbnails[0]:"",width:"86px",height:"57px"}}),e._v(" "),e.isFavorite(e.treatment)?r("CartFavoriteIcon"):e._e(),e._v(" "),e.treatment.description.length?r("CartInfoIcon",{attrs:{border:e.showDescription?null:"var(--v-primary-base)",color:e.showDescription?"white":"var(--v-primary-base)",background:e.showDescription?"var(--v-primary-base)":"white","disable-click":e.treatment.showDescriptionDefault},on:{"toggle-description":function(t){return e.toggleDescription()}}}):e._e()],1),e._v(" "),r("div",{staticClass:"treatment__text"},[r("p",{staticClass:"mb-1"},[e._v(e._s(null===(t=e.treatment)||void 0===t?void 0:t.treatmentName))]),e._v(" "),r("p",{staticClass:"mb-1 font-weight-regular"},[e._v(e._s(e.formatTreatmentDuration(e.treatment.durationMinutes)))])])])]),e._v(" "),r("div",{class:e.$vuetify.breakpoint.mdAndDown?"col-5":"col-6"},[r("div",{staticClass:"treatment__price flex-nowrap row justify-end align-center ma-0",on:{click:function(t){!e.treatment.notBookable&&e.bookingActive&&e.$emit("clickButton",e.treatment)}}},[e.showPrice&&0!==e.formatPrice(e.treatment)?r("div",{staticClass:"mt-1 d-flex mr-3"},[r("span",{staticClass:"treatment__price--from mr-1"},[e._v("Fra")]),e._v(" "),r("span",{staticClass:"treatment__price--number"},[e._v(e._s(e.formatPrice(e.treatment))+",–")])]):e._e(),e._v(" "),e.treatment.notBookable&&e.bookingActive?r("div",{style:e.overrideUrl?"":"width: 44px"}):e.bookingActive?r("AddToCartBtn",{attrs:{type:"T",isAdded:e.treatmentIsInCart(e.treatment),overrideUrl:e.overrideUrl,overrideText:e.overrideText},on:{clickButton:function(t){return e.$emit("clickButton",e.treatment)}}}):e._e()],1)])]),e._v(" "),r("transition",{attrs:{mode:"out-in",name:e.showDescription?"scroll-y-transition":"fade-transition"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:e.showDescription,expression:"showDescription"}],staticClass:"description row align-center my-0 px-3 py-4",on:{click:function(t){e.showFullDescription=!e.showFullDescription}}},[r("span",{ref:"modelDiv",staticClass:"description__text",class:e.showFullDescription?"":"description__truncated",domProps:{innerHTML:e._s(e.formatDescription(e.treatment.description))}}),e._v(" "),!e.showFullDescription&&e.showReadMoreButton?r("div",{staticClass:"read-more"},[r("span",{staticStyle:{color:"var(--v-primary-base)"}},[e._v("Les mer")])]):e._e()])])],1)}),[],!1,null,"498163fe",null);e.default=component.exports},1085:function(t,e,r){var content=r(1138);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(7).default)("99978c72",content,!0,{sourceMap:!1})},1111:function(t,e,r){"use strict";r.r(e);var n=r(1049),o=r(1051),l=r(1050),c=r(1048),d=(r(47),r(35),r(24),r(59),r(43),r(13),r(69),r(0)),f=r(42),m=(r(17),r(33),r(9),r(4),r(15),r(26),r(50),r(10),r(49),r(281)),v=r(445),h=r(1070),x=r(45);function y(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){c=!0,o=t},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw o}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}var w={props:{treatments:{type:Array,required:!0},showRecEngine:{type:Boolean,default:!0},categoriesFromUrl:{type:Array,default:[]}},components:{CartList:m.default,AddToCart:v.default,TreatmentListItem:h.default},data:function(){return{currentSelectedTreatment:null,addedKey:0,selectedDepartment:null,panel:[],recEnginePanel:[0]}},computed:{treatmentsByCategories:function(){var t,e=this,r=this.$store.getters["treatments/getTreatmentsByCategories"],n=y(r.entries());try{for(n.s();!(t=n.n()).done;){var o=Object(f.a)(t.value,2),i=o[0];o[1].index=i}}catch(t){n.e(t)}finally{n.f()}return this.panel=r.filter((function(t){return e.categoriesFromUrl.includes(t.urlSafeName)})).map((function(t){return t.index})),r},recEngineTreatments:function(){return this.$store.getters["treatments/getRecEngineItems"].map((function(t){var e,r;return{ftcCategoryImgUrlsThumbnails:t.imageUrl,description:t.description||"",treatmentName:t.title,treatmentId:t.id,notBookable:t.notBookable,urlSafe:(null===(e=t.urlSafe)||void 0===e?void 0:e.split("/")[1])||"",urlSafeTreatmentName:(null===(r=t.urlSafe)||void 0===r?void 0:r.split("/")[0])||"",price:t.price,pricePerSite:t.pricePerSite,subtitle:t.subtitle,showDescriptionDefault:t.showDescriptionDefault||!1,isFavorite:t.isFavorite||!1}}))},user:function(){return new x.c(this.$store.getters["app/get"]("user"))}},methods:{addOrRemove:function(t){var e=this;return Object(d.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.addedKey+=1,e.currentSelectedTreatment=t;case 2:case"end":return r.stop()}}),r)})))()}},beforeDestroy:function(){this.selectedDepartment=null}},k=(r(1137),r(3)),component=Object(k.a)(w,(function(){var t=this,e=t._self._c;return e("div",[t.showRecEngine&&t.recEngineTreatments&&t.recEngineTreatments.length?e(c.a,{attrs:{color:"primary",hover:"",accordion:"",multiple:"",flat:""},model:{value:t.recEnginePanel,callback:function(e){t.recEnginePanel=e},expression:"recEnginePanel"}},[e(n.a,{staticClass:"fixit-expansion-panel"},[e(l.a,[t._v(t._s(t.user&&t.user.onlineSluttKundeId?"Anbefalte behandlinger":"Populære behandlinger"))]),t._v(" "),e(o.a,t._l(t.recEngineTreatments,(function(r){return e("div",{key:r.treatmentId},[e("TreatmentListItem",{attrs:{treatment:r},on:{clickButton:function(e){return t.addOrRemove(r)}}})],1)})),0)],1)],1):t._e(),t._v(" "),e(c.a,{attrs:{color:"primary",hover:"",accordion:"",multiple:"",flat:""},model:{value:t.panel,callback:function(e){t.panel=e},expression:"panel"}},t._l(t.treatmentsByCategories,(function(r,i){return e(n.a,{key:i,staticClass:"fixit-expansion-panel",on:{click:function(e){return t.$emit("update:categoriesFromUrl",r.urlSafeName)}}},[e(l.a,[t._v(t._s(r.categoryName))]),t._v(" "),e(o.a,t._l(r.treatments,(function(r){return e("div",{key:r.treatmentId},[e("TreatmentListItem",{attrs:{treatment:r},on:{clickButton:function(e){return t.addOrRemove(r)}}})],1)})),0)],1)})),1),t._v(" "),t.currentSelectedTreatment?e("AddToCart",{key:t.currentSelectedTreatment.treatmentId+t.addedKey,attrs:{treatment:t.currentSelectedTreatment}}):t._e()],1)}),[],!1,null,"edc977f8",null);e.default=component.exports;installComponents(component,{TreatmentListItem:r(1070).default})},1137:function(t,e,r){"use strict";r(1085)},1138:function(t,e,r){var n=r(6)((function(i){return i[1]}));n.push([t.i,".fixit-expansion-panel[data-v-edc977f8]{border-bottom:2px solid var(--v-primary-base);font-weight:700}.v-expansion-panel-header[data-v-edc977f8]{background-color:#fff!important}.v-expansion-panel-header--active[data-v-edc977f8]{background-color:#fff!important;min-height:48px!important}",""]),n.locals={},t.exports=n}}]);
//# sourceMappingURL=95d20da.js.map