{"version":3,"file":"home.min.js","sources":["home.js"],"sourcesContent":["\nvar app = new Vue(\n {\n el: \"#body-container\",\n data:\n {\n gallery: model.gallery,\n galleryWall: model.galleryWall,\n testimonials: model.testimonials,\n current: -1\n },\n computed:\n {\n hasGalleryImages: function () {\n return this.gallery && this.gallery.length && this.gallery.length > 0;\n },\n\n hasGalleryWallImages: function () {\n return this.galleryWall && this.galleryWall.length && this.galleryWall.length > 0;\n },\n\n hasItems: function () {\n return this.testimonials && this.testimonials.length && this.testimonials.length > 0;\n },\n\n canCycle: function () {\n return this.testimonials && this.testimonials.length && this.testimonials.length > 1;\n }\n },\n mounted: function () {\n clearLoading();\n\n if (this.hasItems) {\n if (this.canCycle) {\n this.rotate();\n }\n }\n\n if (this.hasGalleryImages) {\n new Glide(\".glide\",\n {\n type: \"carousel\",\n perView: 6,\n autoplay: 3000,\n breakpoints:\n {\n 1200: { perView: 5 },\n 992: { perView: 4 },\n 767: { perView: 3 },\n 575: { perView: 3 }\n }\n }).mount();\n }\n\n model.testimonials = null;\n model.gallery = null;\n model.galleryWall = null;\n },\n methods:\n {\n rotate: function () {\n var duration;\n var minDuration = 3000;\n var previous = this.current;\n\n this.current++;\n\n if (this.current === this.testimonials.length) {\n this.current = 0;\n }\n\n duration = this.testimonials[this.current].message.length / 100;\n duration = Math.round(duration);\n duration = duration * 140;\n duration = duration * 16;\n\n if (duration < 1000) {\n duration = 1000;\n }\n\n duration += minDuration;\n\n if (previous !== -1) {\n this.testimonials[previous].show = false;\n }\n\n this.testimonials[this.current].show = true;\n\n setTimeout(function () { app.rotate(); }, duration);\n }\n }\n });\n\n"],"names":["app","Vue","el","data","gallery","model","galleryWall","testimonials","current","computed","hasGalleryImages","this","length","hasGalleryWallImages","hasItems","canCycle","mounted","clearLoading","rotate","Glide","type","perView","autoplay","breakpoints","1200","992","767","575","mount","methods","duration","previous","message","Math","round","show","setTimeout"],"mappings":"AACA,IAAIA,IAAM,IAAIC,IACZ,CACEC,GAAI,kBACJC,KAC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