<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict";
var _createClass = function() {
        function i(t, e) {
            for (var s = 0; s &lt; e.length; s++) {
                var i = e[s];
                i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i &amp;&amp; (i.writable = !0), Object.defineProperty(t, i.key, i)
            }
        }
        return function(t, e, s) {
            return e &amp;&amp; i(t.prototype, e), s &amp;&amp; i(t, s), t
        }
    }(),
    _get = function t(e, s, i) {
        null === e &amp;&amp; (e = Function.prototype);
        var r = Object.getOwnPropertyDescriptor(e, s);
        if (void 0 === r) {
            var n = Object.getPrototypeOf(e);
            return null === n ? void 0 : t(n, s, i)
        }
        if ("value" in r) return r.value;
        var a = r.get;
        return void 0 !== a ? a.call(i) : void 0
    };

function _classCallCheck(t, e) {
    if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
}

function _possibleConstructorReturn(t, e) {
    if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    return !e || "object" != typeof e &amp;&amp; "function" != typeof e ? t : e
}
function _inherits(t, e) {
    if ("function" != typeof e &amp;&amp; null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
    t.prototype = Object.create(e &amp;&amp; e.prototype, {
        constructor: {
            value: t,
            enumerable: !1,
            writable: !0,
            configurable: !0
        }
    }), e &amp;&amp; (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}! function(l, d) {
    
     var e = (_inherits(i, l.Quiz), _createClass(i, [{
        key: "isFullyAnswered",
        value: function(t) {
            var e = t.attr("data-index");
            return parseInt(this.questions[e].totalCorrects) &lt;= t.find(".wq-answer.chosen").length
        }
    }, {
        key: "afterClickAnswer",
        value: function(t, e) {
             this.savePlayData();
            "multiple" !== this.settings.question_layout &amp;&amp; "off" !== this.settings.end_answers || this.checkQuestion(e), _get(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "afterClickAnswer", this).call(this, t, e)
            var y = t.parent().attr("data-id");
            if(y == undefined ){
                var y = t.parent().parent().attr("data-id");
                if(y == undefined ){
                    var y = t.parent().parent().parent().attr("data-id");
                }
            }
            var nxtBtn = '.wq-question[data-index="' + y + '"]'+' .quiz_nxt_btn';
            var finishBtn = '.wq-question[data-index="' + y + '"]'+' .quiz_finish_btn';            
           if(this.totalQuestions == this.totalAnswered)
           {
            $(finishBtn).removeClass('d-none');
           }else {
            $(nxtBtn).removeClass('d-none');
           }           
           this.saveProgressToCookie(); 

        }
    },{
        key: "handleShowTestResult",
        value: function(e,id) {
        this.saveResultData();
        this.saveProgressToCookie(), window.location.href = window.location.href.split('?')[0] + '?results=' + id
        }
    }, {
        key: "checkQuestion",
        value: function(i) {
            var r = this,
                t = i.attr("data-index"),
                n = this.questions[t];
            if (n) {
                var a = 0 &lt; i.find(".wq-answer.chosen").length;
                this.checkedAnswersList += "&lt;div&gt;&lt;p&gt;&lt;strong&gt;" + n.title + "&lt;/strong&gt;&lt;/p&gt;", Object.keys(n.answers).forEach(function(t) {
                    var e = n.answers[t],
                        s = i.find('.wq-answer[data-id="' + t + '"]');
                    e.isCorrect &amp;&amp; parseInt(e.isCorrect) ? s.addClass("wq_correctAnswer") : s.hasClass("chosen") &amp;&amp; (s.addClass("wq_incorrectAnswer"), a = !1), s.hasClass("chosen") &amp;&amp; (r.checkedAnswersList += '&lt;p class="' + (a ? "is-correct" : "is-incorrect") + '"&gt;' + e.title + "&lt;/p&gt;"), "on" === r.settings.end_answers &amp;&amp; "multiple" === r.settings.question_layout &amp;&amp; s.removeClass("wq_correctAnswer").removeClass("wq_incorrectAnswer")
                }), this.checkedAnswersList += "&lt;/div&gt;", a ? (this.totalCorrects++, i.addClass("is-correct")) : i.addClass("is-incorrect"), "off" !== this.settings.end_answers &amp;&amp; "single" !== this.settings.question_layout &amp;&amp; !i.find(".wq-trivia-question-explanation").length || i.find(".wq-trivia-question-explanation").fadeIn()
            }
        }
    },

{
        key: "trackAnswer",
        value: function(t) {
            var e = t.attr("data-index"),
                s = this.questions[e],
                i = {
                    answers: []
                };
            this.timer &amp;&amp; (i.time = parseFloat(this.settings.countdown_timer) - this.timer.current()), t.find(".wq-answer.chosen").each(function(t, e) {
                return i.answers.push(e.dataset.id)
            }), this.tracker[s.id] = i
        }
    },{
        key: "complete",
        value: function() {
            var t = this;
            "single" === this.settings.question_layout &amp;&amp; "on" === this.settings.end_answers &amp;&amp; this.$wrapper.find(".wq-question").each(function() {
                t.checkQuestion(d(this))
            }), _get(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "complete", this).call(this)
        }
    }, {
        key: "findResultId",
        value: function() {
            var e = this,
                s = this.totalCorrects,
                i = !1;
            this.results.forEach(function(t) {
                i || s &gt;= t.min &amp;&amp; s &lt;= t.max &amp;&amp; (i = !0, e.resultId = t.id, e.result = t)
            })
        }
    }, {
        key: "showResult",
        value: function() {
            var t = this,
                e = this.totalCorrects,
                s = this.totalQuestions;
            if (this.$wrapper.find(".wq-timer").hide(), this.result.redirect_url) {
                var i = 0 &lt; this.questions[this.lastQuestionIndex].desc.length ? this.nextQuestionDelayWithExplanation : this.nextQuestionDelay;
                setTimeout(function() {
                    window.location.href = t.result.redirect_url.replace("%%score%%", e).replace("%%total%%", s)
                }, i)
            } else {
                var r = this.$wrapper.find(".wq-results"),
                    n = this.$wrapper.find('.wq-result[data-id="' + this.resultId + '"]'),
                    a = l.i18n.resultScore.replace("%%score%%", e).replace("%%total%%", s),
                    o = this.$wrapper.find('.wq-question[data-index="' + this.lastQuestionIndex + '"]');
                if (n.find(".wq-result-score").text(a), n.find(".wq-checked-answers-list").html(this.checkedAnswersList), n.show(), this.$wrapper.addClass("wq-should-show-correct-answer"), this.isResultInPopup() &amp;&amp; void 0 !== d.magnificPopup) {
                    var c = ["max-width: " + this.$wrapper.width() + "px", "padding: 0"],
                        u = r.clone();
                    u.show();
                    var h = '&lt;div class="wq-popup" style="' + c.join("; ") + '"&gt;' + u.prop("outerHTML") + "&lt;/div&gt;";
                    return d.magnificPopup.open({
                        items: {
                            src: h,
                            type: "inline"
                        }
                    }), void this.showPlayAgainButton()
                }
                "multiple" === this.settings.question_layout &amp;&amp; o.is(":visible") ? o.animateCss(this.settings.animation_out, function() {
                    o.hide(), o.offset().top, o.hide(), r.show().animateCss(t.settings.animation_in), t.showPlayAgainButton()
                }) : ("on" === this.settings.end_answers &amp;&amp; this.scrollToQuestion(0), r.show(), this.showPlayAgainButton())
            }
        }
    }, {
        key: "saveResultData",
        value: function() {
            var e = this,
            
                t = l.restUrl + "wp-quiz/v2/result_data",
                s = l.helpers.getRequest({
                    url: t,
                    method: "POST",
                    data: {
                        quiz_id: this.quizId,
                        quiz_data: JSON.stringify(this.quizData),
                        answered: JSON.stringify(this.tracker),
                        corrects: this.totalCorrects,
                        result_id: this.resultId,
                        current_url: window.location.href
                    }
                });
            s.done(function(t) {
                "number" == typeof t &amp;&amp; (e.$wrapper.find(".wq-subscribe-form").attr("data-tracking-id", t), e.$wrapper.find(".wq-share button").attr("data-tracking-id", t), d(".mfp-wrap .wq-popup .wq-share button").attr("data-tracking-id", t), e.$wrapper.find(".wq_forceShareFB").attr("data-tracking-id", t))
            }), s.fail(function(t) {
                console.error(t)
            })
        }
        },{
        key: "savePlayData",
        value: function() {
            
            var e = this,
            
                t = l.restUrl + "wp-quiz/v2/play_data",
                s = l.helpers.getRequest({
                    url: t,
                    method: "POST",
                    data: {
                        quiz_id: this.quizId,
                        quiz_data: JSON.stringify(this.quizData),
                        answered: JSON.stringify(this.tracker),
                        corrects: this.totalCorrects,
                        result_id: this.resultId,
                        current_url: window.location.href
                    }
                });
            s.done(function(t) {
                "number" == typeof t &amp;&amp; (e.$wrapper.find(".wq-subscribe-form").attr("data-tracking-id", t), e.$wrapper.find(".wq-share button").attr("data-tracking-id", t), d(".mfp-wrap .wq-popup .wq-share button").attr("data-tracking-id", t), e.$wrapper.find(".wq_forceShareFB").attr("data-tracking-id", t))
            }), s.fail(function(t) {
                console.error(t)
            })
        }
    }, {
        key: "restartQuiz",
        value: function() {
            _get(i.prototype.__proto__ || Object.getPrototypeOf(i.prototype), "restartQuiz", this).call(this), "on" === this.settings.end_answers &amp;&amp; this.$wrapper.removeClass("wq-should-show-correct-answer"), this.$wrapper.find(".wq_correctExplanationHead").removeClass("wq_correctExplanationHead"), this.$wrapper.find(".wq-trivia-question-explanation").hide(), this.$wrapper.find(".wq_wrongExplanationHead").removeClass("wq_wrongExplanationHead"), this.$wrapper.find(".wq_incorrectAnswer").removeClass("wq_incorrectAnswer"), this.$wrapper.find(".wq_correctAnswer").removeClass("wq_correctAnswer"), this.checkedAnswersList = "", this.$wrapper.find(".wq-checked-answers-list").html("")
        }
    },{
        key: "continueFromProgress",
        value: function(e) {
            var n = this;
            if ( this.totalAnswered = e.totalAnswered, this.totalCorrects = e.totalCorrects, this.tracker = e.tracker, this.totalAnswered &gt;= this.totalQuestions) {} //else this.$wrapper.find('.wq-question[data-index="' + this.currentQuestionIndex + '"]').show()
                // Resume Test if page refreshed
            if ( this.totalAnswered = e.totalAnswered){
                $('.wq-question').addClass('d-none');
                var ResumeQuestion = '.wq-question[data-index="' + e.totalAnswered + '"]';
                $(ResumeQuestion).removeClass('d-none');
             }else if ( this.totalAnswered = e.totalAnswered, this.totalCorrects = e.totalCorrects, this.tracker = e.tracker, this.totalAnswered &gt;= this.totalQuestions) {} //else this.$wrapper.find('.wq-question[data-index="' + this.currentQuestionIndex + '"]').show()
            }
    }
    
    ]), i);
    function i(t, e) {
        _classCallCheck(this, i);
        var s = _possibleConstructorReturn(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this, t, e));
        return s.checkedAnswersList = "", s
    }
    d(document).ready(function() {
        d(".wq-quiz-trivia").each(function() {
            var t = d(this).attr("data-quiz-id");
            void 0 !== window["triviaQuiz" + t] &amp;&amp; new e(d(this), window["triviaQuiz" + t])
        })
    })
    
}(wpQuiz, jQuery);



$( window ).load(function() {
   $("#stickyfooter_in_test_page").addClass("showfootersticky");
});</pre></body></html>