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,EAAKC,YACpB1E,EAAE,aAAayE,KAAK,aAAcrB,EACtC,EACAuB,MAAO,SAAUC,GACbC,QAAQF,MAAM,eAAgBC,EAClC,GAKpB,GAEJ,CACJ,IACA5E,EAAE,gBAAgBkC,GAAG,SAAS,WAC1BnB,OAAOiC,UAAUC,KAAK,CAClB,MAAS,sBACT,SAAYjD,EAAEwG,MAAM,GAAGO,UAAUC,eAEzC,IACAhH,EAAE,aAAakC,GAAG,SAAS,WACvBnB,OAAOiC,UAAUC,KAAK,CAClB,MAAS,sBACT,SAAYjD,EAAEwG,MAAM,GAAGO,UAAUC,gBAGrC,IAAI5D,EAAYpD,EAAEwG,MAAM/B,KAAK,cAC7B5D,EAAiBA,EAAiB,YAAcuC,EAChDpD,EAAEuD,KAAK,CACHC,IAAK3C,EACL2D,KAAM,MACNd,SAAU,OACVC,QAAS,SAAUc,GACf1D,OAAOiC,UAAUC,KAAKwB,EAAKwC,sBAC/B,EACAtC,MAAO,SAAUC,GACbC,QAAQF,MAAM,eAAgBC,EAClC,GAER,IACA5E,EAAE,eAAekC,GAAG,SAAS,WACzBnB,OAAOiC,UAAUC,KAAK,CAClB,MAAS,sBACT,SAAYjD,EAAEwG,MAAM,GAAGO,UAAUC,eAEzC,IACAhH,EAAE,iBAAiBkC,GAAG,SAAS,WAC3BnB,OAAOiC,UAAUC,KAAK,CAClB,MAAS,sBACT,SAAYjD,EAAEwG,MAAM,GAAGO,UAAUC,eAEzC,GACJ,G","sources":["webpack:///./cartridges/app_custom_mufe/cartridges/app_custom_mufe/cartridge/client/default/js/primerFinder.js"],"sourcesContent":["'use strict';\n\n$(document).ready(function () {\n\n    var step1Response;\n    var step2Response;\n    var step3Response;\n    var jsonData = $(\".json-primer\").attr(\"data-json\");\n    jsonData = JSON.parse(jsonData);\n    var getProductUrl = $(\".get-product-url\").attr(\"data-url\");\n    var language= $(\".get-language\").attr(\"data-lang\");\n    var country= $(\".get-country\").attr(\"data-country\");\n    var dataGtmProduct = $(\".js_primer-finder-product\").attr(\"data-url\");\n    var windowSize = $(window).width();\n\n    if (windowSize > 991) {\n        $(\".step-0-mobile\").remove();\n    } else {\n        $(\".step-0\").remove();\n    }\n\n    var resultText = jsonData[\"resultText\"][language] ? jsonData[\"resultText\"][language] : jsonData[\"resultText\"];\n    var resultSubText = jsonData[\"resultSubText\"][language] ? jsonData[\"resultSubText\"][language] : jsonData[\"resultSubText\"];\n    var questionToUse = jsonData[\"question\"][language] ? jsonData[\"question\"][language] : jsonData[\"question\"];\n    var subquestionToUse = jsonData[\"subquestion\"][language] ? jsonData[\"subquestion\"][language] : jsonData[\"subquestion\"];\n    var nextButton = jsonData[\"nextButton\"] && jsonData[\"nextButton\"][language] ? jsonData[\"nextButton\"][language] : jsonData[\"nextButton\"];\n    var discoverPrimerButton = jsonData[\"discoverPrimerButton\"] && jsonData[\"discoverPrimerButton\"][language] ? jsonData[\"discoverPrimerButton\"][language] : jsonData[\"discoverPrimerButton\"];\n    var shopNowButton = jsonData[\"shopNowButton\"] && jsonData[\"shopNowButton\"][language] ? jsonData[\"shopNowButton\"][language] : jsonData[\"shopNowButton\"];\n    var startAgainButton = jsonData[\"startAgainButton\"] && jsonData[\"startAgainButton\"][language] ? jsonData[\"startAgainButton\"][language] : jsonData[\"startAgainButton\"];\n\n    if (nextButton) {\n        $(\".step1\").text(nextButton);\n        $(\".step2\").text(nextButton);\n    }\n\n    if (discoverPrimerButton) {\n        $(\".final-step\").text(discoverPrimerButton);\n        $(\".step3\").text(discoverPrimerButton);\n    }\n\n    if (shopNowButton) {\n        $(\".shop-now\").text(shopNowButton);\n    }\n\n    if (startAgainButton) {\n        $(\".start-again\").text(startAgainButton);\n    }\n\n    $(\".step-1 .question-primer\").text(questionToUse);\n    $(\".step-1 .subquestion-primer\").text(subquestionToUse);\n    $(\".result-primer\").text(resultText);\n    $(\".sub-result-primer\").text(resultSubText);\n\n    var htmlStep1 = \"\";\n    for (var prop in jsonData[\"options\"]) {\n        var option = jsonData[\"options\"][prop];\n        var textToUse = option.text[language] ? option.text[language] : option.text;\n\n        if (windowSize > 991) {\n            htmlStep1 = htmlStep1 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop +\" class='select-response-input' name='step1-selectedResponse' />\";\n            htmlStep1 = htmlStep1 + \"<div class='image-response'><img class='image-display' src=\" + option.image +\"/></diV><div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div></label></div>\"\n        } else {\n            htmlStep1 = htmlStep1 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop + \" class='select-response-input' name='step1-selectedResponse' />\";\n            htmlStep1 = htmlStep1 + \"<div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div><div class='image-response'><img class='image-display' src=\" + option.image +\"/></div></label></div>\";\n        }\n    }\n    if (windowSize > 991) {\n        $(\".response-options-desktop-step1\").append(htmlStep1);\n    } else {\n        $(\".response-options-mobile-step1\").append(htmlStep1);\n    }\n\n    $(\".footer-content-1.container\").hide();\n\n    $('.primer-button').on('click', function(){\n        $('.primer-finder-page').slick(\"slickNext\");\n        $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n    });\n\n    $('.back-button').on('click', function() {\n        $('.primer-finder-page').slick(\"slickPrev\");\n        $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n    });\n\n    $(\"input[name='step1-selectedResponse']\").on(\"change\", function() {\n        $('.step1').css({display: \"block\"});\n        if (windowSize < 991) {\n            $(\".step1\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n        }\n    });\n\n    // Skip the intermediate step.\n    $(\".step-1 .select-response-input\").on(\"click\", function() {\n        var choice1 = $('input[name=\"step1-selectedResponse\"]:checked').val();\n        var response = jsonData[\"options\"][choice1];\n        if (!response.hasOwnProperty('nextStep')){\n            $(\".step-1 .step1\").addClass(\"hide\");\n            $(\".step-1 .final-step\").removeClass(\"hide\");\n            if (windowSize < 991) {\n                $(\".step-1 .step1\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n                $(\".step-1 .final-step\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n            }\n        } else {\n            $(\".step-1 .step1\").removeClass(\"hide\");\n            $(\".step-1 .final-step\").addClass(\"hide\");\n        }\n    });\n    $('.step-1 .final-step').on(\"click\", function() {\n        var choice1 = $('input[name=\"step1-selectedResponse\"]:checked').val();\n        var finalStep= jsonData[\"options\"][choice1];\n        if (!finalStep.hasOwnProperty('nextStep')){\n            dataLayer.push({\n                'event':'primer_finder_question',\n                'pf_question':{\n                    'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                    'step': '1'\n                }\n            });\n            $.spinner().start();\n            var productId = finalStep.result.productId;\n            var resultImage = finalStep.result.image;\n            getProductUrl = getProductUrl + productId + \"&l=\" + language + \"&c=\" + country;\n            $.ajax({\n                url: getProductUrl,\n                method: 'GET',\n                dataType: 'json',\n                success: function (dataJson) {\n                    if (dataJson.product) {\n                        var product = dataJson.product;\n                        var imageHtml = \"<img class='image-display' src=\"+ product.imageUrl.url +\" alt=\" + product.imageUrl.alt + \" />\";\n                        $(\".sub-title\").text(product.productSubName);\n                        $(\".title-product\").text(product.productName);\n                        if (product.colorShade) {\n                            $(\".name-shade\").text(product.colorShade);\n                        }\n                        $(\".description-product\").append(product.shortDescription);\n                        $(\".product-image\").append(imageHtml);\n                        $(\"#primer-finder-page\").remove();\n                        $(\".primer-finder-result\").show();\n                        $('.shop-now-href').attr(\"href\", product.selectedProductUrl);\n                        $(\".result-image\").append(\"<img class='image-display' src=\" + resultImage +\"/>\");\n                        $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n                        $.spinner().stop();\n                    }\n                }\n            });\n            // Tagging\n            dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n            $.ajax({\n                url: dataGtmProduct,\n                type: 'get',\n                dataType: 'json',\n                success: function (data) {\n                    dataLayer.push(data.productGtm);\n                    $('.shop-now').data(\"product-id\", productId);\n                },\n                error: function (err) {\n                    console.error(\"Error on GTM\", err)\n                }\n            })\n        }\n    });\n\n    $(\".step1\").on(\"click\", function() {\n        var choice1 = $('input[name=\"step1-selectedResponse\"]:checked').val();\n        if (windowSize < 991) {\n            $(\".step1\").addClass(\"hide\");\n        }\n        if (choice1) {\n            dataLayer.push({\n                'event':'primer_finder_question',\n                'pf_question':{\n                    'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                    'step': '1'\n                }\n            });\n            step1Response = jsonData[\"options\"][choice1].nextStep;\n            var textQuestion = step1Response[\"question\"][language] ? step1Response[\"question\"][language] : step1Response[\"question\"];\n            $(\".step-2 .question-primer\").text(textQuestion);\n            var htmlStep2 = \"\";\n            var mobileOptions = [];\n            for (var prop in step1Response[\"options\"]) {\n                var option = step1Response[\"options\"][prop];\n                var textToUse = option.text[language] ? option.text[language] : option.text;\n                var optionsCount = Object.keys(step1Response[\"options\"]).length;\n\n                if (windowSize > 991) {\n                    htmlStep2 = htmlStep2 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop +\" class='select-response-input' name='step2-selectedResponse' />\";\n                    htmlStep2 = htmlStep2 + \"<div class='image-response'><img class='image-display' src=\" + option.image +\"/></diV><div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div></label></div>\"\n                } else if (windowSize <= 991 && optionsCount < 3) {\n                    htmlStep2 = htmlStep2 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop + \" class='select-response-input' name='step2-selectedResponse' />\";\n                    htmlStep2 = htmlStep2 + \"<div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div><div class='image-response'><img class='image-display' src=\" + option.image +\"/></div></label></div>\";\n                } else {\n                    var mobileOption = {\n                        text: textToUse,\n                        property: prop,\n                        image: option.image\n                    }\n                    mobileOptions.push(mobileOption);\n                }\n            }\n\n            if (mobileOptions.length && !htmlStep2) {\n                htmlStep2 = \"<div class='response-element-caroussel'><div class='text-response-caroussel'>\" + mobileOptions[0].text + \"</div><div class='radio-checkmark-caroussel'><div class='radio-check-checked'></div></div><div class='images-caroussel'>\";\n                for (var i=0; i<mobileOptions.length; i++) {\n                    htmlStep2 = htmlStep2 + \"<div class='image-response-caroussel'><img class='mobile-caroussel-image' src=\" + mobileOptions[i].image + \" alt=\" + mobileOptions[i].property + \" /></div>\"\n                }\n                htmlStep2 = htmlStep2 + \"</div></div>\"\n                $(\".step2\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n                $('.step2').css({display: \"block\"});\n            }\n\n            if (windowSize > 991) {\n                $(\".response-options-desktop-step2\").empty().append(htmlStep2);\n            } else {\n                $(\".response-options-mobile-step2\").empty().append(htmlStep2);\n            }\n\n            if (mobileOptions.length) {\n                $('.images-caroussel').slick({\n                    slidesToShow: 1,\n                    centerPadding: '0',\n                    arrows: true,\n                    swipe: false,\n                    nextArrow: '<a class=\"next-arrow\"><span class=\"icon-CHEVRON\"></span></a>',\n                    prevArrow: '<a class=\"prev-arrow\"><span class=\"icon-CHEVRON\"></span></a>',\n                    initialSlide: 0,\n                    responsive: [{\n                        breakpoint: 1024,\n                        settings: {\n                            slidesToShow: 1,\n                            slidesToScroll: 1,\n                            initialSlide: 0,\n                            arrows: true,\n                            swipe: true,\n                        }\n                    },\n                    {\n                        breakpoint: 768,\n                        settings: {\n                            slidesToShow: 1,\n                            initialSlide: 0,\n                            centerMode: true,\n                            centerPadding: '95px',\n                            arrows: true,\n                            swipe: true\n                        }\n                    }]\n                });\n\n                var selectedOption = $('.images-caroussel .slick-current img.mobile-caroussel-image').attr('alt');\n                var response = step1Response[\"options\"][selectedOption];\n                if (!response.nextStep) {\n                    $(\".step2\").addClass(\"hide\");\n                    $(\".final-step\").removeClass(\"hide\");\n                }\n                $(\".step2\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n                $(\".final-step\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n\n                $('.images-caroussel').on('afterChange', function() {\n                    selectedOption = $('.images-caroussel .slick-current img.mobile-caroussel-image').attr('alt');\n                    var response = step1Response[\"options\"][selectedOption];\n                    if (response.nextStep) {\n                        $(\".step2\").removeClass(\"hide\");\n                        $(\".final-step\").addClass(\"hide\");\n                    } else {\n                        $(\".step2\").addClass(\"hide\");\n                        $(\".final-step\").removeClass(\"hide\");\n                    }\n                    for (var i=0; i<mobileOptions.length; i++) {\n                        if (selectedOption === mobileOptions[i].property) {\n                            $(\".text-response-caroussel\").text(mobileOptions[i].text);\n\n                            break;\n                        }\n                    }\n                });\n\n                $('.owl-next').on('click', function() {\n                    $('.images-caroussel').slick(\"slickNext\");\n                });\n\n                $('.owl-prev').on('click', function(){\n                    $('.images-caroussel').slick(\"slickPrev\");\n                });\n            }\n\n            if (windowSize < 991) {\n                $(\".step2\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n                $(\".final-step\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n            }\n\n            $(\"input[name='step2-selectedResponse']\").on(\"change\", function() {\n                $('.step2').css({display: \"block\"});\n                var actualValue = $(this).val();\n                var response = step1Response[\"options\"][actualValue];\n                if (response.nextStep) {\n                    $(\".step2\").removeClass(\"hide\");\n                    $(\".final-step\").addClass(\"hide\");\n                } else {\n                    $(\".step2\").addClass(\"hide\");\n                    $(\".final-step\").removeClass(\"hide\");\n                }\n            });\n\n            $(\".step2, .final-step\").on(\"click\", function() {\n                var choice2, htmlStep3;\n                if (windowSize > 991) {\n                    choice2 = $('input[name=\"step2-selectedResponse\"]:checked').val();\n                    if (choice2) {\n                        step2Response = step1Response[\"options\"][choice2];\n                        dataLayer.push({\n                            'event':'primer_finder_question',\n                            'pf_question':{\n                                'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                                'step': '2'\n                            }\n                        });\n                        dataLayer.push({\n                            'event':'primer_finder_answer',\n                            'pf_answer':{\n                                'step': '2',\n                                'choice': step2Response[\"text\"][\"en\"] || step2Response[\"text\"]\n                            }\n                        });\n\n                        if (step2Response.nextStep) {\n                            step2Response = step2Response.nextStep;\n                            var step3Question = step2Response[\"question\"][language] ? step2Response[\"question\"][language] :step2Response[\"question\"];\n                            $(\".step-3 .question-primer\").text(step3Question);\n                            htmlStep3 = \"\";\n                            for (var prop in step2Response[\"options\"]) {\n                                var option = step2Response[\"options\"][prop];\n                                var textToUse = option.text[language] ? option.text[language] : option.text;\n                                htmlStep3 = htmlStep3 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop +\" class='select-response-input' name='step3-selectedResponse' />\";\n                                htmlStep3 = htmlStep3 + \"<div class='image-response'><img class='image-display' src=\" + option.image +\"/></diV><div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div></label></div>\"\n                            }\n                            $(\".response-options-desktop-step3\").empty().append(htmlStep3);\n\n                            $(\"input[name='step3-selectedResponse']\").on(\"change\", function() {\n                                $('.step3').css({display: \"block\"});\n                            });\n\n                            $(\".step3\").on('click', function() {\n                                $.spinner().start();\n                                var choice3 = $('input[name=\"step3-selectedResponse\"]:checked').val();\n                                step3Response = step2Response[\"options\"][choice3];\n                                dataLayer.push({\n                                    'event':'primer_finder_question',\n                                    'pf_question':{\n                                        'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                                        'step': '3'\n                                    }\n                                });\n                                dataLayer.push({\n                                    'event':'primer_finder_answer',\n                                    'pf_answer':{\n                                        'step': '3',\n                                        'choice': step3Response[\"text\"][\"en\"] || step3Response[\"text\"]\n                                    }\n                                });\n                                var productId = step3Response.result.productId;\n                                var resultImage = step3Response.result.image;\n                                getProductUrl = getProductUrl + productId + \"&l=\" + language + \"&c=\" + country;\n                                $.ajax({\n                                    url: getProductUrl,\n                                    method: 'GET',\n                                    dataType: 'json',\n                                    success: function (dataJson) {\n                                        if (dataJson.product) {\n                                            var product = dataJson.product;\n                                            var imageHtml = \"<img class='image-display' src=\"+ product.imageUrl.url +\" alt=\" + product.imageUrl.alt + \" />\";\n                                            $(\".sub-title\").text(product.productSubName);\n                                            $(\".title-product\").text(product.productName);\n                                            if (product.colorShade) {\n                                                $(\".name-shade\").text(product.colorShade);\n                                            }\n                                            $(\".description-product\").append(product.shortDescription);\n                                            $(\".product-image\").append(imageHtml);\n                                            $(\"#primer-finder-page\").remove();\n                                            $(\".primer-finder-result\").show();\n                                            $('.shop-now-href').attr(\"href\", product.selectedProductUrl);\n                                            $(\".result-image\").append(\"<img class='image-display' src=\" + resultImage +\"/>\");\n                                            $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n                                            $.spinner().stop();\n                                        }\n                                    }\n                                });\n                                // Tagging\n                                dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n                                $.ajax({\n                                    url: dataGtmProduct,\n                                    type: 'get',\n                                    dataType: 'json',\n                                    success: function (data) {\n                                        dataLayer.push(data.productGtm);\n                                        $('.shop-now').data(\"product-id\", productId);\n                                    },\n                                    error: function (err) {\n                                        console.error(\"Error on GTM\", err)\n                                    }\n                                });\n                            });\n                        } else {\n                            $.spinner().start();\n                            var productId = step2Response.result.productId;\n                            var resultImage = step2Response.result.image;\n                            getProductUrl = getProductUrl + productId + \"&l=\" + language + \"&c=\" + country;\n                            $.ajax({\n                                url: getProductUrl,\n                                method: 'GET',\n                                dataType: 'json',\n                                success: function (dataJson) {\n                                    if (dataJson.product) {\n                                        var product = dataJson.product;\n                                        var imageHtml = \"<img class='image-display' src=\"+ product.imageUrl.url +\" alt=\" + product.imageUrl.alt + \" />\";\n                                        $(\".sub-title\").text(product.productSubName);\n                                        $(\".title-product\").text(product.productName);\n                                        if (product.colorShade) {\n                                            $(\".name-shade\").text(product.colorShade);\n                                        }\n                                        $(\".description-product\").append(product.shortDescription);\n                                        $(\".product-image\").append(imageHtml);\n                                        $(\"#primer-finder-page\").remove();\n                                        $(\".primer-finder-result\").show();\n                                        $('.shop-now-href').attr(\"href\", product.selectedProductUrl);\n                                        $(\".result-image\").append(\"<img class='image-display' src=\" + resultImage +\"/>\");\n                                        $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n                                        $.spinner().stop();\n                                    }\n                                }\n                            });\n                            // Tagging\n                            dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n                            $.ajax({\n                                url: dataGtmProduct,\n                                type: 'get',\n                                dataType: 'json',\n                                success: function (data) {\n                                    dataLayer.push(data.productGtm);\n                                    $('.shop-now').data(\"product-id\", productId);\n                                },\n                                error: function (err) {\n                                    console.error(\"Error on GTM\", err)\n                                }\n                            });\n                        }\n                    }\n                } else {\n                    $(\".step2\").addClass(\"hide\");\n                    if (optionsCount < 3) {\n                        choice2 = $('input[name=\"step2-selectedResponse\"]:checked').val();\n                    } else if (selectedOption) {\n                        choice2 = selectedOption;\n                    }\n                    if (choice2) {\n                        step2Response = step1Response[\"options\"][choice2];\n                        dataLayer.push({\n                            'event':'primer_finder_question',\n                            'pf_question':{\n                                'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                                'step': '2'\n                            }\n                        });\n                        dataLayer.push({\n                            'event':'primer_finder_answer',\n                            'pf_answer':{\n                                'step': '2',\n                                'choice': step2Response[\"text\"][\"en\"] || step2Response[\"text\"]\n                            }\n                        });\n                        if (step2Response.nextStep) {\n                            step2Response = step2Response.nextStep;\n                            var questionToUse = step2Response[\"question\"][language] ? step2Response[\"question\"][language] : step2Response[\"question\"];\n                            $(\".step-3 .question-primer\").text(questionToUse);\n                            htmlStep3 = \"\";\n                            var secondMobileOptions = [];\n                            for (var prop in step2Response[\"options\"]) { // eslint-disable-line\n                                var option = step2Response[\"options\"][prop]; // eslint-disable-line\n                                var textToUse = option.text[language] ? option.text[language] : option.text; // eslint-disable-line\n                                var secondOptionsCount = Object.keys(step2Response[\"options\"]).length;\n                                if (secondOptionsCount < 3) {\n                                    htmlStep3 = htmlStep3 + \"<div class='response-element'><label class='label-select-response'><input type='radio' value=\" + prop + \" class='select-response-input' name='step3-selectedResponse' />\";\n                                    htmlStep3 = htmlStep3 + \"<div class='text-response'>\" + textToUse + \"</div><div class='radio-checkmark'><div class='radio-check'></div></div><div class='image-response'><img class='image-display' src=\" + option.image +\"/></div></label></div>\";\n                                } else {\n                                    var secondMobileOption = {\n                                        text: textToUse,\n                                        property: prop,\n                                        image: option.image\n                                    }\n                                    secondMobileOptions.push(secondMobileOption);\n                                }\n                            }\n\n                            if (secondMobileOptions.length && !htmlStep3) {\n                                htmlStep3 = \"<div class='response-element-caroussel'><div class='text-response-caroussel2'>\" + secondMobileOptions[0].text + \"</div><div class='radio-checkmark-caroussel'><div class='radio-check-checked'></div></div><div class='images-caroussel2'>\";\n                                for (var i=0; i<secondMobileOptions.length; i++) {\n                                    htmlStep3 = htmlStep3 + \"<div class='image-response-caroussel'><img class='mobile-caroussel-image' src=\" + secondMobileOptions[i].image + \" alt=\" + secondMobileOptions[i].property + \" /></div>\"\n                                }\n                                htmlStep3 = htmlStep3 + \"</div></div>\"\n                                $('.step3').css({display: \"block\"});\n                            }\n                            $(\".response-options-mobile-step3\").empty().append(htmlStep3);\n                            $(\".step3\").detach().appendTo(\"#primer-finder-page\").addClass(\"sticky-button\");\n                            $(\"input[name='step3-selectedResponse']\").on(\"change\", function() {\n                                $('.step3').css({display: \"block\"});\n                            });\n\n                            if (secondMobileOptions.length) {\n                                $('.images-caroussel2').slick({\n                                    slidesToShow: 1,\n                                    centerPadding: '0',\n                                    arrows: true,\n                                    swipe: false,\n                                    nextArrow: '<a class=\"next-arrow\"><span class=\"icon-CHEVRON\"></span></a>',\n                                    prevArrow: '<a class=\"prev-arrow\"><span class=\"icon-CHEVRON\"></span></a>',\n                                    initialSlide: 0,\n                                    responsive: [{\n                                        breakpoint: 1024,\n                                        settings: {\n                                            slidesToShow: 1,\n                                            slidesToScroll: 1,\n                                            initialSlide: 0,\n                                            arrows: true,\n                                            swipe: true,\n                                        }\n                                    },\n                                    {\n                                        breakpoint: 768,\n                                        settings: {\n                                            slidesToShow: 1,\n                                            initialSlide: 0,\n                                            centerMode: true,\n                                            centerPadding: '95px',\n                                            arrows: true,\n                                            swipe: true\n                                        }\n                                    }]\n                                });\n\n                                selectedOption = $('.images-caroussel2 .slick-current img.mobile-caroussel-image').attr('alt');\n                                $('.images-caroussel2').on('afterChange', function() {\n                                    selectedOption = $('.images-caroussel2 .slick-current img.mobile-caroussel-image').attr('alt');\n                                    for (var i=0; i<secondMobileOptions.length; i++) {\n                                        if (selectedOption === secondMobileOptions[i].property) {\n                                            $(\".text-response-caroussel2\").text(secondMobileOptions[i].text);\n                                        }\n                                    }\n                                });\n\n                                $('.owl-next').on('click', function() {\n                                    $('.images-caroussel2').slick(\"slickNext\");\n                                });\n\n                                $('.owl-prev').on('click', function(){\n                                    $('.images-caroussel2').slick(\"slickPrev\");\n                                });\n                            }\n\n                            $(\".step3\").on('click', function() {\n                                var choice3;\n                                $(\".step3\").addClass(\"hide\");\n                                $.spinner().start();\n                                if (secondMobileOptions < 3) {\n                                    choice3 = $('input[name=\"step3-selectedResponse\"]:checked').val();\n                                } else {\n                                    choice3 = selectedOption;\n                                }\n                                if (choice3) {\n                                    step3Response = step2Response[\"options\"][choice3];\n                                    dataLayer.push({\n                                        'event':'primer_finder_question',\n                                        'pf_question':{\n                                            'parcours': jsonData[\"options\"][choice1][\"text\"][\"en\"] ||jsonData[\"options\"][choice1][\"text\"],\n                                            'step': '3'\n                                        }\n                                    });\n                                    dataLayer.push({\n                                        'event':'primer_finder_answer',\n                                        'pf_answer':{\n                                            'step': '3',\n                                            'choice': step3Response[\"text\"][\"en\"] || step3Response[\"text\"]\n                                        }\n                                    });\n                                    var productId = step3Response.result.productId;\n                                    var resultImage = step3Response.result.image;\n                                    getProductUrl = getProductUrl + productId + \"&l=\" + language + \"&c=\" + country;\n                                    $.ajax({\n                                        url: getProductUrl,\n                                        method: 'GET',\n                                        dataType: 'json',\n                                        success: function (dataJson) {\n                                            if (dataJson.product) {\n                                                var product = dataJson.product;\n                                                var imageHtml = \"<img class='image-display' src=\"+ product.imageUrl.url +\" alt=\" + product.imageUrl.alt + \" />\";\n                                                $(\".sub-title\").text(product.productSubName);\n                                                $(\".title-product\").text(product.productName);\n                                                if (product.colorShade) {\n                                                    $(\".name-shade\").text(product.colorShade);\n                                                }\n                                                $(\".description-product\").append(product.shortDescription);\n                                                $(\".product-image\").append(imageHtml);\n                                                $(\"#primer-finder-page\").remove();\n                                                $(\".primer-finder-result\").show();\n                                                $('.shop-now-href').attr(\"href\", product.selectedProductUrl);\n                                                $(\".result-image\").append(\"<img class='image-display' src=\" + resultImage +\"/>\");\n                                                $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n                                                $.spinner().stop();\n                                            }\n                                        }\n                                    });\n                                    // Tagging\n                                    dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n                                    $.ajax({\n                                        url: dataGtmProduct,\n                                        type: 'get',\n                                        dataType: 'json',\n                                        success: function (data) {\n                                            dataLayer.push(data.productGtm);\n                                            $('.shop-now').data(\"product-id\", productId);\n                                        },\n                                        error: function (err) {\n                                            console.error(\"Error on GTM\", err)\n                                        }\n                                    });\n                                }\n                            });\n                        } else {\n                            $.spinner().start();\n                            var productId = step2Response.result.productId; // eslint-disable-line\n                            var resultImage = step2Response.result.image; // eslint-disable-line\n                            getProductUrl = getProductUrl + productId + \"&l=\" + language + \"&c=\" + country;\n                            $.ajax({\n                                url: getProductUrl,\n                                method: 'GET',\n                                dataType: 'json',\n                                success: function (dataJson) {\n                                    if (dataJson.product) {\n                                        var product = dataJson.product;\n                                        var imageHtml = \"<img class='image-display' src=\"+ product.imageUrl.url +\" alt=\" + product.imageUrl.alt + \" />\";\n                                        $(\".sub-title\").text(product.productSubName);\n                                        $(\".title-product\").text(product.productName);\n                                        if (product.colorShade) {\n                                            $(\".name-shade\").text(product.colorShade);\n                                        }\n                                        $(\".description-product\").append(product.shortDescription);\n                                        $(\".product-image\").append(imageHtml);\n                                        $(\"#primer-finder-page\").remove();\n                                        $(\".primer-finder-result\").show();\n                                        $('.shop-now-href').attr(\"href\", product.selectedProductUrl);\n                                        $(\".result-image\").append(\"<img class='image-display' src=\" + resultImage +\"/>\");\n                                        $(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n                                        $.spinner().stop();\n                                    }\n                                }\n                            });\n                            // Tagging\n                            dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n                            $.ajax({\n                                url: dataGtmProduct,\n                                type: 'get',\n                                dataType: 'json',\n                                success: function (data) {\n                                    dataLayer.push(data.productGtm);\n                                    $('.shop-now').data(\"product-id\", productId);\n                                },\n                                error: function (err) {\n                                    console.error(\"Error on GTM\", err)\n                                }\n                            });\n                        }\n                    }\n                }\n            });\n\n        }\n    });\n    $(\".start-again\").on(\"click\", function() {\n        window.dataLayer.push({\n            'event': \"primer_finder_click\",\n            'cta_name': $(this)[0].innerText.toLowerCase()\n        });\n    });\n    $(\".shop-now\").on(\"click\", function() {\n        window.dataLayer.push({\n            'event': \"primer_finder_click\",\n            'cta_name': $(this)[0].innerText.toLowerCase()\n        });\n        // Push productClick event Primer Finder to GTM.\n        var productId = $(this).data(\"product-id\");\n        dataGtmProduct = dataGtmProduct + \"?product=\" + productId;\n        $.ajax({\n            url: dataGtmProduct,\n            type: 'get',\n            dataType: 'json',\n            success: function (data) {\n                window.dataLayer.push(data.primerFinderResultGtm);\n            },\n            error: function (err) {\n                console.error(\"Error on GTM\", err)\n            }\n        });\n    });\n    $(\".final-step\").on(\"click\", function() {\n        window.dataLayer.push({\n            'event': \"primer_finder_click\",\n            'cta_name': $(this)[0].innerText.toLowerCase()\n        });\n    });\n    $(\".button-start\").on(\"click\", function() {\n        window.dataLayer.push({\n            'event': \"primer_finder_click\",\n            'cta_name': $(this)[0].innerText.toLowerCase()\n        });\n    });\n});\n"],"names":["$","document","ready","step1Response","step2Response","step3Response","jsonData","attr","JSON","parse","getProductUrl","language","country","dataGtmProduct","windowSize","window","width","remove","resultText","resultSubText","questionToUse","subquestionToUse","nextButton","discoverPrimerButton","shopNowButton","startAgainButton","text","htmlStep1","prop","option","textToUse","image","append","hide","on","slick","animate","scrollTop","css","display","detach","appendTo","addClass","choice1","val","hasOwnProperty","removeClass","finalStep","dataLayer","push","spinner","start","productId","result","resultImage","ajax","url","method","dataType","success","dataJson","product","imageHtml","imageUrl","alt","productSubName","productName","colorShade","shortDescription","show","selectedProductUrl","stop","type","data","productGtm","error","err","console","textQuestion","nextStep","htmlStep2","mobileOptions","optionsCount","Object","keys","length","mobileOption","property","i","empty","slidesToShow","centerPadding","arrows","swipe","nextArrow","prevArrow","initialSlide","responsive","breakpoint","settings","slidesToScroll","centerMode","selectedOption","actualValue","this","choice2","htmlStep3","step3Question","choice3","secondMobileOptions","secondMobileOption","innerText","toLowerCase","primerFinderResultGtm"],"sourceRoot":""}