H5PIntegration = {
  ajax: { setFinished: "", contentUserData: "" },
  ajaxPath: "/h5p/ajax?action=",
  contents: {
    "cid-2554109425": {
      displayOptions: {
        copy: false,
        copyright: false,
        embed: false,
        export: false,
        frame: false,
        icon: false,
      },
      fullScreen: "1",
      jsonContent:
        '{"showCoverPage":false,"bookCover":{"coverDescription":"<p style=\\"text-align:center\\"></p>"},"chapters":[{"params":{"content":[{"content":{"params":{"text":"<p>Τα <strong>υποπρογράμματα</strong> είναι μικρά τμήματα κώδικα που εκτελούν συγκεκριμένες εργασίες, βοηθώντας μας να οργανώνουμε και να απλοποιούμε τον κώδικά μας. Μπορούν να δέχονται παραμέτρους, δηλαδή τιμές που τους δίνουμε για να επεξεργαστούν, και μπορούν να επιστρέφουν αποτελέσματα. Ανάλογα με τη χρήση τους, οι παράμετροι μπορεί να είναι απλές (όπως αριθμοί και κείμενο) ή σύνθετες (όπως λίστες).</p>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]},"subContentId":"5facc3d0-1547-43f8-b7ff-649e57f2a402"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"0e5fb466-e9b4-489f-8e9a-7348608747c2","metadata":{"contentType":"Column","license":"U","title":"Εισαγωγή","authors":[],"changes":[],"extraTitle":"Εισαγωγή"}},{"params":{"content":[{"content":{"params":{"text":"<p>Είναι ένα υποπρόγραμμα που εκτελεί μια συγκεκριμένη λειτουργία χωρίς να δέχεται εισόδους ή να επιστρέφει τιμές. Ιδανικό για εντολές, όπως μηνύματα στην οθόνη.</p>\\n\\n<hr />\\n<p><em>Παράδειγμα</em></p>\\n\\n<ul>\\n\\t<li>Υποπρόγραμμα</li>\\n</ul>\\n\\n<p>def <strong>καλημέρα()</strong>:</p>\\n\\n<p>      print(\\"Καλημέρα σας!\\")</p>\\n\\n<p> </p>\\n\\n<ul>\\n\\t<li>Κύριο πρόγραμμα</li>\\n</ul>\\n\\n<p><strong>καλημέρα()</strong></p>\\n\\n<ul>\\n\\t<li>Πρόκειται για ένα υποπρόγραμμα που εκτελεί μία εντολήεμφάνισης, χωρίς είσοδο ή υπολογιζόμενη έξοδο.</li>\\n</ul>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]},"subContentId":"7963d801-48b6-4ee6-bc8a-94010152368e"},"useSeparator":"auto"},{"content":{"params":{"introPage":{"showIntroPage":false,"startButtonText":"Έναρξη","introduction":""},"progressType":"dots","passPercentage":50,"questions":[{"params":{"media":{"disableImageZooming":false},"answers":[{"correct":true,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>Καλημέρα σας!</div>\\n"},{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>Τίποτα, γιατί το υποπρόγραμμα δεν περιέχει καμία παράμετρο.</div>\\n"}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"type":"auto","singlePoint":false,"randomAnswers":true,"showSolutionsRequiresInput":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"passPercentage":100,"showScorePoints":true},"UI":{"checkAnswerButton":"Έλεγχος","submitAnswerButton":"Υποβολή","showSolutionButton":"Λύση","tryAgainButton":"Επανάληψη","tipsLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total πόντους","tipAvailable":"Επεξήγηση διαθέσιμη","feedbackAvailable":"Ανατροφοδότηση διαθέσιμη","readFeedback":"Ανάγνωση ανατροφοδότησης","wrongAnswer":"Λάθος απάντηση","correctAnswer":"Σωστή απάντηση","shouldCheck":"Θα πρέπει να έχει επιλεγεί","shouldNotCheck":"Δεν θα πρέπει να έχει επιλεγεί","noInput":"Παρακαλώ απάντησε προτού δεις τη λύση","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Τι θα εμφανίσει η εντολή καλημέρα(); στην οθόνη;</p>\\n"},"library":"H5P.MultiChoice 1.16","metadata":{"contentType":"Multiple Choice","license":"U","title":"Untitled Πολλαπλή επιλογή (Multiple Choice)","authors":[],"changes":[],"extraTitle":"Untitled Πολλαπλή επιλογή (Multiple Choice)"},"subContentId":"c85f7ca6-da4c-4351-a0bb-2b3e2054d06b"},{"params":{"media":{"disableImageZooming":false},"answers":[{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>Ναι, την λέξη καλημέρα.</div>\\n"},{"correct":true,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>Όχι, απλώς εκτυπώνει ένα μήνυμα.</div>\\n"}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"type":"auto","singlePoint":false,"randomAnswers":true,"showSolutionsRequiresInput":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"passPercentage":100,"showScorePoints":true},"UI":{"checkAnswerButton":"Έλεγχος","submitAnswerButton":"Υποβολή","showSolutionButton":"Λύση","tryAgainButton":"Επανάληψη","tipsLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total πόντους","tipAvailable":"Επεξήγηση διαθέσιμη","feedbackAvailable":"Ανατροφοδότηση διαθέσιμη","readFeedback":"Ανάγνωση ανατροφοδότησης","wrongAnswer":"Λάθος απάντηση","correctAnswer":"Σωστή απάντηση","shouldCheck":"Θα πρέπει να έχει επιλεγεί","shouldNotCheck":"Δεν θα πρέπει να έχει επιλεγεί","noInput":"Παρακαλώ απάντησε προτού δεις τη λύση","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Το υποπρόγραμμα επιστρέφει κάποια τιμή;</p>\\n"},"library":"H5P.MultiChoice 1.16","metadata":{"contentType":"Multiple Choice","license":"U","title":"Untitled Πολλαπλή επιλογή (Multiple Choice)","authors":[],"changes":[],"extraTitle":"Untitled Πολλαπλή επιλογή (Multiple Choice)"},"subContentId":"7685de8b-794c-4bc1-8afd-242d71b72986"}],"disableBackwardsNavigation":false,"randomQuestions":false,"endGame":{"showResultPage":true,"showSolutionButton":true,"showRetryButton":true,"noResultMessage":"Ολοκληρώθηκε","message":"Η βαθμολογία σου:","scoreBarLabel":"Έχετε @finals από @totals πόντους","overallFeedback":[{"from":0,"to":100}],"solutionButtonText":"Λύση","retryButtonText":"Επανάληψη","finishButtonText":"Ολοκλήρωση","submitButtonText":"Υποβολή","showAnimations":false,"skippable":false,"skipButtonText":"Παράβλεψη"},"texts":{"prevButton":"Προηγούμενη","nextButton":"Επόμενη","finishButton":"Ολοκλήρωση","submitButton":"Υποβολή","textualProgress":"Ερώτηση: @current από @total ερωτήσεις","jumpToQuestion":"Ερώτηση %d από %total","questionLabel":"Ερώτηση","readSpeakerProgress":"Ερώτηση @current από @total","unansweredText":"Δεν απαντήθηκε","answeredText":"Απαντήθηκε","currentQuestionText":"Τρέχουσα ερώτηση","navigationLabel":"Ερωτήσεις"},"override":{"checkButton":true}},"library":"H5P.QuestionSet 1.20","metadata":{"contentType":"Question Set","license":"U","title":"Κουίζ (Απλό υποπρόγραμμα)","authors":[],"changes":[],"extraTitle":"Κουίζ (Απλό υποπρόγραμμα)"},"subContentId":"c3975736-27a1-44dc-8247-f0dcb03ca2a8"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"687bdb57-50da-47e8-8cf9-5ff90acc5ae4","metadata":{"contentType":"Column","license":"U","title":"Απλό υποπρόγραμμα χωρίς παραμέτρους","authors":[],"changes":[],"extraTitle":"Απλό υποπρόγραμμα χωρίς παραμέτρους"}},{"params":{"content":[{"content":{"params":{"text":"<p>Είναι ένα υποπρόγραμμα, στο οποίο όταν \\"περνάμε\\" μια μεταβλητή ως όρισμα, η αρχική της τιμή δεν αλλάζει έξω από το υποπρόγραμμα. Χρήσιμο για υπολογισμούς χωρίς τροποποίηση δεδομένων.</p>\\n\\n<hr />\\n<p><em>Παράδειγμα</em></p>\\n\\n<ul>\\n\\t<li>Υποπρόγραμμα</li>\\n</ul>\\n\\n<p>def <strong>διπλασιασε(</strong>αριθμός<strong>)</strong>:</p>\\n\\n<p>    αριθμός = αριθμός * 2</p>\\n\\n<p>    print(\\"Μέσα στη συνάρτηση:\\", αριθμός)</p>\\n\\n<p> </p>\\n\\n<ul>\\n\\t<li>Κύριο πρόγραμμα</li>\\n</ul>\\n\\n<p>x = 5</p>\\n\\n<p><strong>διπλασίασε(</strong>x<strong>)</strong></p>\\n\\n<p>print(\\"Έξω από τη συνάρτηση:\\", x)</p>\\n\\n<p> </p>\\n\\n<ul>\\n\\t<li>Απλό αριθμητικό παράδειγμα. Το x δεν αλλάζει έξω από το υποπρόγραμμα.</li>\\n</ul>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]},"subContentId":"dee2ac38-687e-47fb-9b3d-89d2310fef7b"},"useSeparator":"auto"},{"content":{"params":{"introPage":{"showIntroPage":false,"startButtonText":"Έναρξη","introduction":""},"progressType":"dots","passPercentage":50,"questions":[{"params":{"media":{"disableImageZooming":false},"answers":[{"correct":true,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>10</div>\\n\\n<div>5</div>\\n"},{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>10</div>\\n\\n<div>10</div>\\n"},{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>5</div>\\n\\n<div>5</div>\\n"}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"type":"auto","singlePoint":false,"randomAnswers":true,"showSolutionsRequiresInput":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"passPercentage":100,"showScorePoints":true},"UI":{"checkAnswerButton":"Έλεγχος","submitAnswerButton":"Υποβολή","showSolutionButton":"Λύση","tryAgainButton":"Επανάληψη","tipsLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total πόντους","tipAvailable":"Επεξήγηση διαθέσιμη","feedbackAvailable":"Ανατροφοδότηση διαθέσιμη","readFeedback":"Ανάγνωση ανατροφοδότησης","wrongAnswer":"Λάθος απάντηση","correctAnswer":"Σωστή απάντηση","shouldCheck":"Θα πρέπει να έχει επιλεγεί","shouldNotCheck":"Δεν θα πρέπει να έχει επιλεγεί","noInput":"Παρακαλώ απάντησε προτού δεις τη λύση","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Τι θα εμφανίσει η εκτέλεση του παραπάνω κώδικα;</p>\\n"},"library":"H5P.MultiChoice 1.16","metadata":{"contentType":"Multiple Choice","license":"U","title":"Untitled Πολλαπλή επιλογή (Multiple Choice)","authors":[],"changes":[],"extraTitle":"Untitled Πολλαπλή επιλογή (Multiple Choice)"},"subContentId":"89a0c03d-0da6-487b-8579-1161ac310fdb"},{"params":{"media":{"disableImageZooming":false},"correct":"true","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"feedbackOnCorrect":"Ωραία!","feedbackOnWrong":"Στην Python οι αριθμητικές τιμές περνούν by value, οπότε δημιουργείται ένα αντίγραφο της μεταβλητής μέσα στη συνάρτηση."},"l10n":{"trueText":"Σωστό","falseText":"Λάθος","score":"Συγκέντρωσες @score από @total βαθμούς","checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","showSolutionButton":"Λύση","tryAgain":"Επανάληψη","wrongAnswerMessage":"Λάθος απάντηση","correctAnswerMessage":"Σωστή απάντηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος/η ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Η μεταβλητή x δεν αλλάζει έξω από τη συνάρτηση.</p>\\n"},"library":"H5P.TrueFalse 1.8","metadata":{"contentType":"True/False Question","license":"U","title":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)","authors":[],"changes":[],"extraTitle":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)"},"subContentId":"e406efee-6835-4c03-8d66-8ec01c2a7ca3"}],"disableBackwardsNavigation":false,"randomQuestions":false,"endGame":{"showResultPage":true,"showSolutionButton":true,"showRetryButton":true,"noResultMessage":"Ολοκληρώθηκε","message":"Η βαθμολογία σου:","scoreBarLabel":"Έχετε @finals από @totals πόντους","overallFeedback":[{"from":0,"to":100}],"solutionButtonText":"Λύση","retryButtonText":"Επανάληψη","finishButtonText":"Ολοκλήρωση","submitButtonText":"Υποβολή","showAnimations":false,"skippable":false,"skipButtonText":"Παράβλεψη"},"texts":{"prevButton":"Προηγούμενη","nextButton":"Επόμενη","finishButton":"Ολοκλήρωση","submitButton":"Υποβολή","textualProgress":"Ερώτηση: @current από @total ερωτήσεις","jumpToQuestion":"Ερώτηση %d από %total","questionLabel":"Ερώτηση","readSpeakerProgress":"Ερώτηση @current από @total","unansweredText":"Δεν απαντήθηκε","answeredText":"Απαντήθηκε","currentQuestionText":"Τρέχουσα ερώτηση","navigationLabel":"Ερωτήσεις"},"override":{"checkButton":true}},"library":"H5P.QuestionSet 1.20","metadata":{"contentType":"Question Set","license":"U","title":"Κουίζ (by value)","authors":[],"changes":[],"extraTitle":"Κουίζ (by value)"},"subContentId":"53fa3990-93db-41c9-9ab9-9bf4dd8c179a"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"f942f6b5-61f8-4488-88c6-4dac04f3590d","metadata":{"contentType":"Column","license":"U","title":"Υποπρόγραμμα με παράμετρο (by value)","authors":[],"changes":[],"extraTitle":"Υποπρόγραμμα με παράμετρο (by value)"}},{"params":{"content":[{"content":{"params":{"text":"<p>Είναι ένα υποπρόγραμμα με λίστες, οι οποίες \\"περνάνε\\" με αναφορά (by reference), πράγμα που σημαίνει ότι οι αλλαγές που γίνονται μέσα στο υποπρόγραμμα επηρεάζουν και τα αρχικά δεδομένα.</p>\\n\\n<hr />\\n<p><em>Παράδειγμα</em></p>\\n\\n<ul>\\n\\t<li>Υποπρόγραμμα</li>\\n</ul>\\n\\n<p>def <strong>πρόσθεσε_στο_τέλος(</strong>λίστα<strong>)</strong>:</p>\\n\\n<p>    λίστα.append(\\"νέο στοιχείο\\")</p>\\n\\n<p> </p>\\n\\n<ul>\\n\\t<li>Κύριο πρόγραμμα</li>\\n</ul>\\n\\n<p>ροφήματα = [\\"τσάι\\", \\"καφές\\"]</p>\\n\\n<p><strong>πρόσθεσε_στο_τέλος(</strong>ροφήματα<strong>)</strong></p>\\n\\n<p>print(ροφήματα)</p>\\n\\n<p> </p>\\n\\n<ul>\\n\\t<li>Η λίστα αλλάζει επειδή περνά by reference.</li>\\n</ul>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]},"subContentId":"e2985f44-0f4b-4238-b712-f47600824881"},"useSeparator":"auto"},{"content":{"params":{"introPage":{"showIntroPage":false,"startButtonText":"Έναρξη","introduction":""},"progressType":"dots","passPercentage":50,"questions":[{"params":{"media":{"disableImageZooming":false},"answers":[{"correct":true,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>[\\"τσάι\\", \\"καφές\\", \\"νέο στοιχείο\\"]</div>\\n"},{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>[\\"τσάι\\", \\"καφές\\"]</div>\\n"}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"type":"auto","singlePoint":false,"randomAnswers":true,"showSolutionsRequiresInput":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"passPercentage":100,"showScorePoints":true},"UI":{"checkAnswerButton":"Έλεγχος","submitAnswerButton":"Υποβολή","showSolutionButton":"Λύση","tryAgainButton":"Επανάληψη","tipsLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total πόντους","tipAvailable":"Επεξήγηση διαθέσιμη","feedbackAvailable":"Ανατροφοδότηση διαθέσιμη","readFeedback":"Ανάγνωση ανατροφοδότησης","wrongAnswer":"Λάθος απάντηση","correctAnswer":"Σωστή απάντηση","shouldCheck":"Θα πρέπει να έχει επιλεγεί","shouldNotCheck":"Δεν θα πρέπει να έχει επιλεγεί","noInput":"Παρακαλώ απάντησε προτού δεις τη λύση","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Αν καλέσουμε το πρόσθεσε_στο_τέλος(ροφήματα), τι θα περιέχει η λίστα ροφηματα μετά την εκτέλεση;</p>\\n"},"library":"H5P.MultiChoice 1.16","metadata":{"contentType":"Multiple Choice","license":"U","title":"Untitled Πολλαπλή επιλογή (Multiple Choice)","authors":[],"changes":[],"extraTitle":"Untitled Πολλαπλή επιλογή (Multiple Choice)"},"subContentId":"67a5a71f-a49c-45c5-8d28-b2f828d40905"},{"params":{"media":{"disableImageZooming":false},"correct":"false","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"feedbackOnWrong":"Οι λίστες στην Python &quot;περνούν&quot; by reference, άρα η αλλαγή μέσα στη συνάρτηση επηρεάζει τα αρχικά δεδομένα.","feedbackOnCorrect":"Ωραία!"},"l10n":{"trueText":"Σωστό","falseText":"Λάθος","score":"Συγκέντρωσες @score από @total βαθμούς","checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","showSolutionButton":"Λύση","tryAgain":"Επανάληψη","wrongAnswerMessage":"Λάθος απάντηση","correctAnswerMessage":"Σωστή απάντηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος/η ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Αν γίνει κάποια αλλαγή της λίστας μέσα στη συνάρτηση, αυτό δεν επηρεάζει τα αρχικά δεδομένα της.</p>\\n"},"library":"H5P.TrueFalse 1.8","metadata":{"contentType":"True/False Question","license":"U","title":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)","authors":[],"changes":[],"extraTitle":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)"},"subContentId":"5eec35de-64f0-420f-85b8-fe9a120d7177"}],"disableBackwardsNavigation":false,"randomQuestions":false,"endGame":{"showResultPage":true,"showSolutionButton":true,"showRetryButton":true,"noResultMessage":"Ολοκληρώθηκε","message":"Η βαθμολογία σου:","scoreBarLabel":"Έχετε @finals από @totals πόντους","overallFeedback":[{"from":0,"to":100}],"solutionButtonText":"Λύση","retryButtonText":"Επανάληψη","finishButtonText":"Ολοκλήρωση","submitButtonText":"Υποβολή","showAnimations":false,"skippable":false,"skipButtonText":"Παράβλεψη"},"texts":{"prevButton":"Προηγούμενη","nextButton":"Επόμενη","finishButton":"Ολοκλήρωση","submitButton":"Υποβολή","textualProgress":"Ερώτηση: @current από @total ερωτήσεις","jumpToQuestion":"Ερώτηση %d από %total","questionLabel":"Ερώτηση","readSpeakerProgress":"Ερώτηση @current από @total","unansweredText":"Δεν απαντήθηκε","answeredText":"Απαντήθηκε","currentQuestionText":"Τρέχουσα ερώτηση","navigationLabel":"Ερωτήσεις"},"override":{"checkButton":true}},"library":"H5P.QuestionSet 1.20","metadata":{"contentType":"Question Set","license":"U","title":"Κουίζ (by reference)","authors":[],"changes":[],"extraTitle":"Κουίζ (by reference)"},"subContentId":"56d0e4b4-9885-402c-bee7-828771ea10a7"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"2a419f69-bee5-4d46-b5a6-27441a20a2fd","metadata":{"contentType":"Column","license":"U","title":"Υποπρόγραμμα με λίστα (by reference)","authors":[],"changes":[],"extraTitle":"Υποπρόγραμμα με λίστα (by reference)"}},{"params":{"content":[{"content":{"params":{"text":"<p>Ένα υποπρόγραμμα μπορεί να δέχεται σύνθετες παραμέτρους, όπως λίστες, για να επεξεργάζεται πολλαπλές τιμές ταυτόχρονα. Αυτό είναι χρήσιμο όταν χρειάζεται να υπολογίσουμε συνολικά αποτελέσματα, όπως το άθροισμα, τον μέσο όρο ή τον μεγαλύτερο αριθμό σε ένα σύνολο δεδομένων.</p>\\n\\n<hr />\\n<p><em>Παράδειγμα</em></p>\\n\\n<ul>\\n\\t<li>Υποπρόγραμμα</li>\\n</ul>\\n\\n<p>def <strong>βρες_μεγιστο_και_ελαχιστο(</strong>αριθμοί<strong>)</strong>:<br />\\n    μέγιστος = max(αριθμοι)<br />\\n    ελάχιστος = min(αριθμοι)<br />\\n    return μέγιστος, ελάχιστος</p>\\n\\n<ul>\\n\\t<li>Κύριο πρόγραμμα</li>\\n</ul>\\n\\n<p>αριθμοί = [5, 8, 2, 10, 3]<br />\\nμέγιστος, ελάχιστος = <strong>βρες_μεγιστο_και_ελαχιστο(</strong>αριθμοί<strong>)</strong></p>\\n\\n<p>print(\\"Μεγαλύτερος αριθμός:\\", μέγιστος)<br />\\nprint(\\"Μικρότερος αριθμός:\\", ελάχιστος)</p>\\n\\n<ul>\\n\\t<li>Το υποπρόγραμμα δέχεται μια λίστα αριθμών και επιστρέφει τον μεγαλύτερο και τον μικρότερο αριθμό από αυτήν.</li>\\n</ul>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Κείμενο","authors":[],"changes":[]},"subContentId":"f6cd12fc-bbb5-43ac-b6a4-e83311e476c1"},"useSeparator":"auto"},{"content":{"params":{"introPage":{"showIntroPage":false,"startButtonText":"Έναρξη","introduction":""},"progressType":"dots","passPercentage":50,"questions":[{"params":{"media":{"disableImageZooming":false},"answers":[{"correct":false,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"<div>Μήνυμα λάθους, γιατί δεν μπορεί να εντοπίσει μέγιστο και ελάχιστο αριθμό σε λίστα με ένα μόνο στοιχείο.</div>\\n"},{"correct":true,"tipsAndFeedback":{"tip":"","chosenFeedback":"","notChosenFeedback":""},"text":"Μεγαλύτερος αριθμός: 7\\n\\nΜικρότερος αριθμός: 7\\n"}],"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"type":"auto","singlePoint":false,"randomAnswers":true,"showSolutionsRequiresInput":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"passPercentage":100,"showScorePoints":true},"UI":{"checkAnswerButton":"Έλεγχος","submitAnswerButton":"Υποβολή","showSolutionButton":"Λύση","tryAgainButton":"Επανάληψη","tipsLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total πόντους","tipAvailable":"Επεξήγηση διαθέσιμη","feedbackAvailable":"Ανατροφοδότηση διαθέσιμη","readFeedback":"Ανάγνωση ανατροφοδότησης","wrongAnswer":"Λάθος απάντηση","correctAnswer":"Σωστή απάντηση","shouldCheck":"Θα πρέπει να έχει επιλεγεί","shouldNotCheck":"Δεν θα πρέπει να έχει επιλεγεί","noInput":"Παρακαλώ απάντησε προτού δεις τη λύση","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Αν η λίστα περιέχει μόνο έναν αριθμό, π.χ. [7], τι θα επιστρέψει το πρόγραμμα;</p>\\n"},"library":"H5P.MultiChoice 1.16","metadata":{"contentType":"Multiple Choice","license":"U","title":"Untitled Πολλαπλή επιλογή (Multiple Choice)","authors":[],"changes":[],"extraTitle":"Untitled Πολλαπλή επιλογή (Multiple Choice)"},"subContentId":"b0768fad-70d7-4a16-80b6-0b0c6e7dcfb6"},{"params":{"media":{"disableImageZooming":false},"correct":"true","behaviour":{"enableRetry":true,"enableSolutionsButton":true,"enableCheckButton":true,"confirmCheckDialog":false,"confirmRetryDialog":false,"autoCheck":false,"feedbackOnCorrect":"Ωραία!","feedbackOnWrong":"Θα εμφανιστεί σφάλμα ValueError γιατί η max() και η min() δεν μπορούν να εφαρμοστούν σε κενή λίστα."},"l10n":{"trueText":"Σωστό","falseText":"Λάθος","score":"Συγκέντρωσες @score από @total βαθμούς","checkAnswer":"Έλεγχος","submitAnswer":"Υποβολή","showSolutionButton":"Λύση","tryAgain":"Επανάληψη","wrongAnswerMessage":"Λάθος απάντηση","correctAnswerMessage":"Σωστή απάντηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yShowSolution":"Προβολή της λύσης. Η άσκηση θα επισημανθεί με την σωστή απάντση.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή."},"confirmCheck":{"header":"Ολοκλήρωση άσκησης","body":"Είσαι σίγουρος ότι θέλεις να ολοκληρώσεις την άσκηση;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"confirmRetry":{"header":"Επανάληψη","body":"Είσαι σίγουρος/η ότι θέλεις να προσπαθήσεις ξανά;","cancelLabel":"Όχι","confirmLabel":"Ναι"},"question":"<p>Αν η λίστα είναι κενή, η εκτέλεση του προγράμματος θα εμφανίσει σφάλμα.</p>\\n"},"library":"H5P.TrueFalse 1.8","metadata":{"contentType":"True/False Question","license":"U","title":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)","authors":[],"changes":[],"extraTitle":"Untitled Αληθινή / Λάθος ερώτηση (True/False Question)"},"subContentId":"b88cc068-e609-457b-982d-addaaf8d51bd"}],"disableBackwardsNavigation":false,"randomQuestions":false,"endGame":{"showResultPage":true,"showSolutionButton":true,"showRetryButton":true,"noResultMessage":"Ολοκληρώθηκε","message":"Η βαθμολογία σου:","scoreBarLabel":"Έχετε @finals από @totals πόντους","overallFeedback":[{"from":0,"to":100}],"solutionButtonText":"Λύση","retryButtonText":"Επανάληψη","finishButtonText":"Ολοκλήρωση","submitButtonText":"Υποβολή","showAnimations":false,"skippable":false,"skipButtonText":"Παράβλεψη"},"texts":{"prevButton":"Προηγούμενη","nextButton":"Επόμενη","finishButton":"Ολοκλήρωση","submitButton":"Υποβολή","textualProgress":"Ερώτηση: @current από @total ερωτήσεις","jumpToQuestion":"Ερώτηση %d από %total","questionLabel":"Ερώτηση","readSpeakerProgress":"Ερώτηση @current από @total","unansweredText":"Δεν απαντήθηκε","answeredText":"Απαντήθηκε","currentQuestionText":"Τρέχουσα ερώτηση","navigationLabel":"Ερωτήσεις"},"override":{"checkButton":true}},"library":"H5P.QuestionSet 1.20","metadata":{"contentType":"Question Set","license":"U","title":"Κουίζ (υποπρόγραμμα με σύνθετες παραμέτρους )","authors":[],"changes":[],"extraTitle":"Κουίζ (υποπρόγραμμα με σύνθετες παραμέτρους )"},"subContentId":"97f11a11-7204-4db7-929a-5c363b145f1f"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"b1a57958-0245-4b59-841f-fabc12d5d5ea","metadata":{"contentType":"Column","license":"U","title":"Υποπρόγραμμα με σύνθετες παραμέτρους (λίστες)","authors":[],"changes":[],"extraTitle":"Υποπρόγραμμα με σύνθετες παραμέτρους (λίστες)"}},{"params":{"content":[{"content":{"params":{"interactiveVideo":{"video":{"startScreenOptions":{"title":"Διαδραστικό βίντεο","hideStartTitle":false},"textTracks":{"videoTrack":[{"label":"Υπότιτλοι","kind":"subtitles","srcLang":"gr","track":{"path":"data:text/vtt;base64,V0VCVlRUDQoNCjAwOjAwLjAwMCAtLT4gMDA6MDYuMDAwDQrOo861IM6xz4XPhM+MIM+Ezr8gzrLOr869z4TOtc6/LCDOuM6xIM61zr7Ot86zzq7Pg86/z4XOvM61IM+Ezr8gz4XPgM6/z4DPgc+MzrPPgc6xzrzOvM6xLCDOvM6tz4POsSDOsc+Az4wgz4TOtyDOtM65zrHPh861zq/Pgc65z4POtyDOvM6vzrHPgiDOus6xz4bOtc+Ezq3Pgc65zrHPgi4NCg0KMDA6MDcuMDAwIC0tPiAwMDoxMy4yMDANCs6fIM+Hz4HOrs+Dz4TOt8+CIM61z4DOuc67zq3Os861zrkgz4TOvyDPgc+Mz4bOt868zrEgz4DOv8+FIM61z4DOuc64z4XOvM61zq8sIM66zrHOuSDPhM6/IM+Az4HPjM6zz4HOsc68zrzOsSDOtc+AzrnPg8+Ez4HOrc+GzrXOuSDOrc69zrEgzrzOrs69z4XOvM6xLCDOsc69zqzOu86/zrPOsSDOvM61IM+EzrcgzrTOuc6xzrjOtc+DzrnOvM+Mz4TOt8+EzrEgz4TOv8+FIM+Az4HOv8+Kz4zOvc+Ezr/Pgi4NCg0KMDA6MTMuNzAwIC0tPiAwMDoxNy4wMDANCs6XIM68zrXPhM6xzrLOu863z4TOriBtZXNzYWdlIM68z4DOv8+BzrXOryDOvc6xIM67zqzOss61zrkgzrTPjc6/IM60zrnOsc+Gzr/Pgc61z4TOuc66zq3PgiDPhM65zrzOrc+COg0KDQowMDoxNy41MDAgLS0+IDAwOjIzLjI4MA0KIs6czrcgzrTOuc6xzrjOrc+DzrnOvM6/LiDOo8+FzrPOs869z47OvM63ISIsIM+Mz4TOsc69IM+Ezr8gzrHOvc+Ezq/Pg8+Ezr/Ouc+Hzr8gz4PPhM6/zrnPh861zq/OvyDPg8+EzrcgzrvOr8+Dz4TOsSDOtM65zrHOuM61z4POuc68z4zPhM63z4TOsc+CIM6tz4fOtc65IM+EzrfOvSDPhM65zrzOriAwLg0KDQowMDoyMy42MDAgLS0+IDAwOjI4LjI2MA0KIs6UzrnOsc64zq3Pg865zrzOvy4gzpXPhc+HzrHPgc65z4PPhM6/z43OvM61ISIsIM+Mz4TOsc69IM63IM+EzrnOvM6uIM61zq/Ovc6xzrkgMS4NCg0KMDA6MzIuMjAwIC0tPiAwMDozNi4wMDANCs6fIM6tzrvOtc6zz4fOv8+CIM6zzq/Ovc61z4TOsc65IM+Dz4TOtyDOu86vz4PPhM6xIM6yzqzPg861zrkgz4TOt8+CIM61z4DOuc67zr/Os86uz4Igz4TOv8+FIM+Hz4HOrs+Dz4TOty4NCg0KMDA6NDEuMjAwIC0tPiAwMDo0OC4wMDANCs6TzrnOsSDOvc6xIM6yzrXOu8+EzrnPjs+Dzr/Phc68zrUgz4TOtyDOtM6/zrzOriDPhM6/z4UgzrrPjs60zrnOus6xLCDOvM+Azr/Pgc6/z43OvM61IM69zrEgz4fPgc63z4POuc68zr/PgM6/zrnOrs+Dzr/Phc68zrUgzq3Ovc6xIM+Fz4DOv8+Az4HPjM6zz4HOsc68zrzOsSDPgM6/z4UgzrjOsSDOtM6tz4fOtc+EzrHOuSDPic+CIM+AzrHPgc6szrzOtc+Ez4HOvyDPhM6/IM68zq7Ovc+FzrzOsSDOus6xzrkgzrjOsSDPhM6/IM61zrrPhM+Fz4DPjs69zrXOuS4NCg0KMDA6NDkuMDAwIC0tPiAwMDo1NC4wMDANCs6jzrfOvM6xzr3PhM65zrrPjCDOtc6vzr3Osc65IM69zrEgz4POt868zrXOuc+Oz4POv8+FzrzOtSDPjM+Ezrkgz4TOvyDPjM69zr/OvM6xIM+EzrfPgiDPhM+Fz4DOuc66zq7PgiDPgM6xz4HOsc68zq3PhM+Bzr/PhSAoz4zPgM+Jz4IgzrTOt867z47Ovc61z4TOsc65IM+Dz4TOvyDPhc+Azr/PgM+Bz4zOs8+BzrHOvM68zrEpIA0KDQowMDo1NC41MDAgLS0+IDAxOjAxLjAwMA0KzrrOsc65IM+EzrfPgiDPgM+BzrHOs868zrHPhM65zrrOrs+CIM+AzrHPgc6xzrzOrc+Ez4HOv8+FICjPjM+Az4nPgiDPgM61z4HOvc6sz4TOsc65IM6xz4DPjCDPhM6/IM66z4XPgc6vz4nPgiDPgM+Bz4zOs8+BzrHOvM68zrEpIM60zrXOvSDPh8+BzrXOuc6szrbOtc+EzrHOuSDOvc6xIM61zq/Ovc6xzrkgzq/OtM65zr8uIA0KDQogDQo=","mime":"application/octet-stream","copyright":{"license":"U"}}}]},"files":[{"path":"resources/video-lX3iW8jL.mp4","mime":"video/mp4","copyright":{"license":"U"}}]},"assets":{"interactions":[],"bookmarks":[],"endscreens":[{"time":64.52,"label":"1:04 Οθόνη υποβολής"}]},"summary":{"task":{"library":"H5P.Summary 1.10","params":{"intro":"Επίλεξε τη σωστή πρόταση.","summaries":[{"subContentId":"3e128a9f-50b5-4ba3-b8a0-e722cdb3a857","tip":""}],"overallFeedback":[{"from":0,"to":100}],"solvedLabel":"Πρόοδος:","scoreLabel":"Λάθος απαντήσεις:","resultLabel":"Η βαθμολογία σου","labelCorrect":"Σωστό.","labelIncorrect":"Λάθος! Προσπάθησε ξανά.","alternativeIncorrectLabel":"Λάθος.","labelCorrectAnswers":"Σωστές απαντήσεις.","tipButtonLabel":"Εμφάνιση επεξήγησης","scoreBarLabel":"Έχεις :num από :total βαθμούς","progressText":"Πρόοδος: :num από :total"},"subContentId":"8dd26c70-3777-4605-9d60-6f6cf5245eb8","metadata":{"contentType":"Summary","license":"U","title":"Untitled Περίληψη (Summary)","authors":[],"changes":[],"extraTitle":"Untitled Περίληψη (Summary)"}},"displayAt":3}},"override":{"autoplay":false,"loop":false,"showBookmarksmenuOnLoad":false,"showRewind10":false,"preventSkippingMode":"none","deactivateSound":false},"l10n":{"interaction":"Διαδραστικό στοιχείο","play":"Αναπαραγωγή","pause":"Παύση","mute":"Σίγαση, (τρέχουσα κατάσταση : ανενεργή σίγαση)","unmute":"Κατάργηση Σίγασης, (τρέχουσα κατάσταση : ενεργή σίγαση)","quality":"Ποιότητα βίντεο","captions":"Λεζάντες","close":"Κλείσιμο","fullscreen":"Πλήρης οθόνη","exitFullscreen":"Κλείσιμο προβολής πλήρους οθόνης","summary":"Σύνοψη","bookmarks":"Σελιδοδείκτες","endscreen":"Οθόνη υποβολής","defaultAdaptivitySeekLabel":"Συνέχεια","continueWithVideo":"Συνέχεια του βίντεο","more":"Περισσότερες επιλογές αναπαραγωγής","playbackRate":"Ρυθμός αναπαραγωγής","rewind10":"Επαναφορά 10 δευτερολέπτων (rewind)","navDisabled":"Η πλοήγηση είναι απενεργοποιημένη","navForwardDisabled":"Η πλοήγηση προς τα εμπρός είναι απενεργοποιημένη","sndDisabled":"Ο ήχος είναι απενεργοποιημένος","requiresCompletionWarning":"Πρέπει να απαντήσεις σωστά σε όλες τις ερωτήσεις πριν συνεχίσεις.","back":"Πίσω","hours":"Ώρες","minutes":"Λεπτά","seconds":"Δευτερόλεπτα","currentTime":"Χρόνος:","totalTime":"Συνολικός χρόνος:","singleInteractionAnnouncement":"Εμφανίστηκε το διαδραστικό στοιχείο:","multipleInteractionsAnnouncement":"Εμφανίστηκαν πολλαπλά διαδραστικά στοιχεία.","videoPausedAnnouncement":"Έχει γίνει παύση (pause) του βίντεο","content":"Περιεχόμενο","answered":"@answered απαντήθηκαν","endcardTitle":"@answered ερωτήσεις απαντήθηκαν","endcardInformation":"Έχετε απαντήσει σε @answered ερωτήσεις.","endcardInformationOnSubmitButtonDisabled":"Έχεις απαντήσει @answered ερωτήσεις, κάνε κλικ παρακάτω για να υποβάλλεις τις απαντήσεις σου.","endcardInformationNoAnswers":"Δεν έχεις απαντήσει σε καμμία ερώτηση.","endcardInformationMustHaveAnswer":"Πρέπει να έχεις απαντήσει τουλάχιστον σε μία ερώτηση για να μπορέσεις να προχωρήσεις στην υποβολή.","endcardSubmitButton":"Υποβολή απαντήσεων","endcardSubmitMessage":"Έγινε υποβολή των απαντήσεών σου!","endcardTableRowAnswered":"Ερωτήσεις που απαντήθηκαν","endcardTableRowScore":"Βαθμολογία","endcardAnsweredScore":"απαντήθηκαν","endCardTableRowSummaryWithScore":"Έλαβες @score από @total πόντους για την @question που εμφανίστηκε μετά από @minutes λεπτά και @seconds δευτερόλεπτα.","endCardTableRowSummaryWithoutScore":"Απάντησες την @question που εμφανίστηκε μετά από @minutes λεπτά και @seconds δευτερόλεπτα.","videoProgressBar":"Πρόοδος αναπαραγωγής βίντεο","howToCreateInteractions":"Play the video to start creating interactions"}},"library":"H5P.InteractiveVideo 1.26","metadata":{"contentType":"Interactive Video","license":"U","title":"Untitled Διαδραστικό βίντεο (Interactive Video)","authors":[],"changes":[],"extraTitle":"Untitled Διαδραστικό βίντεο (Interactive Video)"},"subContentId":"a6a7217d-ed00-4882-874c-aa35d8360d1b"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"c5d53225-57bb-40f9-ba1f-fe87a10e07e6","metadata":{"contentType":"Column","license":"U","title":"Παράδειγμα: Η διαχείριση μίας καφετέρειας με τη χρήση υποπρογραμμάτων","authors":[],"changes":[],"extraTitle":"Παράδειγμα: Η διαχείριση μίας καφετέρειας με τη χρήση υποπρογραμμάτων"}}],"behaviour":{"baseColor":"#1768c4","defaultTableOfContents":true,"progressIndicators":true,"progressAuto":true,"displaySummary":true,"enableRetry":true},"read":"Ανάγνωση","displayTOC":"Προβολή \'Πίνακα Περιεχομένων\'","hideTOC":"Απόκρυψη \'Πίνακα Περιεχομένων\'","nextPage":"Επόμενη σελίδα","previousPage":"Προηγούμενη σελίδα","chapterCompleted":"Ολοκληρωμένη σελίδα!","partCompleted":"@pages από @total έχουν ολοκληρωθεί","incompleteChapter":"Μη ολοκληρωμένη σελίδα","navigateToTop":"Μετάβαση στην κορυφή","markAsFinished":"Έχω ολοκληρώσει αυτήν τη σελίδα","fullscreen":"Πλήρης οθόνη","exitFullscreen":"Έξοδος από πρόβολή πλήρους οθόνης","bookProgressSubtext":"@count από @total σελίδες","interactionsProgressSubtext":"@count από @total δραστηριοτήτων","submitReport":"Υποβολή Αναφοράς","restartLabel":"Επανεκκίνηση","summaryHeader":"Περίληψη","allInteractions":"Όλες οι διαδράσεις","unansweredInteractions":"Διαδράσεις που δεν απαντήθηκαν","scoreText":"@score / @maxscore","leftOutOfTotalCompleted":"@left από @max διαδράσεις έχουν ολοκληρωθεί","noInteractions":"Δεν υπάρχουν διαδράσεις","score":"Βαθμολογία","summaryAndSubmit":"Περίληψη &amp; υποβολή","noChapterInteractionBoldText":"Δεν έχετε ολοκληρώσει καμία διάδραση σε καμία από τις σελίδες.","noChapterInteractionText":"Πρέπει να έχετε ολοκληρώσει τουλάχιστον μια διάδραση σε τουλάχιστον μια σελίδα για να μπορέσετε να προβάλετε την περίληψη.","yourAnswersAreSubmittedForReview":"Οι απαντήσεις σας έχουν υποβληθεί για έλεγχο!","bookProgress":"Πρόοδος στο βιβλίο","interactionsProgress":"Πρόοδος διαδράσεων","totalScoreLabel":"Συνολική βαθμολογία","a11y":{"progress":"Σελίδα @page από @total.","menu":"Εναλλαγή μενού πλοήγησης"}}',
      library: "H5P.InteractiveBook 1.7",
      metadata: { license: "U", title: "νέο", defaultLanguage: "en" },
      scripts: [
        "/h5p/libraries/H5P.AdvancedText-1.1/text.js?version=1.1.16",
        "/h5p/libraries/H5P.Column-1.16/scripts/h5p-column.js?version=1.16.7",
        "/h5p/libraries/H5P.Transition-1.0/transition.js?version=1.0.4",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-help-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-message-dialog.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progress-circle.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-simple-rounded-button.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-speech-bubble.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-throbber.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-tip.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-slider.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-score-bar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-progressbar.js?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/js/joubel-ui.js?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/scripts/question.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/explainer.js?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/scripts/score-points.js?version=1.5.15",
        "/h5p/libraries/H5P.MultiChoice-1.16/js/multichoice.js?version=1.16.12",
        "/h5p/libraries/H5P.Video-1.6/scripts/vimeo.js?version=1.6.42",
        "/h5p/libraries/H5P.Video-1.6/scripts/youtube.js?version=1.6.42",
        "/h5p/libraries/H5P.Video-1.6/scripts/panopto.js?version=1.6.42",
        "/h5p/libraries/H5P.Video-1.6/scripts/html5.js?version=1.6.42",
        "/h5p/libraries/H5P.Video-1.6/scripts/video.js?version=1.6.42",
        "/h5p/libraries/H5P.QuestionSet-1.20/js/questionset.js?version=1.20.12",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false.js?version=1.8.8",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false-answer-group.js?version=1.8.8",
        "/h5p/libraries/H5P.TrueFalse-1.8/scripts/h5p-true-false-answer.js?version=1.8.8",
        "/h5p/libraries/H5P.Summary-1.10/js/stop-watch.js?version=1.10.22",
        "/h5p/libraries/H5P.Summary-1.10/js/xapi-event-builder.js?version=1.10.22",
        "/h5p/libraries/H5P.Summary-1.10/js/summary.js?version=1.10.22",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?version=1.10.22",
        "/h5p/libraries/H5P.DragNDrop-1.1/drag-n-drop.js?version=1.1.8",
        "/h5p/libraries/H5P.DragNResize-1.2/H5P.DragNResize.js?version=1.2.6",
        "/h5p/libraries/H5P.DragNBar-1.5/scripts/drag-n-bar.js?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/scripts/context-menu.js?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/scripts/dialog.js?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/scripts/drag-n-bar-element.js?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/scripts/drag-n-bar-form-manager.js?version=1.5.24",
        "/h5p/libraries/H5P.InteractiveVideo-1.26/dist/h5p-interactive-video.js?version=1.26.30",
        "/h5p/libraries/H5P.InteractiveBook-1.7/dist/h5p-interactive-book.js?version=1.7.12",
      ],
      styles: [
        "/h5p/libraries/H5P.AdvancedText-1.1/text.css?version=1.1.16",
        "/h5p/libraries/H5P.Column-1.16/styles/h5p-column.css?version=1.16.7",
        "/h5p/libraries/FontAwesome-4.5/h5p-font-awesome.min.css?version=4.5.6",
        "/h5p/libraries/H5P.FontIcons-1.0/styles/h5p-font-icons.css?version=1.0.11",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-help-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-message-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progress-circle.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-simple-rounded-button.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-speech-bubble.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-tip.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-slider.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-score-bar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progressbar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-ui.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-icon.css?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/styles/question.css?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/styles/explainer.css?version=1.5.15",
        "/h5p/libraries/H5P.MultiChoice-1.16/css/multichoice.css?version=1.16.12",
        "/h5p/libraries/H5P.Video-1.6/styles/video.css?version=1.6.42",
        "/h5p/libraries/H5P.QuestionSet-1.20/css/questionset.css?version=1.20.12",
        "/h5p/libraries/H5P.TrueFalse-1.8/styles/h5p-true-false.css?version=1.8.8",
        "/h5p/libraries/H5P.Summary-1.10/css/summary.css?version=1.10.22",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.css?version=1.10.22",
        "/h5p/libraries/H5P.DragNResize-1.2/H5P.DragNResize.css?version=1.2.6",
        "/h5p/libraries/H5P.DragNBar-1.5/styles/drag-n-bar.css?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/styles/dialog.css?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/styles/context-menu.css?version=1.5.24",
        "/h5p/libraries/H5P.DragNBar-1.5/styles/drag-n-bar-form-manager.css?version=1.5.24",
        "/h5p/libraries/H5P.InteractiveVideo-1.26/dist/h5p-interactive-video.css?version=1.26.30",
        "/h5p/libraries/H5P.InteractiveBook-1.7/dist/h5p-interactive-book.css?version=1.7.12",
      ],
      url: "2554109425",
      exportUrl: "/h5p/download/2554109425",
    },
  },
  core: {
    scripts: [
      "/h5p/core/js/jquery.js?version=1.24-master",
      "/h5p/core/js/h5p.js?version=1.24-master",
      "/h5p/core/js/h5p-event-dispatcher.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api-event.js?version=1.24-master",
      "/h5p/core/js/h5p-x-api.js?version=1.24-master",
      "/h5p/core/js/h5p-content-type.js?version=1.24-master",
      "/h5p/core/js/h5p-confirmation-dialog.js?version=1.24-master",
      "/h5p/core/js/h5p-action-bar.js?version=1.24-master",
      "/h5p/core/js/request-queue.js?version=1.24-master",
    ],
    styles: [
      "/h5p/core/styles/h5p.css?version=1.24-master",
      "/h5p/core/styles/h5p-confirmation-dialog.css?version=1.24-master",
      "/h5p/core/styles/h5p-core-button.css?version=1.24-master",
    ],
  },
  l10n: {
    H5P: {
      fullscreen: "Fullscreen",
      disableFullscreen: "Disable fullscreen",
      download: "Download",
      copyrights: "Rights of use",
      embed: "Embed",
      size: "Size",
      showAdvanced: "Show advanced",
      hideAdvanced: "Hide advanced",
      advancedHelp:
        "Include this script on your website if you want dynamic sizing of the embedded content:",
      copyrightInformation: "Rights of use",
      close: "Close",
      title: "Title",
      author: "Author",
      year: "Year",
      source: "Source",
      license: "License",
      thumbnail: "Thumbnail",
      noCopyrights: "No copyright information available for this content.",
      reuse: "Reuse",
      reuseContent: "Reuse Content",
      reuseDescription: "Reuse this content.",
      downloadDescription: "Download this content as a H5P file.",
      copyrightsDescription: "View copyright information for this content.",
      embedDescription: "View the embed code for this content.",
      h5pDescription: "Visit H5P.org to check out more cool content.",
      contentChanged: "This content has changed since you last used it.",
      startingOver: "You'll be starting over.",
      by: "by",
      showMore: "Show more",
      showLess: "Show less",
      subLevel: "Sublevel",
      confirmDialogHeader: "Confirm action",
      confirmDialogBody:
        "Please confirm that you wish to proceed. This action is not reversible.",
      cancelLabel: "Cancel",
      confirmLabel: "Confirm",
      licenseU: "Undisclosed",
      licenseCCBY: "Attribution",
      licenseCCBYSA: "Attribution-ShareAlike",
      licenseCCBYND: "Attribution-NoDerivs",
      licenseCCBYNC: "Attribution-NonCommercial",
      licenseCCBYNCSA: "Attribution-NonCommercial-ShareAlike",
      licenseCCBYNCND: "Attribution-NonCommercial-NoDerivs",
      licenseCC40: "4.0 International",
      licenseCC30: "3.0 Unported",
      licenseCC25: "2.5 Generic",
      licenseCC20: "2.0 Generic",
      licenseCC10: "1.0 Generic",
      licenseGPL: "General Public License",
      licenseV3: "Version 3",
      licenseV2: "Version 2",
      licenseV1: "Version 1",
      licensePD: "Public Domain",
      licenseCC010: "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
      licensePDM: "Public Domain Mark",
      licenseC: "Copyright",
      contentType: "Content Type",
      licenseExtras: "License Extras",
      changes: "Changelog",
      contentCopied: "Content is copied to the clipboard",
      connectionLost:
        "Connection lost. Results will be stored and sent when you regain connection.",
      connectionReestablished: "Connection reestablished.",
      resubmitScores: "Attempting to submit stored results.",
      offlineDialogHeader: "Your connection to the server was lost",
      offlineDialogBody:
        "We were unable to send information about your completion of this task. Please check your internet connection.",
      offlineDialogRetryMessage: "Retrying in :num....",
      offlineDialogRetryButtonLabel: "Retry now",
      offlineSuccessfulSubmit: "Successfully submitted results.",
      mainTitle: "Sharing <strong>:title</strong>",
      editInfoTitle: "Edit info for <strong>:title</strong>",
      cancel: "Cancel",
      back: "Back",
      next: "Next",
      reviewInfo: "Review info",
      share: "Share",
      saveChanges: "Save changes",
      registerOnHub: "Register on the H5P Hub",
      updateRegistrationOnHub: "Save account settings",
      requiredInfo: "Required Info",
      optionalInfo: "Optional Info",
      reviewAndShare: "Review & Share",
      reviewAndSave: "Review & Save",
      shared: "Shared",
      currentStep: "Step :step of :total",
      sharingNote: "All content details can be edited after sharing",
      licenseDescription: "Select a license for your content",
      licenseVersion: "License Version",
      licenseVersionDescription: "Select a license version",
      disciplineLabel: "Disciplines",
      disciplineDescription: "You can select multiple disciplines",
      disciplineLimitReachedMessage:
        "You can select up to :numDisciplines disciplines",
      discipline: {
        searchPlaceholder: "Type to search for disciplines",
        in: "in",
        dropdownButton: "Dropdown button",
      },
      removeChip: "Remove :chip from the list",
      keywordsPlaceholder: "Add keywords",
      keywords: "Keywords",
      keywordsDescription:
        'You can add multiple keywords separated by commas. Press "Enter" or "Add" to confirm keywords',
      altText: "Alt text",
      reviewMessage: "Please review the info below before you share",
      subContentWarning:
        "Sub-content (images, questions etc.) will be shared under :license unless otherwise specified in the authoring tool",
      disciplines: "Disciplines",
      shortDescription: "Short description",
      longDescription: "Long description",
      icon: "Icon",
      screenshots: "Screenshots",
      helpChoosingLicense: "Help me choose a license",
      shareFailed: "Share failed.",
      editingFailed: "Editing failed.",
      shareTryAgain: "Something went wrong, please try to share again.",
      pleaseWait: "Please wait...",
      language: "Language",
      level: "Level",
      shortDescriptionPlaceholder: "Short description of your content",
      longDescriptionPlaceholder: "Long description of your content",
      description: "Description",
      iconDescription:
        "640x480px. If not selected content will use category icon",
      screenshotsDescription: "Add up to five screenshots of your content",
      submitted: "Submitted!",
      isNowSubmitted: "Is now submitted to H5P Hub",
      changeHasBeenSubmitted: "A change has been submited for",
      contentAvailable:
        "Your content will normally be available in the Hub within one business day.",
      contentUpdateSoon: "Your content will update soon",
      contentLicenseTitle: "Content License Info",
      licenseDialogDescription:
        "Click on a specific license to get info about proper usage",
      publisherFieldTitle: "Publisher",
      publisherFieldDescription:
        'This will display as the "Publisher name" on shared content',
      emailAddress: "Email Address",
      publisherDescription: "Publisher description",
      publisherDescriptionText:
        'This will be displayed under "Publisher info" on shared content',
      contactPerson: "Contact Person",
      phone: "Phone",
      address: "Address",
      city: "City",
      zip: "Zip",
      country: "Country",
      logoUploadText: "Organization logo or avatar",
      acceptTerms:
        "I accept the <a href=':url' target='_blank'>terms of use</a>",
      successfullyRegistred:
        "You have successfully registered an account on the H5P Hub",
      successfullyRegistredDescription: "You account details can be changed",
      successfullyUpdated:
        "Your H5P Hub account settings have successfully been changed",
      accountDetailsLinkText: "here",
      registrationTitle: "H5P Hub Registration",
      registrationFailed: "An error occurred",
      registrationFailedDescription:
        "We were not able to create an account at this point. Something went wrong. Try again later.",
      maxLength: ":length is the maximum number of characters",
      keywordExists: "Keyword already exists!",
      licenseDetails: "License details",
      remove: "Remove",
      removeImage: "Remove image",
      cancelPublishConfirmationDialogTitle: "Cancel sharing",
      cancelPublishConfirmationDialogDescription:
        "Are you sure you want to cancel the sharing process?",
      cancelPublishConfirmationDialogCancelButtonText: "No",
      cancelPublishConfirmationDialogConfirmButtonText: "Yes",
      add: "Add",
      age: "Typical age",
      ageDescription:
        'The target audience of this content. Possible input formats separated by commas: "1,34-45,-50,59-".',
      invalidAge:
        'Invalid input format for Typical age. Possible input formats separated by commas: "1, 34-45, -50, -59-".',
      contactPersonDescription:
        'H5P will reach out to the contact person in case there are any issues with the content shared by the publisher. The contact person"s name or other information will not be published or shared with third parties',
      emailAddressDescription:
        "The email address will be used by H5P to reach out to the publisher in case of any issues with the content or in case the publisher needs to recover their account. It will not be published or shared with any third parties",
      copyrightWarning:
        "Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.",
      keywordsExits: "Keywords already exists!",
      someKeywordsExits: "Some of these keywords already exist",
    },
  },
  postUserStatistics: false,
  saveFreq: false,
  url: ".",
  hubIsEnabled: true,
  fullscreenDisabled: 0,
  user: { name: "Firstname Surname", id: "1" },
  baseUrl: ".",
  libraryUrl: "",
};

if (new URLSearchParams(window.location.search).get("embed") == "true") {
  H5PIntegration.contents["cid-" + "2554109425"].displayOptions.embed = false;
} else {
  H5PIntegration.contents["cid-" + "2554109425"].embedCode =
    '<iframe src="' +
    window.location.protocol +
    "//" +
    window.location.host +
    window.location.pathname +
    "?embed=true" +
    '" width=":w" height=":h" frameborder="0" allowfullscreen="allowfullscreen"></iframe>';
  H5PIntegration.contents["cid-" + "2554109425"].resizeCode = "";
}

/*!@license js/jquery.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/
!(function (t, e) {
  "use strict";
  "object" == typeof module && "object" == typeof module.exports
    ? (module.exports = t.document
        ? e(t, !0)
        : function (t) {
            if (!t.document)
              throw new Error("jQuery requires a window with a document");
            return e(t);
          })
    : e(t);
})("undefined" != typeof window ? window : this, function (k, t) {
  "use strict";
  function m(t) {
    return "function" == typeof t && "number" != typeof t.nodeType;
  }
  function g(t) {
    return null != t && t === t.window;
  }
  var e = [],
    i = Object.getPrototypeOf,
    a = e.slice,
    v = e.flat
      ? function (t) {
          return e.flat.call(t);
        }
      : function (t) {
          return e.concat.apply([], t);
        },
    l = e.push,
    o = e.indexOf,
    n = {},
    r = n.toString,
    b = n.hasOwnProperty,
    s = b.toString,
    c = s.call(Object),
    y = {},
    C = k.document,
    u = { type: !0, src: !0, nonce: !0, noModule: !0 };
  function w(t, e, i) {
    var n,
      o,
      r = (i = i || C).createElement("script");
    if (((r.text = t), e))
      for (n in u)
        (o = e[n] || (e.getAttribute && e.getAttribute(n))) &&
          r.setAttribute(n, o);
    i.head.appendChild(r).parentNode.removeChild(r);
  }
  function f(t) {
    return null == t
      ? t + ""
      : "object" == typeof t || "function" == typeof t
        ? n[r.call(t)] || "object"
        : typeof t;
  }
  var h = "3.5.1",
    P = function (t, e) {
      return new P.fn.init(t, e);
    };
  function d(t) {
    var e = !!t && "length" in t && t.length,
      i = f(t);
    return (
      !m(t) &&
      !g(t) &&
      ("array" === i ||
        0 === e ||
        ("number" == typeof e && 0 < e && e - 1 in t))
    );
  }
  ((P.fn = P.prototype =
    {
      jquery: h,
      constructor: P,
      length: 0,
      toArray: function () {
        return a.call(this);
      },
      get: function (t) {
        return null == t
          ? a.call(this)
          : t < 0
            ? this[t + this.length]
            : this[t];
      },
      pushStack: function (t) {
        t = P.merge(this.constructor(), t);
        return ((t.prevObject = this), t);
      },
      each: function (t) {
        return P.each(this, t);
      },
      map: function (i) {
        return this.pushStack(
          P.map(this, function (t, e) {
            return i.call(t, e, t);
          }),
        );
      },
      slice: function () {
        return this.pushStack(a.apply(this, arguments));
      },
      first: function () {
        return this.eq(0);
      },
      last: function () {
        return this.eq(-1);
      },
      even: function () {
        return this.pushStack(
          P.grep(this, function (t, e) {
            return (e + 1) % 2;
          }),
        );
      },
      odd: function () {
        return this.pushStack(
          P.grep(this, function (t, e) {
            return e % 2;
          }),
        );
      },
      eq: function (t) {
        var e = this.length,
          t = +t + (t < 0 ? e : 0);
        return this.pushStack(0 <= t && t < e ? [this[t]] : []);
      },
      end: function () {
        return this.prevObject || this.constructor();
      },
      push: l,
      sort: e.sort,
      splice: e.splice,
    }),
    (P.extend = P.fn.extend =
      function () {
        var t,
          e,
          i,
          n,
          o,
          r = arguments[0] || {},
          s = 1,
          a = arguments.length,
          l = !1;
        for (
          "boolean" == typeof r && ((l = r), (r = arguments[s] || {}), s++),
            "object" == typeof r || m(r) || (r = {}),
            s === a && ((r = this), s--);
          s < a;
          s++
        )
          if (null != (t = arguments[s]))
            for (e in t)
              ((i = t[e]),
                "__proto__" !== e &&
                  r !== i &&
                  (l && i && (P.isPlainObject(i) || (n = Array.isArray(i)))
                    ? ((o = r[e]),
                      (o =
                        n && !Array.isArray(o)
                          ? []
                          : n || P.isPlainObject(o)
                            ? o
                            : {}),
                      (n = !1),
                      (r[e] = P.extend(l, o, i)))
                    : void 0 !== i && (r[e] = i)));
        return r;
      }),
    P.extend({
      expando: "jQuery" + (h + Math.random()).replace(/\D/g, ""),
      isReady: !0,
      error: function (t) {
        throw new Error(t);
      },
      noop: function () {},
      isPlainObject: function (t) {
        return !(
          !t ||
          "[object Object]" !== r.call(t) ||
          ((t = i(t)) &&
            ("function" !=
              typeof (t = b.call(t, "constructor") && t.constructor) ||
              s.call(t) !== c))
        );
      },
      isEmptyObject: function (t) {
        for (var e in t) return !1;
        return !0;
      },
      globalEval: function (t, e, i) {
        w(t, { nonce: e && e.nonce }, i);
      },
      each: function (t, e) {
        var i,
          n = 0;
        if (d(t))
          for (i = t.length; n < i && !1 !== e.call(t[n], n, t[n]); n++);
        else for (n in t) if (!1 === e.call(t[n], n, t[n])) break;
        return t;
      },
      makeArray: function (t, e) {
        e = e || [];
        return (
          null != t &&
            (d(Object(t))
              ? P.merge(e, "string" == typeof t ? [t] : t)
              : l.call(e, t)),
          e
        );
      },
      inArray: function (t, e, i) {
        return null == e ? -1 : o.call(e, t, i);
      },
      merge: function (t, e) {
        for (var i = +e.length, n = 0, o = t.length; n < i; n++) t[o++] = e[n];
        return ((t.length = o), t);
      },
      grep: function (t, e, i) {
        for (var n = [], o = 0, r = t.length, s = !i; o < r; o++)
          !e(t[o], o) != s && n.push(t[o]);
        return n;
      },
      map: function (t, e, i) {
        var n,
          o,
          r = 0,
          s = [];
        if (d(t))
          for (n = t.length; r < n; r++)
            null != (o = e(t[r], r, i)) && s.push(o);
        else for (r in t) null != (o = e(t[r], r, i)) && s.push(o);
        return v(s);
      },
      guid: 1,
      support: y,
    }),
    "function" == typeof Symbol && (P.fn[Symbol.iterator] = e[Symbol.iterator]),
    P.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (t, e) {
        n["[object " + e + "]"] = e.toLowerCase();
      },
    ));
  var p = (function (i) {
    function h(t, e) {
      return (
        (t = "0x" + t.slice(1) - 65536),
        e ||
          (t < 0
            ? String.fromCharCode(65536 + t)
            : String.fromCharCode((t >> 10) | 55296, (1023 & t) | 56320))
      );
    }
    function d(t, e) {
      return e
        ? "\0" === t
          ? "�"
          : t.slice(0, -1) +
            "\\" +
            t.charCodeAt(t.length - 1).toString(16) +
            " "
        : "\\" + t;
    }
    function n() {
      k();
    }
    var t,
      p,
      w,
      r,
      o,
      f,
      m,
      g,
      x,
      l,
      c,
      k,
      C,
      s,
      P,
      v,
      a,
      u,
      b,
      _ = "sizzle" + +new Date(),
      y = i.document,
      S = 0,
      T = 0,
      H = lt(),
      I = lt(),
      E = lt(),
      D = lt(),
      A = function (t, e) {
        return (t === e && (c = !0), 0);
      },
      M = {}.hasOwnProperty,
      e = [],
      L = e.pop,
      O = e.push,
      B = e.push,
      $ = e.slice,
      N = function (t, e) {
        for (var i = 0, n = t.length; i < n; i++) if (t[i] === e) return i;
        return -1;
      },
      R =
        "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
      F = "[\\x20\\t\\r\\n\\f]",
      j =
        "(?:\\\\[\\da-fA-F]{1,6}" +
        F +
        "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
      z =
        "\\[" +
        F +
        "*(" +
        j +
        ")(?:" +
        F +
        "*([*^$|!~]?=)" +
        F +
        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
        j +
        "))|)" +
        F +
        "*\\]",
      W =
        ":(" +
        j +
        ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
        z +
        ")*)|.*)\\)|)",
      q = new RegExp(F + "+", "g"),
      V = new RegExp("^" + F + "+|((?:^|[^\\\\])(?:\\\\.)*)" + F + "+$", "g"),
      U = new RegExp("^" + F + "*," + F + "*"),
      Q = new RegExp("^" + F + "*([>+~]|" + F + ")" + F + "*"),
      Y = new RegExp(F + "|>"),
      G = new RegExp(W),
      X = new RegExp("^" + j + "$"),
      K = {
        ID: new RegExp("^#(" + j + ")"),
        CLASS: new RegExp("^\\.(" + j + ")"),
        TAG: new RegExp("^(" + j + "|[*])"),
        ATTR: new RegExp("^" + z),
        PSEUDO: new RegExp("^" + W),
        CHILD: new RegExp(
          "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
            F +
            "*(even|odd|(([+-]|)(\\d*)n|)" +
            F +
            "*(?:([+-]|)" +
            F +
            "*(\\d+)|))" +
            F +
            "*\\)|)",
          "i",
        ),
        bool: new RegExp("^(?:" + R + ")$", "i"),
        needsContext: new RegExp(
          "^" +
            F +
            "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
            F +
            "*((?:-\\d)?\\d*)" +
            F +
            "*\\)|)(?=[^-]|$)",
          "i",
        ),
      },
      J = /HTML$/i,
      Z = /^(?:input|select|textarea|button)$/i,
      tt = /^h\d$/i,
      et = /^[^{]+\{\s*\[native \w/,
      it = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
      nt = /[+~]/,
      ot = new RegExp("\\\\[\\da-fA-F]{1,6}" + F + "?|\\\\([^\\r\\n\\f])", "g"),
      rt = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
      st = bt(
        function (t) {
          return !0 === t.disabled && "fieldset" === t.nodeName.toLowerCase();
        },
        { dir: "parentNode", next: "legend" },
      );
    try {
      (B.apply((e = $.call(y.childNodes)), y.childNodes),
        e[y.childNodes.length].nodeType);
    } catch (t) {
      B = {
        apply: e.length
          ? function (t, e) {
              O.apply(t, $.call(e));
            }
          : function (t, e) {
              for (var i = t.length, n = 0; (t[i++] = e[n++]); );
              t.length = i - 1;
            },
      };
    }
    function at(t, e, i, n) {
      var o,
        r,
        s,
        a,
        l,
        c,
        u = e && e.ownerDocument,
        h = e ? e.nodeType : 9;
      if (
        ((i = i || []),
        "string" != typeof t || !t || (1 !== h && 9 !== h && 11 !== h))
      )
        return i;
      if (!n && (k(e), (e = e || C), P)) {
        if (11 !== h && (a = it.exec(t)))
          if ((c = a[1])) {
            if (9 === h) {
              if (!(r = e.getElementById(c))) return i;
              if (r.id === c) return (i.push(r), i);
            } else if (u && (r = u.getElementById(c)) && b(e, r) && r.id === c)
              return (i.push(r), i);
          } else {
            if (a[2]) return (B.apply(i, e.getElementsByTagName(t)), i);
            if (
              (c = a[3]) &&
              p.getElementsByClassName &&
              e.getElementsByClassName
            )
              return (B.apply(i, e.getElementsByClassName(c)), i);
          }
        if (
          p.qsa &&
          !D[t + " "] &&
          (!v || !v.test(t)) &&
          (1 !== h || "object" !== e.nodeName.toLowerCase())
        ) {
          if (((c = t), (u = e), 1 === h && (Y.test(t) || Q.test(t)))) {
            for (
              ((u = (nt.test(t) && mt(e.parentNode)) || e) === e && p.scope) ||
                ((s = e.getAttribute("id"))
                  ? (s = s.replace(rt, d))
                  : e.setAttribute("id", (s = _))),
                o = (l = f(t)).length;
              o--;
            )
              l[o] = (s ? "#" + s : ":scope") + " " + vt(l[o]);
            c = l.join(",");
          }
          try {
            return (B.apply(i, u.querySelectorAll(c)), i);
          } catch (e) {
            D(t, !0);
          } finally {
            s === _ && e.removeAttribute("id");
          }
        }
      }
      return g(t.replace(V, "$1"), e, i, n);
    }
    function lt() {
      var n = [];
      return function t(e, i) {
        return (
          n.push(e + " ") > w.cacheLength && delete t[n.shift()],
          (t[e + " "] = i)
        );
      };
    }
    function ct(t) {
      return ((t[_] = !0), t);
    }
    function ut(t) {
      var e = C.createElement("fieldset");
      try {
        return !!t(e);
      } catch (t) {
        return !1;
      } finally {
        e.parentNode && e.parentNode.removeChild(e);
      }
    }
    function ht(t, e) {
      for (var i = t.split("|"), n = i.length; n--; ) w.attrHandle[i[n]] = e;
    }
    function dt(t, e) {
      var i = e && t,
        n =
          i &&
          1 === t.nodeType &&
          1 === e.nodeType &&
          t.sourceIndex - e.sourceIndex;
      if (n) return n;
      if (i) for (; (i = i.nextSibling); ) if (i === e) return -1;
      return t ? 1 : -1;
    }
    function pt(e) {
      return function (t) {
        return "form" in t
          ? t.parentNode && !1 === t.disabled
            ? "label" in t
              ? "label" in t.parentNode
                ? t.parentNode.disabled === e
                : t.disabled === e
              : t.isDisabled === e || (t.isDisabled !== !e && st(t) === e)
            : t.disabled === e
          : "label" in t && t.disabled === e;
      };
    }
    function ft(s) {
      return ct(function (r) {
        return (
          (r = +r),
          ct(function (t, e) {
            for (var i, n = s([], t.length, r), o = n.length; o--; )
              t[(i = n[o])] && (t[i] = !(e[i] = t[i]));
          })
        );
      });
    }
    function mt(t) {
      return t && void 0 !== t.getElementsByTagName && t;
    }
    for (t in ((p = at.support = {}),
    (o = at.isXML =
      function (t) {
        var e = t.namespaceURI,
          t = (t.ownerDocument || t).documentElement;
        return !J.test(e || (t && t.nodeName) || "HTML");
      }),
    (k = at.setDocument =
      function (t) {
        var e,
          t = t ? t.ownerDocument || t : y;
        return (
          t != C &&
            9 === t.nodeType &&
            t.documentElement &&
            ((s = (C = t).documentElement),
            (P = !o(C)),
            y != C &&
              (e = C.defaultView) &&
              e.top !== e &&
              (e.addEventListener
                ? e.addEventListener("unload", n, !1)
                : e.attachEvent && e.attachEvent("onunload", n)),
            (p.scope = ut(function (t) {
              return (
                s.appendChild(t).appendChild(C.createElement("div")),
                void 0 !== t.querySelectorAll &&
                  !t.querySelectorAll(":scope fieldset div").length
              );
            })),
            (p.attributes = ut(function (t) {
              return ((t.className = "i"), !t.getAttribute("className"));
            })),
            (p.getElementsByTagName = ut(function (t) {
              return (
                t.appendChild(C.createComment("")),
                !t.getElementsByTagName("*").length
              );
            })),
            (p.getElementsByClassName = et.test(C.getElementsByClassName)),
            (p.getById = ut(function (t) {
              return (
                (s.appendChild(t).id = _),
                !C.getElementsByName || !C.getElementsByName(_).length
              );
            })),
            p.getById
              ? ((w.filter.ID = function (t) {
                  var e = t.replace(ot, h);
                  return function (t) {
                    return t.getAttribute("id") === e;
                  };
                }),
                (w.find.ID = function (t, e) {
                  if (void 0 !== e.getElementById && P) {
                    t = e.getElementById(t);
                    return t ? [t] : [];
                  }
                }))
              : ((w.filter.ID = function (t) {
                  var e = t.replace(ot, h);
                  return function (t) {
                    t =
                      void 0 !== t.getAttributeNode && t.getAttributeNode("id");
                    return t && t.value === e;
                  };
                }),
                (w.find.ID = function (t, e) {
                  if (void 0 !== e.getElementById && P) {
                    var i,
                      n,
                      o,
                      r = e.getElementById(t);
                    if (r) {
                      if ((i = r.getAttributeNode("id")) && i.value === t)
                        return [r];
                      for (o = e.getElementsByName(t), n = 0; (r = o[n++]); )
                        if ((i = r.getAttributeNode("id")) && i.value === t)
                          return [r];
                    }
                    return [];
                  }
                })),
            (w.find.TAG = p.getElementsByTagName
              ? function (t, e) {
                  return void 0 !== e.getElementsByTagName
                    ? e.getElementsByTagName(t)
                    : p.qsa
                      ? e.querySelectorAll(t)
                      : void 0;
                }
              : function (t, e) {
                  var i,
                    n = [],
                    o = 0,
                    r = e.getElementsByTagName(t);
                  if ("*" !== t) return r;
                  for (; (i = r[o++]); ) 1 === i.nodeType && n.push(i);
                  return n;
                }),
            (w.find.CLASS =
              p.getElementsByClassName &&
              function (t, e) {
                if (void 0 !== e.getElementsByClassName && P)
                  return e.getElementsByClassName(t);
              }),
            (a = []),
            (v = []),
            (p.qsa = et.test(C.querySelectorAll)) &&
              (ut(function (t) {
                var e;
                ((s.appendChild(t).innerHTML =
                  "<a id='" +
                  _ +
                  "'></a><select id='" +
                  _ +
                  "-\r\\' msallowcapture=''><option selected=''></option></select>"),
                  t.querySelectorAll("[msallowcapture^='']").length &&
                    v.push("[*^$]=" + F + "*(?:''|\"\")"),
                  t.querySelectorAll("[selected]").length ||
                    v.push("\\[" + F + "*(?:value|" + R + ")"),
                  t.querySelectorAll("[id~=" + _ + "-]").length || v.push("~="),
                  (e = C.createElement("input")).setAttribute("name", ""),
                  t.appendChild(e),
                  t.querySelectorAll("[name='']").length ||
                    v.push("\\[" + F + "*name" + F + "*=" + F + "*(?:''|\"\")"),
                  t.querySelectorAll(":checked").length || v.push(":checked"),
                  t.querySelectorAll("a#" + _ + "+*").length ||
                    v.push(".#.+[+~]"),
                  t.querySelectorAll("\\\f"),
                  v.push("[\\r\\n\\f]"));
              }),
              ut(function (t) {
                t.innerHTML =
                  "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
                var e = C.createElement("input");
                (e.setAttribute("type", "hidden"),
                  t.appendChild(e).setAttribute("name", "D"),
                  t.querySelectorAll("[name=d]").length &&
                    v.push("name" + F + "*[*^$|!~]?="),
                  2 !== t.querySelectorAll(":enabled").length &&
                    v.push(":enabled", ":disabled"),
                  (s.appendChild(t).disabled = !0),
                  2 !== t.querySelectorAll(":disabled").length &&
                    v.push(":enabled", ":disabled"),
                  t.querySelectorAll("*,:x"),
                  v.push(",.*:"));
              })),
            (p.matchesSelector = et.test(
              (u =
                s.matches ||
                s.webkitMatchesSelector ||
                s.mozMatchesSelector ||
                s.oMatchesSelector ||
                s.msMatchesSelector),
            )) &&
              ut(function (t) {
                ((p.disconnectedMatch = u.call(t, "*")),
                  u.call(t, "[s!='']:x"),
                  a.push("!=", W));
              }),
            (v = v.length && new RegExp(v.join("|"))),
            (a = a.length && new RegExp(a.join("|"))),
            (e = et.test(s.compareDocumentPosition)),
            (b =
              e || et.test(s.contains)
                ? function (t, e) {
                    var i = 9 === t.nodeType ? t.documentElement : t,
                      e = e && e.parentNode;
                    return (
                      t === e ||
                      !(
                        !e ||
                        1 !== e.nodeType ||
                        !(i.contains
                          ? i.contains(e)
                          : t.compareDocumentPosition &&
                            16 & t.compareDocumentPosition(e))
                      )
                    );
                  }
                : function (t, e) {
                    if (e) for (; (e = e.parentNode); ) if (e === t) return !0;
                    return !1;
                  }),
            (A = e
              ? function (t, e) {
                  return t === e
                    ? ((c = !0), 0)
                    : (i =
                        !t.compareDocumentPosition -
                        !e.compareDocumentPosition) ||
                        (1 &
                          (i =
                            (t.ownerDocument || t) == (e.ownerDocument || e)
                              ? t.compareDocumentPosition(e)
                              : 1) ||
                        (!p.sortDetached && e.compareDocumentPosition(t) === i)
                          ? t == C || (t.ownerDocument == y && b(y, t))
                            ? -1
                            : e == C || (e.ownerDocument == y && b(y, e))
                              ? 1
                              : l
                                ? N(l, t) - N(l, e)
                                : 0
                          : 4 & i
                            ? -1
                            : 1);
                  var i;
                }
              : function (t, e) {
                  if (t === e) return ((c = !0), 0);
                  var i,
                    n = 0,
                    o = t.parentNode,
                    r = e.parentNode,
                    s = [t],
                    a = [e];
                  if (!o || !r)
                    return t == C
                      ? -1
                      : e == C
                        ? 1
                        : o
                          ? -1
                          : r
                            ? 1
                            : l
                              ? N(l, t) - N(l, e)
                              : 0;
                  if (o === r) return dt(t, e);
                  for (i = t; (i = i.parentNode); ) s.unshift(i);
                  for (i = e; (i = i.parentNode); ) a.unshift(i);
                  for (; s[n] === a[n]; ) n++;
                  return n
                    ? dt(s[n], a[n])
                    : s[n] == y
                      ? -1
                      : a[n] == y
                        ? 1
                        : 0;
                })),
          C
        );
      }),
    (at.matches = function (t, e) {
      return at(t, null, null, e);
    }),
    (at.matchesSelector = function (t, e) {
      if (
        (k(t),
        p.matchesSelector &&
          P &&
          !D[e + " "] &&
          (!a || !a.test(e)) &&
          (!v || !v.test(e)))
      )
        try {
          var i = u.call(t, e);
          if (
            i ||
            p.disconnectedMatch ||
            (t.document && 11 !== t.document.nodeType)
          )
            return i;
        } catch (t) {
          D(e, !0);
        }
      return 0 < at(e, C, null, [t]).length;
    }),
    (at.contains = function (t, e) {
      return ((t.ownerDocument || t) != C && k(t), b(t, e));
    }),
    (at.attr = function (t, e) {
      (t.ownerDocument || t) != C && k(t);
      var i = w.attrHandle[e.toLowerCase()],
        i = i && M.call(w.attrHandle, e.toLowerCase()) ? i(t, e, !P) : void 0;
      return void 0 !== i
        ? i
        : p.attributes || !P
          ? t.getAttribute(e)
          : (i = t.getAttributeNode(e)) && i.specified
            ? i.value
            : null;
    }),
    (at.escape = function (t) {
      return (t + "").replace(rt, d);
    }),
    (at.error = function (t) {
      throw new Error("Syntax error, unrecognized expression: " + t);
    }),
    (at.uniqueSort = function (t) {
      var e,
        i = [],
        n = 0,
        o = 0;
      if (
        ((c = !p.detectDuplicates),
        (l = !p.sortStable && t.slice(0)),
        t.sort(A),
        c)
      ) {
        for (; (e = t[o++]); ) e === t[o] && (n = i.push(o));
        for (; n--; ) t.splice(i[n], 1);
      }
      return ((l = null), t);
    }),
    (r = at.getText =
      function (t) {
        var e,
          i = "",
          n = 0,
          o = t.nodeType;
        if (o) {
          if (1 === o || 9 === o || 11 === o) {
            if ("string" == typeof t.textContent) return t.textContent;
            for (t = t.firstChild; t; t = t.nextSibling) i += r(t);
          } else if (3 === o || 4 === o) return t.nodeValue;
        } else for (; (e = t[n++]); ) i += r(e);
        return i;
      }),
    ((w = at.selectors =
      {
        cacheLength: 50,
        createPseudo: ct,
        match: K,
        attrHandle: {},
        find: {},
        relative: {
          ">": { dir: "parentNode", first: !0 },
          " ": { dir: "parentNode" },
          "+": { dir: "previousSibling", first: !0 },
          "~": { dir: "previousSibling" },
        },
        preFilter: {
          ATTR: function (t) {
            return (
              (t[1] = t[1].replace(ot, h)),
              (t[3] = (t[3] || t[4] || t[5] || "").replace(ot, h)),
              "~=" === t[2] && (t[3] = " " + t[3] + " "),
              t.slice(0, 4)
            );
          },
          CHILD: function (t) {
            return (
              (t[1] = t[1].toLowerCase()),
              "nth" === t[1].slice(0, 3)
                ? (t[3] || at.error(t[0]),
                  (t[4] = +(t[4]
                    ? t[5] + (t[6] || 1)
                    : 2 * ("even" === t[3] || "odd" === t[3]))),
                  (t[5] = +(t[7] + t[8] || "odd" === t[3])))
                : t[3] && at.error(t[0]),
              t
            );
          },
          PSEUDO: function (t) {
            var e,
              i = !t[6] && t[2];
            return K.CHILD.test(t[0])
              ? null
              : (t[3]
                  ? (t[2] = t[4] || t[5] || "")
                  : i &&
                    G.test(i) &&
                    (e = f(i, !0)) &&
                    (e = i.indexOf(")", i.length - e) - i.length) &&
                    ((t[0] = t[0].slice(0, e)), (t[2] = i.slice(0, e))),
                t.slice(0, 3));
          },
        },
        filter: {
          TAG: function (t) {
            var e = t.replace(ot, h).toLowerCase();
            return "*" === t
              ? function () {
                  return !0;
                }
              : function (t) {
                  return t.nodeName && t.nodeName.toLowerCase() === e;
                };
          },
          CLASS: function (t) {
            var e = H[t + " "];
            return (
              e ||
              ((e = new RegExp("(^|" + F + ")" + t + "(" + F + "|$)")) &&
                H(t, function (t) {
                  return e.test(
                    ("string" == typeof t.className && t.className) ||
                      (void 0 !== t.getAttribute && t.getAttribute("class")) ||
                      "",
                  );
                }))
            );
          },
          ATTR: function (e, i, n) {
            return function (t) {
              t = at.attr(t, e);
              return null == t
                ? "!=" === i
                : !i ||
                    ((t += ""),
                    "=" === i
                      ? t === n
                      : "!=" === i
                        ? t !== n
                        : "^=" === i
                          ? n && 0 === t.indexOf(n)
                          : "*=" === i
                            ? n && -1 < t.indexOf(n)
                            : "$=" === i
                              ? n && t.slice(-n.length) === n
                              : "~=" === i
                                ? -1 <
                                  (" " + t.replace(q, " ") + " ").indexOf(n)
                                : "|=" === i &&
                                  (t === n ||
                                    t.slice(0, n.length + 1) === n + "-"));
            };
          },
          CHILD: function (f, t, e, m, g) {
            var v = "nth" !== f.slice(0, 3),
              b = "last" !== f.slice(-4),
              y = "of-type" === t;
            return 1 === m && 0 === g
              ? function (t) {
                  return !!t.parentNode;
                }
              : function (t, e, i) {
                  var n,
                    o,
                    r,
                    s,
                    a,
                    l,
                    c = v != b ? "nextSibling" : "previousSibling",
                    u = t.parentNode,
                    h = y && t.nodeName.toLowerCase(),
                    d = !i && !y,
                    p = !1;
                  if (u) {
                    if (v) {
                      for (; c; ) {
                        for (s = t; (s = s[c]); )
                          if (
                            y
                              ? s.nodeName.toLowerCase() === h
                              : 1 === s.nodeType
                          )
                            return !1;
                        l = c = "only" === f && !l && "nextSibling";
                      }
                      return !0;
                    }
                    if (((l = [b ? u.firstChild : u.lastChild]), b && d)) {
                      for (
                        p =
                          (a =
                            (n =
                              (o =
                                (r = (s = u)[_] || (s[_] = {}))[s.uniqueID] ||
                                (r[s.uniqueID] = {}))[f] || [])[0] === S &&
                            n[1]) && n[2],
                          s = a && u.childNodes[a];
                        (s = (++a && s && s[c]) || (p = a = 0) || l.pop());
                      )
                        if (1 === s.nodeType && ++p && s === t) {
                          o[f] = [S, a, p];
                          break;
                        }
                    } else if (
                      !1 ===
                      (p = d
                        ? (a =
                            (n =
                              (o =
                                (r = (s = t)[_] || (s[_] = {}))[s.uniqueID] ||
                                (r[s.uniqueID] = {}))[f] || [])[0] === S &&
                            n[1])
                        : p)
                    )
                      for (
                        ;
                        (s = (++a && s && s[c]) || (p = a = 0) || l.pop()) &&
                        ((y
                          ? s.nodeName.toLowerCase() !== h
                          : 1 !== s.nodeType) ||
                          !++p ||
                          (d &&
                            ((o =
                              (r = s[_] || (s[_] = {}))[s.uniqueID] ||
                              (r[s.uniqueID] = {}))[f] = [S, p]),
                          s !== t));
                      );
                    return (p -= g) === m || (p % m == 0 && 0 <= p / m);
                  }
                };
          },
          PSEUDO: function (t, r) {
            var e,
              s =
                w.pseudos[t] ||
                w.setFilters[t.toLowerCase()] ||
                at.error("unsupported pseudo: " + t);
            return s[_]
              ? s(r)
              : 1 < s.length
                ? ((e = [t, t, "", r]),
                  w.setFilters.hasOwnProperty(t.toLowerCase())
                    ? ct(function (t, e) {
                        for (var i, n = s(t, r), o = n.length; o--; )
                          t[(i = N(t, n[o]))] = !(e[i] = n[o]);
                      })
                    : function (t) {
                        return s(t, 0, e);
                      })
                : s;
          },
        },
        pseudos: {
          not: ct(function (t) {
            var n = [],
              o = [],
              a = m(t.replace(V, "$1"));
            return a[_]
              ? ct(function (t, e, i, n) {
                  for (var o, r = a(t, null, n, []), s = t.length; s--; )
                    (o = r[s]) && (t[s] = !(e[s] = o));
                })
              : function (t, e, i) {
                  return (
                    (n[0] = t),
                    a(n, null, i, o),
                    (n[0] = null),
                    !o.pop()
                  );
                };
          }),
          has: ct(function (e) {
            return function (t) {
              return 0 < at(e, t).length;
            };
          }),
          contains: ct(function (e) {
            return (
              (e = e.replace(ot, h)),
              function (t) {
                return -1 < (t.textContent || r(t)).indexOf(e);
              }
            );
          }),
          lang: ct(function (i) {
            return (
              X.test(i || "") || at.error("unsupported lang: " + i),
              (i = i.replace(ot, h).toLowerCase()),
              function (t) {
                var e;
                do {
                  if (
                    (e = P
                      ? t.lang
                      : t.getAttribute("xml:lang") || t.getAttribute("lang"))
                  )
                    return (
                      (e = e.toLowerCase()) === i || 0 === e.indexOf(i + "-")
                    );
                } while ((t = t.parentNode) && 1 === t.nodeType);
                return !1;
              }
            );
          }),
          target: function (t) {
            var e = i.location && i.location.hash;
            return e && e.slice(1) === t.id;
          },
          root: function (t) {
            return t === s;
          },
          focus: function (t) {
            return (
              t === C.activeElement &&
              (!C.hasFocus || C.hasFocus()) &&
              !!(t.type || t.href || ~t.tabIndex)
            );
          },
          enabled: pt(!1),
          disabled: pt(!0),
          checked: function (t) {
            var e = t.nodeName.toLowerCase();
            return (
              ("input" === e && !!t.checked) || ("option" === e && !!t.selected)
            );
          },
          selected: function (t) {
            return (
              t.parentNode && t.parentNode.selectedIndex,
              !0 === t.selected
            );
          },
          empty: function (t) {
            for (t = t.firstChild; t; t = t.nextSibling)
              if (t.nodeType < 6) return !1;
            return !0;
          },
          parent: function (t) {
            return !w.pseudos.empty(t);
          },
          header: function (t) {
            return tt.test(t.nodeName);
          },
          input: function (t) {
            return Z.test(t.nodeName);
          },
          button: function (t) {
            var e = t.nodeName.toLowerCase();
            return ("input" === e && "button" === t.type) || "button" === e;
          },
          text: function (t) {
            return (
              "input" === t.nodeName.toLowerCase() &&
              "text" === t.type &&
              (null == (t = t.getAttribute("type")) ||
                "text" === t.toLowerCase())
            );
          },
          first: ft(function () {
            return [0];
          }),
          last: ft(function (t, e) {
            return [e - 1];
          }),
          eq: ft(function (t, e, i) {
            return [i < 0 ? i + e : i];
          }),
          even: ft(function (t, e) {
            for (var i = 0; i < e; i += 2) t.push(i);
            return t;
          }),
          odd: ft(function (t, e) {
            for (var i = 1; i < e; i += 2) t.push(i);
            return t;
          }),
          lt: ft(function (t, e, i) {
            for (var n = i < 0 ? i + e : e < i ? e : i; 0 <= --n; ) t.push(n);
            return t;
          }),
          gt: ft(function (t, e, i) {
            for (var n = i < 0 ? i + e : i; ++n < e; ) t.push(n);
            return t;
          }),
        },
      }).pseudos.nth = w.pseudos.eq),
    { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }))
      w.pseudos[t] = (function (e) {
        return function (t) {
          return "input" === t.nodeName.toLowerCase() && t.type === e;
        };
      })(t);
    for (t in { submit: !0, reset: !0 })
      w.pseudos[t] = (function (i) {
        return function (t) {
          var e = t.nodeName.toLowerCase();
          return ("input" === e || "button" === e) && t.type === i;
        };
      })(t);
    function gt() {}
    function vt(t) {
      for (var e = 0, i = t.length, n = ""; e < i; e++) n += t[e].value;
      return n;
    }
    function bt(s, t, e) {
      var a = t.dir,
        l = t.next,
        c = l || a,
        u = e && "parentNode" === c,
        h = T++;
      return t.first
        ? function (t, e, i) {
            for (; (t = t[a]); ) if (1 === t.nodeType || u) return s(t, e, i);
            return !1;
          }
        : function (t, e, i) {
            var n,
              o,
              r = [S, h];
            if (i) {
              for (; (t = t[a]); )
                if ((1 === t.nodeType || u) && s(t, e, i)) return !0;
            } else
              for (; (t = t[a]); )
                if (1 === t.nodeType || u)
                  if (
                    ((n =
                      (o = t[_] || (t[_] = {}))[t.uniqueID] ||
                      (o[t.uniqueID] = {})),
                    l && l === t.nodeName.toLowerCase())
                  )
                    t = t[a] || t;
                  else {
                    if ((o = n[c]) && o[0] === S && o[1] === h)
                      return (r[2] = o[2]);
                    if (((n[c] = r)[2] = s(t, e, i))) return !0;
                  }
            return !1;
          };
    }
    function yt(o) {
      return 1 < o.length
        ? function (t, e, i) {
            for (var n = o.length; n--; ) if (!o[n](t, e, i)) return !1;
            return !0;
          }
        : o[0];
    }
    function wt(t, e, i, n, o) {
      for (var r, s = [], a = 0, l = t.length, c = null != e; a < l; a++)
        (r = t[a]) && ((i && !i(r, n, o)) || (s.push(r), c && e.push(a)));
      return s;
    }
    function xt(t) {
      for (
        var n,
          e,
          i,
          o = t.length,
          r = w.relative[t[0].type],
          s = r || w.relative[" "],
          a = r ? 1 : 0,
          l = bt(
            function (t) {
              return t === n;
            },
            s,
            !0,
          ),
          c = bt(
            function (t) {
              return -1 < N(n, t);
            },
            s,
            !0,
          ),
          u = [
            function (t, e, i) {
              i = (!r && (i || e !== x)) || ((n = e).nodeType ? l : c)(t, e, i);
              return ((n = null), i);
            },
          ];
        a < o;
        a++
      )
        if ((e = w.relative[t[a].type])) u = [bt(yt(u), e)];
        else {
          if ((e = w.filter[t[a].type].apply(null, t[a].matches))[_]) {
            for (i = ++a; i < o && !w.relative[t[i].type]; i++);
            return (function t(p, f, m, g, v, e) {
              return (
                g && !g[_] && (g = t(g)),
                v && !v[_] && (v = t(v, e)),
                ct(function (t, e, i, n) {
                  var o,
                    r,
                    s,
                    a = [],
                    l = [],
                    c = e.length,
                    u =
                      t ||
                      (function (t, e, i) {
                        for (var n = 0, o = e.length; n < o; n++)
                          at(t, e[n], i);
                        return i;
                      })(f || "*", i.nodeType ? [i] : i, []),
                    h = !p || (!t && f) ? u : wt(u, a, p, i, n),
                    d = m ? (v || (t ? p : c || g) ? [] : e) : h;
                  if ((m && m(h, d, i, n), g))
                    for (o = wt(d, l), g(o, [], i, n), r = o.length; r--; )
                      (s = o[r]) && (d[l[r]] = !(h[l[r]] = s));
                  if (t) {
                    if (v || p) {
                      if (v) {
                        for (o = [], r = d.length; r--; )
                          (s = d[r]) && o.push((h[r] = s));
                        v(null, (d = []), o, n);
                      }
                      for (r = d.length; r--; )
                        (s = d[r]) &&
                          -1 < (o = v ? N(t, s) : a[r]) &&
                          (t[o] = !(e[o] = s));
                    }
                  } else
                    ((d = wt(d === e ? d.splice(c, d.length) : d)),
                      v ? v(null, e, d, n) : B.apply(e, d));
                })
              );
            })(
              1 < a && yt(u),
              1 < a &&
                vt(
                  t
                    .slice(0, a - 1)
                    .concat({ value: " " === t[a - 2].type ? "*" : "" }),
                ).replace(V, "$1"),
              e,
              a < i && xt(t.slice(a, i)),
              i < o && xt((t = t.slice(i))),
              i < o && vt(t),
            );
          }
          u.push(e);
        }
      return yt(u);
    }
    return (
      (gt.prototype = w.filters = w.pseudos),
      (w.setFilters = new gt()),
      (f = at.tokenize =
        function (t, e) {
          var i,
            n,
            o,
            r,
            s,
            a,
            l,
            c = I[t + " "];
          if (c) return e ? 0 : c.slice(0);
          for (s = t, a = [], l = w.preFilter; s; ) {
            for (r in ((i && !(n = U.exec(s))) ||
              (n && (s = s.slice(n[0].length) || s), a.push((o = []))),
            (i = !1),
            (n = Q.exec(s)) &&
              ((i = n.shift()),
              o.push({ value: i, type: n[0].replace(V, " ") }),
              (s = s.slice(i.length))),
            w.filter))
              !(n = K[r].exec(s)) ||
                (l[r] && !(n = l[r](n))) ||
                ((i = n.shift()),
                o.push({ value: i, type: r, matches: n }),
                (s = s.slice(i.length)));
            if (!i) break;
          }
          return e ? s.length : s ? at.error(t) : I(t, a).slice(0);
        }),
      (m = at.compile =
        function (t, e) {
          var i,
            g,
            v,
            b,
            y,
            n,
            o = [],
            r = [],
            s = E[t + " "];
          if (!s) {
            for (i = (e = e || f(t)).length; i--; )
              ((s = xt(e[i]))[_] ? o : r).push(s);
            (s = E(
              t,
              ((b = 0 < (v = o).length),
              (y = 0 < (g = r).length),
              (n = function (t, e, i, n, o) {
                var r,
                  s,
                  a,
                  l = 0,
                  c = "0",
                  u = t && [],
                  h = [],
                  d = x,
                  p = t || (y && w.find.TAG("*", o)),
                  f = (S += null == d ? 1 : Math.random() || 0.1),
                  m = p.length;
                for (
                  o && (x = e == C || e || o);
                  c !== m && null != (r = p[c]);
                  c++
                ) {
                  if (y && r) {
                    for (
                      s = 0, e || r.ownerDocument == C || (k(r), (i = !P));
                      (a = g[s++]);
                    )
                      if (a(r, e || C, i)) {
                        n.push(r);
                        break;
                      }
                    o && (S = f);
                  }
                  b && ((r = !a && r) && l--, t && u.push(r));
                }
                if (((l += c), b && c !== l)) {
                  for (s = 0; (a = v[s++]); ) a(u, h, e, i);
                  if (t) {
                    if (0 < l) for (; c--; ) u[c] || h[c] || (h[c] = L.call(n));
                    h = wt(h);
                  }
                  (B.apply(n, h),
                    o &&
                      !t &&
                      0 < h.length &&
                      1 < l + v.length &&
                      at.uniqueSort(n));
                }
                return (o && ((S = f), (x = d)), u);
              }),
              b ? ct(n) : n),
            )).selector = t;
          }
          return s;
        }),
      (g = at.select =
        function (t, e, i, n) {
          var o,
            r,
            s,
            a,
            l,
            c = "function" == typeof t && t,
            u = !n && f((t = c.selector || t));
          if (((i = i || []), 1 === u.length)) {
            if (
              2 < (r = u[0] = u[0].slice(0)).length &&
              "ID" === (s = r[0]).type &&
              9 === e.nodeType &&
              P &&
              w.relative[r[1].type]
            ) {
              if (!(e = (w.find.ID(s.matches[0].replace(ot, h), e) || [])[0]))
                return i;
              (c && (e = e.parentNode), (t = t.slice(r.shift().value.length)));
            }
            for (
              o = K.needsContext.test(t) ? 0 : r.length;
              o-- && ((s = r[o]), !w.relative[(a = s.type)]);
            )
              if (
                (l = w.find[a]) &&
                (n = l(
                  s.matches[0].replace(ot, h),
                  (nt.test(r[0].type) && mt(e.parentNode)) || e,
                ))
              ) {
                if ((r.splice(o, 1), !(t = n.length && vt(r))))
                  return (B.apply(i, n), i);
                break;
              }
          }
          return (
            (c || m(t, u))(
              n,
              e,
              !P,
              i,
              !e || (nt.test(t) && mt(e.parentNode)) || e,
            ),
            i
          );
        }),
      (p.sortStable = _.split("").sort(A).join("") === _),
      (p.detectDuplicates = !!c),
      k(),
      (p.sortDetached = ut(function (t) {
        return 1 & t.compareDocumentPosition(C.createElement("fieldset"));
      })),
      ut(function (t) {
        return (
          (t.innerHTML = "<a href='#'></a>"),
          "#" === t.firstChild.getAttribute("href")
        );
      }) ||
        ht("type|href|height|width", function (t, e, i) {
          if (!i) return t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2);
        }),
      (p.attributes &&
        ut(function (t) {
          return (
            (t.innerHTML = "<input/>"),
            t.firstChild.setAttribute("value", ""),
            "" === t.firstChild.getAttribute("value")
          );
        })) ||
        ht("value", function (t, e, i) {
          if (!i && "input" === t.nodeName.toLowerCase()) return t.defaultValue;
        }),
      ut(function (t) {
        return null == t.getAttribute("disabled");
      }) ||
        ht(R, function (t, e, i) {
          if (!i)
            return !0 === t[e]
              ? e.toLowerCase()
              : (e = t.getAttributeNode(e)) && e.specified
                ? e.value
                : null;
        }),
      at
    );
  })(k);
  ((P.find = p),
    (P.expr = p.selectors),
    (P.expr[":"] = P.expr.pseudos),
    (P.uniqueSort = P.unique = p.uniqueSort),
    (P.text = p.getText),
    (P.isXMLDoc = p.isXML),
    (P.contains = p.contains),
    (P.escapeSelector = p.escape));
  function x(t, e, i) {
    for (var n = [], o = void 0 !== i; (t = t[e]) && 9 !== t.nodeType; )
      if (1 === t.nodeType) {
        if (o && P(t).is(i)) break;
        n.push(t);
      }
    return n;
  }
  function _(t, e) {
    for (var i = []; t; t = t.nextSibling)
      1 === t.nodeType && t !== e && i.push(t);
    return i;
  }
  var S = P.expr.match.needsContext;
  function T(t, e) {
    return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase();
  }
  var H = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  function I(t, i, n) {
    return m(i)
      ? P.grep(t, function (t, e) {
          return !!i.call(t, e, t) !== n;
        })
      : i.nodeType
        ? P.grep(t, function (t) {
            return (t === i) !== n;
          })
        : "string" != typeof i
          ? P.grep(t, function (t) {
              return -1 < o.call(i, t) !== n;
            })
          : P.filter(i, t, n);
  }
  ((P.filter = function (t, e, i) {
    var n = e[0];
    return (
      i && (t = ":not(" + t + ")"),
      1 === e.length && 1 === n.nodeType
        ? P.find.matchesSelector(n, t)
          ? [n]
          : []
        : P.find.matches(
            t,
            P.grep(e, function (t) {
              return 1 === t.nodeType;
            }),
          )
    );
  }),
    P.fn.extend({
      find: function (t) {
        var e,
          i,
          n = this.length,
          o = this;
        if ("string" != typeof t)
          return this.pushStack(
            P(t).filter(function () {
              for (e = 0; e < n; e++) if (P.contains(o[e], this)) return !0;
            }),
          );
        for (i = this.pushStack([]), e = 0; e < n; e++) P.find(t, o[e], i);
        return 1 < n ? P.uniqueSort(i) : i;
      },
      filter: function (t) {
        return this.pushStack(I(this, t || [], !1));
      },
      not: function (t) {
        return this.pushStack(I(this, t || [], !0));
      },
      is: function (t) {
        return !!I(this, "string" == typeof t && S.test(t) ? P(t) : t || [], !1)
          .length;
      },
    }));
  var E = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
  (P.fn.init = function (t, e, i) {
    if (!t) return this;
    if (((i = i || D), "string" != typeof t))
      return t.nodeType
        ? ((this[0] = t), (this.length = 1), this)
        : m(t)
          ? void 0 !== i.ready
            ? i.ready(t)
            : t(P)
          : P.makeArray(t, this);
    if (
      !(n =
        "<" === t[0] && ">" === t[t.length - 1] && 3 <= t.length
          ? [null, t, null]
          : E.exec(t)) ||
      (!n[1] && e)
    )
      return (!e || e.jquery ? e || i : this.constructor(e)).find(t);
    if (n[1]) {
      if (
        ((e = e instanceof P ? e[0] : e),
        P.merge(
          this,
          P.parseHTML(n[1], e && e.nodeType ? e.ownerDocument || e : C, !0),
        ),
        H.test(n[1]) && P.isPlainObject(e))
      )
        for (var n in e) m(this[n]) ? this[n](e[n]) : this.attr(n, e[n]);
      return this;
    }
    return (
      (t = C.getElementById(n[2])) && ((this[0] = t), (this.length = 1)),
      this
    );
  }).prototype = P.fn;
  var D = P(C),
    A = /^(?:parents|prev(?:Until|All))/,
    M = { children: !0, contents: !0, next: !0, prev: !0 };
  function L(t, e) {
    for (; (t = t[e]) && 1 !== t.nodeType; );
    return t;
  }
  (P.fn.extend({
    has: function (t) {
      var e = P(t, this),
        i = e.length;
      return this.filter(function () {
        for (var t = 0; t < i; t++) if (P.contains(this, e[t])) return !0;
      });
    },
    closest: function (t, e) {
      var i,
        n = 0,
        o = this.length,
        r = [],
        s = "string" != typeof t && P(t);
      if (!S.test(t))
        for (; n < o; n++)
          for (i = this[n]; i && i !== e; i = i.parentNode)
            if (
              i.nodeType < 11 &&
              (s
                ? -1 < s.index(i)
                : 1 === i.nodeType && P.find.matchesSelector(i, t))
            ) {
              r.push(i);
              break;
            }
      return this.pushStack(1 < r.length ? P.uniqueSort(r) : r);
    },
    index: function (t) {
      return t
        ? "string" == typeof t
          ? o.call(P(t), this[0])
          : o.call(this, t.jquery ? t[0] : t)
        : this[0] && this[0].parentNode
          ? this.first().prevAll().length
          : -1;
    },
    add: function (t, e) {
      return this.pushStack(P.uniqueSort(P.merge(this.get(), P(t, e))));
    },
    addBack: function (t) {
      return this.add(null == t ? this.prevObject : this.prevObject.filter(t));
    },
  }),
    P.each(
      {
        parent: function (t) {
          t = t.parentNode;
          return t && 11 !== t.nodeType ? t : null;
        },
        parents: function (t) {
          return x(t, "parentNode");
        },
        parentsUntil: function (t, e, i) {
          return x(t, "parentNode", i);
        },
        next: function (t) {
          return L(t, "nextSibling");
        },
        prev: function (t) {
          return L(t, "previousSibling");
        },
        nextAll: function (t) {
          return x(t, "nextSibling");
        },
        prevAll: function (t) {
          return x(t, "previousSibling");
        },
        nextUntil: function (t, e, i) {
          return x(t, "nextSibling", i);
        },
        prevUntil: function (t, e, i) {
          return x(t, "previousSibling", i);
        },
        siblings: function (t) {
          return _((t.parentNode || {}).firstChild, t);
        },
        children: function (t) {
          return _(t.firstChild);
        },
        contents: function (t) {
          return null != t.contentDocument && i(t.contentDocument)
            ? t.contentDocument
            : (T(t, "template") && (t = t.content || t),
              P.merge([], t.childNodes));
        },
      },
      function (n, o) {
        P.fn[n] = function (t, e) {
          var i = P.map(this, o, t);
          return (
            (e = "Until" !== n.slice(-5) ? t : e) &&
              "string" == typeof e &&
              (i = P.filter(e, i)),
            1 < this.length &&
              (M[n] || P.uniqueSort(i), A.test(n) && i.reverse()),
            this.pushStack(i)
          );
        };
      },
    ));
  var O = /[^\x20\t\r\n\f]+/g;
  function B(t) {
    return t;
  }
  function $(t) {
    throw t;
  }
  function N(t, e, i, n) {
    var o;
    try {
      t && m((o = t.promise))
        ? o.call(t).done(e).fail(i)
        : t && m((o = t.then))
          ? o.call(t, e, i)
          : e.apply(void 0, [t].slice(n));
    } catch (t) {
      i.apply(void 0, [t]);
    }
  }
  ((P.Callbacks = function (n) {
    var t, i;
    n =
      "string" == typeof n
        ? ((t = n),
          (i = {}),
          P.each(t.match(O) || [], function (t, e) {
            i[e] = !0;
          }),
          i)
        : P.extend({}, n);
    function o() {
      for (a = a || n.once, s = r = !0; c.length; u = -1)
        for (e = c.shift(); ++u < l.length; )
          !1 === l[u].apply(e[0], e[1]) &&
            n.stopOnFalse &&
            ((u = l.length), (e = !1));
      (n.memory || (e = !1), (r = !1), a && (l = e ? [] : ""));
    }
    var r,
      e,
      s,
      a,
      l = [],
      c = [],
      u = -1,
      h = {
        add: function () {
          return (
            l &&
              (e && !r && ((u = l.length - 1), c.push(e)),
              (function i(t) {
                P.each(t, function (t, e) {
                  m(e)
                    ? (n.unique && h.has(e)) || l.push(e)
                    : e && e.length && "string" !== f(e) && i(e);
                });
              })(arguments),
              e && !r && o()),
            this
          );
        },
        remove: function () {
          return (
            P.each(arguments, function (t, e) {
              for (var i; -1 < (i = P.inArray(e, l, i)); )
                (l.splice(i, 1), i <= u && u--);
            }),
            this
          );
        },
        has: function (t) {
          return t ? -1 < P.inArray(t, l) : 0 < l.length;
        },
        empty: function () {
          return ((l = l && []), this);
        },
        disable: function () {
          return ((a = c = []), (l = e = ""), this);
        },
        disabled: function () {
          return !l;
        },
        lock: function () {
          return ((a = c = []), e || r || (l = e = ""), this);
        },
        locked: function () {
          return !!a;
        },
        fireWith: function (t, e) {
          return (
            a ||
              ((e = [t, (e = e || []).slice ? e.slice() : e]),
              c.push(e),
              r || o()),
            this
          );
        },
        fire: function () {
          return (h.fireWith(this, arguments), this);
        },
        fired: function () {
          return !!s;
        },
      };
    return h;
  }),
    P.extend({
      Deferred: function (t) {
        var r = [
            [
              "notify",
              "progress",
              P.Callbacks("memory"),
              P.Callbacks("memory"),
              2,
            ],
            [
              "resolve",
              "done",
              P.Callbacks("once memory"),
              P.Callbacks("once memory"),
              0,
              "resolved",
            ],
            [
              "reject",
              "fail",
              P.Callbacks("once memory"),
              P.Callbacks("once memory"),
              1,
              "rejected",
            ],
          ],
          o = "pending",
          s = {
            state: function () {
              return o;
            },
            always: function () {
              return (a.done(arguments).fail(arguments), this);
            },
            catch: function (t) {
              return s.then(null, t);
            },
            pipe: function () {
              var o = arguments;
              return P.Deferred(function (n) {
                (P.each(r, function (t, e) {
                  var i = m(o[e[4]]) && o[e[4]];
                  a[e[1]](function () {
                    var t = i && i.apply(this, arguments);
                    t && m(t.promise)
                      ? t
                          .promise()
                          .progress(n.notify)
                          .done(n.resolve)
                          .fail(n.reject)
                      : n[e[0] + "With"](this, i ? [t] : arguments);
                  });
                }),
                  (o = null));
              }).promise();
            },
            then: function (e, i, n) {
              var l = 0;
              function c(o, r, s, a) {
                return function () {
                  function t() {
                    var t, e;
                    if (!(o < l)) {
                      if ((t = s.apply(i, n)) === r.promise())
                        throw new TypeError("Thenable self-resolution");
                      ((e =
                        t &&
                        ("object" == typeof t || "function" == typeof t) &&
                        t.then),
                        m(e)
                          ? a
                            ? e.call(t, c(l, r, B, a), c(l, r, $, a))
                            : (l++,
                              e.call(
                                t,
                                c(l, r, B, a),
                                c(l, r, $, a),
                                c(l, r, B, r.notifyWith),
                              ))
                          : (s !== B && ((i = void 0), (n = [t])),
                            (a || r.resolveWith)(i, n)));
                    }
                  }
                  var i = this,
                    n = arguments,
                    e = a
                      ? t
                      : function () {
                          try {
                            t();
                          } catch (t) {
                            (P.Deferred.exceptionHook &&
                              P.Deferred.exceptionHook(t, e.stackTrace),
                              l <= o + 1 &&
                                (s !== $ && ((i = void 0), (n = [t])),
                                r.rejectWith(i, n)));
                          }
                        };
                  o
                    ? e()
                    : (P.Deferred.getStackHook &&
                        (e.stackTrace = P.Deferred.getStackHook()),
                      k.setTimeout(e));
                };
              }
              return P.Deferred(function (t) {
                (r[0][3].add(c(0, t, m(n) ? n : B, t.notifyWith)),
                  r[1][3].add(c(0, t, m(e) ? e : B)),
                  r[2][3].add(c(0, t, m(i) ? i : $)));
              }).promise();
            },
            promise: function (t) {
              return null != t ? P.extend(t, s) : s;
            },
          },
          a = {};
        return (
          P.each(r, function (t, e) {
            var i = e[2],
              n = e[5];
            ((s[e[1]] = i.add),
              n &&
                i.add(
                  function () {
                    o = n;
                  },
                  r[3 - t][2].disable,
                  r[3 - t][3].disable,
                  r[0][2].lock,
                  r[0][3].lock,
                ),
              i.add(e[3].fire),
              (a[e[0]] = function () {
                return (
                  a[e[0] + "With"](this === a ? void 0 : this, arguments),
                  this
                );
              }),
              (a[e[0] + "With"] = i.fireWith));
          }),
          s.promise(a),
          t && t.call(a, a),
          a
        );
      },
      when: function (t) {
        function e(e) {
          return function (t) {
            ((o[e] = this),
              (r[e] = 1 < arguments.length ? a.call(arguments) : t),
              --i || s.resolveWith(o, r));
          };
        }
        var i = arguments.length,
          n = i,
          o = Array(n),
          r = a.call(arguments),
          s = P.Deferred();
        if (
          i <= 1 &&
          (N(t, s.done(e(n)).resolve, s.reject, !i),
          "pending" === s.state() || m(r[n] && r[n].then))
        )
          return s.then();
        for (; n--; ) N(r[n], e(n), s.reject);
        return s.promise();
      },
    }));
  var R = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  ((P.Deferred.exceptionHook = function (t, e) {
    k.console &&
      k.console.warn &&
      t &&
      R.test(t.name) &&
      k.console.warn("jQuery.Deferred exception: " + t.message, t.stack, e);
  }),
    (P.readyException = function (t) {
      k.setTimeout(function () {
        throw t;
      });
    }));
  var F = P.Deferred();
  function j() {
    (C.removeEventListener("DOMContentLoaded", j),
      k.removeEventListener("load", j),
      P.ready());
  }
  ((P.fn.ready = function (t) {
    return (
      F.then(t).catch(function (t) {
        P.readyException(t);
      }),
      this
    );
  }),
    P.extend({
      isReady: !1,
      readyWait: 1,
      ready: function (t) {
        (!0 === t ? --P.readyWait : P.isReady) ||
          ((P.isReady = !0) !== t && 0 < --P.readyWait) ||
          F.resolveWith(C, [P]);
      },
    }),
    (P.ready.then = F.then),
    "complete" === C.readyState ||
    ("loading" !== C.readyState && !C.documentElement.doScroll)
      ? k.setTimeout(P.ready)
      : (C.addEventListener("DOMContentLoaded", j),
        k.addEventListener("load", j)));
  function z(t, e, i, n, o, r, s) {
    var a = 0,
      l = t.length,
      c = null == i;
    if ("object" === f(i)) for (a in ((o = !0), i)) z(t, e, a, i[a], !0, r, s);
    else if (
      void 0 !== n &&
      ((o = !0),
      m(n) || (s = !0),
      (e = c
        ? s
          ? (e.call(t, n), null)
          : ((c = e),
            function (t, e, i) {
              return c.call(P(t), i);
            })
        : e))
    )
      for (; a < l; a++) e(t[a], i, s ? n : n.call(t[a], a, e(t[a], i)));
    return o ? t : c ? e.call(t) : l ? e(t[0], i) : r;
  }
  var W = /^-ms-/,
    q = /-([a-z])/g;
  function V(t, e) {
    return e.toUpperCase();
  }
  function U(t) {
    return t.replace(W, "ms-").replace(q, V);
  }
  function Q(t) {
    return 1 === t.nodeType || 9 === t.nodeType || !+t.nodeType;
  }
  function Y() {
    this.expando = P.expando + Y.uid++;
  }
  ((Y.uid = 1),
    (Y.prototype = {
      cache: function (t) {
        var e = t[this.expando];
        return (
          e ||
            ((e = {}),
            Q(t) &&
              (t.nodeType
                ? (t[this.expando] = e)
                : Object.defineProperty(t, this.expando, {
                    value: e,
                    configurable: !0,
                  }))),
          e
        );
      },
      set: function (t, e, i) {
        var n,
          o = this.cache(t);
        if ("string" == typeof e) o[U(e)] = i;
        else for (n in e) o[U(n)] = e[n];
        return o;
      },
      get: function (t, e) {
        return void 0 === e
          ? this.cache(t)
          : t[this.expando] && t[this.expando][U(e)];
      },
      access: function (t, e, i) {
        return void 0 === e || (e && "string" == typeof e && void 0 === i)
          ? this.get(t, e)
          : (this.set(t, e, i), void 0 !== i ? i : e);
      },
      remove: function (t, e) {
        var i,
          n = t[this.expando];
        if (void 0 !== n) {
          if (void 0 !== e) {
            i = (e = Array.isArray(e)
              ? e.map(U)
              : (e = U(e)) in n
                ? [e]
                : e.match(O) || []).length;
            for (; i--; ) delete n[e[i]];
          }
          (void 0 !== e && !P.isEmptyObject(n)) ||
            (t.nodeType ? (t[this.expando] = void 0) : delete t[this.expando]);
        }
      },
      hasData: function (t) {
        t = t[this.expando];
        return void 0 !== t && !P.isEmptyObject(t);
      },
    }));
  var G = new Y(),
    X = new Y(),
    K = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    J = /[A-Z]/g;
  function Z(t, e, i) {
    var n, o;
    if (void 0 === i && 1 === t.nodeType)
      if (
        ((n = "data-" + e.replace(J, "-$&").toLowerCase()),
        "string" == typeof (i = t.getAttribute(n)))
      ) {
        try {
          i =
            "true" === (o = i) ||
            ("false" !== o &&
              ("null" === o
                ? null
                : o === +o + ""
                  ? +o
                  : K.test(o)
                    ? JSON.parse(o)
                    : o));
        } catch (t) {}
        X.set(t, e, i);
      } else i = void 0;
    return i;
  }
  (P.extend({
    hasData: function (t) {
      return X.hasData(t) || G.hasData(t);
    },
    data: function (t, e, i) {
      return X.access(t, e, i);
    },
    removeData: function (t, e) {
      X.remove(t, e);
    },
    _data: function (t, e, i) {
      return G.access(t, e, i);
    },
    _removeData: function (t, e) {
      G.remove(t, e);
    },
  }),
    P.fn.extend({
      data: function (i, t) {
        var e,
          n,
          o,
          r = this[0],
          s = r && r.attributes;
        if (void 0 !== i)
          return "object" == typeof i
            ? this.each(function () {
                X.set(this, i);
              })
            : z(
                this,
                function (t) {
                  var e;
                  return r && void 0 === t
                    ? void 0 !== (e = X.get(r, i)) || void 0 !== (e = Z(r, i))
                      ? e
                      : void 0
                    : void this.each(function () {
                        X.set(this, i, t);
                      });
                },
                null,
                t,
                1 < arguments.length,
                null,
                !0,
              );
        if (
          this.length &&
          ((o = X.get(r)), 1 === r.nodeType && !G.get(r, "hasDataAttrs"))
        ) {
          for (e = s.length; e--; )
            s[e] &&
              0 === (n = s[e].name).indexOf("data-") &&
              ((n = U(n.slice(5))), Z(r, n, o[n]));
          G.set(r, "hasDataAttrs", !0);
        }
        return o;
      },
      removeData: function (t) {
        return this.each(function () {
          X.remove(this, t);
        });
      },
    }),
    P.extend({
      queue: function (t, e, i) {
        var n;
        if (t)
          return (
            (n = G.get(t, (e = (e || "fx") + "queue"))),
            i &&
              (!n || Array.isArray(i)
                ? (n = G.access(t, e, P.makeArray(i)))
                : n.push(i)),
            n || []
          );
      },
      dequeue: function (t, e) {
        e = e || "fx";
        var i = P.queue(t, e),
          n = i.length,
          o = i.shift(),
          r = P._queueHooks(t, e);
        ("inprogress" === o && ((o = i.shift()), n--),
          o &&
            ("fx" === e && i.unshift("inprogress"),
            delete r.stop,
            o.call(
              t,
              function () {
                P.dequeue(t, e);
              },
              r,
            )),
          !n && r && r.empty.fire());
      },
      _queueHooks: function (t, e) {
        var i = e + "queueHooks";
        return (
          G.get(t, i) ||
          G.access(t, i, {
            empty: P.Callbacks("once memory").add(function () {
              G.remove(t, [e + "queue", i]);
            }),
          })
        );
      },
    }),
    P.fn.extend({
      queue: function (e, i) {
        var t = 2;
        return (
          "string" != typeof e && ((i = e), (e = "fx"), t--),
          arguments.length < t
            ? P.queue(this[0], e)
            : void 0 === i
              ? this
              : this.each(function () {
                  var t = P.queue(this, e, i);
                  (P._queueHooks(this, e),
                    "fx" === e && "inprogress" !== t[0] && P.dequeue(this, e));
                })
        );
      },
      dequeue: function (t) {
        return this.each(function () {
          P.dequeue(this, t);
        });
      },
      clearQueue: function (t) {
        return this.queue(t || "fx", []);
      },
      promise: function (t, e) {
        function i() {
          --o || r.resolveWith(s, [s]);
        }
        var n,
          o = 1,
          r = P.Deferred(),
          s = this,
          a = this.length;
        for (
          "string" != typeof t && ((e = t), (t = void 0)), t = t || "fx";
          a--;
        )
          (n = G.get(s[a], t + "queueHooks")) &&
            n.empty &&
            (o++, n.empty.add(i));
        return (i(), r.promise(e));
      },
    }));
  var tt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    et = new RegExp("^(?:([+-])=|)(" + tt + ")([a-z%]*)$", "i"),
    it = ["Top", "Right", "Bottom", "Left"],
    nt = C.documentElement,
    ot = function (t) {
      return P.contains(t.ownerDocument, t);
    },
    rt = { composed: !0 };
  nt.getRootNode &&
    (ot = function (t) {
      return (
        P.contains(t.ownerDocument, t) || t.getRootNode(rt) === t.ownerDocument
      );
    });
  function st(t, e) {
    return (
      "none" === (t = e || t).style.display ||
      ("" === t.style.display && ot(t) && "none" === P.css(t, "display"))
    );
  }
  function at(t, e, i, n) {
    var o,
      r,
      s = 20,
      a = n
        ? function () {
            return n.cur();
          }
        : function () {
            return P.css(t, e, "");
          },
      l = a(),
      c = (i && i[3]) || (P.cssNumber[e] ? "" : "px"),
      u =
        t.nodeType &&
        (P.cssNumber[e] || ("px" !== c && +l)) &&
        et.exec(P.css(t, e));
    if (u && u[3] !== c) {
      for (c = c || u[3], u = +(l /= 2) || 1; s--; )
        (P.style(t, e, u + c),
          (1 - r) * (1 - (r = a() / l || 0.5)) <= 0 && (s = 0),
          (u /= r));
      (P.style(t, e, (u *= 2) + c), (i = i || []));
    }
    return (
      i &&
        ((u = +u || +l || 0),
        (o = i[1] ? u + (i[1] + 1) * i[2] : +i[2]),
        n && ((n.unit = c), (n.start = u), (n.end = o))),
      o
    );
  }
  var lt = {};
  function ct(t, e) {
    for (var i, n, o, r, s, a, l = [], c = 0, u = t.length; c < u; c++)
      (n = t[c]).style &&
        ((i = n.style.display),
        e
          ? ("none" === i &&
              ((l[c] = G.get(n, "display") || null),
              l[c] || (n.style.display = "")),
            "" === n.style.display &&
              st(n) &&
              (l[c] =
                ((a = r = o = void 0),
                (r = n.ownerDocument),
                (s = n.nodeName),
                (a = lt[s]) ||
                  ((o = r.body.appendChild(r.createElement(s))),
                  (a = P.css(o, "display")),
                  o.parentNode.removeChild(o),
                  (lt[s] = a = "none" === a ? "block" : a)))))
          : "none" !== i && ((l[c] = "none"), G.set(n, "display", i)));
    for (c = 0; c < u; c++) null != l[c] && (t[c].style.display = l[c]);
    return t;
  }
  P.fn.extend({
    show: function () {
      return ct(this, !0);
    },
    hide: function () {
      return ct(this);
    },
    toggle: function (t) {
      return "boolean" == typeof t
        ? t
          ? this.show()
          : this.hide()
        : this.each(function () {
            st(this) ? P(this).show() : P(this).hide();
          });
    },
  });
  var ut = /^(?:checkbox|radio)$/i,
    ht = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i,
    dt = /^$|^module$|\/(?:java|ecma)script/i,
    h = C.createDocumentFragment().appendChild(C.createElement("div"));
  ((p = C.createElement("input")).setAttribute("type", "radio"),
    p.setAttribute("checked", "checked"),
    p.setAttribute("name", "t"),
    h.appendChild(p),
    (y.checkClone = h.cloneNode(!0).cloneNode(!0).lastChild.checked),
    (h.innerHTML = "<textarea>x</textarea>"),
    (y.noCloneChecked = !!h.cloneNode(!0).lastChild.defaultValue),
    (h.innerHTML = "<option></option>"),
    (y.option = !!h.lastChild));
  var pt = {
    thead: [1, "<table>", "</table>"],
    col: [2, "<table><colgroup>", "</colgroup></table>"],
    tr: [2, "<table><tbody>", "</tbody></table>"],
    td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
    _default: [0, "", ""],
  };
  function ft(t, e) {
    var i =
      void 0 !== t.getElementsByTagName
        ? t.getElementsByTagName(e || "*")
        : void 0 !== t.querySelectorAll
          ? t.querySelectorAll(e || "*")
          : [];
    return void 0 === e || (e && T(t, e)) ? P.merge([t], i) : i;
  }
  function mt(t, e) {
    for (var i = 0, n = t.length; i < n; i++)
      G.set(t[i], "globalEval", !e || G.get(e[i], "globalEval"));
  }
  ((pt.tbody = pt.tfoot = pt.colgroup = pt.caption = pt.thead),
    (pt.th = pt.td),
    y.option ||
      (pt.optgroup = pt.option =
        [1, "<select multiple='multiple'>", "</select>"]));
  var gt = /<|&#?\w+;/;
  function vt(t, e, i, n, o) {
    for (
      var r,
        s,
        a,
        l,
        c,
        u = e.createDocumentFragment(),
        h = [],
        d = 0,
        p = t.length;
      d < p;
      d++
    )
      if ((r = t[d]) || 0 === r)
        if ("object" === f(r)) P.merge(h, r.nodeType ? [r] : r);
        else if (gt.test(r)) {
          for (
            s = s || u.appendChild(e.createElement("div")),
              a = (ht.exec(r) || ["", ""])[1].toLowerCase(),
              a = pt[a] || pt._default,
              s.innerHTML = a[1] + P.htmlPrefilter(r) + a[2],
              c = a[0];
            c--;
          )
            s = s.lastChild;
          (P.merge(h, s.childNodes), ((s = u.firstChild).textContent = ""));
        } else h.push(e.createTextNode(r));
    for (u.textContent = "", d = 0; (r = h[d++]); )
      if (n && -1 < P.inArray(r, n)) o && o.push(r);
      else if (
        ((l = ot(r)), (s = ft(u.appendChild(r), "script")), l && mt(s), i)
      )
        for (c = 0; (r = s[c++]); ) dt.test(r.type || "") && i.push(r);
    return u;
  }
  var bt = /^key/,
    yt = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    wt = /^([^.]*)(?:\.(.+)|)/;
  function xt() {
    return !0;
  }
  function kt() {
    return !1;
  }
  function Ct(t, e) {
    return (
      (t ===
        (function () {
          try {
            return C.activeElement;
          } catch (t) {}
        })()) ==
      ("focus" === e)
    );
  }
  function Pt(t, e, i, n, o, r) {
    var s, a;
    if ("object" == typeof e) {
      for (a in ("string" != typeof i && ((n = n || i), (i = void 0)), e))
        Pt(t, a, i, n, e[a], r);
      return t;
    }
    if (
      (null == n && null == o
        ? ((o = i), (n = i = void 0))
        : null == o &&
          ("string" == typeof i
            ? ((o = n), (n = void 0))
            : ((o = n), (n = i), (i = void 0))),
      !1 === o)
    )
      o = kt;
    else if (!o) return t;
    return (
      1 === r &&
        ((s = o),
        ((o = function (t) {
          return (P().off(t), s.apply(this, arguments));
        }).guid = s.guid || (s.guid = P.guid++))),
      t.each(function () {
        P.event.add(this, e, o, n, i);
      })
    );
  }
  function _t(t, o, r) {
    r
      ? (G.set(t, o, !1),
        P.event.add(t, o, {
          namespace: !1,
          handler: function (t) {
            var e,
              i,
              n = G.get(this, o);
            if (1 & t.isTrigger && this[o]) {
              if (n.length)
                (P.event.special[o] || {}).delegateType && t.stopPropagation();
              else if (
                ((n = a.call(arguments)),
                G.set(this, o, n),
                (e = r(this, o)),
                this[o](),
                n !== (i = G.get(this, o)) || e ? G.set(this, o, !1) : (i = {}),
                n !== i)
              )
                return (
                  t.stopImmediatePropagation(),
                  t.preventDefault(),
                  i.value
                );
            } else
              n.length &&
                (G.set(this, o, {
                  value: P.event.trigger(
                    P.extend(n[0], P.Event.prototype),
                    n.slice(1),
                    this,
                  ),
                }),
                t.stopImmediatePropagation());
          },
        }))
      : void 0 === G.get(t, o) && P.event.add(t, o, xt);
  }
  ((P.event = {
    global: {},
    add: function (e, t, i, n, o) {
      var r,
        s,
        a,
        l,
        c,
        u,
        h,
        d,
        p,
        f = G.get(e);
      if (Q(e))
        for (
          i.handler && ((i = (r = i).handler), (o = r.selector)),
            o && P.find.matchesSelector(nt, o),
            i.guid || (i.guid = P.guid++),
            (a = f.events) || (a = f.events = Object.create(null)),
            (s = f.handle) ||
              (s = f.handle =
                function (t) {
                  return void 0 !== P && P.event.triggered !== t.type
                    ? P.event.dispatch.apply(e, arguments)
                    : void 0;
                }),
            l = (t = (t || "").match(O) || [""]).length;
          l--;
        )
          ((h = p = (c = wt.exec(t[l]) || [])[1]),
            (d = (c[2] || "").split(".").sort()),
            h &&
              ((u = P.event.special[h] || {}),
              (h = (o ? u.delegateType : u.bindType) || h),
              (u = P.event.special[h] || {}),
              (c = P.extend(
                {
                  type: h,
                  origType: p,
                  data: n,
                  handler: i,
                  guid: i.guid,
                  selector: o,
                  needsContext: o && P.expr.match.needsContext.test(o),
                  namespace: d.join("."),
                },
                r,
              )),
              (p = a[h]) ||
                (((p = a[h] = []).delegateCount = 0),
                (u.setup && !1 !== u.setup.call(e, n, d, s)) ||
                  (e.addEventListener && e.addEventListener(h, s))),
              u.add &&
                (u.add.call(e, c), c.handler.guid || (c.handler.guid = i.guid)),
              o ? p.splice(p.delegateCount++, 0, c) : p.push(c),
              (P.event.global[h] = !0)));
    },
    remove: function (t, e, i, n, o) {
      var r,
        s,
        a,
        l,
        c,
        u,
        h,
        d,
        p,
        f,
        m,
        g = G.hasData(t) && G.get(t);
      if (g && (l = g.events)) {
        for (c = (e = (e || "").match(O) || [""]).length; c--; )
          if (
            ((p = m = (a = wt.exec(e[c]) || [])[1]),
            (f = (a[2] || "").split(".").sort()),
            p)
          ) {
            for (
              h = P.event.special[p] || {},
                d = l[(p = (n ? h.delegateType : h.bindType) || p)] || [],
                a =
                  a[2] &&
                  new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"),
                s = r = d.length;
              r--;
            )
              ((u = d[r]),
                (!o && m !== u.origType) ||
                  (i && i.guid !== u.guid) ||
                  (a && !a.test(u.namespace)) ||
                  (n && n !== u.selector && ("**" !== n || !u.selector)) ||
                  (d.splice(r, 1),
                  u.selector && d.delegateCount--,
                  h.remove && h.remove.call(t, u)));
            s &&
              !d.length &&
              ((h.teardown && !1 !== h.teardown.call(t, f, g.handle)) ||
                P.removeEvent(t, p, g.handle),
              delete l[p]);
          } else for (p in l) P.event.remove(t, p + e[c], i, n, !0);
        P.isEmptyObject(l) && G.remove(t, "handle events");
      }
    },
    dispatch: function (t) {
      var e,
        i,
        n,
        o,
        r,
        s = new Array(arguments.length),
        a = P.event.fix(t),
        l = (G.get(this, "events") || Object.create(null))[a.type] || [],
        t = P.event.special[a.type] || {};
      for (s[0] = a, e = 1; e < arguments.length; e++) s[e] = arguments[e];
      if (
        ((a.delegateTarget = this),
        !t.preDispatch || !1 !== t.preDispatch.call(this, a))
      ) {
        for (
          r = P.event.handlers.call(this, a, l), e = 0;
          (n = r[e++]) && !a.isPropagationStopped();
        )
          for (
            a.currentTarget = n.elem, i = 0;
            (o = n.handlers[i++]) && !a.isImmediatePropagationStopped();
          )
            (a.rnamespace &&
              !1 !== o.namespace &&
              !a.rnamespace.test(o.namespace)) ||
              ((a.handleObj = o),
              (a.data = o.data),
              void 0 !==
                (o = (
                  (P.event.special[o.origType] || {}).handle || o.handler
                ).apply(n.elem, s)) &&
                !1 === (a.result = o) &&
                (a.preventDefault(), a.stopPropagation()));
        return (t.postDispatch && t.postDispatch.call(this, a), a.result);
      }
    },
    handlers: function (t, e) {
      var i,
        n,
        o,
        r,
        s,
        a = [],
        l = e.delegateCount,
        c = t.target;
      if (l && c.nodeType && !("click" === t.type && 1 <= t.button))
        for (; c !== this; c = c.parentNode || this)
          if (1 === c.nodeType && ("click" !== t.type || !0 !== c.disabled)) {
            for (r = [], s = {}, i = 0; i < l; i++)
              (void 0 === s[(o = (n = e[i]).selector + " ")] &&
                (s[o] = n.needsContext
                  ? -1 < P(o, this).index(c)
                  : P.find(o, this, null, [c]).length),
                s[o] && r.push(n));
            r.length && a.push({ elem: c, handlers: r });
          }
      return (
        (c = this),
        l < e.length && a.push({ elem: c, handlers: e.slice(l) }),
        a
      );
    },
    addProp: function (e, t) {
      Object.defineProperty(P.Event.prototype, e, {
        enumerable: !0,
        configurable: !0,
        get: m(t)
          ? function () {
              if (this.originalEvent) return t(this.originalEvent);
            }
          : function () {
              if (this.originalEvent) return this.originalEvent[e];
            },
        set: function (t) {
          Object.defineProperty(this, e, {
            enumerable: !0,
            configurable: !0,
            writable: !0,
            value: t,
          });
        },
      });
    },
    fix: function (t) {
      return t[P.expando] ? t : new P.Event(t);
    },
    special: {
      load: { noBubble: !0 },
      click: {
        setup: function (t) {
          t = this || t;
          return (
            ut.test(t.type) && t.click && T(t, "input") && _t(t, "click", xt),
            !1
          );
        },
        trigger: function (t) {
          t = this || t;
          return (
            ut.test(t.type) && t.click && T(t, "input") && _t(t, "click"),
            !0
          );
        },
        _default: function (t) {
          t = t.target;
          return (
            (ut.test(t.type) &&
              t.click &&
              T(t, "input") &&
              G.get(t, "click")) ||
            T(t, "a")
          );
        },
      },
      beforeunload: {
        postDispatch: function (t) {
          void 0 !== t.result &&
            t.originalEvent &&
            (t.originalEvent.returnValue = t.result);
        },
      },
    },
  }),
    (P.removeEvent = function (t, e, i) {
      t.removeEventListener && t.removeEventListener(e, i);
    }),
    (P.Event = function (t, e) {
      if (!(this instanceof P.Event)) return new P.Event(t, e);
      (t && t.type
        ? ((this.originalEvent = t),
          (this.type = t.type),
          (this.isDefaultPrevented =
            t.defaultPrevented ||
            (void 0 === t.defaultPrevented && !1 === t.returnValue)
              ? xt
              : kt),
          (this.target =
            t.target && 3 === t.target.nodeType
              ? t.target.parentNode
              : t.target),
          (this.currentTarget = t.currentTarget),
          (this.relatedTarget = t.relatedTarget))
        : (this.type = t),
        e && P.extend(this, e),
        (this.timeStamp = (t && t.timeStamp) || Date.now()),
        (this[P.expando] = !0));
    }),
    (P.Event.prototype = {
      constructor: P.Event,
      isDefaultPrevented: kt,
      isPropagationStopped: kt,
      isImmediatePropagationStopped: kt,
      isSimulated: !1,
      preventDefault: function () {
        var t = this.originalEvent;
        ((this.isDefaultPrevented = xt),
          t && !this.isSimulated && t.preventDefault());
      },
      stopPropagation: function () {
        var t = this.originalEvent;
        ((this.isPropagationStopped = xt),
          t && !this.isSimulated && t.stopPropagation());
      },
      stopImmediatePropagation: function () {
        var t = this.originalEvent;
        ((this.isImmediatePropagationStopped = xt),
          t && !this.isSimulated && t.stopImmediatePropagation(),
          this.stopPropagation());
      },
    }),
    P.each(
      {
        altKey: !0,
        bubbles: !0,
        cancelable: !0,
        changedTouches: !0,
        ctrlKey: !0,
        detail: !0,
        eventPhase: !0,
        metaKey: !0,
        pageX: !0,
        pageY: !0,
        shiftKey: !0,
        view: !0,
        char: !0,
        code: !0,
        charCode: !0,
        key: !0,
        keyCode: !0,
        button: !0,
        buttons: !0,
        clientX: !0,
        clientY: !0,
        offsetX: !0,
        offsetY: !0,
        pointerId: !0,
        pointerType: !0,
        screenX: !0,
        screenY: !0,
        targetTouches: !0,
        toElement: !0,
        touches: !0,
        which: function (t) {
          var e = t.button;
          return null == t.which && bt.test(t.type)
            ? null != t.charCode
              ? t.charCode
              : t.keyCode
            : !t.which && void 0 !== e && yt.test(t.type)
              ? 1 & e
                ? 1
                : 2 & e
                  ? 3
                  : 4 & e
                    ? 2
                    : 0
              : t.which;
        },
      },
      P.event.addProp,
    ),
    P.each({ focus: "focusin", blur: "focusout" }, function (t, e) {
      P.event.special[t] = {
        setup: function () {
          return (_t(this, t, Ct), !1);
        },
        trigger: function () {
          return (_t(this, t), !0);
        },
        delegateType: e,
      };
    }),
    P.each(
      {
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout",
      },
      function (t, o) {
        P.event.special[t] = {
          delegateType: o,
          bindType: o,
          handle: function (t) {
            var e,
              i = t.relatedTarget,
              n = t.handleObj;
            return (
              (i && (i === this || P.contains(this, i))) ||
                ((t.type = n.origType),
                (e = n.handler.apply(this, arguments)),
                (t.type = o)),
              e
            );
          },
        };
      },
    ),
    P.fn.extend({
      on: function (t, e, i, n) {
        return Pt(this, t, e, i, n);
      },
      one: function (t, e, i, n) {
        return Pt(this, t, e, i, n, 1);
      },
      off: function (t, e, i) {
        var n, o;
        if (t && t.preventDefault && t.handleObj)
          return (
            (n = t.handleObj),
            P(t.delegateTarget).off(
              n.namespace ? n.origType + "." + n.namespace : n.origType,
              n.selector,
              n.handler,
            ),
            this
          );
        if ("object" != typeof t)
          return (
            (!1 !== e && "function" != typeof e) || ((i = e), (e = void 0)),
            !1 === i && (i = kt),
            this.each(function () {
              P.event.remove(this, t, i, e);
            })
          );
        for (o in t) this.off(o, e, t[o]);
        return this;
      },
    }));
  var St = /<script|<style|<link/i,
    Tt = /checked\s*(?:[^=]|=\s*.checked.)/i,
    Ht = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  function It(t, e) {
    return (
      (T(t, "table") &&
        T(11 !== e.nodeType ? e : e.firstChild, "tr") &&
        P(t).children("tbody")[0]) ||
      t
    );
  }
  function Et(t) {
    return ((t.type = (null !== t.getAttribute("type")) + "/" + t.type), t);
  }
  function Dt(t) {
    return (
      "true/" === (t.type || "").slice(0, 5)
        ? (t.type = t.type.slice(5))
        : t.removeAttribute("type"),
      t
    );
  }
  function At(t, e) {
    var i, n, o, r;
    if (1 === e.nodeType) {
      if (G.hasData(t) && (r = G.get(t).events))
        for (o in (G.remove(e, "handle events"), r))
          for (i = 0, n = r[o].length; i < n; i++) P.event.add(e, o, r[o][i]);
      X.hasData(t) && ((t = X.access(t)), (t = P.extend({}, t)), X.set(e, t));
    }
  }
  function Mt(i, n, o, r) {
    n = v(n);
    var t,
      e,
      s,
      a,
      l,
      c,
      u = 0,
      h = i.length,
      d = h - 1,
      p = n[0],
      f = m(p);
    if (f || (1 < h && "string" == typeof p && !y.checkClone && Tt.test(p)))
      return i.each(function (t) {
        var e = i.eq(t);
        (f && (n[0] = p.call(this, t, e.html())), Mt(e, n, o, r));
      });
    if (
      h &&
      ((e = (t = vt(n, i[0].ownerDocument, !1, i, r)).firstChild),
      1 === t.childNodes.length && (t = e),
      e || r)
    ) {
      for (a = (s = P.map(ft(t, "script"), Et)).length; u < h; u++)
        ((l = t),
          u !== d &&
            ((l = P.clone(l, !0, !0)), a && P.merge(s, ft(l, "script"))),
          o.call(i[u], l, u));
      if (a)
        for (c = s[s.length - 1].ownerDocument, P.map(s, Dt), u = 0; u < a; u++)
          ((l = s[u]),
            dt.test(l.type || "") &&
              !G.access(l, "globalEval") &&
              P.contains(c, l) &&
              (l.src && "module" !== (l.type || "").toLowerCase()
                ? P._evalUrl &&
                  !l.noModule &&
                  P._evalUrl(
                    l.src,
                    { nonce: l.nonce || l.getAttribute("nonce") },
                    c,
                  )
                : w(l.textContent.replace(Ht, ""), l, c)));
    }
    return i;
  }
  function Lt(t, e, i) {
    for (var n, o = e ? P.filter(e, t) : t, r = 0; null != (n = o[r]); r++)
      (i || 1 !== n.nodeType || P.cleanData(ft(n)),
        n.parentNode &&
          (i && ot(n) && mt(ft(n, "script")), n.parentNode.removeChild(n)));
    return t;
  }
  (P.extend({
    htmlPrefilter: function (t) {
      return t;
    },
    clone: function (t, e, i) {
      var n,
        o,
        r,
        s,
        a,
        l,
        c,
        u = t.cloneNode(!0),
        h = ot(t);
      if (
        !(
          y.noCloneChecked ||
          (1 !== t.nodeType && 11 !== t.nodeType) ||
          P.isXMLDoc(t)
        )
      )
        for (s = ft(u), n = 0, o = (r = ft(t)).length; n < o; n++)
          ((a = r[n]),
            "input" === (c = (l = s[n]).nodeName.toLowerCase()) &&
            ut.test(a.type)
              ? (l.checked = a.checked)
              : ("input" !== c && "textarea" !== c) ||
                (l.defaultValue = a.defaultValue));
      if (e)
        if (i)
          for (r = r || ft(t), s = s || ft(u), n = 0, o = r.length; n < o; n++)
            At(r[n], s[n]);
        else At(t, u);
      return (
        0 < (s = ft(u, "script")).length && mt(s, !h && ft(t, "script")),
        u
      );
    },
    cleanData: function (t) {
      for (var e, i, n, o = P.event.special, r = 0; void 0 !== (i = t[r]); r++)
        if (Q(i)) {
          if ((e = i[G.expando])) {
            if (e.events)
              for (n in e.events)
                o[n] ? P.event.remove(i, n) : P.removeEvent(i, n, e.handle);
            i[G.expando] = void 0;
          }
          i[X.expando] && (i[X.expando] = void 0);
        }
    },
  }),
    P.fn.extend({
      detach: function (t) {
        return Lt(this, t, !0);
      },
      remove: function (t) {
        return Lt(this, t);
      },
      text: function (t) {
        return z(
          this,
          function (t) {
            return void 0 === t
              ? P.text(this)
              : this.empty().each(function () {
                  (1 !== this.nodeType &&
                    11 !== this.nodeType &&
                    9 !== this.nodeType) ||
                    (this.textContent = t);
                });
          },
          null,
          t,
          arguments.length,
        );
      },
      append: function () {
        return Mt(this, arguments, function (t) {
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            It(this, t).appendChild(t);
        });
      },
      prepend: function () {
        return Mt(this, arguments, function (t) {
          var e;
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            (e = It(this, t)).insertBefore(t, e.firstChild);
        });
      },
      before: function () {
        return Mt(this, arguments, function (t) {
          this.parentNode && this.parentNode.insertBefore(t, this);
        });
      },
      after: function () {
        return Mt(this, arguments, function (t) {
          this.parentNode && this.parentNode.insertBefore(t, this.nextSibling);
        });
      },
      empty: function () {
        for (var t, e = 0; null != (t = this[e]); e++)
          1 === t.nodeType && (P.cleanData(ft(t, !1)), (t.textContent = ""));
        return this;
      },
      clone: function (t, e) {
        return (
          (t = null != t && t),
          (e = null == e ? t : e),
          this.map(function () {
            return P.clone(this, t, e);
          })
        );
      },
      html: function (t) {
        return z(
          this,
          function (t) {
            var e = this[0] || {},
              i = 0,
              n = this.length;
            if (void 0 === t && 1 === e.nodeType) return e.innerHTML;
            if (
              "string" == typeof t &&
              !St.test(t) &&
              !pt[(ht.exec(t) || ["", ""])[1].toLowerCase()]
            ) {
              t = P.htmlPrefilter(t);
              try {
                for (; i < n; i++)
                  1 === (e = this[i] || {}).nodeType &&
                    (P.cleanData(ft(e, !1)), (e.innerHTML = t));
                e = 0;
              } catch (t) {}
            }
            e && this.empty().append(t);
          },
          null,
          t,
          arguments.length,
        );
      },
      replaceWith: function () {
        var i = [];
        return Mt(
          this,
          arguments,
          function (t) {
            var e = this.parentNode;
            P.inArray(this, i) < 0 &&
              (P.cleanData(ft(this)), e && e.replaceChild(t, this));
          },
          i,
        );
      },
    }),
    P.each(
      {
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith",
      },
      function (t, s) {
        P.fn[t] = function (t) {
          for (var e, i = [], n = P(t), o = n.length - 1, r = 0; r <= o; r++)
            ((e = r === o ? this : this.clone(!0)),
              P(n[r])[s](e),
              l.apply(i, e.get()));
          return this.pushStack(i);
        };
      },
    ));
  function Ot(t) {
    var e = t.ownerDocument.defaultView;
    return (e = !e || !e.opener ? k : e).getComputedStyle(t);
  }
  function Bt(t, e, i) {
    var n,
      o = {};
    for (n in e) ((o[n] = t.style[n]), (t.style[n] = e[n]));
    for (n in ((i = i.call(t)), e)) t.style[n] = o[n];
    return i;
  }
  var $t,
    Nt,
    Rt,
    Ft,
    jt,
    zt,
    Wt,
    qt,
    Vt = new RegExp("^(" + tt + ")(?!px)[a-z%]+$", "i"),
    Ut = new RegExp(it.join("|"), "i");
  function Qt(t, e, i) {
    var n,
      o,
      r = t.style;
    return (
      (i = i || Ot(t)) &&
        ("" !== (o = i.getPropertyValue(e) || i[e]) ||
          ot(t) ||
          (o = P.style(t, e)),
        !y.pixelBoxStyles() &&
          Vt.test(o) &&
          Ut.test(e) &&
          ((n = r.width),
          (t = r.minWidth),
          (e = r.maxWidth),
          (r.minWidth = r.maxWidth = r.width = o),
          (o = i.width),
          (r.width = n),
          (r.minWidth = t),
          (r.maxWidth = e))),
      void 0 !== o ? o + "" : o
    );
  }
  function Yt(t, e) {
    return {
      get: function () {
        if (!t()) return (this.get = e).apply(this, arguments);
        delete this.get;
      },
    };
  }
  function Gt() {
    var t;
    qt &&
      ((Wt.style.cssText =
        "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"),
      (qt.style.cssText =
        "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"),
      nt.appendChild(Wt).appendChild(qt),
      (t = k.getComputedStyle(qt)),
      ($t = "1%" !== t.top),
      (zt = 12 === Xt(t.marginLeft)),
      (qt.style.right = "60%"),
      (Ft = 36 === Xt(t.right)),
      (Nt = 36 === Xt(t.width)),
      (qt.style.position = "absolute"),
      (Rt = 12 === Xt(qt.offsetWidth / 3)),
      nt.removeChild(Wt),
      (qt = null));
  }
  function Xt(t) {
    return Math.round(parseFloat(t));
  }
  ((Wt = C.createElement("div")),
    (qt = C.createElement("div")).style &&
      ((qt.style.backgroundClip = "content-box"),
      (qt.cloneNode(!0).style.backgroundClip = ""),
      (y.clearCloneStyle = "content-box" === qt.style.backgroundClip),
      P.extend(y, {
        boxSizingReliable: function () {
          return (Gt(), Nt);
        },
        pixelBoxStyles: function () {
          return (Gt(), Ft);
        },
        pixelPosition: function () {
          return (Gt(), $t);
        },
        reliableMarginLeft: function () {
          return (Gt(), zt);
        },
        scrollboxSize: function () {
          return (Gt(), Rt);
        },
        reliableTrDimensions: function () {
          var t, e, i;
          return (
            null == jt &&
              ((t = C.createElement("table")),
              (i = C.createElement("tr")),
              (e = C.createElement("div")),
              (t.style.cssText = "position:absolute;left:-11111px"),
              (i.style.height = "1px"),
              (e.style.height = "9px"),
              nt.appendChild(t).appendChild(i).appendChild(e),
              (i = k.getComputedStyle(i)),
              (jt = 3 < parseInt(i.height)),
              nt.removeChild(t)),
            jt
          );
        },
      })));
  var Kt = ["Webkit", "Moz", "ms"],
    Jt = C.createElement("div").style,
    Zt = {};
  function te(t) {
    return (
      P.cssProps[t] ||
      Zt[t] ||
      (t in Jt
        ? t
        : (Zt[t] =
            (function (t) {
              for (
                var e = t[0].toUpperCase() + t.slice(1), i = Kt.length;
                i--;
              )
                if ((t = Kt[i] + e) in Jt) return t;
            })(t) || t))
    );
  }
  var ee = /^(none|table(?!-c[ea]).+)/,
    ie = /^--/,
    ne = { position: "absolute", visibility: "hidden", display: "block" },
    oe = { letterSpacing: "0", fontWeight: "400" };
  function re(t, e, i) {
    var n = et.exec(e);
    return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : e;
  }
  function se(t, e, i, n, o, r) {
    var s = "width" === e ? 1 : 0,
      a = 0,
      l = 0;
    if (i === (n ? "border" : "content")) return 0;
    for (; s < 4; s += 2)
      ("margin" === i && (l += P.css(t, i + it[s], !0, o)),
        n
          ? ("content" === i && (l -= P.css(t, "padding" + it[s], !0, o)),
            "margin" !== i &&
              (l -= P.css(t, "border" + it[s] + "Width", !0, o)))
          : ((l += P.css(t, "padding" + it[s], !0, o)),
            "padding" !== i
              ? (l += P.css(t, "border" + it[s] + "Width", !0, o))
              : (a += P.css(t, "border" + it[s] + "Width", !0, o))));
    return (
      !n &&
        0 <= r &&
        (l +=
          Math.max(
            0,
            Math.ceil(
              t["offset" + e[0].toUpperCase() + e.slice(1)] - r - l - a - 0.5,
            ),
          ) || 0),
      l
    );
  }
  function ae(t, e, i) {
    var n = Ot(t),
      o =
        (!y.boxSizingReliable() || i) &&
        "border-box" === P.css(t, "boxSizing", !1, n),
      r = o,
      s = Qt(t, e, n),
      a = "offset" + e[0].toUpperCase() + e.slice(1);
    if (Vt.test(s)) {
      if (!i) return s;
      s = "auto";
    }
    return (
      ((!y.boxSizingReliable() && o) ||
        (!y.reliableTrDimensions() && T(t, "tr")) ||
        "auto" === s ||
        (!parseFloat(s) && "inline" === P.css(t, "display", !1, n))) &&
        t.getClientRects().length &&
        ((o = "border-box" === P.css(t, "boxSizing", !1, n)),
        (r = a in t) && (s = t[a])),
      (s = parseFloat(s) || 0) +
        se(t, e, i || (o ? "border" : "content"), r, n, s) +
        "px"
    );
  }
  function le(t, e, i, n, o) {
    return new le.prototype.init(t, e, i, n, o);
  }
  (P.extend({
    cssHooks: {
      opacity: {
        get: function (t, e) {
          if (e) {
            t = Qt(t, "opacity");
            return "" === t ? "1" : t;
          }
        },
      },
    },
    cssNumber: {
      animationIterationCount: !0,
      columnCount: !0,
      fillOpacity: !0,
      flexGrow: !0,
      flexShrink: !0,
      fontWeight: !0,
      gridArea: !0,
      gridColumn: !0,
      gridColumnEnd: !0,
      gridColumnStart: !0,
      gridRow: !0,
      gridRowEnd: !0,
      gridRowStart: !0,
      lineHeight: !0,
      opacity: !0,
      order: !0,
      orphans: !0,
      widows: !0,
      zIndex: !0,
      zoom: !0,
    },
    cssProps: {},
    style: function (t, e, i, n) {
      if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
        var o,
          r,
          s,
          a = U(e),
          l = ie.test(e),
          c = t.style;
        if (
          (l || (e = te(a)), (s = P.cssHooks[e] || P.cssHooks[a]), void 0 === i)
        )
          return s && "get" in s && void 0 !== (o = s.get(t, !1, n)) ? o : c[e];
        ("string" == (r = typeof i) &&
          (o = et.exec(i)) &&
          o[1] &&
          ((i = at(t, e, o)), (r = "number")),
          null != i &&
            i == i &&
            ("number" !== r ||
              l ||
              (i += (o && o[3]) || (P.cssNumber[a] ? "" : "px")),
            y.clearCloneStyle ||
              "" !== i ||
              0 !== e.indexOf("background") ||
              (c[e] = "inherit"),
            (s && "set" in s && void 0 === (i = s.set(t, i, n))) ||
              (l ? c.setProperty(e, i) : (c[e] = i))));
      }
    },
    css: function (t, e, i, n) {
      var o,
        r = U(e);
      return (
        ie.test(e) || (e = te(r)),
        "normal" ===
          (o =
            void 0 ===
            (o =
              (r = P.cssHooks[e] || P.cssHooks[r]) && "get" in r
                ? r.get(t, !0, i)
                : o)
              ? Qt(t, e, n)
              : o) &&
          e in oe &&
          (o = oe[e]),
        "" === i || i
          ? ((e = parseFloat(o)), !0 === i || isFinite(e) ? e || 0 : o)
          : o
      );
    },
  }),
    P.each(["height", "width"], function (t, a) {
      P.cssHooks[a] = {
        get: function (t, e, i) {
          if (e)
            return !ee.test(P.css(t, "display")) ||
              (t.getClientRects().length && t.getBoundingClientRect().width)
              ? ae(t, a, i)
              : Bt(t, ne, function () {
                  return ae(t, a, i);
                });
        },
        set: function (t, e, i) {
          var n,
            o = Ot(t),
            r = !y.scrollboxSize() && "absolute" === o.position,
            s = (r || i) && "border-box" === P.css(t, "boxSizing", !1, o),
            i = i ? se(t, a, i, s, o) : 0;
          return (
            s &&
              r &&
              (i -= Math.ceil(
                t["offset" + a[0].toUpperCase() + a.slice(1)] -
                  parseFloat(o[a]) -
                  se(t, a, "border", !1, o) -
                  0.5,
              )),
            i &&
              (n = et.exec(e)) &&
              "px" !== (n[3] || "px") &&
              ((t.style[a] = e), (e = P.css(t, a))),
            re(0, e, i)
          );
        },
      };
    }),
    (P.cssHooks.marginLeft = Yt(y.reliableMarginLeft, function (t, e) {
      if (e)
        return (
          (parseFloat(Qt(t, "marginLeft")) ||
            t.getBoundingClientRect().left -
              Bt(t, { marginLeft: 0 }, function () {
                return t.getBoundingClientRect().left;
              })) + "px"
        );
    })),
    P.each({ margin: "", padding: "", border: "Width" }, function (o, r) {
      ((P.cssHooks[o + r] = {
        expand: function (t) {
          for (
            var e = 0, i = {}, n = "string" == typeof t ? t.split(" ") : [t];
            e < 4;
            e++
          )
            i[o + it[e] + r] = n[e] || n[e - 2] || n[0];
          return i;
        },
      }),
        "margin" !== o && (P.cssHooks[o + r].set = re));
    }),
    P.fn.extend({
      css: function (t, e) {
        return z(
          this,
          function (t, e, i) {
            var n,
              o,
              r = {},
              s = 0;
            if (Array.isArray(e)) {
              for (n = Ot(t), o = e.length; s < o; s++)
                r[e[s]] = P.css(t, e[s], !1, n);
              return r;
            }
            return void 0 !== i ? P.style(t, e, i) : P.css(t, e);
          },
          t,
          e,
          1 < arguments.length,
        );
      },
    }),
    (((P.Tween = le).prototype = {
      constructor: le,
      init: function (t, e, i, n, o, r) {
        ((this.elem = t),
          (this.prop = i),
          (this.easing = o || P.easing._default),
          (this.options = e),
          (this.start = this.now = this.cur()),
          (this.end = n),
          (this.unit = r || (P.cssNumber[i] ? "" : "px")));
      },
      cur: function () {
        var t = le.propHooks[this.prop];
        return (t && t.get ? t : le.propHooks._default).get(this);
      },
      run: function (t) {
        var e,
          i = le.propHooks[this.prop];
        return (
          this.options.duration
            ? (this.pos = e =
                P.easing[this.easing](
                  t,
                  this.options.duration * t,
                  0,
                  1,
                  this.options.duration,
                ))
            : (this.pos = e = t),
          (this.now = (this.end - this.start) * e + this.start),
          this.options.step &&
            this.options.step.call(this.elem, this.now, this),
          (i && i.set ? i : le.propHooks._default).set(this),
          this
        );
      },
    }).init.prototype = le.prototype),
    ((le.propHooks = {
      _default: {
        get: function (t) {
          return 1 !== t.elem.nodeType ||
            (null != t.elem[t.prop] && null == t.elem.style[t.prop])
            ? t.elem[t.prop]
            : (t = P.css(t.elem, t.prop, "")) && "auto" !== t
              ? t
              : 0;
        },
        set: function (t) {
          P.fx.step[t.prop]
            ? P.fx.step[t.prop](t)
            : 1 !== t.elem.nodeType ||
                (!P.cssHooks[t.prop] && null == t.elem.style[te(t.prop)])
              ? (t.elem[t.prop] = t.now)
              : P.style(t.elem, t.prop, t.now + t.unit);
        },
      },
    }).scrollTop = le.propHooks.scrollLeft =
      {
        set: function (t) {
          t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now);
        },
      }),
    (P.easing = {
      linear: function (t) {
        return t;
      },
      swing: function (t) {
        return 0.5 - Math.cos(t * Math.PI) / 2;
      },
      _default: "swing",
    }),
    (P.fx = le.prototype.init),
    (P.fx.step = {}));
  var ce,
    ue,
    he = /^(?:toggle|show|hide)$/,
    de = /queueHooks$/;
  function pe() {
    ue &&
      (!1 === C.hidden && k.requestAnimationFrame
        ? k.requestAnimationFrame(pe)
        : k.setTimeout(pe, P.fx.interval),
      P.fx.tick());
  }
  function fe() {
    return (
      k.setTimeout(function () {
        ce = void 0;
      }),
      (ce = Date.now())
    );
  }
  function me(t, e) {
    var i,
      n = 0,
      o = { height: t };
    for (e = e ? 1 : 0; n < 4; n += 2 - e)
      o["margin" + (i = it[n])] = o["padding" + i] = t;
    return (e && (o.opacity = o.width = t), o);
  }
  function ge(t, e, i) {
    for (
      var n,
        o = (ve.tweeners[e] || []).concat(ve.tweeners["*"]),
        r = 0,
        s = o.length;
      r < s;
      r++
    )
      if ((n = o[r].call(i, e, t))) return n;
  }
  function ve(o, t, e) {
    var i,
      r,
      n = 0,
      s = ve.prefilters.length,
      a = P.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (r) return !1;
        for (
          var t = ce || fe(),
            t = Math.max(0, c.startTime + c.duration - t),
            e = 1 - (t / c.duration || 0),
            i = 0,
            n = c.tweens.length;
          i < n;
          i++
        )
          c.tweens[i].run(e);
        return (
          a.notifyWith(o, [c, e, t]),
          e < 1 && n
            ? t
            : (n || a.notifyWith(o, [c, 1, 0]), a.resolveWith(o, [c]), !1)
        );
      },
      c = a.promise({
        elem: o,
        props: P.extend({}, t),
        opts: P.extend(!0, { specialEasing: {}, easing: P.easing._default }, e),
        originalProperties: t,
        originalOptions: e,
        startTime: ce || fe(),
        duration: e.duration,
        tweens: [],
        createTween: function (t, e) {
          t = P.Tween(
            o,
            c.opts,
            t,
            e,
            c.opts.specialEasing[t] || c.opts.easing,
          );
          return (c.tweens.push(t), t);
        },
        stop: function (t) {
          var e = 0,
            i = t ? c.tweens.length : 0;
          if (r) return this;
          for (r = !0; e < i; e++) c.tweens[e].run(1);
          return (
            t
              ? (a.notifyWith(o, [c, 1, 0]), a.resolveWith(o, [c, t]))
              : a.rejectWith(o, [c, t]),
            this
          );
        },
      }),
      u = c.props;
    for (
      (function (t, e) {
        var i, n, o, r, s;
        for (i in t)
          if (
            ((o = e[(n = U(i))]),
            (r = t[i]),
            Array.isArray(r) && ((o = r[1]), (r = t[i] = r[0])),
            i !== n && ((t[n] = r), delete t[i]),
            (s = P.cssHooks[n]) && ("expand" in s))
          )
            for (i in ((r = s.expand(r)), delete t[n], r))
              (i in t) || ((t[i] = r[i]), (e[i] = o));
          else e[n] = o;
      })(u, c.opts.specialEasing);
      n < s;
      n++
    )
      if ((i = ve.prefilters[n].call(c, o, u, c.opts)))
        return (
          m(i.stop) &&
            (P._queueHooks(c.elem, c.opts.queue).stop = i.stop.bind(i)),
          i
        );
    return (
      P.map(u, ge, c),
      m(c.opts.start) && c.opts.start.call(o, c),
      c
        .progress(c.opts.progress)
        .done(c.opts.done, c.opts.complete)
        .fail(c.opts.fail)
        .always(c.opts.always),
      P.fx.timer(P.extend(l, { elem: o, anim: c, queue: c.opts.queue })),
      c
    );
  }
  ((P.Animation = P.extend(ve, {
    tweeners: {
      "*": [
        function (t, e) {
          var i = this.createTween(t, e);
          return (at(i.elem, t, et.exec(e), i), i);
        },
      ],
    },
    tweener: function (t, e) {
      for (
        var i, n = 0, o = (t = m(t) ? ((e = t), ["*"]) : t.match(O)).length;
        n < o;
        n++
      )
        ((i = t[n]),
          (ve.tweeners[i] = ve.tweeners[i] || []),
          ve.tweeners[i].unshift(e));
    },
    prefilters: [
      function (t, e, i) {
        var n,
          o,
          r,
          s,
          a,
          l,
          c,
          u = "width" in e || "height" in e,
          h = this,
          d = {},
          p = t.style,
          f = t.nodeType && st(t),
          m = G.get(t, "fxshow");
        for (n in (i.queue ||
          (null == (s = P._queueHooks(t, "fx")).unqueued &&
            ((s.unqueued = 0),
            (a = s.empty.fire),
            (s.empty.fire = function () {
              s.unqueued || a();
            })),
          s.unqueued++,
          h.always(function () {
            h.always(function () {
              (s.unqueued--, P.queue(t, "fx").length || s.empty.fire());
            });
          })),
        e))
          if (((o = e[n]), he.test(o))) {
            if (
              (delete e[n],
              (r = r || "toggle" === o),
              o === (f ? "hide" : "show"))
            ) {
              if ("show" !== o || !m || void 0 === m[n]) continue;
              f = !0;
            }
            d[n] = (m && m[n]) || P.style(t, n);
          }
        if ((l = !P.isEmptyObject(e)) || !P.isEmptyObject(d))
          for (n in (u &&
            1 === t.nodeType &&
            ((i.overflow = [p.overflow, p.overflowX, p.overflowY]),
            null == (c = m && m.display) && (c = G.get(t, "display")),
            "none" === (u = P.css(t, "display")) &&
              (c
                ? (u = c)
                : (ct([t], !0),
                  (c = t.style.display || c),
                  (u = P.css(t, "display")),
                  ct([t]))),
            ("inline" === u || ("inline-block" === u && null != c)) &&
              "none" === P.css(t, "float") &&
              (l ||
                (h.done(function () {
                  p.display = c;
                }),
                null == c && ((u = p.display), (c = "none" === u ? "" : u))),
              (p.display = "inline-block"))),
          i.overflow &&
            ((p.overflow = "hidden"),
            h.always(function () {
              ((p.overflow = i.overflow[0]),
                (p.overflowX = i.overflow[1]),
                (p.overflowY = i.overflow[2]));
            })),
          (l = !1),
          d))
            (l ||
              (m
                ? "hidden" in m && (f = m.hidden)
                : (m = G.access(t, "fxshow", { display: c })),
              r && (m.hidden = !f),
              f && ct([t], !0),
              h.done(function () {
                for (n in (f || ct([t]), G.remove(t, "fxshow"), d))
                  P.style(t, n, d[n]);
              })),
              (l = ge(f ? m[n] : 0, n, h)),
              n in m ||
                ((m[n] = l.start), f && ((l.end = l.start), (l.start = 0))));
      },
    ],
    prefilter: function (t, e) {
      e ? ve.prefilters.unshift(t) : ve.prefilters.push(t);
    },
  })),
    (P.speed = function (t, e, i) {
      var n =
        t && "object" == typeof t
          ? P.extend({}, t)
          : {
              complete: i || (!i && e) || (m(t) && t),
              duration: t,
              easing: (i && e) || (e && !m(e) && e),
            };
      return (
        P.fx.off
          ? (n.duration = 0)
          : "number" != typeof n.duration &&
            (n.duration in P.fx.speeds
              ? (n.duration = P.fx.speeds[n.duration])
              : (n.duration = P.fx.speeds._default)),
        (null != n.queue && !0 !== n.queue) || (n.queue = "fx"),
        (n.old = n.complete),
        (n.complete = function () {
          (m(n.old) && n.old.call(this), n.queue && P.dequeue(this, n.queue));
        }),
        n
      );
    }),
    P.fn.extend({
      fadeTo: function (t, e, i, n) {
        return this.filter(st)
          .css("opacity", 0)
          .show()
          .end()
          .animate({ opacity: e }, t, i, n);
      },
      animate: function (e, t, i, n) {
        function o() {
          var t = ve(this, P.extend({}, e), s);
          (r || G.get(this, "finish")) && t.stop(!0);
        }
        var r = P.isEmptyObject(e),
          s = P.speed(t, i, n);
        return (
          (o.finish = o),
          r || !1 === s.queue ? this.each(o) : this.queue(s.queue, o)
        );
      },
      stop: function (o, t, r) {
        function s(t) {
          var e = t.stop;
          (delete t.stop, e(r));
        }
        return (
          "string" != typeof o && ((r = t), (t = o), (o = void 0)),
          t && this.queue(o || "fx", []),
          this.each(function () {
            var t = !0,
              e = null != o && o + "queueHooks",
              i = P.timers,
              n = G.get(this);
            if (e) n[e] && n[e].stop && s(n[e]);
            else for (e in n) n[e] && n[e].stop && de.test(e) && s(n[e]);
            for (e = i.length; e--; )
              i[e].elem !== this ||
                (null != o && i[e].queue !== o) ||
                (i[e].anim.stop(r), (t = !1), i.splice(e, 1));
            (!t && r) || P.dequeue(this, o);
          })
        );
      },
      finish: function (s) {
        return (
          !1 !== s && (s = s || "fx"),
          this.each(function () {
            var t,
              e = G.get(this),
              i = e[s + "queue"],
              n = e[s + "queueHooks"],
              o = P.timers,
              r = i ? i.length : 0;
            for (
              e.finish = !0,
                P.queue(this, s, []),
                n && n.stop && n.stop.call(this, !0),
                t = o.length;
              t--;
            )
              o[t].elem === this &&
                o[t].queue === s &&
                (o[t].anim.stop(!0), o.splice(t, 1));
            for (t = 0; t < r; t++)
              i[t] && i[t].finish && i[t].finish.call(this);
            delete e.finish;
          })
        );
      },
    }),
    P.each(["toggle", "show", "hide"], function (t, n) {
      var o = P.fn[n];
      P.fn[n] = function (t, e, i) {
        return null == t || "boolean" == typeof t
          ? o.apply(this, arguments)
          : this.animate(me(n, !0), t, e, i);
      };
    }),
    P.each(
      {
        slideDown: me("show"),
        slideUp: me("hide"),
        slideToggle: me("toggle"),
        fadeIn: { opacity: "show" },
        fadeOut: { opacity: "hide" },
        fadeToggle: { opacity: "toggle" },
      },
      function (t, n) {
        P.fn[t] = function (t, e, i) {
          return this.animate(n, t, e, i);
        };
      },
    ),
    (P.timers = []),
    (P.fx.tick = function () {
      var t,
        e = 0,
        i = P.timers;
      for (ce = Date.now(); e < i.length; e++)
        (t = i[e])() || i[e] !== t || i.splice(e--, 1);
      (i.length || P.fx.stop(), (ce = void 0));
    }),
    (P.fx.timer = function (t) {
      (P.timers.push(t), P.fx.start());
    }),
    (P.fx.interval = 13),
    (P.fx.start = function () {
      ue || ((ue = !0), pe());
    }),
    (P.fx.stop = function () {
      ue = null;
    }),
    (P.fx.speeds = { slow: 600, fast: 200, _default: 400 }),
    (P.fn.delay = function (n, t) {
      return (
        (n = (P.fx && P.fx.speeds[n]) || n),
        this.queue((t = t || "fx"), function (t, e) {
          var i = k.setTimeout(t, n);
          e.stop = function () {
            k.clearTimeout(i);
          };
        })
      );
    }),
    (h = C.createElement("input")),
    (tt = C.createElement("select").appendChild(C.createElement("option"))),
    (h.type = "checkbox"),
    (y.checkOn = "" !== h.value),
    (y.optSelected = tt.selected),
    ((h = C.createElement("input")).value = "t"),
    (h.type = "radio"),
    (y.radioValue = "t" === h.value));
  var be,
    ye = P.expr.attrHandle;
  (P.fn.extend({
    attr: function (t, e) {
      return z(this, P.attr, t, e, 1 < arguments.length);
    },
    removeAttr: function (t) {
      return this.each(function () {
        P.removeAttr(this, t);
      });
    },
  }),
    P.extend({
      attr: function (t, e, i) {
        var n,
          o,
          r = t.nodeType;
        if (3 !== r && 8 !== r && 2 !== r)
          return void 0 === t.getAttribute
            ? P.prop(t, e, i)
            : ((1 === r && P.isXMLDoc(t)) ||
                (o =
                  P.attrHooks[e.toLowerCase()] ||
                  (P.expr.match.bool.test(e) ? be : void 0)),
              void 0 !== i
                ? null === i
                  ? void P.removeAttr(t, e)
                  : o && "set" in o && void 0 !== (n = o.set(t, i, e))
                    ? n
                    : (t.setAttribute(e, i + ""), i)
                : !(o && "get" in o && null !== (n = o.get(t, e))) &&
                    null == (n = P.find.attr(t, e))
                  ? void 0
                  : n);
      },
      attrHooks: {
        type: {
          set: function (t, e) {
            if (!y.radioValue && "radio" === e && T(t, "input")) {
              var i = t.value;
              return (t.setAttribute("type", e), i && (t.value = i), e);
            }
          },
        },
      },
      removeAttr: function (t, e) {
        var i,
          n = 0,
          o = e && e.match(O);
        if (o && 1 === t.nodeType) for (; (i = o[n++]); ) t.removeAttribute(i);
      },
    }),
    (be = {
      set: function (t, e, i) {
        return (!1 === e ? P.removeAttr(t, i) : t.setAttribute(i, i), i);
      },
    }),
    P.each(P.expr.match.bool.source.match(/\w+/g), function (t, e) {
      var s = ye[e] || P.find.attr;
      ye[e] = function (t, e, i) {
        var n,
          o,
          r = e.toLowerCase();
        return (
          i ||
            ((o = ye[r]),
            (ye[r] = n),
            (n = null != s(t, e, i) ? r : null),
            (ye[r] = o)),
          n
        );
      };
    }));
  var we = /^(?:input|select|textarea|button)$/i,
    xe = /^(?:a|area)$/i;
  function ke(t) {
    return (t.match(O) || []).join(" ");
  }
  function Ce(t) {
    return (t.getAttribute && t.getAttribute("class")) || "";
  }
  function Pe(t) {
    return Array.isArray(t) ? t : ("string" == typeof t && t.match(O)) || [];
  }
  (P.fn.extend({
    prop: function (t, e) {
      return z(this, P.prop, t, e, 1 < arguments.length);
    },
    removeProp: function (t) {
      return this.each(function () {
        delete this[P.propFix[t] || t];
      });
    },
  }),
    P.extend({
      prop: function (t, e, i) {
        var n,
          o,
          r = t.nodeType;
        if (3 !== r && 8 !== r && 2 !== r)
          return (
            (1 === r && P.isXMLDoc(t)) ||
              ((e = P.propFix[e] || e), (o = P.propHooks[e])),
            void 0 !== i
              ? o && "set" in o && void 0 !== (n = o.set(t, i, e))
                ? n
                : (t[e] = i)
              : o && "get" in o && null !== (n = o.get(t, e))
                ? n
                : t[e]
          );
      },
      propHooks: {
        tabIndex: {
          get: function (t) {
            var e = P.find.attr(t, "tabindex");
            return e
              ? parseInt(e, 10)
              : we.test(t.nodeName) || (xe.test(t.nodeName) && t.href)
                ? 0
                : -1;
          },
        },
      },
      propFix: { for: "htmlFor", class: "className" },
    }),
    y.optSelected ||
      (P.propHooks.selected = {
        get: function (t) {
          t = t.parentNode;
          return (t && t.parentNode && t.parentNode.selectedIndex, null);
        },
        set: function (t) {
          t = t.parentNode;
          t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex);
        },
      }),
    P.each(
      [
        "tabIndex",
        "readOnly",
        "maxLength",
        "cellSpacing",
        "cellPadding",
        "rowSpan",
        "colSpan",
        "useMap",
        "frameBorder",
        "contentEditable",
      ],
      function () {
        P.propFix[this.toLowerCase()] = this;
      },
    ),
    P.fn.extend({
      addClass: function (e) {
        var t,
          i,
          n,
          o,
          r,
          s,
          a = 0;
        if (m(e))
          return this.each(function (t) {
            P(this).addClass(e.call(this, t, Ce(this)));
          });
        if ((t = Pe(e)).length)
          for (; (i = this[a++]); )
            if (((s = Ce(i)), (n = 1 === i.nodeType && " " + ke(s) + " "))) {
              for (r = 0; (o = t[r++]); )
                n.indexOf(" " + o + " ") < 0 && (n += o + " ");
              s !== (s = ke(n)) && i.setAttribute("class", s);
            }
        return this;
      },
      removeClass: function (e) {
        var t,
          i,
          n,
          o,
          r,
          s,
          a = 0;
        if (m(e))
          return this.each(function (t) {
            P(this).removeClass(e.call(this, t, Ce(this)));
          });
        if (!arguments.length) return this.attr("class", "");
        if ((t = Pe(e)).length)
          for (; (i = this[a++]); )
            if (((s = Ce(i)), (n = 1 === i.nodeType && " " + ke(s) + " "))) {
              for (r = 0; (o = t[r++]); )
                for (; -1 < n.indexOf(" " + o + " "); )
                  n = n.replace(" " + o + " ", " ");
              s !== (s = ke(n)) && i.setAttribute("class", s);
            }
        return this;
      },
      toggleClass: function (o, e) {
        var r = typeof o,
          s = "string" == r || Array.isArray(o);
        return "boolean" == typeof e && s
          ? e
            ? this.addClass(o)
            : this.removeClass(o)
          : m(o)
            ? this.each(function (t) {
                P(this).toggleClass(o.call(this, t, Ce(this), e), e);
              })
            : this.each(function () {
                var t, e, i, n;
                if (s)
                  for (e = 0, i = P(this), n = Pe(o); (t = n[e++]); )
                    i.hasClass(t) ? i.removeClass(t) : i.addClass(t);
                else
                  (void 0 !== o && "boolean" != r) ||
                    ((t = Ce(this)) && G.set(this, "__className__", t),
                    this.setAttribute &&
                      this.setAttribute(
                        "class",
                        (!t && !1 !== o && G.get(this, "__className__")) || "",
                      ));
              });
      },
      hasClass: function (t) {
        for (var e, i = 0, n = " " + t + " "; (e = this[i++]); )
          if (1 === e.nodeType && -1 < (" " + ke(Ce(e)) + " ").indexOf(n))
            return !0;
        return !1;
      },
    }));
  var _e = /\r/g;
  (P.fn.extend({
    val: function (e) {
      var i,
        t,
        n,
        o = this[0];
      return arguments.length
        ? ((n = m(e)),
          this.each(function (t) {
            1 === this.nodeType &&
              (null == (t = n ? e.call(this, t, P(this).val()) : e)
                ? (t = "")
                : "number" == typeof t
                  ? (t += "")
                  : Array.isArray(t) &&
                    (t = P.map(t, function (t) {
                      return null == t ? "" : t + "";
                    })),
              ((i =
                P.valHooks[this.type] ||
                P.valHooks[this.nodeName.toLowerCase()]) &&
                "set" in i &&
                void 0 !== i.set(this, t, "value")) ||
                (this.value = t));
          }))
        : o
          ? (i = P.valHooks[o.type] || P.valHooks[o.nodeName.toLowerCase()]) &&
            "get" in i &&
            void 0 !== (t = i.get(o, "value"))
            ? t
            : "string" == typeof (t = o.value)
              ? t.replace(_e, "")
              : null == t
                ? ""
                : t
          : void 0;
    },
  }),
    P.extend({
      valHooks: {
        option: {
          get: function (t) {
            var e = P.find.attr(t, "value");
            return null != e ? e : ke(P.text(t));
          },
        },
        select: {
          get: function (t) {
            for (
              var e,
                i = t.options,
                n = t.selectedIndex,
                o = "select-one" === t.type,
                r = o ? null : [],
                s = o ? n + 1 : i.length,
                a = n < 0 ? s : o ? n : 0;
              a < s;
              a++
            )
              if (
                ((e = i[a]).selected || a === n) &&
                !e.disabled &&
                (!e.parentNode.disabled || !T(e.parentNode, "optgroup"))
              ) {
                if (((e = P(e).val()), o)) return e;
                r.push(e);
              }
            return r;
          },
          set: function (t, e) {
            for (
              var i, n, o = t.options, r = P.makeArray(e), s = o.length;
              s--;
            )
              ((n = o[s]).selected =
                -1 < P.inArray(P.valHooks.option.get(n), r)) && (i = !0);
            return (i || (t.selectedIndex = -1), r);
          },
        },
      },
    }),
    P.each(["radio", "checkbox"], function () {
      ((P.valHooks[this] = {
        set: function (t, e) {
          if (Array.isArray(e))
            return (t.checked = -1 < P.inArray(P(t).val(), e));
        },
      }),
        y.checkOn ||
          (P.valHooks[this].get = function (t) {
            return null === t.getAttribute("value") ? "on" : t.value;
          }));
    }),
    (y.focusin = "onfocusin" in k));
  function Se(t) {
    t.stopPropagation();
  }
  var Te = /^(?:focusinfocus|focusoutblur)$/;
  (P.extend(P.event, {
    trigger: function (t, e, i, n) {
      var o,
        r,
        s,
        a,
        l,
        c,
        u,
        h = [i || C],
        d = b.call(t, "type") ? t.type : t,
        p = b.call(t, "namespace") ? t.namespace.split(".") : [],
        f = (u = r = i = i || C);
      if (
        3 !== i.nodeType &&
        8 !== i.nodeType &&
        !Te.test(d + P.event.triggered) &&
        (-1 < d.indexOf(".") && ((d = (p = d.split(".")).shift()), p.sort()),
        (a = d.indexOf(":") < 0 && "on" + d),
        ((t = t[P.expando]
          ? t
          : new P.Event(d, "object" == typeof t && t)).isTrigger = n ? 2 : 3),
        (t.namespace = p.join(".")),
        (t.rnamespace = t.namespace
          ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")
          : null),
        (t.result = void 0),
        t.target || (t.target = i),
        (e = null == e ? [t] : P.makeArray(e, [t])),
        (c = P.event.special[d] || {}),
        n || !c.trigger || !1 !== c.trigger.apply(i, e))
      ) {
        if (!n && !c.noBubble && !g(i)) {
          for (
            s = c.delegateType || d, Te.test(s + d) || (f = f.parentNode);
            f;
            f = f.parentNode
          )
            (h.push(f), (r = f));
          r === (i.ownerDocument || C) &&
            h.push(r.defaultView || r.parentWindow || k);
        }
        for (o = 0; (f = h[o++]) && !t.isPropagationStopped(); )
          ((u = f),
            (t.type = 1 < o ? s : c.bindType || d),
            (l =
              (G.get(f, "events") || Object.create(null))[t.type] &&
              G.get(f, "handle")) && l.apply(f, e),
            (l = a && f[a]) &&
              l.apply &&
              Q(f) &&
              ((t.result = l.apply(f, e)),
              !1 === t.result && t.preventDefault()));
        return (
          (t.type = d),
          n ||
            t.isDefaultPrevented() ||
            (c._default && !1 !== c._default.apply(h.pop(), e)) ||
            !Q(i) ||
            (a &&
              m(i[d]) &&
              !g(i) &&
              ((r = i[a]) && (i[a] = null),
              (P.event.triggered = d),
              t.isPropagationStopped() && u.addEventListener(d, Se),
              i[d](),
              t.isPropagationStopped() && u.removeEventListener(d, Se),
              (P.event.triggered = void 0),
              r && (i[a] = r))),
          t.result
        );
      }
    },
    simulate: function (t, e, i) {
      t = P.extend(new P.Event(), i, { type: t, isSimulated: !0 });
      P.event.trigger(t, null, e);
    },
  }),
    P.fn.extend({
      trigger: function (t, e) {
        return this.each(function () {
          P.event.trigger(t, e, this);
        });
      },
      triggerHandler: function (t, e) {
        var i = this[0];
        if (i) return P.event.trigger(t, e, i, !0);
      },
    }),
    y.focusin ||
      P.each({ focus: "focusin", blur: "focusout" }, function (i, n) {
        function o(t) {
          P.event.simulate(n, t.target, P.event.fix(t));
        }
        P.event.special[n] = {
          setup: function () {
            var t = this.ownerDocument || this.document || this,
              e = G.access(t, n);
            (e || t.addEventListener(i, o, !0), G.access(t, n, (e || 0) + 1));
          },
          teardown: function () {
            var t = this.ownerDocument || this.document || this,
              e = G.access(t, n) - 1;
            e
              ? G.access(t, n, e)
              : (t.removeEventListener(i, o, !0), G.remove(t, n));
          },
        };
      }));
  var He = k.location,
    Ie = { guid: Date.now() },
    Ee = /\?/;
  P.parseXML = function (t) {
    var e;
    if (!t || "string" != typeof t) return null;
    try {
      e = new k.DOMParser().parseFromString(t, "text/xml");
    } catch (t) {
      e = void 0;
    }
    return (
      (e && !e.getElementsByTagName("parsererror").length) ||
        P.error("Invalid XML: " + t),
      e
    );
  };
  var De = /\[\]$/,
    Ae = /\r?\n/g,
    Me = /^(?:submit|button|image|reset|file)$/i,
    Le = /^(?:input|select|textarea|keygen)/i;
  ((P.param = function (t, e) {
    function i(t, e) {
      ((e = m(e) ? e() : e),
        (o[o.length] =
          encodeURIComponent(t) +
          "=" +
          encodeURIComponent(null == e ? "" : e)));
    }
    var n,
      o = [];
    if (null == t) return "";
    if (Array.isArray(t) || (t.jquery && !P.isPlainObject(t)))
      P.each(t, function () {
        i(this.name, this.value);
      });
    else
      for (n in t)
        !(function i(n, t, o, r) {
          if (Array.isArray(t))
            P.each(t, function (t, e) {
              o || De.test(n)
                ? r(n, e)
                : i(
                    n +
                      "[" +
                      ("object" == typeof e && null != e ? t : "") +
                      "]",
                    e,
                    o,
                    r,
                  );
            });
          else if (o || "object" !== f(t)) r(n, t);
          else for (var e in t) i(n + "[" + e + "]", t[e], o, r);
        })(n, t[n], e, i);
    return o.join("&");
  }),
    P.fn.extend({
      serialize: function () {
        return P.param(this.serializeArray());
      },
      serializeArray: function () {
        return this.map(function () {
          var t = P.prop(this, "elements");
          return t ? P.makeArray(t) : this;
        })
          .filter(function () {
            var t = this.type;
            return (
              this.name &&
              !P(this).is(":disabled") &&
              Le.test(this.nodeName) &&
              !Me.test(t) &&
              (this.checked || !ut.test(t))
            );
          })
          .map(function (t, e) {
            var i = P(this).val();
            return null == i
              ? null
              : Array.isArray(i)
                ? P.map(i, function (t) {
                    return { name: e.name, value: t.replace(Ae, "\r\n") };
                  })
                : { name: e.name, value: i.replace(Ae, "\r\n") };
          })
          .get();
      },
    }));
  var Oe = /%20/g,
    Be = /#.*$/,
    $e = /([?&])_=[^&]*/,
    Ne = /^(.*?):[ \t]*([^\r\n]*)$/gm,
    Re = /^(?:GET|HEAD)$/,
    Fe = /^\/\//,
    je = {},
    ze = {},
    We = "*/".concat("*"),
    qe = C.createElement("a");
  function Ve(r) {
    return function (t, e) {
      "string" != typeof t && ((e = t), (t = "*"));
      var i,
        n = 0,
        o = t.toLowerCase().match(O) || [];
      if (m(e))
        for (; (i = o[n++]); )
          "+" === i[0]
            ? ((i = i.slice(1) || "*"), (r[i] = r[i] || []).unshift(e))
            : (r[i] = r[i] || []).push(e);
    };
  }
  function Ue(e, n, o, r) {
    var s = {},
      a = e === ze;
    function l(t) {
      var i;
      return (
        (s[t] = !0),
        P.each(e[t] || [], function (t, e) {
          e = e(n, o, r);
          return "string" != typeof e || a || s[e]
            ? a
              ? !(i = e)
              : void 0
            : (n.dataTypes.unshift(e), l(e), !1);
        }),
        i
      );
    }
    return l(n.dataTypes[0]) || (!s["*"] && l("*"));
  }
  function Qe(t, e) {
    var i,
      n,
      o = P.ajaxSettings.flatOptions || {};
    for (i in e) void 0 !== e[i] && ((o[i] ? t : (n = n || {}))[i] = e[i]);
    return (n && P.extend(!0, t, n), t);
  }
  ((qe.href = He.href),
    P.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: He.href,
        type: "GET",
        isLocal:
          /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
            He.protocol,
          ),
        global: !0,
        processData: !0,
        async: !0,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        accepts: {
          "*": We,
          text: "text/plain",
          html: "text/html",
          xml: "application/xml, text/xml",
          json: "application/json, text/javascript",
        },
        contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ },
        responseFields: {
          xml: "responseXML",
          text: "responseText",
          json: "responseJSON",
        },
        converters: {
          "* text": String,
          "text html": !0,
          "text json": JSON.parse,
          "text xml": P.parseXML,
        },
        flatOptions: { url: !0, context: !0 },
      },
      ajaxSetup: function (t, e) {
        return e ? Qe(Qe(t, P.ajaxSettings), e) : Qe(P.ajaxSettings, t);
      },
      ajaxPrefilter: Ve(je),
      ajaxTransport: Ve(ze),
      ajax: function (t, e) {
        "object" == typeof t && ((e = t), (t = void 0));
        var l,
          c,
          u,
          i,
          h,
          d,
          p,
          n,
          o,
          f = P.ajaxSetup({}, (e = e || {})),
          m = f.context || f,
          g = f.context && (m.nodeType || m.jquery) ? P(m) : P.event,
          v = P.Deferred(),
          b = P.Callbacks("once memory"),
          y = f.statusCode || {},
          r = {},
          s = {},
          a = "canceled",
          w = {
            readyState: 0,
            getResponseHeader: function (t) {
              var e;
              if (d) {
                if (!i)
                  for (i = {}; (e = Ne.exec(u)); )
                    i[e[1].toLowerCase() + " "] = (
                      i[e[1].toLowerCase() + " "] || []
                    ).concat(e[2]);
                e = i[t.toLowerCase() + " "];
              }
              return null == e ? null : e.join(", ");
            },
            getAllResponseHeaders: function () {
              return d ? u : null;
            },
            setRequestHeader: function (t, e) {
              return (
                null == d &&
                  ((t = s[t.toLowerCase()] = s[t.toLowerCase()] || t),
                  (r[t] = e)),
                this
              );
            },
            overrideMimeType: function (t) {
              return (null == d && (f.mimeType = t), this);
            },
            statusCode: function (t) {
              if (t)
                if (d) w.always(t[w.status]);
                else for (var e in t) y[e] = [y[e], t[e]];
              return this;
            },
            abort: function (t) {
              t = t || a;
              return (l && l.abort(t), x(0, t), this);
            },
          };
        if (
          (v.promise(w),
          (f.url = ((t || f.url || He.href) + "").replace(
            Fe,
            He.protocol + "//",
          )),
          (f.type = e.method || e.type || f.method || f.type),
          (f.dataTypes = (f.dataType || "*").toLowerCase().match(O) || [""]),
          null == f.crossDomain)
        ) {
          o = C.createElement("a");
          try {
            ((o.href = f.url),
              (o.href = o.href),
              (f.crossDomain =
                qe.protocol + "//" + qe.host != o.protocol + "//" + o.host));
          } catch (t) {
            f.crossDomain = !0;
          }
        }
        if (
          (f.data &&
            f.processData &&
            "string" != typeof f.data &&
            (f.data = P.param(f.data, f.traditional)),
          Ue(je, f, e, w),
          d)
        )
          return w;
        for (n in ((p = P.event && f.global) &&
          0 == P.active++ &&
          P.event.trigger("ajaxStart"),
        (f.type = f.type.toUpperCase()),
        (f.hasContent = !Re.test(f.type)),
        (c = f.url.replace(Be, "")),
        f.hasContent
          ? f.data &&
            f.processData &&
            0 ===
              (f.contentType || "").indexOf(
                "application/x-www-form-urlencoded",
              ) &&
            (f.data = f.data.replace(Oe, "+"))
          : ((o = f.url.slice(c.length)),
            f.data &&
              (f.processData || "string" == typeof f.data) &&
              ((c += (Ee.test(c) ? "&" : "?") + f.data), delete f.data),
            !1 === f.cache &&
              ((c = c.replace($e, "$1")),
              (o = (Ee.test(c) ? "&" : "?") + "_=" + Ie.guid++ + o)),
            (f.url = c + o)),
        f.ifModified &&
          (P.lastModified[c] &&
            w.setRequestHeader("If-Modified-Since", P.lastModified[c]),
          P.etag[c] && w.setRequestHeader("If-None-Match", P.etag[c])),
        ((f.data && f.hasContent && !1 !== f.contentType) || e.contentType) &&
          w.setRequestHeader("Content-Type", f.contentType),
        w.setRequestHeader(
          "Accept",
          f.dataTypes[0] && f.accepts[f.dataTypes[0]]
            ? f.accepts[f.dataTypes[0]] +
                ("*" !== f.dataTypes[0] ? ", " + We + "; q=0.01" : "")
            : f.accepts["*"],
        ),
        f.headers))
          w.setRequestHeader(n, f.headers[n]);
        if (f.beforeSend && (!1 === f.beforeSend.call(m, w, f) || d))
          return w.abort();
        if (
          ((a = "abort"),
          b.add(f.complete),
          w.done(f.success),
          w.fail(f.error),
          (l = Ue(ze, f, e, w)))
        ) {
          if (((w.readyState = 1), p && g.trigger("ajaxSend", [w, f]), d))
            return w;
          f.async &&
            0 < f.timeout &&
            (h = k.setTimeout(function () {
              w.abort("timeout");
            }, f.timeout));
          try {
            ((d = !1), l.send(r, x));
          } catch (t) {
            if (d) throw t;
            x(-1, t);
          }
        } else x(-1, "No Transport");
        function x(t, e, i, n) {
          var o,
            r,
            s,
            a = e;
          d ||
            ((d = !0),
            h && k.clearTimeout(h),
            (l = void 0),
            (u = n || ""),
            (w.readyState = 0 < t ? 4 : 0),
            (n = (200 <= t && t < 300) || 304 === t),
            i &&
              (s = (function (t, e, i) {
                for (
                  var n, o, r, s, a = t.contents, l = t.dataTypes;
                  "*" === l[0];
                )
                  (l.shift(),
                    void 0 === n &&
                      (n = t.mimeType || e.getResponseHeader("Content-Type")));
                if (n)
                  for (o in a)
                    if (a[o] && a[o].test(n)) {
                      l.unshift(o);
                      break;
                    }
                if (l[0] in i) r = l[0];
                else {
                  for (o in i) {
                    if (!l[0] || t.converters[o + " " + l[0]]) {
                      r = o;
                      break;
                    }
                    s = s || o;
                  }
                  r = r || s;
                }
                if (r) return (r !== l[0] && l.unshift(r), i[r]);
              })(f, w, i)),
            !n &&
              -1 < P.inArray("script", f.dataTypes) &&
              (f.converters["text script"] = function () {}),
            (s = (function (t, e, i, n) {
              var o,
                r,
                s,
                a,
                l,
                c = {},
                u = t.dataTypes.slice();
              if (u[1])
                for (s in t.converters) c[s.toLowerCase()] = t.converters[s];
              for (r = u.shift(); r; )
                if (
                  (t.responseFields[r] && (i[t.responseFields[r]] = e),
                  !l && n && t.dataFilter && (e = t.dataFilter(e, t.dataType)),
                  (l = r),
                  (r = u.shift()))
                )
                  if ("*" === r) r = l;
                  else if ("*" !== l && l !== r) {
                    if (!(s = c[l + " " + r] || c["* " + r]))
                      for (o in c)
                        if (
                          (a = o.split(" "))[1] === r &&
                          (s = c[l + " " + a[0]] || c["* " + a[0]])
                        ) {
                          !0 === s
                            ? (s = c[o])
                            : !0 !== c[o] && ((r = a[0]), u.unshift(a[1]));
                          break;
                        }
                    if (!0 !== s)
                      if (s && t.throws) e = s(e);
                      else
                        try {
                          e = s(e);
                        } catch (t) {
                          return {
                            state: "parsererror",
                            error: s
                              ? t
                              : "No conversion from " + l + " to " + r,
                          };
                        }
                  }
              return { state: "success", data: e };
            })(f, s, w, n)),
            n
              ? (f.ifModified &&
                  ((i = w.getResponseHeader("Last-Modified")) &&
                    (P.lastModified[c] = i),
                  (i = w.getResponseHeader("etag")) && (P.etag[c] = i)),
                204 === t || "HEAD" === f.type
                  ? (a = "nocontent")
                  : 304 === t
                    ? (a = "notmodified")
                    : ((a = s.state), (o = s.data), (n = !(r = s.error))))
              : ((r = a), (!t && a) || ((a = "error"), t < 0 && (t = 0))),
            (w.status = t),
            (w.statusText = (e || a) + ""),
            n ? v.resolveWith(m, [o, a, w]) : v.rejectWith(m, [w, a, r]),
            w.statusCode(y),
            (y = void 0),
            p && g.trigger(n ? "ajaxSuccess" : "ajaxError", [w, f, n ? o : r]),
            b.fireWith(m, [w, a]),
            p &&
              (g.trigger("ajaxComplete", [w, f]),
              --P.active || P.event.trigger("ajaxStop")));
        }
        return w;
      },
      getJSON: function (t, e, i) {
        return P.get(t, e, i, "json");
      },
      getScript: function (t, e) {
        return P.get(t, void 0, e, "script");
      },
    }),
    P.each(["get", "post"], function (t, o) {
      P[o] = function (t, e, i, n) {
        return (
          m(e) && ((n = n || i), (i = e), (e = void 0)),
          P.ajax(
            P.extend(
              { url: t, type: o, dataType: n, data: e, success: i },
              P.isPlainObject(t) && t,
            ),
          )
        );
      };
    }),
    P.ajaxPrefilter(function (t) {
      for (var e in t.headers)
        "content-type" === e.toLowerCase() &&
          (t.contentType = t.headers[e] || "");
    }),
    (P._evalUrl = function (t, e, i) {
      return P.ajax({
        url: t,
        type: "GET",
        dataType: "script",
        cache: !0,
        async: !1,
        global: !1,
        converters: { "text script": function () {} },
        dataFilter: function (t) {
          P.globalEval(t, e, i);
        },
      });
    }),
    P.fn.extend({
      wrapAll: function (t) {
        return (
          this[0] &&
            (m(t) && (t = t.call(this[0])),
            (t = P(t, this[0].ownerDocument).eq(0).clone(!0)),
            this[0].parentNode && t.insertBefore(this[0]),
            t
              .map(function () {
                for (var t = this; t.firstElementChild; )
                  t = t.firstElementChild;
                return t;
              })
              .append(this)),
          this
        );
      },
      wrapInner: function (i) {
        return m(i)
          ? this.each(function (t) {
              P(this).wrapInner(i.call(this, t));
            })
          : this.each(function () {
              var t = P(this),
                e = t.contents();
              e.length ? e.wrapAll(i) : t.append(i);
            });
      },
      wrap: function (e) {
        var i = m(e);
        return this.each(function (t) {
          P(this).wrapAll(i ? e.call(this, t) : e);
        });
      },
      unwrap: function (t) {
        return (
          this.parent(t)
            .not("body")
            .each(function () {
              P(this).replaceWith(this.childNodes);
            }),
          this
        );
      },
    }),
    (P.expr.pseudos.hidden = function (t) {
      return !P.expr.pseudos.visible(t);
    }),
    (P.expr.pseudos.visible = function (t) {
      return !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length);
    }),
    (P.ajaxSettings.xhr = function () {
      try {
        return new k.XMLHttpRequest();
      } catch (t) {}
    }));
  var Ye = { 0: 200, 1223: 204 },
    Ge = P.ajaxSettings.xhr();
  ((y.cors = !!Ge && "withCredentials" in Ge),
    (y.ajax = Ge = !!Ge),
    P.ajaxTransport(function (o) {
      var r, s;
      if (y.cors || (Ge && !o.crossDomain))
        return {
          send: function (t, e) {
            var i,
              n = o.xhr();
            if (
              (n.open(o.type, o.url, o.async, o.username, o.password),
              o.xhrFields)
            )
              for (i in o.xhrFields) n[i] = o.xhrFields[i];
            for (i in (o.mimeType &&
              n.overrideMimeType &&
              n.overrideMimeType(o.mimeType),
            o.crossDomain ||
              t["X-Requested-With"] ||
              (t["X-Requested-With"] = "XMLHttpRequest"),
            t))
              n.setRequestHeader(i, t[i]);
            ((r = function (t) {
              return function () {
                r &&
                  ((r =
                    s =
                    n.onload =
                    n.onerror =
                    n.onabort =
                    n.ontimeout =
                    n.onreadystatechange =
                      null),
                  "abort" === t
                    ? n.abort()
                    : "error" === t
                      ? "number" != typeof n.status
                        ? e(0, "error")
                        : e(n.status, n.statusText)
                      : e(
                          Ye[n.status] || n.status,
                          n.statusText,
                          "text" !== (n.responseType || "text") ||
                            "string" != typeof n.responseText
                            ? { binary: n.response }
                            : { text: n.responseText },
                          n.getAllResponseHeaders(),
                        ));
              };
            }),
              (n.onload = r()),
              (s = n.onerror = n.ontimeout = r("error")),
              void 0 !== n.onabort
                ? (n.onabort = s)
                : (n.onreadystatechange = function () {
                    4 === n.readyState &&
                      k.setTimeout(function () {
                        r && s();
                      });
                  }),
              (r = r("abort")));
            try {
              n.send((o.hasContent && o.data) || null);
            } catch (t) {
              if (r) throw t;
            }
          },
          abort: function () {
            r && r();
          },
        };
    }),
    P.ajaxPrefilter(function (t) {
      t.crossDomain && (t.contents.script = !1);
    }),
    P.ajaxSetup({
      accepts: {
        script:
          "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",
      },
      contents: { script: /\b(?:java|ecma)script\b/ },
      converters: {
        "text script": function (t) {
          return (P.globalEval(t), t);
        },
      },
    }),
    P.ajaxPrefilter("script", function (t) {
      (void 0 === t.cache && (t.cache = !1), t.crossDomain && (t.type = "GET"));
    }),
    P.ajaxTransport("script", function (i) {
      var n, o;
      if (i.crossDomain || i.scriptAttrs)
        return {
          send: function (t, e) {
            ((n = P("<script>")
              .attr(i.scriptAttrs || {})
              .prop({ charset: i.scriptCharset, src: i.url })
              .on(
                "load error",
                (o = function (t) {
                  (n.remove(),
                    (o = null),
                    t && e("error" === t.type ? 404 : 200, t.type));
                }),
              )),
              C.head.appendChild(n[0]));
          },
          abort: function () {
            o && o();
          },
        };
    }));
  var Xe = [],
    Ke = /(=)\?(?=&|$)|\?\?/;
  (P.ajaxSetup({
    jsonp: "callback",
    jsonpCallback: function () {
      var t = Xe.pop() || P.expando + "_" + Ie.guid++;
      return ((this[t] = !0), t);
    },
  }),
    P.ajaxPrefilter("json jsonp", function (t, e, i) {
      var n,
        o,
        r,
        s =
          !1 !== t.jsonp &&
          (Ke.test(t.url)
            ? "url"
            : "string" == typeof t.data &&
              0 ===
                (t.contentType || "").indexOf(
                  "application/x-www-form-urlencoded",
                ) &&
              Ke.test(t.data) &&
              "data");
      if (s || "jsonp" === t.dataTypes[0])
        return (
          (n = t.jsonpCallback =
            m(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback),
          s
            ? (t[s] = t[s].replace(Ke, "$1" + n))
            : !1 !== t.jsonp &&
              (t.url += (Ee.test(t.url) ? "&" : "?") + t.jsonp + "=" + n),
          (t.converters["script json"] = function () {
            return (r || P.error(n + " was not called"), r[0]);
          }),
          (t.dataTypes[0] = "json"),
          (o = k[n]),
          (k[n] = function () {
            r = arguments;
          }),
          i.always(function () {
            (void 0 === o ? P(k).removeProp(n) : (k[n] = o),
              t[n] && ((t.jsonpCallback = e.jsonpCallback), Xe.push(n)),
              r && m(o) && o(r[0]),
              (r = o = void 0));
          }),
          "script"
        );
    }),
    (y.createHTMLDocument =
      (((h = C.implementation.createHTMLDocument("").body).innerHTML =
        "<form></form><form></form>"),
      2 === h.childNodes.length)),
    (P.parseHTML = function (t, e, i) {
      return "string" != typeof t
        ? []
        : ("boolean" == typeof e && ((i = e), (e = !1)),
          e ||
            (y.createHTMLDocument
              ? (((n = (e =
                  C.implementation.createHTMLDocument("")).createElement(
                  "base",
                )).href = C.location.href),
                e.head.appendChild(n))
              : (e = C)),
          (n = !i && []),
          (i = H.exec(t))
            ? [e.createElement(i[1])]
            : ((i = vt([t], e, n)),
              n && n.length && P(n).remove(),
              P.merge([], i.childNodes)));
      var n;
    }),
    (P.fn.load = function (t, e, i) {
      var n,
        o,
        r,
        s = this,
        a = t.indexOf(" ");
      return (
        -1 < a && ((n = ke(t.slice(a))), (t = t.slice(0, a))),
        m(e)
          ? ((i = e), (e = void 0))
          : e && "object" == typeof e && (o = "POST"),
        0 < s.length &&
          P.ajax({ url: t, type: o || "GET", dataType: "html", data: e })
            .done(function (t) {
              ((r = arguments),
                s.html(n ? P("<div>").append(P.parseHTML(t)).find(n) : t));
            })
            .always(
              i &&
                function (t, e) {
                  s.each(function () {
                    i.apply(this, r || [t.responseText, e, t]);
                  });
                },
            ),
        this
      );
    }),
    (P.expr.pseudos.animated = function (e) {
      return P.grep(P.timers, function (t) {
        return e === t.elem;
      }).length;
    }),
    (P.offset = {
      setOffset: function (t, e, i) {
        var n,
          o,
          r,
          s,
          a = P.css(t, "position"),
          l = P(t),
          c = {};
        ("static" === a && (t.style.position = "relative"),
          (r = l.offset()),
          (n = P.css(t, "top")),
          (s = P.css(t, "left")),
          (s =
            ("absolute" === a || "fixed" === a) && -1 < (n + s).indexOf("auto")
              ? ((o = (a = l.position()).top), a.left)
              : ((o = parseFloat(n) || 0), parseFloat(s) || 0)),
          null != (e = m(e) ? e.call(t, i, P.extend({}, r)) : e).top &&
            (c.top = e.top - r.top + o),
          null != e.left && (c.left = e.left - r.left + s),
          "using" in e
            ? e.using.call(t, c)
            : ("number" == typeof c.top && (c.top += "px"),
              "number" == typeof c.left && (c.left += "px"),
              l.css(c)));
      },
    }),
    P.fn.extend({
      offset: function (e) {
        if (arguments.length)
          return void 0 === e
            ? this
            : this.each(function (t) {
                P.offset.setOffset(this, e, t);
              });
        var t,
          i = this[0];
        return i
          ? i.getClientRects().length
            ? ((t = i.getBoundingClientRect()),
              (i = i.ownerDocument.defaultView),
              { top: t.top + i.pageYOffset, left: t.left + i.pageXOffset })
            : { top: 0, left: 0 }
          : void 0;
      },
      position: function () {
        if (this[0]) {
          var t,
            e,
            i,
            n = this[0],
            o = { top: 0, left: 0 };
          if ("fixed" === P.css(n, "position")) e = n.getBoundingClientRect();
          else {
            for (
              e = this.offset(),
                i = n.ownerDocument,
                t = n.offsetParent || i.documentElement;
              t &&
              (t === i.body || t === i.documentElement) &&
              "static" === P.css(t, "position");
            )
              t = t.parentNode;
            t &&
              t !== n &&
              1 === t.nodeType &&
              (((o = P(t).offset()).top += P.css(t, "borderTopWidth", !0)),
              (o.left += P.css(t, "borderLeftWidth", !0)));
          }
          return {
            top: e.top - o.top - P.css(n, "marginTop", !0),
            left: e.left - o.left - P.css(n, "marginLeft", !0),
          };
        }
      },
      offsetParent: function () {
        return this.map(function () {
          for (
            var t = this.offsetParent;
            t && "static" === P.css(t, "position");
          )
            t = t.offsetParent;
          return t || nt;
        });
      },
    }),
    P.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (e, o) {
        var r = "pageYOffset" === o;
        P.fn[e] = function (t) {
          return z(
            this,
            function (t, e, i) {
              var n;
              return (
                g(t) ? (n = t) : 9 === t.nodeType && (n = t.defaultView),
                void 0 === i
                  ? n
                    ? n[o]
                    : t[e]
                  : void (n
                      ? n.scrollTo(r ? n.pageXOffset : i, r ? i : n.pageYOffset)
                      : (t[e] = i))
              );
            },
            e,
            t,
            arguments.length,
          );
        };
      },
    ),
    P.each(["top", "left"], function (t, i) {
      P.cssHooks[i] = Yt(y.pixelPosition, function (t, e) {
        if (e)
          return ((e = Qt(t, i)), Vt.test(e) ? P(t).position()[i] + "px" : e);
      });
    }),
    P.each({ Height: "height", Width: "width" }, function (s, a) {
      P.each(
        { padding: "inner" + s, content: a, "": "outer" + s },
        function (n, r) {
          P.fn[r] = function (t, e) {
            var i = arguments.length && (n || "boolean" != typeof t),
              o = n || (!0 === t || !0 === e ? "margin" : "border");
            return z(
              this,
              function (t, e, i) {
                var n;
                return g(t)
                  ? 0 === r.indexOf("outer")
                    ? t["inner" + s]
                    : t.document.documentElement["client" + s]
                  : 9 === t.nodeType
                    ? ((n = t.documentElement),
                      Math.max(
                        t.body["scroll" + s],
                        n["scroll" + s],
                        t.body["offset" + s],
                        n["offset" + s],
                        n["client" + s],
                      ))
                    : void 0 === i
                      ? P.css(t, e, o)
                      : P.style(t, e, i, o);
              },
              a,
              i ? t : void 0,
              i,
            );
          };
        },
      );
    }),
    P.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (t, e) {
        P.fn[e] = function (t) {
          return this.on(e, t);
        };
      },
    ),
    P.fn.extend({
      bind: function (t, e, i) {
        return this.on(t, null, e, i);
      },
      unbind: function (t, e) {
        return this.off(t, null, e);
      },
      delegate: function (t, e, i, n) {
        return this.on(e, t, i, n);
      },
      undelegate: function (t, e, i) {
        return 1 === arguments.length
          ? this.off(t, "**")
          : this.off(e, t || "**", i);
      },
      hover: function (t, e) {
        return this.mouseenter(t).mouseleave(e || t);
      },
    }),
    P.each(
      "blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(
        " ",
      ),
      function (t, i) {
        P.fn[i] = function (t, e) {
          return 0 < arguments.length
            ? this.on(i, null, t, e)
            : this.trigger(i);
        };
      },
    ));
  var Je = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  ((P.proxy = function (t, e) {
    var i, n;
    if (("string" == typeof e && ((n = t[e]), (e = t), (t = n)), m(t)))
      return (
        (i = a.call(arguments, 2)),
        ((n = function () {
          return t.apply(e || this, i.concat(a.call(arguments)));
        }).guid = t.guid =
          t.guid || P.guid++),
        n
      );
  }),
    (P.holdReady = function (t) {
      t ? P.readyWait++ : P.ready(!0);
    }),
    (P.isArray = Array.isArray),
    (P.parseJSON = JSON.parse),
    (P.nodeName = T),
    (P.isFunction = m),
    (P.isWindow = g),
    (P.camelCase = U),
    (P.type = f),
    (P.now = Date.now),
    (P.isNumeric = function (t) {
      var e = P.type(t);
      return ("number" === e || "string" === e) && !isNaN(t - parseFloat(t));
    }),
    (P.trim = function (t) {
      return null == t ? "" : (t + "").replace(Je, "");
    }),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return P;
      }));
  var Ze = k.jQuery,
    ti = k.$;
  return (
    (P.noConflict = function (t) {
      return (
        k.$ === P && (k.$ = ti),
        t && k.jQuery === P && (k.jQuery = Ze),
        P
      );
    }),
    void 0 === t && (k.jQuery = k.$ = P),
    P
  );
});
var H5P = (window.H5P = window.H5P || {});
((H5P.jQuery = jQuery.noConflict(!0)),
  (H5P.jQuery.fn.__originalLoad = H5P.jQuery.load),
  (H5P.jQuery.fn.load = function (t, e, i) {
    if ("function" != typeof t)
      return H5P.jQuery.fn.__originalLoad.apply(this, arguments);
    {
      console.warn("You are using a deprecated H5P library. Please upgrade!");
      let t = Array.prototype.slice.call(arguments);
      return (t.unshift("load"), H5P.jQuery.fn.on.apply(this, t));
    }
  }),
  ((H5P = window.H5P = window.H5P || {}).isFramed =
    window.self !== window.parent),
  (H5P.$window = H5P.jQuery(window)),
  (H5P.instances = []),
  document.documentElement.requestFullScreen
    ? (H5P.fullScreenBrowserPrefix = "")
    : document.documentElement.webkitRequestFullScreen
      ? ((H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i)),
        (H5P.safariBrowser =
          null === H5P.safariBrowser ? 0 : parseInt(H5P.safariBrowser[1])),
        (0 === H5P.safariBrowser || 6 < H5P.safariBrowser) &&
          (H5P.fullScreenBrowserPrefix = "webkit"))
      : document.documentElement.mozRequestFullScreen
        ? (H5P.fullScreenBrowserPrefix = "moz")
        : document.documentElement.msRequestFullscreen &&
          (H5P.fullScreenBrowserPrefix = "ms"),
  (H5P.opened = {}),
  (H5P.init = function (t) {
    (void 0 === H5P.$body && (H5P.$body = H5P.jQuery(document.body)),
      void 0 === H5P.fullscreenSupported &&
        (H5P.fullscreenSupported = !(
          H5PIntegration.fullscreenDisabled ||
          H5P.fullscreenDisabled ||
          (H5P.isFramed &&
            !1 !== H5P.externalEmbed &&
            !(
              document.fullscreenEnabled ||
              document.webkitFullscreenEnabled ||
              document.mozFullScreenEnabled
            ))
        )),
      void 0 === H5P.canHasFullScreen &&
        (H5P.canHasFullScreen = H5P.fullscreenSupported),
      H5P.jQuery(".h5p-content:not(.h5p-initialized)", t).each(function () {
        var e = H5P.jQuery(this).addClass("h5p-initialized"),
          i = H5P.jQuery('<div class="h5p-container"></div>').appendTo(e),
          o = e.data("content-id"),
          r = H5PIntegration.contents["cid-" + o];
        if (void 0 === r)
          return H5P.error(
            "No data for content id " + o + ". Perhaps the library is gone?",
          );
        var s = {
          library: r.library,
          params: JSON.parse(r.jsonContent),
          metadata: r.metadata,
        };
        H5P.getUserData(o, "state", function (t, e) {
          var n;
          e
            ? (s.userDatas = { state: e })
            : null === e &&
              H5PIntegration.saveFreq &&
              (delete r.contentUserData,
              (n = new H5P.Dialog(
                "content-user-data-reset",
                "Data Reset",
                "<p>" +
                  H5P.t("contentChanged") +
                  "</p><p>" +
                  H5P.t("startingOver") +
                  '</p><div class="h5p-dialog-ok-button" tabIndex="0" role="button">OK</div>',
                i,
              )),
              H5P.jQuery(n)
                .on("dialog-opened", function (t, e) {
                  function i(t) {
                    ("click" !== t.type && 32 !== t.which) ||
                      (n.close(), H5P.deleteUserData(o, "state", 0));
                  }
                  (e.find(".h5p-dialog-ok-button").click(i).keypress(i),
                    H5P.trigger(a, "resize"));
                })
                .on("dialog-closed", function () {
                  H5P.trigger(a, "resize");
                }),
              n.open());
        });
        var a = H5P.newRunnable(s, o, i, !0, { standalone: !0 });
        ((H5P.offlineRequestQueue = new H5P.OfflineRequestQueue({
          instance: a,
        })),
          1 == r.fullScreen &&
            H5P.fullscreenSupported &&
            H5P.jQuery(
              '<div class="h5p-content-controls"><div role="button" tabindex="0" class="h5p-enable-fullscreen" aria-label="' +
                H5P.t("fullscreen") +
                '" title="' +
                H5P.t("fullscreen") +
                '"></div></div>',
            )
              .prependTo(i)
              .children()
              .click(function () {
                H5P.fullScreen(i, a);
              })
              .keydown(function (t) {
                if (32 === t.which || 13 === t.which)
                  return (H5P.fullScreen(i, a), !1);
              }));
        var t,
          n,
          l,
          c,
          u,
          h,
          d,
          p = r.displayOptions,
          f = !1;
        (p.frame &&
          (p.copyright &&
            ((t = H5P.getCopyrights(a, s.params, o, s.metadata)) ||
              (p.copyright = !1)),
          (p = new H5P.ActionBar(p)),
          (n = p.getDOMElement()),
          p.on("reuse", function () {
            (H5P.openReuseDialog(n, r, s, a, o),
              a.triggerXAPI("accessed-reuse"));
          }),
          p.on("copyrights", function () {
            (new H5P.Dialog(
              "copyrights",
              H5P.t("copyrightInformation"),
              t,
              i,
            ).open(!0),
              a.triggerXAPI("accessed-copyright"));
          }),
          p.on("embed", function () {
            (H5P.openEmbedDialog(
              n,
              r.embedCode,
              r.resizeCode,
              { width: e.width(), height: e.height() },
              a,
            ),
              a.triggerXAPI("accessed-embed"));
          }),
          p.hasActions() && ((f = !0), n.insertAfter(i))),
          e.addClass(f ? "h5p-frame" : "h5p-no-frame"),
          (H5P.opened[o] = new Date()),
          H5P.on(a, "finish", function (t) {
            void 0 !== t.data &&
              H5P.setFinished(o, t.data.score, t.data.maxScore, t.data.time);
          }),
          H5P.on(a, "xAPI", H5P.xAPICompletedListener),
          !1 !== H5PIntegration.saveFreq &&
            (a.getCurrentState instanceof Function ||
              "function" == typeof a.getCurrentState) &&
            ((c = function () {
              var t = a.getCurrentState();
              (void 0 !== t &&
                H5P.setUserData(o, "state", t, { deleteOnChange: !0 }),
                H5PIntegration.saveFreq &&
                  (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)));
            }),
            H5PIntegration.saveFreq &&
              (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)),
            H5P.on(a, "xAPI", function (t) {
              t = t.getVerb();
              ("completed" !== t && "progressed" !== t) ||
                (clearTimeout(l), (l = setTimeout(c, 3e3)));
            })),
          H5P.isFramed &&
            (!1 === H5P.externalEmbed
              ? ((h = window.frameElement),
                H5P.on(a, "resize", function () {
                  (clearTimeout(u),
                    (u = setTimeout(function () {
                      var t;
                      window.parent.H5P.isFullscreen ||
                        ((t = h.parentElement.style.height),
                        (h.parentElement.style.height =
                          h.parentElement.clientHeight + "px"),
                        h.getBoundingClientRect(),
                        (h.style.height = "1px"),
                        (h.style.height =
                          h.contentDocument.body.scrollHeight + "px"),
                        (h.parentElement.style.height = t));
                    }, 1)));
                }))
              : H5P.communicator &&
                ((d = !1),
                H5P.communicator.on("ready", function () {
                  H5P.communicator.send("hello");
                }),
                H5P.communicator.on("hello", function () {
                  ((d = !0),
                    (document.body.style.height = "auto"),
                    (document.body.style.overflow = "hidden"),
                    H5P.trigger(a, "resize"));
                }),
                H5P.communicator.on("resizePrepared", function () {
                  H5P.communicator.send("resize", {
                    scrollHeight: document.body.scrollHeight,
                  });
                }),
                H5P.communicator.on("resize", function () {
                  H5P.trigger(a, "resize");
                }),
                H5P.on(a, "resize", function () {
                  H5P.isFullscreen ||
                    (clearTimeout(u),
                    (u = setTimeout(function () {
                      d
                        ? H5P.communicator.send("prepareResize", {
                            scrollHeight: document.body.scrollHeight,
                            clientHeight: document.body.clientHeight,
                          })
                        : H5P.communicator.send("hello");
                    }, 0)));
                }))),
          (H5P.isFramed && !1 !== H5P.externalEmbed) ||
            H5P.jQuery(window.parent).resize(function () {
              (window.parent.H5P.isFullscreen, H5P.trigger(a, "resize"));
            }),
          H5P.instances.push(a),
          H5P.trigger(a, "resize"),
          e.addClass("using-mouse"),
          e.on("mousedown keydown keyup", function (t) {
            e.toggleClass("using-mouse", "mousedown" === t.type);
          }),
          H5P.externalDispatcher &&
            H5P.externalDispatcher.trigger("initialized"));
      }),
      H5P.jQuery("iframe.h5p-iframe:not(.h5p-initialized)", t).each(
        function () {
          var t = H5P.jQuery(this)
              .addClass("h5p-initialized")
              .data("content-id"),
            e = H5PIntegration.contents["cid-" + t],
            e =
              e && e.metadata && e.metadata.defaultLanguage
                ? e.metadata.defaultLanguage
                : "en";
          (this.contentDocument.open(),
            this.contentDocument.write(
              '<!doctype html><html class="h5p-iframe" lang="' +
                e +
                '"><head>' +
                H5P.getHeadTags(t) +
                '</head><body><div class="h5p-content" data-content-id="' +
                t +
                '"/></body></html>',
            ),
            this.contentDocument.close());
        },
      ));
  }),
  (H5P.getHeadTags = function (t) {
    function e(t) {
      for (var e = "", i = 0; i < t.length; i++)
        e += '<link rel="stylesheet" href="' + t[i] + '">';
      return e;
    }
    function i(t) {
      for (var e = "", i = 0; i < t.length; i++)
        e += '<script src="' + t[i] + '"><\/script>';
      return e;
    }
    return (
      '<base target="_parent">' +
      e(H5PIntegration.core.styles) +
      e(H5PIntegration.contents["cid-" + t].styles) +
      i(H5PIntegration.core.scripts) +
      i(H5PIntegration.contents["cid-" + t].scripts) +
      "<script>H5PIntegration = window.parent.H5PIntegration; var H5P = H5P || {}; H5P.externalEmbed = false;<\/script>"
    );
  }),
  (H5P.communicator =
    window.postMessage && window.addEventListener
      ? new (function () {
          var i = {};
          (window.addEventListener(
            "message",
            function (t) {
              window.parent === t.source &&
                "h5p" === t.data.context &&
                void 0 !== i[t.data.action] &&
                i[t.data.action](t.data);
            },
            !1,
          ),
            (this.on = function (t, e) {
              i[t] = e;
            }),
            (this.send = function (t, e) {
              (((e = void 0 === e ? {} : e).context = "h5p"),
                (e.action = t),
                window.parent.postMessage(e, "*"));
            }));
        })()
      : void 0),
  (H5P.semiFullScreen = function (t, e, i, n) {
    H5P.fullScreen(t, e, i, n, !0);
  }),
  (H5P.fullScreen = function (t, e, i, n, o) {
    if (void 0 === H5P.exitFullScreen) {
      if (H5P.isFramed && !1 === H5P.externalEmbed)
        return (
          window.parent.H5P.fullScreen(t, e, i, H5P.$body.get(), o),
          (H5P.isFullscreen = !0),
          (H5P.exitFullScreen = function () {
            window.parent.H5P.exitFullScreen();
          }),
          void H5P.on(e, "exitFullScreen", function () {
            ((H5P.isFullscreen = !1), (H5P.exitFullScreen = void 0));
          })
        );
      var r,
        s,
        a,
        l = t;
      (void 0 === n
        ? (r = H5P.$body)
        : ((s = (r = H5P.jQuery(n)).add(t.get())),
          (n = "#h5p-iframe-" + t.parent().data("content-id")),
          (t = (a = H5P.jQuery(n)).parent())),
        (s = t.add(H5P.$body).add(s)));
      function c(t) {
        (s.addClass(t), void 0 !== a && a.css("height", ""));
      }
      function u() {
        (H5P.trigger(e, "resize"),
          H5P.trigger(e, "focus"),
          H5P.trigger(e, "enterFullScreen"));
      }
      function h(t) {
        ((H5P.isFullscreen = !1),
          s.removeClass(t),
          H5P.trigger(e, "resize"),
          H5P.trigger(e, "focus"),
          (H5P.exitFullScreen = void 0) !== i && i(),
          H5P.trigger(e, "exitFullScreen"));
      }
      if (
        ((H5P.isFullscreen = !0),
        void 0 === H5P.fullScreenBrowserPrefix || !0 === o)
      ) {
        if (!H5P.isFramed) {
          c("h5p-semi-fullscreen");
          var d,
            p,
            f = H5P.jQuery(
              '<div role="button" tabindex="0" class="h5p-disable-fullscreen" title="' +
                H5P.t("disableFullscreen") +
                '" aria-label="' +
                H5P.t("disableFullscreen") +
                '"></div>',
            ).appendTo(l.find(".h5p-content-controls")),
            m = (H5P.exitFullScreen = function () {
              (d ? (p.content = d) : v.removeChild(p),
                f.remove(),
                r.unbind("keyup", g),
                h("h5p-semi-fullscreen"));
            }),
            g = function (t) {
              27 === t.keyCode && m();
            };
          (f.click(m), r.keyup(g));
          for (
            var v, b = document.getElementsByTagName("meta"), y = 0;
            y < b.length;
            y++
          )
            if ("viewport" === b[y].name) {
              ((p = b[y]), (d = p.content));
              break;
            }
          (d || ((p = document.createElement("meta")).name = "viewport"),
            (p.content =
              "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"),
            d || (v = document.getElementsByTagName("head")[0]).appendChild(p),
            u());
        }
      } else {
        c("h5p-fullscreen");
        var w,
          x =
            "ms" === H5P.fullScreenBrowserPrefix
              ? "MSFullscreenChange"
              : H5P.fullScreenBrowserPrefix + "fullscreenchange";
        (document.addEventListener(x, function () {
          return void 0 === w
            ? ((w = !1), void u())
            : (h("h5p-fullscreen"),
              void document.removeEventListener(x, arguments.callee, !1));
        }),
          "" === H5P.fullScreenBrowserPrefix
            ? t[0].requestFullScreen()
            : ((o =
                "ms" === H5P.fullScreenBrowserPrefix
                  ? "msRequestFullscreen"
                  : H5P.fullScreenBrowserPrefix + "RequestFullScreen"),
              (l =
                "webkit" === H5P.fullScreenBrowserPrefix &&
                0 === H5P.safariBrowser
                  ? Element.ALLOW_KEYBOARD_INPUT
                  : void 0),
              t[0][o](l)),
          (H5P.exitFullScreen = function () {
            "" === H5P.fullScreenBrowserPrefix
              ? document.exitFullscreen()
              : "moz" === H5P.fullScreenBrowserPrefix
                ? document.mozCancelFullScreen()
                : document[H5P.fullScreenBrowserPrefix + "ExitFullscreen"]();
          }));
      }
    }
  }),
  (function () {
    ((H5P.addQueryParameter = function (t, e) {
      let i, n;
      const o = t.split("?");
      return (
        (i = o[1]
          ? ((n = o[1].split("#")), o[0] + "?" + n[0] + "&")
          : ((n = o[0].split("#")), n[0] + "?")),
        (i += e),
        n[1] && (i += "#" + n[1]),
        i
      );
    }),
      (H5P.setSource = function (t, e, i) {
        let n = e.path;
        e = H5P.getCrossOrigin(e);
        (e
          ? ((t.crossOrigin = e),
            H5PIntegration.crossoriginCacheBuster &&
              (n = H5P.addQueryParameter(
                n,
                H5PIntegration.crossoriginCacheBuster,
              )))
          : t.removeAttribute("crossorigin"),
          (t.src = H5P.getPath(n, i)));
      }));
    function o(t) {
      return t.match(/^[a-z0-9]+:\/\//i);
    }
    ((H5P.getCrossOrigin = function (t) {
      return "object" != typeof t
        ? H5PIntegration.crossorigin &&
          H5PIntegration.crossoriginRegex &&
          t.match(H5PIntegration.crossoriginRegex)
          ? H5PIntegration.crossorigin
          : null
        : H5PIntegration.crossorigin && !o(t.path)
          ? H5PIntegration.crossorigin
          : void 0;
    }),
      (H5P.getPath = function (t, e) {
        if (o(t)) return t;
        var i,
          n = "#tmp" === t.substr(-4, 4);
        if (void 0 === e || n) {
          if (void 0 === window.H5PEditor) return;
          i = H5PEditor.filesPath;
        } else
          i =
            (i =
              void 0 !== H5PIntegration.contents &&
              H5PIntegration.contents["cid-" + e]
                ? H5PIntegration.contents["cid-" + e].contentUrl
                : i) || H5PIntegration.url + "/content/" + e;
        return (
          (i = !o(i)
            ? window.location.protocol + "//" + window.location.host + i
            : i) +
          "/" +
          t
        );
      }));
  })(),
  (H5P.getContentPath = function (t) {
    return H5PIntegration.url + "/content/" + t;
  }),
  (H5P.classFromName = function (t) {
    t = t.split(".");
    return this[t[t.length - 1]];
  }),
  (H5P.newRunnable = function (e, t, i, n, o) {
    var r, s;
    try {
      ((s = (a = e.library.split(" ", 2))[0]), (r = a[1].split(".", 2)));
    } catch (t) {
      return H5P.error("Invalid library string: " + e.library);
    }
    if (e.params instanceof Object != !0 || e.params instanceof Array == !0)
      return (
        H5P.error("Invalid library params for: " + e.library),
        H5P.error(e.params)
      );
    try {
      for (var a = a[0].split("."), l = window, c = 0; c < a.length; c++)
        l = l[a[c]];
      if ("function" != typeof l) throw null;
    } catch (t) {
      return H5P.error("Unable to find constructor for: " + e.library);
    }
    (void 0 === o && (o = {}),
      e.subContentId && (o.subContentId = e.subContentId),
      e.userDatas &&
        e.userDatas.state &&
        H5PIntegration.saveFreq &&
        (o.previousState = e.userDatas.state),
      e.metadata && (o.metadata = e.metadata));
    var u,
      h = o.standalone || !1;
    return (
      (l.prototype = H5P.jQuery.extend(
        {},
        H5P.ContentType(h).prototype,
        l.prototype,
      )),
      void 0 ===
        (u =
          -1 <
          H5P.jQuery.inArray(e.library, [
            "H5P.CoursePresentation 1.0",
            "H5P.CoursePresentation 1.1",
            "H5P.CoursePresentation 1.2",
            "H5P.CoursePresentation 1.3",
          ])
            ? new l(e.params, t)
            : new l(e.params, t, o)).$ && (u.$ = H5P.jQuery(u)),
      void 0 === u.contentId && (u.contentId = t),
      void 0 === u.subContentId &&
        e.subContentId &&
        (u.subContentId = e.subContentId),
      void 0 === u.parent && o && o.parent && (u.parent = o.parent),
      void 0 === u.libraryInfo &&
        (u.libraryInfo = {
          versionedName: e.library,
          versionedNameNoSpaces: s + "-" + r[0] + "." + r[1],
          machineName: s,
          majorVersion: r[0],
          minorVersion: r[1],
        }),
      void 0 !== i &&
        (i.toggleClass("h5p-standalone", h),
        u.attach(i),
        H5P.trigger(
          u,
          "domChanged",
          { $target: i, library: s, key: "newLibrary" },
          { bubbles: !0, external: !0 },
        ),
        (void 0 !== n && n) || H5P.trigger(u, "resize")),
      u
    );
  }),
  (H5P.error = function (t) {
    void 0 !== window.console &&
      void 0 !== console.error &&
      console.error(t.stack || t);
  }),
  (H5P.t = function (t, e, i) {
    if ((void 0 === i && (i = "H5P"), void 0 === H5PIntegration.l10n[i]))
      return '[Missing translation namespace "' + i + '"]';
    if (void 0 === H5PIntegration.l10n[i][t])
      return '[Missing translation "' + t + '" in "' + i + '"]';
    var n = H5PIntegration.l10n[i][t];
    if (void 0 !== e) for (var o in e) n = n.replace(o, e[o]);
    return n;
  }),
  (H5P.Dialog = function (t, e, i, n) {
    var o = this,
      r = H5P.jQuery(
        '<div class="h5p-popup-dialog h5p-' +
          t +
          '-dialog" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2>' +
          e +
          '</h2>                                <div class="h5p-scroll-content">' +
          i +
          '</div>                                <div class="h5p-close" role="button" tabindex="0" aria-label="' +
          H5P.t("close") +
          '" title="' +
          H5P.t("close") +
          '"></div>                              </div>                            </div>',
      )
        .insertAfter(n)
        .click(function (t) {
          (t && t.originalEvent && t.originalEvent.preventClosing) || o.close();
        })
        .children(".h5p-inner")
        .click(function (t) {
          t.originalEvent.preventClosing = !0;
        })
        .find(".h5p-close")
        .click(function () {
          o.close();
        })
        .keypress(function (t) {
          if (13 === t.which || 32 === t.which) return (o.close(), !1);
        })
        .end()
        .find("a")
        .click(function (t) {
          t.stopPropagation();
        })
        .end()
        .end();
    ((o.open = function (t) {
      (t && r.css("height", "100%"),
        setTimeout(function () {
          (r.addClass("h5p-open"),
            H5P.jQuery(o).trigger("dialog-opened", [r]),
            r.focus());
        }, 1));
    }),
      (o.close = function () {
        (r.removeClass("h5p-open"),
          setTimeout(function () {
            (r.remove(),
              H5P.jQuery(o).trigger("dialog-closed", [r]),
              n.attr("tabindex", "-1"),
              n.focus());
          }, 200));
      }));
  }),
  (H5P.getCopyrights = function (t, e, i, n) {
    var o;
    if (void 0 !== t.getCopyrights)
      try {
        o = t.getCopyrights();
      } catch (t) {}
    void 0 === o &&
      ((o = new H5P.ContentCopyrights()), H5P.findCopyrights(o, e, i));
    t = H5P.buildMetadataCopyrights(n, t.libraryInfo.machineName);
    return (
      void 0 !== t && o.addMediaInFront(t),
      (o = void 0 !== o ? o.toString() : o)
    );
  }),
  (H5P.findCopyrights = function (r, t, e, i) {
    var n, o, s, a;
    for (o in (i && ((i.params = t), l(i, i.machineName, e)), t))
      t.hasOwnProperty(o) &&
        ("overrideSettings" !== o
          ? ((s = t[o]) && s.library && "string" == typeof s.library
              ? (n = s.library.split(" ")[0])
              : s &&
                s.library &&
                "object" == typeof s.library &&
                (n =
                  s.library.library && "string" == typeof s.library.library
                    ? s.library.library.split(" ")[0]
                    : n),
            s instanceof Array
              ? H5P.findCopyrights(r, s, e)
              : s instanceof Object &&
                (l(s, n, e),
                void 0 === s.copyright ||
                void 0 === s.copyright.license ||
                void 0 === s.path ||
                void 0 === s.mime
                  ? H5P.findCopyrights(r, s, e)
                  : ((a = new H5P.MediaCopyright(s.copyright)),
                    void 0 !== s.width &&
                      void 0 !== s.height &&
                      a.setThumbnail(
                        new H5P.Thumbnail(
                          H5P.getPath(s.path, e),
                          s.width,
                          s.height,
                        ),
                      ),
                    r.addMedia(a))))
          : (console.warn(
              "The semantics field 'overrideSettings' is DEPRECATED and should not be used.",
            ),
            console.warn(t)));
    function l(t, e, i) {
      if (t.metadata) {
        const o = H5P.buildMetadataCopyrights(t.metadata, e);
        var n;
        void 0 !== o &&
          (t.params &&
            "Image" === t.params.contentName &&
            t.params.file &&
            ((n = t.params.file.path),
            (e = t.params.file.width),
            (t = t.params.file.height),
            o.setThumbnail(new H5P.Thumbnail(H5P.getPath(n, i), e, t))),
          r.addMedia(o));
      }
    }
  }),
  (H5P.buildMetadataCopyrights = function (t) {
    if (t && void 0 !== t.license && "U" !== t.license) {
      t = {
        contentType: t.contentType,
        title: t.title,
        author:
          t.authors && 0 < t.authors.length
            ? t.authors
                .map(function (t) {
                  return t.role ? t.name + " (" + t.role + ")" : t.name;
                })
                .join(", ")
            : void 0,
        source: t.source,
        year: t.yearFrom
          ? t.yearFrom + (t.yearTo ? "-" + t.yearTo : "")
          : void 0,
        license: t.license,
        version: t.licenseVersion,
        licenseExtras: t.licenseExtras,
        changes:
          t.changes && 0 < t.changes.length
            ? t.changes
                .map(function (t) {
                  return (
                    t.log +
                    (t.author ? ", " + t.author : "") +
                    (t.date ? ", " + t.date : "")
                  );
                })
                .join(" / ")
            : void 0,
      };
      return new H5P.MediaCopyright(t);
    }
  }),
  (H5P.openReuseDialog = function (t, i, n, o, r) {
    let e = "";
    (i.displayOptions.export &&
      (e +=
        '<button type="button" class="h5p-big-button h5p-download-button"><div class="h5p-button-title">Download as an .h5p file</div><div class="h5p-button-description">.h5p files may be uploaded to any web-site where H5P content may be created.</div></button>'),
      i.displayOptions.export &&
        i.displayOptions.copy &&
        (e += '<div class="h5p-horizontal-line-text"><span>or</span></div>'),
      i.displayOptions.copy &&
        (e +=
          '<button type="button" class="h5p-big-button h5p-copy-button"><div class="h5p-button-title">Copy content</div><div class="h5p-button-description">Copied content may be pasted anywhere this content type is supported on this website.</div></button>'));
    const s = new H5P.Dialog("reuse", H5P.t("reuseContent"), e, t);
    (H5P.jQuery(s)
      .on("dialog-opened", function (t, e) {
        (H5P.jQuery(
          '<a href="https://h5p.org/node/442225" target="_blank">More Info</a>',
        )
          .click(function (t) {
            t.stopPropagation();
          })
          .appendTo(e.find("h2")),
          e.find(".h5p-download-button").click(function () {
            ((window.location.href = i.exportUrl),
              o.triggerXAPI("downloaded"),
              s.close());
          }),
          e.find(".h5p-copy-button").click(function () {
            const t = new H5P.ClipboardItem(n);
            ((t.contentId = r),
              H5P.setClipboard(t),
              o.triggerXAPI("copied"),
              s.close(),
              H5P.attachToastTo(
                H5P.jQuery(".h5p-content:first")[0],
                H5P.t("contentCopied"),
                {
                  position: {
                    horizontal: "centered",
                    vertical: "centered",
                    noOverflowX: !0,
                  },
                },
              ));
          }),
          H5P.trigger(o, "resize"));
      })
      .on("dialog-closed", function () {
        H5P.trigger(o, "resize");
      }),
      s.open());
  }),
  (H5P.openEmbedDialog = function (t, e, i, c, u) {
    var h = e + i,
      t = new H5P.Dialog(
        "embed",
        H5P.t("embed"),
        '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' +
          H5P.t("size") +
          ': <input type="text" value="' +
          Math.ceil(c.width) +
          '" class="h5p-embed-size"/> × <input type="text" value="' +
          Math.ceil(c.height) +
          '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' +
          H5P.t("showAdvanced") +
          '</div><div class="h5p-expander-content"><p>' +
          H5P.t("advancedHelp") +
          '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' +
          i +
          "</textarea></div>",
        t,
      );
    (H5P.jQuery(t)
      .on("dialog-opened", function (t, i) {
        function n() {
          H5P.trigger(u, "resize");
        }
        function e(t, e) {
          return ((t = parseFloat(t.val())), isNaN(t) ? e : Math.ceil(t));
        }
        function o() {
          i.find(".h5p-embed-code-container:first").val(
            h.replace(":w", e(s, c.width)).replace(":h", e(a, c.height)),
          );
        }
        var r = i.find(".h5p-inner").find(".h5p-scroll-content"),
          s =
            (r.outerHeight(), r.innerHeight(), i.find(".h5p-embed-size:eq(0)")),
          a = i.find(".h5p-embed-size:eq(1)");
        (s.change(o),
          a.change(o),
          o(),
          i.find(".h5p-embed-code-container").each(function () {
            H5P.jQuery(this)
              .css("height", this.scrollHeight + "px")
              .focus(function () {
                H5P.jQuery(this).select();
              });
          }),
          i.find(".h5p-embed-code-container").eq(0).select(),
          n());
        function l() {
          var t = H5P.jQuery(this),
            e = t.next();
          (e.is(":visible")
            ? (t
                .removeClass("h5p-open")
                .text(H5P.t("showAdvanced"))
                .attr("aria-expanded", "true"),
              e.hide())
            : (t
                .addClass("h5p-open")
                .text(H5P.t("hideAdvanced"))
                .attr("aria-expanded", "false"),
              e.show()),
            i.find(".h5p-embed-code-container").each(function () {
              H5P.jQuery(this).css("height", this.scrollHeight + "px");
            }),
            n());
        }
        i.find(".h5p-expander")
          .click(l)
          .keypress(function (t) {
            if (32 === t.keyCode) return (l.apply(this), !1);
          });
      })
      .on("dialog-closed", function () {
        H5P.trigger(u, "resize");
      }),
      t.open());
  }),
  (H5P.attachToastTo = function (e, t, i) {
    if (void 0 === e || void 0 === t) return;
    function n(t) {
      -1 === o(t).indexOf(e) && (clearTimeout(l), r());
    }
    const o = function (t) {
        var e = (t.composedPath && t.composedPath()) || t.path,
          t = t.target;
        return null != e
          ? e.indexOf(window) < 0
            ? e.concat(window)
            : e
          : t === window
            ? [window]
            : [t].concat(
                (function t(e, i) {
                  i = i || [];
                  e = e.parentNode;
                  return e ? t(e, i.concat(e)) : i;
                })(t),
                window,
              );
      },
      r = function () {
        (document.removeEventListener("click", n),
          s.parentNode && s.parentNode.removeChild(s));
      };
    (((i = i || {}).style = i.style || "h5p-toast"),
      (i.duration = i.duration || 3e3));
    const s = document.createElement("div");
    (s.setAttribute("id", i.style),
      s.classList.add("h5p-toast-disabled"),
      s.classList.add(i.style));
    const a = document.createElement("span");
    ((a.innerHTML = t), s.appendChild(a), document.body.appendChild(s));
    t = (function (t, e, i) {
      (((i = i || {}).offsetHorizontal = i.offsetHorizontal || 0),
        (i.offsetVertical = i.offsetVertical || 0));
      var n = e.getBoundingClientRect(),
        o = t.getBoundingClientRect();
      let r = 0,
        s = 0;
      switch (i.horizontal) {
        case "before":
          r = o.left - n.width - i.offsetHorizontal;
          break;
        case "after":
          r = o.left + o.width + i.offsetHorizontal;
          break;
        case "left":
          r = o.left + i.offsetHorizontal;
          break;
        case "right":
          r = o.left + o.width - n.width - i.offsetHorizontal;
          break;
        default:
          r = o.left + o.width / 2 - n.width / 2 + i.offsetHorizontal;
      }
      switch (i.vertical) {
        case "above":
          s = o.top - n.height - i.offsetVertical;
          break;
        case "below":
          s = o.top + o.height + i.offsetVertical;
          break;
        case "top":
          s = o.top + i.offsetVertical;
          break;
        case "bottom":
          s = o.top + o.height - n.height - i.offsetVertical;
          break;
        case "centered":
          s = o.top + o.height / 2 - n.height / 2 + i.offsetVertical;
          break;
        default:
          s = o.top + o.height + i.offsetVertical;
      }
      const a = document.body;
      t = a.getBoundingClientRect();
      return (
        (i.noOverflowLeft || i.noOverflowX) && r < t.x && (r = t.x),
        (i.noOverflowRight || i.noOverflowX) &&
          r + n.width > t.x + t.width &&
          (r = t.x + t.width - n.width),
        (i.noOverflowTop || i.noOverflowY) && s < t.y && (s = t.y),
        (i.noOverflowBottom || i.noOverflowY) &&
          s + n.height > t.y + t.height &&
          (r = t.y + t.height - n.height),
        { left: r, top: s }
      );
    })(e, s, i.position);
    ((s.style.left = Math.round(t.left) + "px"),
      (s.style.top = Math.round(t.top) + "px"),
      s.classList.remove("h5p-toast-disabled"));
    const l = setTimeout(r, i.duration);
    document.addEventListener("click", n);
  }),
  (H5P.ContentCopyrights = function () {
    var i,
      n = [],
      o = [];
    ((this.setLabel = function (t) {
      i = t;
    }),
      (this.addMedia = function (t) {
        void 0 !== t && n.push(t);
      }),
      (this.addMediaInFront = function (t) {
        void 0 !== t && n.unshift(t);
      }),
      (this.addContent = function (t) {
        void 0 !== t && o.push(t);
      }),
      (this.toString = function () {
        for (var t = "", e = 0; e < n.length; e++) t += n[e];
        for (e = 0; e < o.length; e++) t += o[e];
        return (t =
          "" !== t
            ? '<div class="h5p-content-copyrights">' +
              (t = void 0 !== i ? "<h3>" + i + "</h3>" + t : t) +
              "</div>"
            : t);
      }));
  }),
  (H5P.MediaCopyright = function (t, e, i, n) {
    function o(t) {
      return void 0 === e || void 0 === e[t] ? H5P.t(t) : e[t];
    }
    function r(t, e) {
      var i,
        n = H5P.copyrightLicenses[t],
        o = "";
      (("PD" === t && e) || (o += n.hasOwnProperty("label") ? n.label : n),
        (i =
          n.versions &&
          (e =
            !n.versions.default || (e && n.versions[e])
              ? e
              : n.versions.default) &&
          n.versions[e]
            ? n.versions[e]
            : i) &&
          (o && (o += " "), (o += i.hasOwnProperty("label") ? i.label : i)),
        n.hasOwnProperty("link")
          ? (r = n.link.replace(
              ":version",
              n.linkVersions ? n.linkVersions[e] : e,
            ))
          : i && n.hasOwnProperty("link") && (r = i.link),
        r && (o = '<a href="' + r + '" target="_blank">' + o + "</a>"));
      var r = "";
      return (
        "PD" !== t && "C" !== t && (r += t),
        e && "CC0 1.0" !== e && (r && "GNU GPL" !== t && (r += " "), (r += e)),
        r && (o += " (" + r + ")"),
        "C" === t && (o += " &copy;"),
        o
      );
    }
    var s,
      a = new H5P.DefinitionList();
    if (void 0 !== t) {
      for (var l in n) n.hasOwnProperty(l) && (t[l] = n[l]);
      void 0 === i &&
        (i = [
          "contentType",
          "title",
          "license",
          "author",
          "year",
          "source",
          "licenseExtras",
          "changes",
        ]);
      for (var c = 0; c < i.length; c++) {
        var u,
          h = i[c];
        void 0 !== t[h] &&
          "" !== t[h] &&
          ((u = t[h]),
          "license" === h && (u = r(t.license, t.version)),
          "source" === h &&
            (u = u
              ? '<a href="' + u + '" target="_blank">' + u + "</a>"
              : void 0),
          a.add(new H5P.Field(o(h), u)));
      }
    }
    ((this.setThumbnail = function (t) {
      s = t;
    }),
      (this.undisclosed = function () {
        if (1 === a.size()) {
          var t = a.get(0);
          if (t.getLabel() === o("license") && t.getValue() === r("U"))
            return !0;
        }
        return !1;
      }),
      (this.toString = function () {
        var t = "";
        return this.undisclosed()
          ? t
          : (void 0 !== s && (t += s),
            "" !== (t += a)
              ? '<div class="h5p-media-copyright">' + t + "</div>"
              : t);
      }));
  }),
  (H5P.Thumbnail = function (t, e, i) {
    var n;
    (void 0 !== e && (n = Math.round((e / i) * 100)),
      (this.toString = function () {
        return (
          '<img src="' +
          t +
          '" alt="' +
          H5P.t("thumbnail") +
          '" class="h5p-thumbnail" height="100"' +
          (void 0 === n ? "" : ' width="' + n + '"') +
          "/>"
        );
      }));
  }),
  (H5P.Field = function (t, e) {
    ((this.getLabel = function () {
      return t;
    }),
      (this.getValue = function () {
        return e;
      }));
  }),
  (H5P.DefinitionList = function () {
    var n = [];
    ((this.add = function (t) {
      n.push(t);
    }),
      (this.size = function () {
        return n.length;
      }),
      (this.get = function (t) {
        return n[t];
      }),
      (this.toString = function () {
        for (var t = "", e = 0; e < n.length; e++) {
          var i = n[e];
          t += "<dt>" + i.getLabel() + "</dt><dd>" + i.getValue() + "</dd>";
        }
        return "" === t ? t : '<dl class="h5p-definition-list">' + t + "</dl>";
      }));
  }),
  (H5P.Coords = function (t, e, i, n) {
    return this instanceof H5P.Coords
      ? ((this.x = 0),
        (this.y = 0),
        (this.w = 1),
        (this.h = 1),
        "object" == typeof t
          ? ((this.x = t.x), (this.y = t.y), (this.w = t.w), (this.h = t.h))
          : (void 0 !== t && (this.x = t),
            void 0 !== e && (this.y = e),
            void 0 !== i && (this.w = i),
            void 0 !== n && (this.h = n)),
        this)
      : new H5P.Coords(t, e, i, n);
  }),
  (H5P.libraryFromString = function (t) {
    t = /(.+)\s(\d+)\.(\d+)$/g.exec(t);
    return (
      null !== t && {
        machineName: t[1],
        majorVersion: parseInt(t[2]),
        minorVersion: parseInt(t[3]),
      }
    );
  }),
  (H5P.getLibraryPath = function (t) {
    return void 0 !== H5PIntegration.urlLibraries
      ? H5PIntegration.urlLibraries + "/" + t
      : H5PIntegration.url + "/libraries/" + t;
  }),
  (H5P.cloneObject = function (t, e) {
    var i,
      n = t instanceof Array ? [] : {};
    for (i in t)
      t.hasOwnProperty(i) &&
        (void 0 !== e && e && "object" == typeof t[i]
          ? (n[i] = H5P.cloneObject(t[i], e))
          : (n[i] = t[i]));
    return n;
  }),
  (H5P.trim = function (t) {
    return t.replace(/^\s+|\s+$/g, "");
  }),
  (H5P.jsLoaded = function (t) {
    return (
      (H5PIntegration.loadedJs = H5PIntegration.loadedJs || []),
      -1 !== H5P.jQuery.inArray(t, H5PIntegration.loadedJs)
    );
  }),
  (H5P.cssLoaded = function (t) {
    return (
      (H5PIntegration.loadedCss = H5PIntegration.loadedCss || []),
      -1 !== H5P.jQuery.inArray(t, H5PIntegration.loadedCss)
    );
  }),
  (H5P.shuffleArray = function (t) {
    if (t instanceof Array) {
      var e,
        i,
        n,
        o = t.length;
      if (0 === o) return !1;
      for (; --o; )
        ((e = Math.floor(Math.random() * (o + 1))),
          (i = t[o]),
          (n = t[e]),
          (t[o] = n),
          (t[e] = i));
      return t;
    }
  }),
  (H5P.setFinished = function (t, e, i, n) {
    if (
      ("number" == typeof e || e instanceof Number) &&
      !0 === H5PIntegration.postUserStatistics
    ) {
      function o(t) {
        return Math.round(t.getTime() / 1e3);
      }
      const r = {
        contentId: t,
        score: e,
        maxScore: i,
        opened: o(H5P.opened[t]),
        finished: o(new Date()),
        time: n,
      };
      H5P.jQuery.post(H5PIntegration.ajax.setFinished, r).fail(function () {
        H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished, r);
      });
    }
  }),
  Array.prototype.indexOf ||
    (Array.prototype.indexOf = function (t) {
      for (var e = 0; e < this.length; e++) if (this[e] === t) return e;
      return -1;
    }),
  void 0 === String.prototype.trim &&
    (String.prototype.trim = function () {
      return H5P.trim(this);
    }),
  (H5P.trigger = function (t, e, i, n) {
    void 0 !== t.trigger
      ? t.trigger(e, i, n)
      : void 0 !== t.$ && void 0 !== t.$.trigger && t.$.trigger(e);
  }),
  (H5P.on = function (t, e, i) {
    void 0 !== t.on
      ? t.on(e, i)
      : void 0 !== t.$ && void 0 !== t.$.on && t.$.on(e, i);
  }),
  (H5P.createUUID = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (t) {
        var e = (16 * Math.random()) | 0;
        return ("x" === t ? e : (3 & e) | 8).toString(16);
      },
    );
  }),
  (H5P.createTitle = function (t, e) {
    if (!t) return "";
    void 0 === e && (e = 60);
    t = H5P.jQuery("<div></div>")
      .text(t.replace(/(<([^>]+)>)/gi, ""))
      .text();
    return (t = t.length > e ? t.substr(0, e - 3) + "..." : t);
  }),
  (function (l) {
    function a(t, e, i, n, o, r, s, a) {
      void 0 !== H5PIntegration.user
        ? ((a = {
            url: H5PIntegration.ajax.contentUserData
              .replace(":contentId", t)
              .replace(":dataType", e)
              .replace(":subContentId", i || 0),
            dataType: "json",
            async: void 0 === a || a,
          }),
          void 0 !== o
            ? ((a.type = "POST"),
              (a.data = {
                data: null === o ? 0 : o,
                preload: r ? 1 : 0,
                invalidate: s ? 1 : 0,
              }))
            : (a.type = "GET"),
          void 0 !== n &&
            ((a.error = function (t, e) {
              n(e);
            }),
            (a.success = function (t) {
              t.success
                ? !1 !== t.data && void 0 !== t.data
                  ? n(void 0, t.data)
                  : n()
                : n(t.message);
            })),
          l.ajax(a))
        : n("Not signed in.");
    }
    ((H5P.getUserData = function (t, i, n, o) {
      ((o = o || 0), (H5PIntegration.contents = H5PIntegration.contents || {}));
      var r = H5PIntegration.contents["cid-" + t] || {},
        s = r.contentUserData;
      if (s && s[o] && void 0 !== s[o][i])
        if ("RESET" !== s[o][i])
          try {
            n(void 0, JSON.parse(s[o][i]));
          } catch (t) {
            n(t);
          }
        else n(void 0, null);
      else
        a(t, i, o, function (t, e) {
          if (t || void 0 === e) n(t, e);
          else {
            (void 0 === r.contentUserData && (r.contentUserData = s = {}),
              void 0 === s[o] && (s[o] = {}),
              (s[o][i] = e));
            try {
              n(void 0, JSON.parse(e));
            } catch (t) {
              n(t);
            }
          }
        });
    }),
      (H5P.setUserData = function (t, e, i, n) {
        var o = H5P.jQuery.extend(
          !0,
          {},
          { subContentId: 0, preloaded: !0, deleteOnChange: !1, async: !0 },
          n,
        );
        try {
          i = JSON.stringify(i);
        } catch (t) {
          return void (o.errorCallback && o.errorCallback(t));
        }
        n = H5PIntegration.contents["cid-" + t];
        (n = void 0 === n ? (H5PIntegration.contents["cid-" + t] = {}) : n)
          .contentUserData || (n.contentUserData = {});
        n = n.contentUserData;
        (void 0 === n[o.subContentId] && (n[o.subContentId] = {}),
          i !== n[o.subContentId][e] &&
            ((n[o.subContentId][e] = i),
            a(
              t,
              e,
              o.subContentId,
              function (t) {
                o.errorCallback && t && o.errorCallback(t);
              },
              i,
              o.preloaded,
              o.deleteOnChange,
              o.async,
            )));
      }),
      (H5P.deleteUserData = function (t, e, i) {
        i = i || 0;
        var n = H5PIntegration.contents["cid-" + t].contentUserData;
        (n && n[i] && n[i][e] && delete n[i][e], a(t, e, i, void 0, null));
      }),
      (H5P.getContentForInstance = function (t) {
        t = "cid-" + t;
        return H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[t]
          ? H5PIntegration.contents[t]
          : void 0;
      }),
      (H5P.ClipboardItem = function (t, e, i) {
        var n = this;
        (e || ((e = "action"), (t = { action: t })),
          (n.specific = t),
          e && t[e] && (n.generic = e),
          i && (n.from = i),
          window.H5PEditor &&
            H5PEditor.contentId &&
            (n.contentId = H5PEditor.contentId),
          n.specific.width ||
            n.specific.height ||
            !n.generic ||
            ((i = n.specific[n.generic]).params.file &&
              i.params.file.width &&
              i.params.file.height &&
              ((n.width = 20),
              (n.height =
                (i.params.file.height / i.params.file.width) * n.width))));
      }),
      (H5P.clipboardify = function (t) {
        (t instanceof H5P.ClipboardItem || (t = new H5P.ClipboardItem(t)),
          H5P.setClipboard(t));
      }),
      (H5P.getClipboard = function () {
        return t();
      }),
      (H5P.setClipboard = function (t) {
        (localStorage.setItem("h5pClipboard", JSON.stringify(t)),
          H5P.externalDispatcher.trigger("datainclipboard", { reset: !1 }));
      }),
      (H5P.getLibraryConfig = function (t) {
        return H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[t]
          ? H5PIntegration.libraryConfig[t]
          : {};
      }));
    var t = function () {
        var e = localStorage.getItem("h5pClipboard");
        if (e) {
          try {
            e = JSON.parse(e);
          } catch (t) {
            return void console.error(
              "Unable to parse JSON from clipboard.",
              t,
            );
          }
          return (
            n(e.specific, function (t) {
              return "#tmp" === t.substr(-4, 4) ||
                !e.contentId ||
                t.match(/^https?:\/\//i)
                ? t
                : H5PEditor.contentId
                  ? "../" + e.contentId + "/" + t
                  : (H5PEditor.contentRelUrl || "../content/") +
                    e.contentId +
                    "/" +
                    t;
            }),
            e.generic && (e.generic = e.specific[e.generic]),
            e
          );
        }
      },
      n = function (t, e) {
        for (var i in t)
          t.hasOwnProperty(i) &&
            t[i] instanceof Object &&
            (void 0 !== (i = t[i]).path && void 0 !== i.mime
              ? (i.path = e(i.path))
              : (void 0 !== i.library &&
                  void 0 !== i.subContentId &&
                  delete i.subContentId,
                n(i, e)));
      };
    l(document).ready(function () {
      window.addEventListener("storage", function (t) {
        "h5pClipboard" === t.key &&
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: null === t.newValue,
          });
      });
      var o,
        t,
        e = {
          default: "4.0",
          "4.0": H5P.t("licenseCC40"),
          "3.0": H5P.t("licenseCC30"),
          2.5: H5P.t("licenseCC25"),
          "2.0": H5P.t("licenseCC20"),
          "1.0": H5P.t("licenseCC10"),
        };
      ((H5P.copyrightLicenses = {
        U: H5P.t("licenseU"),
        "CC BY": {
          label: H5P.t("licenseCCBY"),
          link: "http://creativecommons.org/licenses/by/:version",
          versions: e,
        },
        "CC BY-SA": {
          label: H5P.t("licenseCCBYSA"),
          link: "http://creativecommons.org/licenses/by-sa/:version",
          versions: e,
        },
        "CC BY-ND": {
          label: H5P.t("licenseCCBYND"),
          link: "http://creativecommons.org/licenses/by-nd/:version",
          versions: e,
        },
        "CC BY-NC": {
          label: H5P.t("licenseCCBYNC"),
          link: "http://creativecommons.org/licenses/by-nc/:version",
          versions: e,
        },
        "CC BY-NC-SA": {
          label: H5P.t("licenseCCBYNCSA"),
          link: "http://creativecommons.org/licenses/by-nc-sa/:version",
          versions: e,
        },
        "CC BY-NC-ND": {
          label: H5P.t("licenseCCBYNCND"),
          link: "http://creativecommons.org/licenses/by-nc-nd/:version",
          versions: e,
        },
        "CC0 1.0": {
          label: H5P.t("licenseCC010"),
          link: "https://creativecommons.org/publicdomain/zero/1.0/",
        },
        "GNU GPL": {
          label: H5P.t("licenseGPL"),
          link: "http://www.gnu.org/licenses/gpl-:version-standalone.html",
          linkVersions: { v3: "3.0", v2: "2.0", v1: "1.0" },
          versions: {
            default: "v3",
            v3: H5P.t("licenseV3"),
            v2: H5P.t("licenseV2"),
            v1: H5P.t("licenseV1"),
          },
        },
        PD: {
          label: H5P.t("licensePD"),
          versions: {
            "CC0 1.0": {
              label: H5P.t("licenseCC010"),
              link: "https://creativecommons.org/publicdomain/zero/1.0/",
            },
            "CC PDM": {
              label: H5P.t("licensePDM"),
              link: "https://creativecommons.org/publicdomain/mark/1.0/",
            },
          },
        },
        "ODC PDDL":
          '<a href="http://opendatacommons.org/licenses/pddl/1.0/" target="_blank">Public Domain Dedication and Licence</a>',
        "CC PDM": {
          label: H5P.t("licensePDM"),
          link: "https://creativecommons.org/publicdomain/mark/1.0/",
        },
        C: H5P.t("licenseC"),
      }),
        H5P.isFramed &&
          !1 === H5P.externalEmbed &&
          H5P.externalDispatcher.on("*", function (t) {
            window.parent.H5P.externalDispatcher.trigger.call(this, t);
          }),
        H5P.preventInit || H5P.init(document.body),
        !1 !== H5PIntegration.saveFreq &&
          ((o = 0),
          (t = function () {
            var t = new Date().getTime();
            if (250 < t - o) {
              o = t;
              for (var e = 0; e < H5P.instances.length; e++) {
                var i,
                  n = H5P.instances[e];
                !(
                  n.getCurrentState instanceof Function ||
                  "function" == typeof n.getCurrentState
                ) ||
                  (void 0 !== (i = n.getCurrentState()) &&
                    H5P.setUserData(n.contentId, "state", i, {
                      deleteOnChange: !0,
                      async: !1,
                    }));
              }
            }
          }),
          H5P.$window.one("beforeunload unload", function () {
            (H5P.$window.off("pagehide beforeunload unload"), t());
          }),
          H5P.$window.on("pagehide", t)));
    });
  })(H5P.jQuery),
  ((H5P = window.H5P = window.H5P || {}).Event = function (t, e, i) {
    ((this.type = t), (this.data = e));
    var n = !1,
      o = !1,
      r = !1;
    (!0 === (i = void 0 === i ? {} : i).bubbles && (n = !0),
      !0 === i.external && (o = !0),
      (this.preventBubbling = function () {
        n = !1;
      }),
      (this.getBubbles = function () {
        return n;
      }),
      (this.scheduleForExternal = function () {
        return !(!o || r) && (r = !0);
      }));
  }),
  (H5P.EventDispatcher = function () {
    var o = this,
      s = {};
    function n(t, e) {
      if (void 0 !== s[t])
        for (var i = s[t].slice(), n = 0; n < i.length; n++) {
          var o = i[n],
            r = o.thisArg || this;
          o.listener.call(r, e);
        }
    }
    ((this.on = function (t, e, i) {
      if ("function" != typeof e)
        throw TypeError("listener must be a function");
      o.trigger("newListener", { type: t, listener: e });
      i = { listener: e, thisArg: i };
      s[t] ? s[t].push(i) : (s[t] = [i]);
    }),
      (this.once = function (t, e, i) {
        if (!(e instanceof Function))
          throw TypeError("listener must be a function");
        var n = function (t) {
          (o.off(t.type, n), e.call(this, t));
        };
        o.on(t, n, i);
      }),
      (this.off = function (t, e) {
        if (void 0 !== e && !(e instanceof Function))
          throw TypeError("listener must be a function");
        if (void 0 !== s[t]) {
          if (void 0 === e)
            return (delete s[t], void o.trigger("removeListener", t));
          for (var i = 0; i < s[t].length; i++)
            if (s[t][i].listener === e) {
              (s[t].splice(i, 1),
                o.trigger("removeListener", t, { listener: e }));
              break;
            }
          s[t].length || delete s[t];
        }
      }),
      (this.trigger = function (t, e, i) {
        void 0 !== t &&
          (t instanceof String || "string" == typeof t
            ? (t = new H5P.Event(t, e, i))
            : void 0 !== e && (t.data = e),
          (e = t.scheduleForExternal()),
          n.call(this, t.type, t),
          n.call(this, "*", t),
          t.getBubbles() &&
            o.parent instanceof H5P.EventDispatcher &&
            (o.parent.trigger instanceof Function ||
              "function" == typeof o.parent.trigger) &&
            o.parent.trigger(t),
          e && H5P.externalDispatcher.trigger.call(this, t));
      }));
  }),
  ((H5P = window.H5P = window.H5P || {}).XAPIEvent = function () {
    H5P.Event.call(
      this,
      "xAPI",
      { statement: {} },
      { bubbles: !0, external: !0 },
    );
  }),
  (H5P.XAPIEvent.prototype = Object.create(H5P.Event.prototype)),
  (H5P.XAPIEvent.prototype.constructor = H5P.XAPIEvent),
  (H5P.XAPIEvent.prototype.setScoredResult = function (t, e, i, n, o) {
    ((this.data.statement.result = {}),
      void 0 !== t &&
        (void 0 === e
          ? (this.data.statement.result.score = { raw: t })
          : ((this.data.statement.result.score = { min: 0, max: e, raw: t }),
            0 < e &&
              (this.data.statement.result.score.scaled =
                Math.round((t / e) * 1e4) / 1e4))),
      (this.data.statement.result.completion =
        void 0 === n
          ? "completed" === this.getVerb() || "answered" === this.getVerb()
          : n),
      void 0 !== o && (this.data.statement.result.success = o),
      i &&
        i.activityStartTime &&
        ((i = Math.round((Date.now() - i.activityStartTime) / 10) / 100),
        (this.data.statement.result.duration = "PT" + i + "S")));
  }),
  (H5P.XAPIEvent.prototype.setVerb = function (t) {
    -1 !== H5P.jQuery.inArray(t, H5P.XAPIEvent.allowedXAPIVerbs)
      ? (this.data.statement.verb = {
          id: "http://adlnet.gov/expapi/verbs/" + t,
          display: { "en-US": t },
        })
      : void 0 !== t.id && (this.data.statement.verb = t);
  }),
  (H5P.XAPIEvent.prototype.getVerb = function (t) {
    var e = this.data.statement;
    return "verb" in e ? (!0 === t ? e.verb : e.verb.id.slice(31)) : null;
  }),
  (H5P.XAPIEvent.prototype.setObject = function (t) {
    t.contentId
      ? ((this.data.statement.object = {
          id: this.getContentXAPIId(t),
          objectType: "Activity",
          definition: {
            extensions: {
              "http://h5p.org/x-api/h5p-local-content-id": t.contentId,
            },
          },
        }),
        t.subContentId
          ? ((this.data.statement.object.definition.extensions[
              "http://h5p.org/x-api/h5p-subContentId"
            ] = t.subContentId),
            "function" == typeof t.getTitle &&
              (this.data.statement.object.definition.name = {
                "en-US": t.getTitle(),
              }))
          : (t = H5P.getContentForInstance(t.contentId)) &&
            t.metadata &&
            t.metadata.title &&
            (this.data.statement.object.definition.name = {
              "en-US": H5P.createTitle(t.metadata.title),
            }))
      : (this.data.statement.object = { definition: {} });
  }),
  (H5P.XAPIEvent.prototype.setContext = function (t) {
    (t.parent &&
      (t.parent.contentId || t.parent.subContentId) &&
      (this.data.statement.context = {
        contextActivities: {
          parent: [
            { id: this.getContentXAPIId(t.parent), objectType: "Activity" },
          ],
        },
      }),
      t.libraryInfo &&
        (void 0 === this.data.statement.context &&
          (this.data.statement.context = { contextActivities: {} }),
        (this.data.statement.context.contextActivities.category = [
          {
            id:
              "http://h5p.org/libraries/" + t.libraryInfo.versionedNameNoSpaces,
            objectType: "Activity",
          },
        ])));
  }),
  (H5P.XAPIEvent.prototype.setActor = function () {
    if (void 0 !== H5PIntegration.user)
      this.data.statement.actor = {
        name: H5PIntegration.user.name,
        mbox: "mailto:" + H5PIntegration.user.mail,
        objectType: "Agent",
      };
    else {
      var e;
      try {
        localStorage.H5PUserUUID
          ? (e = localStorage.H5PUserUUID)
          : ((e = H5P.createUUID()), (localStorage.H5PUserUUID = e));
      } catch (t) {
        e = "not-trackable-" + H5P.createUUID();
      }
      this.data.statement.actor = {
        account: { name: e, homePage: H5PIntegration.siteUrl },
        objectType: "Agent",
      };
    }
  }),
  (H5P.XAPIEvent.prototype.getMaxScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "max"]);
  }),
  (H5P.XAPIEvent.prototype.getScore = function () {
    return this.getVerifiedStatementValue(["result", "score", "raw"]);
  }),
  (H5P.XAPIEvent.prototype.getContentXAPIId = function (t) {
    var e;
    return (
      t.contentId &&
        H5PIntegration &&
        H5PIntegration.contents &&
        H5PIntegration.contents["cid-" + t.contentId] &&
        ((e = H5PIntegration.contents["cid-" + t.contentId].url),
        t.subContentId && (e += "?subContentId=" + t.subContentId)),
      e
    );
  }),
  (H5P.XAPIEvent.prototype.isFromChild = function () {
    var t = this.getVerifiedStatementValue([
      "context",
      "contextActivities",
      "parent",
      0,
      "id",
    ]);
    return !t || -1 === t.indexOf("subContentId");
  }),
  (H5P.XAPIEvent.prototype.getVerifiedStatementValue = function (t) {
    for (var e = this.data.statement, i = 0; i < t.length; i++) {
      if (void 0 === e[t[i]]) return null;
      e = e[t[i]];
    }
    return e;
  }),
  (H5P.XAPIEvent.allowedXAPIVerbs = [
    "answered",
    "asked",
    "attempted",
    "attended",
    "commented",
    "completed",
    "exited",
    "experienced",
    "failed",
    "imported",
    "initialized",
    "interacted",
    "launched",
    "mastered",
    "passed",
    "preferred",
    "progressed",
    "registered",
    "responded",
    "resumed",
    "scored",
    "shared",
    "suspended",
    "terminated",
    "voided",
    "downloaded",
    "copied",
    "accessed-reuse",
    "accessed-embed",
    "accessed-copyright",
  ]),
  ((H5P = window.H5P = window.H5P || {}).externalDispatcher =
    new H5P.EventDispatcher()),
  (H5P.EventDispatcher.prototype.triggerXAPI = function (t, e) {
    this.trigger(this.createXAPIEventTemplate(t, e));
  }),
  (H5P.EventDispatcher.prototype.createXAPIEventTemplate = function (t, e) {
    var i = new H5P.XAPIEvent();
    if ((i.setActor(), i.setVerb(t), void 0 !== e))
      for (var n in e) i.data.statement[n] = e[n];
    return (
      "object" in i.data.statement || i.setObject(this),
      "context" in i.data.statement || i.setContext(this),
      i
    );
  }),
  (H5P.EventDispatcher.prototype.triggerXAPICompleted = function (t, e, i) {
    this.triggerXAPIScored(t, e, "completed", !0, i);
  }),
  (H5P.EventDispatcher.prototype.triggerXAPIScored = function (t, e, i, n, o) {
    i = this.createXAPIEventTemplate(i);
    (i.setScoredResult(t, e, this, n, o), this.trigger(i));
  }),
  (H5P.EventDispatcher.prototype.setActivityStarted = function () {
    void 0 === this.activityStartTime &&
      (void 0 !== this.contentId &&
        void 0 !== H5PIntegration.contents &&
        void 0 !== H5PIntegration.contents["cid-" + this.contentId] &&
        this.triggerXAPI("attempted"),
      (this.activityStartTime = Date.now()));
  }),
  (H5P.xAPICompletedListener = function (t) {
    var e, i;
    ("completed" !== t.getVerb() && "answered" !== t.getVerb()) ||
      t.getVerifiedStatementValue(["context", "contextActivities", "parent"]) ||
      ((e = t.getScore()),
      (i = t.getMaxScore()),
      (t = t.getVerifiedStatementValue([
        "object",
        "definition",
        "extensions",
        "http://h5p.org/x-api/h5p-local-content-id",
      ])),
      H5P.setFinished(t, e, i));
  }) /*!@license js/h5p-content-type.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ContentType = function (t) {
    function e() {}
    return (
      ((e.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return t;
      }),
      (e.prototype.getLibraryFilePath = function (t) {
        return (
          H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + "/" + t
        );
      }),
      e
    );
  }) /*!@license js/h5p-confirmation-dialog.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ConfirmationDialog = (function (C) {
    "use strict";
    function t(i) {
      C.call(this);
      var n = this;
      H5P.ConfirmationDialog.uniqueId += 1;
      var t = H5P.ConfirmationDialog.uniqueId;
      function e(t) {
        (n.hide(), n.trigger("confirmed"), t.preventDefault());
      }
      function o(t) {
        (n.hide(), n.trigger("canceled"), t.preventDefault());
      }
      function r(t, e) {
        (t.focus(), e.preventDefault());
      }
      (((i = i || {}).headerText =
        i.headerText || H5P.t("confirmDialogHeader")),
        (i.dialogText = i.dialogText || H5P.t("confirmDialogBody")),
        (i.cancelText = i.cancelText || H5P.t("cancelLabel")),
        (i.confirmText = i.confirmText || H5P.t("confirmLabel")));
      var s = 32,
        a = 8,
        l = !1,
        c = document.createElement("div");
      c.classList.add("h5p-confirmation-dialog-background", "hidden", "hiding");
      var u = document.createElement("div");
      (u.classList.add("h5p-confirmation-dialog-popup", "hidden"),
        i.classes &&
          i.classes.forEach(function (t) {
            u.classList.add(t);
          }),
        u.setAttribute("role", "dialog"),
        u.setAttribute(
          "aria-labelledby",
          "h5p-confirmation-dialog-dialog-text-" + t,
        ),
        c.appendChild(u),
        u.addEventListener("keydown", function (t) {
          27 === t.which && o(t);
        }));
      var h = document.createElement("div");
      (h.classList.add("h5p-confirmation-dialog-header"), u.appendChild(h));
      var d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-header-text"),
        (d.innerHTML = i.headerText),
        h.appendChild(d));
      h = document.createElement("div");
      (h.classList.add("h5p-confirmation-dialog-body"), u.appendChild(h));
      d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-text"),
        (d.innerHTML = i.dialogText),
        (d.id = "h5p-confirmation-dialog-dialog-text-" + t),
        h.appendChild(d));
      d = document.createElement("div");
      (d.classList.add("h5p-confirmation-dialog-buttons"), h.appendChild(d));
      var p = document.createElement("button");
      (p.classList.add("h5p-core-cancel-button"),
        (p.textContent = i.cancelText));
      var f = document.createElement("button");
      (f.classList.add("h5p-core-button"),
        f.classList.add("h5p-confirmation-dialog-confirm-button"),
        (f.textContent = i.confirmText));
      var m,
        g,
        h = document.createElement("button");
      (h.classList.add("h5p-confirmation-dialog-exit"),
        h.setAttribute("aria-hidden", "true"),
        (h.tabIndex = -1),
        (h.title = i.cancelText),
        p.addEventListener("click", o),
        p.addEventListener("keydown", function (t) {
          32 === t.which ? o(t) : 9 === t.which && t.shiftKey && r(f, t);
        }),
        i.hideCancel ? d.classList.add("center") : d.appendChild(p),
        f.addEventListener("click", e),
        f.addEventListener("keydown", function (t) {
          32 === t.which
            ? e(t)
            : 9 !== t.which || t.shiftKey || r(i.hideCancel ? f : p, t);
        }),
        d.appendChild(f),
        h.addEventListener("click", o),
        h.addEventListener("keydown", function (t) {
          32 === t.which && o(t);
        }),
        i.hideExit || u.appendChild(h));
      var v,
        b = [],
        y = [];
      this.appendTo = function (t) {
        return ((m = t), this);
      };
      var w = function (t) {
          c.contains(t.target) || (t.preventDefault(), f.focus());
        },
        x = function (t) {
          for (
            var e = [], i = t.parentNode.children, n = 0;
            n < i.length;
            n += 1
          )
            ((e[n] = !!i[n].getAttribute("aria-hidden")),
              i[n] !== t && i[n].setAttribute("aria-hidden", !0));
          return e;
        },
        k = function (t, e) {
          for (var i = t.parentNode.children, n = 0; n < i.length; n += 1)
            i[n] === t || e[n] || i[n].removeAttribute("aria-hidden");
        };
      ((this.show = function (t) {
        var e;
        return (
          (v = document.activeElement),
          m.appendChild(c),
          (g = m.parentNode || m).addEventListener("focus", w, !0),
          (b = x(m)),
          (y = x(c)),
          c.classList.remove("hidden"),
          (e = t),
          (t = parseInt(u.style.top, 10)),
          (t =
            (t = (t = void 0 !== e ? e : t) || 0) + u.offsetHeight >
            m.offsetHeight
              ? m.offsetHeight - u.offsetHeight - a
              : t) -
            s <=
            0 && ((t = s + a), (l = !0)),
          (u.style.top = t + "px"),
          setTimeout(function () {
            (u.classList.remove("hidden"),
              c.classList.remove("hiding"),
              setTimeout(function () {
                var t;
                (f.focus(),
                  l &&
                    i.instance &&
                    ((t = parseInt(u.offsetHeight, 10) + s + 2 * a),
                    n.setViewPortMinimumHeight(t),
                    i.instance.trigger("resize"),
                    (l = !1)));
              }, 100));
          }, 0),
          this
        );
      }),
        (this.hide = function () {
          return (
            c.classList.add("hiding"),
            u.classList.add("hidden"),
            g.removeAttribute("aria-hidden"),
            g.removeEventListener("focus", w, !0),
            i.skipRestoreFocus || v.focus(),
            k(m, b),
            k(c, y),
            setTimeout(function () {
              (c.classList.add("hidden"),
                m.removeChild(c),
                n.setViewPortMinimumHeight(null));
            }, 100),
            this
          );
        }),
        (this.getElement = function () {
          return u;
        }),
        (this.getPreviouslyFocused = function () {
          return v;
        }),
        (this.setViewPortMinimumHeight = function (t) {
          (
            document.querySelector(".h5p-container") || document.body
          ).style.minHeight = "number" == typeof t ? t + "px" : t;
        }));
    }
    return ((t.prototype = Object.create(C.prototype)).constructor = t);
  })(H5P.EventDispatcher)),
  (H5P.ConfirmationDialog.uniqueId =
    -1) /*!@license js/h5p-action-bar.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ActionBar = (function (i) {
    "use strict";
    function t(t) {
      i.call(this);
      function e(t, e) {
        function i() {
          n.trigger(t);
        }
        (H5P.jQuery("<li/>", {
          class: "h5p-button h5p-noselect h5p-" + (e || t),
          role: "button",
          tabindex: 0,
          title: H5P.t(t + "Description"),
          html: H5P.t(t),
          on: {
            click: i,
            keypress: function (t) {
              32 === t.which && (i(), t.preventDefault());
            },
          },
          appendTo: r,
        }),
          (o = !0));
      }
      var n = this,
        o = !1,
        r = H5P.jQuery('<ul class="h5p-actions"></ul>');
      ((t.export || t.copy) && e("reuse", "export"),
        t.copyright && e("copyrights"),
        t.embed && e("embed"),
        t.icon &&
          (H5P.jQuery(
            '<li><a class="h5p-link" href="http://h5p.org" target="_blank" title="' +
              H5P.t("h5pDescription") +
              '"></a></li>',
          ).appendTo(r),
          (o = !0)),
        (n.getDOMElement = function () {
          return r;
        }),
        (n.hasActions = function () {
          return o;
        }));
    }
    return ((t.prototype = Object.create(i.prototype)).constructor = t);
  })(
    (H5P.jQuery, H5P.EventDispatcher),
  )) /*!@license js/request-queue.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.RequestQueue = (function (i, e) {
    function t(t) {
      (e.call(this),
        (this.processingQueue = !1),
        (this.showToast = (t = t || {}).showToast),
        (this.itemName = "requestQueue"));
    }
    return (
      (t.prototype.add = function (t, e) {
        if (!window.localStorage) return !1;
        let i = this.getStoredRequests();
        return (
          (i = i || []),
          i.push({ url: t, data: e }),
          window.localStorage.setItem(this.itemName, JSON.stringify(i)),
          this.trigger("requestQueued", {
            storedStatements: i,
            processingQueue: this.processingQueue,
          }),
          !0
        );
      }),
      (t.prototype.getStoredRequests = function () {
        if (!window.localStorage) return !1;
        var t = window.localStorage.getItem(this.itemName);
        return t ? JSON.parse(t) : [];
      }),
      (t.prototype.clearQueue = function () {
        return (
          !!window.localStorage &&
          (window.localStorage.removeItem(this.itemName), !0)
        );
      }),
      (t.prototype.resumeQueue = function () {
        if (!H5PIntegration || !window.navigator || !window.localStorage)
          return !1;
        if (this.processingQueue) return !1;
        var t = this.getStoredRequests(),
          e = t.length;
        return (
          this.clearQueue(),
          e
            ? ((this.processingQueue = !0), this.processQueue(t))
            : this.trigger("emptiedQueue", t),
          !0
        );
      }),
      (t.prototype.processQueue = function (t) {
        var e;
        t.length &&
          (this.trigger("processingQueue"),
          (e = t.shift()),
          i
            .post(e.url, e.data)
            .fail(this.onQueuedRequestFail.bind(this, e))
            .always(this.onQueuedRequestProcessed.bind(this, t)));
      }),
      (t.prototype.onQueuedRequestFail = function (t) {
        window.navigator.onLine || this.add(t.url, t.data);
      }),
      (t.prototype.onQueuedRequestProcessed = function (t) {
        t.length
          ? this.processQueue(t)
          : ((this.processingQueue = !1),
            (t = this.getStoredRequests()),
            this.trigger("queueEmptied", t));
      }),
      (t.prototype.displayToastMessage = function (t, e, i) {
        (this.showToast || e) &&
          ((i = H5P.jQuery.extend(
            !0,
            {},
            {
              position: {
                horizontal: "centered",
                vertical: "centered",
                noOverflowX: !0,
              },
            },
            i,
          )),
          H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0], t, i));
      }),
      t
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  (H5P.OfflineRequestQueue = (function (w, x) {
    return function (t) {
      const i = new w();
      i.clearQueue();
      let n = null;
      const o = [10, 20, 40, 60, 120, 300, 600];
      let r = -1,
        e = null,
        s = !1,
        a = !1,
        l = !1;
      t = t.instance;
      const c = new x({
          headerText: H5P.t("offlineDialogHeader"),
          dialogText: H5P.t("offlineDialogBody"),
          confirmText: H5P.t("offlineDialogRetryButtonLabel"),
          hideCancel: !0,
          hideExit: !0,
          classes: ["offline"],
          instance: t,
          skipRestoreFocus: !0,
        }),
        u = c.getElement(),
        h = document.createElement("div");
      (h.classList.add("count-down"),
        (h.innerHTML = H5P.t("offlineDialogRetryMessage").replace(
          ":num",
          '<span class="count-down-num">0</span>',
        )),
        u.querySelector(".h5p-confirmation-dialog-text").appendChild(h));
      const d = h.querySelector(".count-down-num"),
        p = document.createElement("div");
      p.classList.add("throbber-wrapper");
      const f = document.createElement("div");
      (f.classList.add("sending-requests-throbber"),
        p.appendChild(f),
        i.on(
          "requestQueued",
          function (t) {
            if (!t.data || !t.data.processingQueue) {
              if (!s) {
                const e = document.body.querySelector(".h5p-content");
                if (!e) return;
                (c.appendTo(e), e.appendChild(p), (s = !0));
              }
              b();
            }
          }.bind(this),
        ),
        i.on(
          "queueEmptied",
          function (t) {
            t.data && t.data.length
              ? b(!0)
              : (clearInterval(e),
                m(!1),
                (r = -1),
                a && (c.hide(), (a = !1)),
                i.displayToastMessage(H5P.t("offlineSuccessfulSubmit"), !0, {
                  position: { vertical: "top", offsetVertical: "100" },
                }));
          }.bind(this),
        ),
        c.on(
          "confirmed",
          function () {
            ((a = !1),
              setTimeout(function () {
                g();
              }, 100));
          }.bind(this),
        ),
        window.addEventListener(
          "online",
          function () {
            g();
          }.bind(this),
        ),
        window.addEventListener(
          "message",
          function (t) {
            window.parent === t.source &&
              "h5p" === t.data.context &&
              "queueRequest" === t.data.action &&
              this.add(t.data.url, t.data.data);
          }.bind(this),
        ));
      const m = function (t) {
          ((l = !l),
            void 0 !== t && (l = t),
            l && a && (c.hide(), (a = !1)),
            l ? p.classList.add("show") : p.classList.remove("show"));
        },
        g = function () {
          (clearInterval(e), m(!0), i.resumeQueue());
        },
        v = function () {
          ((r += 1), r >= o.length && (r = o.length - 1));
        },
        b = function (t) {
          a ||
            (m(!1),
            a ||
              (t
                ? setTimeout(function () {
                    c.show(0);
                  }, 100)
                : c.show(0)),
            (a = !0),
            (n = new Date().getTime()),
            v(),
            clearInterval(e),
            (e = setInterval(y, 100)));
        },
        y = function () {
          var t = new Date().getTime(),
            t = Math.floor((t - n) / 1e3);
          const e = o[r] - t;
          ((d.textContent = e.toString()), e <= 0 && g());
        };
      this.add = function (t, e) {
        if (window.navigator.onLine) return !1;
        i.add(t, e);
      };
    };
  })(H5P.RequestQueue, H5P.ConfirmationDialog)),
  /*!@license H5P.AdvancedText-1.1/text.js by Joubel licensed under unknown license*/ (H5P.AdvancedText =
    (function (n) {
      function t(t, e) {
        n.call(this);
        var i = void 0 === t.text ? "<em>New text</em>" : t.text;
        this.attach = function (t) {
          t.addClass("h5p-advanced-text").html(i);
        };
      }
      return ((t.prototype = Object.create(n.prototype)).constructor = t);
    })((H5P.jQuery, H5P.EventDispatcher))),
  /*!@license H5P.Column-1.16/scripts/h5p-column.js by Joubel licensed under MIT*/ (H5P.Column =
    (function (t) {
      function P(i, s, n) {
        var a,
          l = this;
        (t.call(l),
          void 0 === (i = i || {}).useSeparators && (i.useSeparators = !0),
          (this.contentData = n));
        function e() {
          a = document.createElement("div");
          for (var t = 0; t < i.content.length; t++) {
            var e = i.content[t];
            void 0 !== e.content &&
              (i.useSeparators &&
                v(e.content.library.split(" ")[0], e.useSeparator),
              m(e.content, g(t)));
          }
        }
        var o,
          c = [],
          u = [],
          h = 0,
          r = 0,
          d = [],
          p = function () {
            for (var t = 0, e = 0, i = 0; i < d.length; i++) {
              var n = d[i];
              ((t += n.getScore()), (e += n.getMaxScore()));
            }
            l.triggerXAPIScored(t, e, "completed");
          },
          f = function (e) {
            return function (t) {
              null !== t.getScore() &&
                (void 0 === d[e] && r++,
                (d[e] = t),
                ((t =
                  l.createXAPIEventTemplate(
                    "progressed",
                  )).data.statement.object.definition.extensions[
                  "http://id.tincanapi.com/extension/ending-point"
                ] = e + 1),
                l.trigger(t),
                r === h &&
                  setTimeout(function () {
                    p();
                  }, 0));
            };
          },
          m = function (t, e) {
            var i = document.createElement("div");
            i.classList.add("h5p-column-content");
            var n = t.library.split(" ")[0];
            "H5P.Video" === n && (t.params.visuals.fit = !1);
            var o,
              r,
              e = H5P.newRunnable(t, s, void 0, !0, e);
            ((o = "resize"),
              (r = l),
              e.on(o, function (t) {
                ((r.bubblingUpwards = !0),
                  r.trigger(o, t),
                  (r.bubblingUpwards = !1));
              }),
              P.isTask(e) && (e.on("xAPI", f(h)), h++),
              "H5P.Image" === n &&
                e.on("loaded", function () {
                  l.trigger("resize");
                }),
              c.push(e),
              u.push({
                hasAttached: !1,
                container: i,
                instanceIndex: c.length - 1,
              }),
              a.appendChild(i));
          },
          g = function (t) {
            var e = { parent: l };
            return (
              n.previousState &&
                n.previousState.instances &&
                n.previousState.instances[t] &&
                (e.previousState = n.previousState.instances[t]),
              e
            );
          },
          v = function (t, e) {
            var i,
              n = -1 !== _.indexOf(t);
            (void 0 !== o &&
              ((i = document.createElement("div")),
              n || -1 !== S.indexOf(t)
                ? o
                  ? "disabled" !== e && i.classList.add("h5p-column-ruler")
                  : "enabled" === e &&
                    (i.classList.add("h5p-column-ruler"),
                    i.classList.add("h5p-column-space-before"))
                : o
                  ? "enabled" === e &&
                    (i.classList.add("h5p-column-ruler"),
                    i.classList.add("h5p-column-space-after"))
                  : "enabled" === e
                    ? (i.classList.add("h5p-column-ruler"),
                      i.classList.add("h5p-column-space-before-n-after"))
                    : i.classList.add("h5p-column-space-before"),
              a.appendChild(i)),
              (o = n || -1 !== T.indexOf(t)));
          };
        ((l.attach = function (t) {
          (void 0 === a && e(),
            u
              .filter(function (t) {
                return !t.hasAttached;
              })
              .forEach(function (t) {
                (c[t.instanceIndex].attach(H5P.jQuery(t.container)),
                  (function (t) {
                    switch (t.libraryInfo.machineName) {
                      case "H5P.CoursePresentation":
                        t.$fullScreenButton && t.$fullScreenButton.remove();
                        break;
                      case "H5P.InteractiveVideo":
                        t.on("controls", function () {
                          t.controls.$fullscreen &&
                            t.controls.$fullscreen.remove();
                        });
                    }
                  })(c[t.instanceIndex]));
              }),
            t.addClass("h5p-column").html("").append(a));
        }),
          (l.getCurrentState = function () {
            var t = n.previousState || {};
            t.instances || (t.instances = []);
            for (var e = 0; e < c.length; e++) {
              var i = c[e];
              (i.getCurrentState instanceof Function ||
                "function" == typeof i.getCurrentState) &&
                (t.instances[e] = i.getCurrentState());
            }
            return t;
          }),
          (l.getXAPIData = function () {
            var t = l.createXAPIEventTemplate("answered");
            return (
              x(t),
              t.setScoredResult(
                l.getScore(),
                l.getMaxScore(),
                l,
                !0,
                l.getScore() === l.getMaxScore(),
              ),
              { statement: t.data.statement, children: C(c) }
            );
          }),
          (l.getScore = function () {
            return c.reduce(function (t, e) {
              return t + (e.getScore ? e.getScore() : 0);
            }, 0);
          }),
          (l.getMaxScore = function () {
            return c.reduce(function (t, e) {
              return t + (e.getMaxScore ? e.getMaxScore() : 0);
            }, 0);
          }),
          (l.getAnswerGiven = function () {
            return c.reduce(function (t, e) {
              return t && (e.getAnswerGiven ? e.getAnswerGiven() : t);
            }, !0);
          }),
          (l.showSolutions = function () {
            c.forEach(function (t) {
              (t.toggleReadSpeaker && t.toggleReadSpeaker(!0),
                t.showSolutions && t.showSolutions(),
                t.toggleReadSpeaker && t.toggleReadSpeaker(!1));
            });
          }),
          (l.resetTask = function () {
            c.forEach(function (t) {
              t.resetTask && t.resetTask();
            });
          }),
          (l.getInstances = function () {
            return c;
          }),
          (l.getTitle = function () {
            return H5P.createTitle(
              l.contentData &&
                l.contentData.metadata &&
                l.contentData.metadata.title
                ? l.contentData.metadata.title
                : "Column",
            );
          }));
        var b,
          y,
          w,
          x = function (t) {
            t = t.getVerifiedStatementValue(["object", "definition"]);
            H5P.jQuery.extend(t, k());
          },
          k = function () {
            var t = {
              interactionType: "compound",
              type: "http://adlnet.gov/expapi/activities/cmi.interaction",
              description: { "en-US": "" },
            };
            return t;
          },
          C = function (t) {
            return t
              .map(function (t) {
                if ("function" == typeof t.getXAPIData) return t.getXAPIData();
              })
              .filter(function (t) {
                return !!t;
              });
          };
        ((y = "resize"),
          (w = c),
          (b = l).on(y, function (t) {
            if (!b.bubblingUpwards)
              for (var e = 0; e < w.length; e++) w[e].trigger(y, t);
          }),
          void 0 === a && e(),
          l.setActivityStarted());
      }
      P.prototype = Object.create(t.prototype);
      var i = [
        "H5P.ImageHotspotQuestion",
        "H5P.Blanks",
        "H5P.Essay",
        "H5P.SingleChoiceSet",
        "H5P.MultiChoice",
        "H5P.TrueFalse",
        "H5P.DragQuestion",
        "H5P.Summary",
        "H5P.DragText",
        "H5P.MarkTheWords",
        "H5P.MemoryGame",
        "H5P.QuestionSet",
        "H5P.InteractiveVideo",
        "H5P.CoursePresentation",
        "H5P.DocumentationTool",
        "H5P.MultiMediaChoice",
      ];
      (P.prototype.constructor = P).isTask = function (t) {
        if (void 0 !== t.isTask) return t.isTask;
        for (var e = 0; e < i.length; e++)
          if (t.libraryInfo.machineName === i[e]) return !0;
        return !1;
      };
      var _ = [
          "H5P.AdvancedText",
          "H5P.AudioRecorder",
          "H5P.Essay",
          "H5P.Link",
          "H5P.Accordion",
          "H5P.Table",
          "H5P.GuessTheAnswer",
          "H5P.Blanks",
          "H5P.MultiChoice",
          "H5P.TrueFalse",
          "H5P.DragQuestion",
          "H5P.Summary",
          "H5P.DragText",
          "H5P.MarkTheWords",
          "H5P.ImageHotspotQuestion",
          "H5P.MemoryGame",
          "H5P.Dialogcards",
          "H5P.QuestionSet",
          "H5P.DocumentationTool",
        ],
        S = ["H5P.SingleChoiceSet"],
        T = [
          "H5P.CoursePresentation",
          "H5P.Dialogcards",
          "H5P.GuessTheAnswer",
          "H5P.ImageSlider",
        ];
      return P;
    })(H5P.EventDispatcher)),
  ((H5P = H5P || {}).Transition = (function () {
    Transition = {
      transitionEndEventNames: {
        WebkitTransition: "webkitTransitionEnd",
        transition: "transitionend",
        MozTransition: "transitionend",
        OTransition: "oTransitionEnd",
        msTransition: "MSTransitionEnd",
      },
      cache: [],
      getVendorPropertyName: function (t) {
        if (void 0 !== Transition.cache[t]) return Transition.cache[t];
        var e = document.createElement("div");
        if (t in e.style) Transition.cache[t] = t;
        else {
          var i = ["Moz", "Webkit", "O", "ms"],
            n = t.charAt(0).toUpperCase() + t.substr(1);
          if (t in e.style) Transition.cache[t] = t;
          else
            for (var o = 0; o < i.length; ++o) {
              var r = i[o] + n;
              if (r in e.style) {
                Transition.cache[t] = r;
                break;
              }
            }
        }
        return Transition.cache[t];
      },
      getTransitionEndEventName: function () {
        return (
          Transition.transitionEndEventNames[
            Transition.getVendorPropertyName("transition")
          ] || void 0
        );
      },
      onTransitionEnd: function (t, e, i) {
        ((i = i || 1e3),
          (Transition.transitionEndEventName =
            Transition.transitionEndEventName ||
            Transition.getTransitionEndEventName()));
        function n() {
          o ||
            (t.off(Transition.transitionEndEventName, e),
            (o = !0),
            clearTimeout(r),
            e());
        }
        var o = !1,
          r = setTimeout(function () {
            n();
          }, i);
        t.on(Transition.transitionEndEventName, function () {
          n();
        });
      },
    };
    function n(t, e) {
      var i;
      e >= t.length ||
        ((i = t[e]),
        H5P.Transition.onTransitionEnd(
          i.$element,
          function () {
            (i.end && i.end(), !0 !== i.break && n(t, e + 1));
          },
          i.timeout || void 0,
        ));
    }
    return (
      (Transition.sequence = function (t) {
        n(t, 0);
      }),
      Transition
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelHelpTextDialog = (function (u) {
    var h = 0;
    function t(t, e, i) {
      H5P.EventDispatcher.call(this);
      var n = this,
        o = "joubel-help-text-header-" + ++h,
        r = "joubel-help-text-body-" + h,
        s = u("<div>", {
          class: "joubel-help-text-dialog-box",
          role: "dialog",
          "aria-labelledby": o,
          "aria-describedby": r,
        });
      u("<div>", { class: "joubel-help-text-dialog-background" }).appendTo(s);
      var a = u("<div>", {
        class: "joubel-help-text-dialog-container",
      }).appendTo(s);
      (u("<div>", {
        class: "joubel-help-text-header",
        id: o,
        role: "header",
        html: t,
      }).appendTo(a),
        u("<div>", {
          class: "joubel-help-text-body",
          id: r,
          html: e,
          role: "document",
          tabindex: 0,
        }).appendTo(a));
      function l() {
        (s.remove(), n.trigger("closed"));
      }
      var c = u("<div>", {
        class: "joubel-help-text-remove",
        role: "button",
        title: i,
        tabindex: 1,
        click: l,
        keydown: function (t) {
          -1 !== [32, 13].indexOf(t.which) && (t.preventDefault(), l());
        },
      }).appendTo(a);
      ((n.getElement = function () {
        return s;
      }),
        (n.focus = function () {
          c.focus();
        }));
    }
    return ((t.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = t);
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelMessageDialog = (function (r) {
    return function (t, e) {
      function i() {
        (n.remove(), clearTimeout(o), t.off("click.messageDialog"));
      }
      var n = r("<div/>", { class: "joubel-message-dialog", text: e }).appendTo(
          t,
        ),
        o = setTimeout(i, 3e3);
      return (t.on("click.messageDialog", i), n);
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressCircle = (function (a) {
    function t(e, t, i, n) {
      ((i = i || "#f0f0f0"), (n = n || "#ffffff"));
      var o = this.hexToRgb((t = t || "#1a73d9"));
      try {
        if ("" === (e = Number(e))) throw "is empty";
        if (isNaN(e)) throw "is not a number";
      } catch (t) {
        e = "err";
      }
      100 < e && (e = 100);
      var r =
          "rgb(" +
          parseInt(o.r, 10) +
          "," +
          parseInt(o.g, 10) +
          "," +
          parseInt(o.b, 10) +
          ")",
        s = a("<div/>", { class: "joubel-progress-circle-wrapper" }),
        t = a("<div/>", {
          class: "joubel-progress-circle-active-border",
        }).appendTo(s),
        o = a("<div/>", { class: "joubel-progress-circle-circle" }).appendTo(t);
      a("<span/>", {
        text: e + "%",
        class: "joubel-progress-circle-percentage",
      }).appendTo(o);
      e *= 3.6;
      return (
        (e <= 180
          ? t.css(
              "background-image",
              "linear-gradient(" +
                (90 + e) +
                "deg, transparent 50%, " +
                i +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
          : t.css(
              "background-image",
              "linear-gradient(" +
                (e - 90) +
                "deg, transparent 50%, " +
                r +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
        )
          .css("border", "2px solid" + n)
          .css("background-color", r),
        (this.$activeBorder = t),
        (this.$backgroundCircle = o),
        (this.$wrapper = s),
        this.initResizeFunctionality(),
        s
      );
    }
    return (
      (t.prototype.initResizeFunctionality = function () {
        var t = this;
        (a(window).resize(function () {
          setTimeout(function () {
            t.resize();
          });
        }),
          setTimeout(function () {
            t.resize();
          }, 0));
      }),
      (t.prototype.resize = function () {
        var t,
          e,
          i,
          n = this.$wrapper.parent();
        void 0 !== n &&
          n &&
          ((i = parseInt(n.css("font-size"), 10)),
          (e =
            (t =
              parseInt(i / 4.5, 10) % 2 == 0
                ? parseInt(i / 4.5, 10) + 4
                : parseInt(i / 4.5, 10) + 5) / 2),
          this.$activeBorder.css({
            width: (n = 3.75 * i),
            height: (i = 3.75 * i),
          }),
          this.$backgroundCircle.css({
            width: n - t,
            height: i - t,
            top: e,
            left: e,
          }));
      }),
      (t.prototype.hexToRgb = function (t) {
        t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
        return t
          ? {
              r: parseInt(t[1], 16),
              g: parseInt(t[2], 16),
              b: parseInt(t[3], 16),
            }
          : null;
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).SimpleRoundedButton = (function (i) {
    return function (t) {
      var e = i("<div>", {
        class: "joubel-simple-rounded-button",
        title: t,
        role: "button",
        tabindex: "0",
      }).keydown(function (t) {
        -1 !== [32, 13].indexOf(t.which) &&
          (i(this).click(), t.preventDefault());
      });
      return (
        i("<span>", {
          class: "joubel-simple-rounded-button-text",
          html: t,
        }).appendTo(e),
        e
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSpeechBubble = (function (r) {
    var s,
      a,
      l,
      c,
      u,
      h,
      d = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function p(t) {
      var e = t.closest(".h5p-frame");
      return (e = !e.length ? t.closest(".h5p-container") : e);
    }
    function f() {
      m(s, a, h, l, c);
    }
    function m(t, e, i, n, o) {
      var r = (function (t, e) {
          ((t = t[0].getBoundingClientRect()),
            (e = e[0].getBoundingClientRect()));
          return {
            top: e.top - t.top,
            right: t.right - e.right,
            bottom: t.bottom - e.bottom,
            left: e.left - t.left,
            innerWidth: e.width,
            innerHeight: e.height,
            outerWidth: t.width,
            outerHeight: t.height,
          };
        })(p(e), e),
        s = r.bottom > r.top ? "bottom" : "top",
        a = 0.9 * r.outerWidth,
        i = i < a ? i : a,
        a = (function (t, e) {
          var i = {},
            n = t / 2;
          ((i.top = e.top + e.innerHeight),
            (i.bottom = e.bottom + e.innerHeight + 9),
            e.left < n
              ? (i.left = 3)
              : e.left + n > e.outerWidth
                ? (i.left = e.outerWidth - t - 3)
                : (i.left = e.left - n + e.innerWidth / 2));
          return i;
        })(i, r),
        e = (function (t, e, i, n) {
          var o = {},
            t = t - 20;
          ((o.left = i.left - e.left + n / 2 - 6), o.left < 9 && (o.left = 9));
          o.left > t && (o.left = t);
          return ((o.top = -6), (o.bottom = -6), o);
        })(i, a, r, e.width());
      t.css(
        ((t = i),
        (i = a),
        (a = 16),
        "top" === s
          ? {
              width: t + "px",
              bottom: i.bottom + "px",
              left: i.left + "px",
              fontSize: a + "px",
              top: "",
            }
          : {
              width: t + "px",
              top: i.top + "px",
              left: i.left + "px",
              fontSize: a + "px",
              bottom: "",
            }),
      );
      ((e = e),
        (e =
          "top" === s
            ? { bottom: e.bottom + "px", left: e.left + "px", top: "" }
            : { top: e.top + "px", left: e.left + "px", bottom: "" }));
      (n.css(e), o.css(e));
    }
    H5P.externalDispatcher.on("domHidden", function (t) {
      void 0 !== s && 0 !== t.data.$dom.find(a).length && g();
    });
    var g = function () {
      (H5P.$body.off("mousedown.speechBubble"),
        H5P.$window.off("resize", "", f),
        a.parents(".h5p-dialog").off("mousedown.speechBubble"),
        d && H5P.$body.css("cursor", ""),
        void 0 !== s &&
          (s.removeClass("show"),
          clearTimeout(u),
          (u = setTimeout(function () {
            (s.remove(), (s = void 0));
          }, 500))));
    };
    function v(t) {
      t.target !== a[0] && (g(), (a = void 0));
    }
    return function (t, e, i) {
      ((h = i = i || 400),
        (a = t),
        (this.isCurrent = function (t) {
          return t.is(a);
        }),
        (this.remove = function () {
          g();
        }),
        void 0 !== s && g());
      var n,
        o = p(t);
      return (
        (n = s) &&
          (clearTimeout(u),
          n.removeClass("show"),
          setTimeout(function () {
            n && (n.remove(), (n = void 0));
          }, 500)),
        (l = r('<div class="joubel-speech-bubble-tail"></div>')),
        (c = r('<div class="joubel-speech-bubble-inner-tail"></div>')),
        (e = r(
          '<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">' +
            e +
            "</div></div>",
        ).prepend(c)),
        (s = r('<div class="joubel-speech-bubble" aria-live="assertive">')
          .append([l, e])
          .appendTo(o)),
        setTimeout(function () {
          s.addClass("show");
        }, 0),
        m(s, a, i, l, c),
        H5P.$body.on("mousedown.speechBubble", v),
        H5P.$window.on("resize", "", f),
        t.parents(".h5p-dialog").on("mousedown.speechBubble", v),
        d && H5P.$body.css("cursor", "pointer"),
        this
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelThrobber = (function (t) {
    return function () {
      return t("<div/>", { class: "h5p-throbber" });
    };
  })(H5P.jQuery)),
  /*!@license H5P.JoubelUI-1.3/js/joubel-tip.js by Joubel licensed under unknown license*/ (H5P.JoubelTip =
    (function (a) {
      var l = a("<div/>");
      return function (e, i) {
        var n,
          t = l.html(e).text().trim();
        if ("" !== t) {
          i = a.extend(
            { tipLabel: t, helpIcon: !1, showSpeechBubble: !0, tabcontrol: !1 },
            i,
          );
          var o = a("<div/>", {
            class:
              "joubel-tip-container" + (i.showSpeechBubble ? "" : " be-quiet"),
            "aria-label": i.tipLabel,
            "aria-expanded": !1,
            role: "button",
            tabindex: i.tabcontrol ? -1 : 0,
            click: function (t) {
              (r(), t.preventDefault());
            },
            keydown: function (t) {
              32 === t.which || 13 === t.which
                ? (r(), t.stopPropagation(), t.preventDefault())
                : r(!1);
            },
            html:
              '<span class="joubel-icon-tip-normal ' +
              (i.helpIcon ? " help-icon" : "") +
              '"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>',
          });
          const s = a("<div>", {
            class: "hidden-but-read",
            "aria-live": "polite",
            appendTo: o,
          });
          var r = function (t) {
            void 0 !== n && n.isCurrent(o)
              ? (n.remove(),
                (n = void 0),
                o.attr("aria-expanded", !1),
                s.html(""))
              : !1 !== t &&
                i.showSpeechBubble &&
                ((n = H5P.JoubelSpeechBubble(o, e)),
                o.attr("aria-expanded", !0),
                s.html(e));
          };
          return o;
        }
      };
    })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSlider = (function (e) {
    function t(t) {
      (H5P.EventDispatcher.call(this),
        (this.$slider = e(
          "<div>",
          e.extend({ class: "h5p-joubel-ui-slider" }, t),
        )),
        (this.$slides = []),
        (this.currentIndex = 0),
        (this.numSlides = 0));
    }
    return (
      (((t.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = t).prototype.addSlide = function (t) {
        (t
          .addClass("h5p-joubel-ui-slide")
          .css({ left: 100 * this.numSlides + "%" }),
          this.$slider.append(t),
          this.$slides.push(t),
          this.numSlides++,
          1 === this.numSlides && t.addClass("current"));
      }),
      (t.prototype.attach = function (t) {
        t.append(this.$slider);
      }),
      (t.prototype.move = function (t) {
        var e = this;
        (0 === t && e.trigger("first-slide"),
          t + 1 === e.numSlides && e.trigger("last-slide"),
          e.trigger("move"));
        var i = e.$slides[this.currentIndex];
        (H5P.Transition.onTransitionEnd(this.$slider, function () {
          (i.removeClass("current"), e.trigger("moved"));
        }),
          this.$slides[t].addClass("current"));
        var n = "translateX(" + 100 * -t + "%)";
        (this.$slider.css({
          "-webkit-transform": n,
          "-moz-transform": n,
          "-ms-transform": n,
          transform: n,
        }),
          (this.currentIndex = t));
      }),
      (t.prototype.remove = function () {
        this.$slider.remove();
      }),
      (t.prototype.next = function () {
        this.currentIndex + 1 >= this.numSlides ||
          this.move(this.currentIndex + 1);
      }),
      (t.prototype.previous = function () {
        this.move(this.currentIndex - 1);
      }),
      (t.prototype.first = function () {
        this.move(0);
      }),
      (t.prototype.last = function () {
        this.move(this.numSlides - 1);
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelScoreBar = (function (s) {
    var a = 0;
    return function (t, e, i, n) {
      var o = this;
      function r(t) {
        return e ? e.replace(":num", t).replace(":total", o.maxScore) : "";
      }
      ((o.maxScore = t),
        (o.score = 0),
        a++,
        (o.STAR_MARKUP =
          '<svg tabindex="-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63.77 53.87" aria-hidden="true" focusable="false"><title>star</title><filter tabindex="-1" id="h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          '" x0="-50%" y0="-50%" width="200%" height="200%"><feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur><feOffset dy="2" dx="4"></feOffset><feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite><feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur><feOffset dy="-2" dx="-4"></feOffset><feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="firstfilter" operator="over"></feComposite></filter><path tabindex="-1" class="h5p-joubelui-score-bar-star-shadow" d="M35.08,43.41V9.16H20.91v0L9.51,10.85,9,10.93C2.8,12.18,0,17,0,21.25a11.22,11.22,0,0,0,3,7.48l8.73,8.53-1.07,6.16Z"/><g tabindex="-1"><path tabindex="-1" class="h5p-joubelui-score-bar-star-border" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" class="h5p-joubelui-score-bar-star-fill" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" filter="url(#h5p-joubelui-score-bar-star-inner-shadow-' +
          a +
          ')" class="h5p-joubelui-score-bar-star-fill-full-score" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/></g></svg>'),
        (o.appendTo = function (t) {
          o.$scoreBar.appendTo(t);
        }),
        (o.setScore = function (t) {
          t !== o.score &&
            ((o.score = t > o.maxScore ? o.maxScore : t), o.updateVisuals());
        }),
        (o.incrementScore = function (t) {
          o.setScore(o.score + (t || 1));
        }),
        (o.setMaxScore = function (t) {
          o.maxScore = t;
        }),
        (o.updateVisuals = function () {
          (o.$progress.html(r(o.score)),
            o.$scoreCounter.text(o.score),
            o.$maxScore.text(o.maxScore),
            setTimeout(function () {
              (o.$progress.css({ width: (o.score / o.maxScore) * 100 + "%" }),
                H5P.Transition.onTransitionEnd(
                  o.$progress,
                  function () {
                    (o.$scoreBar.toggleClass(
                      "h5p-joubelui-score-bar-full-score",
                      o.score === o.maxScore,
                    ),
                      o.$scoreBar.toggleClass(
                        "h5p-joubelui-score-bar-animation-active",
                        o.score === o.maxScore,
                      ),
                      o.$scoreBar.one("animationend", function () {
                        o.$scoreBar.removeClass(
                          "h5p-joubelui-score-bar-animation-active",
                        );
                      }));
                  },
                  600,
                ));
            }, 300));
        }),
        (o.reset = function () {
          o.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score");
        }),
        (function () {
          o.$scoreBar = s("<div>", { class: "h5p-joubelui-score-bar" });
          var t = s("<div>", {
            class: "h5p-joubelui-score-bar-visuals",
            appendTo: o.$scoreBar,
          });
          ((o.$progressWrapper = s("<div>", {
            class: "h5p-joubelui-score-bar-progress-wrapper",
            appendTo: t,
          })),
            (o.$progress = s("<div>", {
              class: "h5p-joubelui-score-bar-progress",
              html: r(o.score),
              appendTo: o.$progressWrapper,
            })),
            s("<div>", {
              class: "h5p-joubelui-score-bar-star",
              html: o.STAR_MARKUP,
            }).appendTo(t));
          t = s("<div>", {
            class: "h5p-joubelui-score-numeric",
            appendTo: o.$scoreBar,
            "aria-hidden": !0,
          });
          ((o.$scoreCounter = s("<span>", {
            class:
              "h5p-joubelui-score-number h5p-joubelui-score-number-counter",
            text: 0,
            appendTo: t,
          })),
            s("<span>", {
              class: "h5p-joubelui-score-number-separator",
              text: "/",
              appendTo: t,
            }),
            (o.$maxScore = s("<span>", {
              class: "h5p-joubelui-score-number h5p-joubelui-score-max",
              text: o.maxScore,
              appendTo: t,
            })),
            i &&
              (H5P.JoubelUI.createTip(i, {
                tipLabel: n || i,
                helpIcon: !0,
              }).appendTo(o.$scoreBar),
              o.$scoreBar.addClass("h5p-score-bar-has-help")));
        })());
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressbar = (function (i) {
    function t(t, e) {
      H5P.EventDispatcher.call(this);
      ((this.options = i.extend({ progressText: "Slide :num of :total" }, e)),
        (this.currentStep = 0),
        (this.steps = t),
        (this.$progressbar = i("<div>", { class: "h5p-joubelui-progressbar" })),
        (this.$background = i("<div>", {
          class: "h5p-joubelui-progressbar-background",
        }).appendTo(this.$progressbar)));
    }
    return (
      (((t.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = t).prototype.updateAria = function () {
        var t;
        this.options.disableAria ||
          (this.$currentStatus ||
            (this.$currentStatus = i("<div>", {
              class: "h5p-joubelui-progressbar-slide-status-text",
              "aria-live": "assertive",
            }).appendTo(this.$progressbar)),
          (t = this.options.progressText
            .replace(":num", this.currentStep)
            .replace(":total", this.steps)),
          this.$currentStatus.html(t));
      }),
      (t.prototype.appendTo = function (t) {
        this.$progressbar.appendTo(t);
      }),
      (t.prototype.setProgress = function (t) {
        t > this.steps ||
          t < 0 ||
          ((this.currentStep = t),
          this.$background.css({
            width: (this.currentStep / this.steps) * 100 + "%",
          }),
          this.updateAria());
      }),
      (t.prototype.next = function () {
        this.setProgress(this.currentStep + 1);
      }),
      (t.prototype.reset = function () {
        this.setProgress(0);
      }),
      (t.prototype.isLastStep = function () {
        return this.steps === this.currentStep;
      }),
      t
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelUI = (function (i) {
    function t() {}
    var e;
    return (
      (t.createTip = function (t, e) {
        return new H5P.JoubelTip(t, e);
      }),
      (t.createMessageDialog = function (t, e) {
        return new H5P.JoubelMessageDialog(t, e);
      }),
      (t.createHelpTextDialog = function (t, e, i) {
        return new H5P.JoubelHelpTextDialog(t, e, i);
      }),
      (t.createProgressCircle = function (t, e, i, n) {
        return new H5P.JoubelProgressCircle(t, e, i, n);
      }),
      (t.createThrobber = function () {
        return new H5P.JoubelThrobber();
      }),
      (t.createSimpleRoundedButton = function (t) {
        return new H5P.SimpleRoundedButton(t);
      }),
      (t.createSlider = function (t) {
        return new H5P.JoubelSlider(t);
      }),
      (t.createScoreBar = function (t, e, i, n) {
        return new H5P.JoubelScoreBar(t, e, i, n);
      }),
      (t.createProgressbar = function (t, e) {
        return new H5P.JoubelProgressbar(t, e);
      }),
      (t.createButton = function (t) {
        var e = "button";
        return (
          t.href ? (e = "a") : (t.type = "button"),
          t.class
            ? (t.class += " h5p-joubelui-button")
            : (t.class = "h5p-joubelui-button"),
          i("<" + e + "/>", t)
        );
      }),
      H5P.isFramed &&
        !H5P.hasiOSiframeScrollFix &&
        /iPad|iPhone|iPod/.test(navigator.userAgent) &&
        ((H5P.hasiOSiframeScrollFix = !0),
        (e = HTMLElement.prototype.focus),
        (HTMLElement.prototype.focus = function () {
          (this instanceof HTMLAnchorElement ||
            this instanceof HTMLInputElement ||
            this instanceof HTMLSelectElement ||
            this instanceof HTMLTextAreaElement ||
            this instanceof HTMLButtonElement ||
            this instanceof HTMLIFrameElement ||
            this instanceof HTMLAreaElement) &&
            !this.getAttribute("role") &&
            e.call(this);
        })),
      t
    );
  })(H5P.jQuery)),
  /*!@license H5P.Question-1.5/scripts/question.js by Joubel licensed under MIT*/ (H5P.Tooltip =
    H5P.Tooltip || function () {}),
  (H5P.Question = (function (z, t, W) {
    function e(o) {
      var u = this;
      (t.call(u),
        (u.order = [
          "video",
          "image",
          "audio",
          "introduction",
          "content",
          "explanation",
          "feedback",
          "scorebar",
          "buttons",
          "read",
        ]));
      function h(t, e) {
        ((y[t] = {}),
          (t = y[t].$element = z("<div/>", { class: "h5p-question-" + t })),
          e && t[e instanceof z ? "append" : "html"](e));
      }
      function d(t, e) {
        e instanceof z
          ? y[t].$element.html("").append(e)
          : y[t].$element.html(e);
      }
      function p() {
        if (void 0 !== y.buttons) {
          clearTimeout(l);
          for (var t = 0; t < C.length; t++)
            (I(x, C[t].id, w, y.buttons.$element), (w[C[t].id].isVisible = !0));
          for (var e = 0, i = !(C = []), n = 0; n < k.length; n++) {
            var o = w[k[n].id];
            (o.isVisible && (e += 1), o.$element.is(":focus") && (i = !0));
          }
          var r = 150;
          (y.feedback &&
            y.feedback.$element.hasClass("h5p-question-popup") &&
            (r = 0),
            e === y.buttons.$element.children().length
              ? (F(y.buttons), A(i))
              : (A(i),
                y.buttons.$element.is(":empty") ||
                  (R(y.buttons),
                  D(y.buttons.$element),
                  (l = setTimeout(function () {
                    u.trigger("resize");
                  }, r))),
                O()),
            (s = void 0));
        }
      }
      function a() {
        var t = y.image.$element;
        (clearTimeout(i),
          t.addClass("animatable"),
          (i =
            ((S = S
              ? (z(this).attr("aria-expanded", !0),
                t.addClass("h5p-question-image-fill-width"),
                !1)
              : (z(this).attr("aria-expanded", !1),
                t.removeClass("h5p-question-image-fill-width"),
                !0)),
            setTimeout(function () {
              u.trigger("resize");
            }, 600))));
      }
      function n(t, e, i) {
        for (var n = 0; n < i.length; n++) if (i[n][e] === t) return n;
        return -1;
      }
      var f,
        m,
        g,
        v,
        s,
        l,
        e,
        i,
        b,
        r,
        c,
        y = {},
        w = {},
        x = [],
        k = [],
        C = [],
        P = !1,
        _ = { disableFeedback: !1, disableReadSpeaker: !1 },
        S = !0,
        T = !1,
        H = !1,
        I = function (t, e, i, n) {
          for (var o = 0; o < t.length; o++)
            if (t[o] === e) {
              for (
                ;
                0 < o && (void 0 === i[t[o - 1]] || !i[t[o - 1]].isVisible);
              )
                o--;
              (0 === o
                ? i[e].$element.prependTo(n)
                : i[e].$element.insertAfter(i[t[o - 1]].$element),
                (i[e].isVisible = !0));
              break;
            }
        },
        E = function (t, e) {
          var i,
            n,
            o,
            r,
            s = t.parent(),
            a = t.siblings(".h5p-question-feedback-tail"),
            l = t.outerWidth(),
            c = D(t),
            u = !1,
            h = s.height() / 2 - c / 2,
            d = s.width() / 2 - l / 2,
            p = 0,
            f = 0,
            m = 0;
          (null != e
            ? ((i = e[0].offsetTop < 15),
              (n = e[0].offsetTop + e.height() > s.height() - 15),
              (o = e[0].offsetLeft < 15),
              (r = e[0].offsetLeft + e.width() > s.width() - 15),
              (d = e[0].offsetLeft - l / 2 + e.width() / 2),
              (h = e[0].offsetTop - c - 15),
              (p = d + l / 2 - a.width() / 2),
              (f = h + c - a.height() / 2),
              (m = 225),
              c + 15 > e[0].offsetTop &&
                ((f = (h = e[0].offsetTop + e.height() + 15) - a.height() / 2),
                (m = 45)),
              (d = d < 0 ? 0 : d) + l > s.width() && (d = s.width() - l),
              i && (o || r)
                ? ((d = e[0].offsetLeft + (o ? e.width() : -l)),
                  (h = e[0].offsetTop + e.height()),
                  (u = !0))
                : n && (o || r)
                  ? ((d = e[0].offsetLeft + (o ? e.width() : -l)),
                    (h = e[0].offsetTop - c),
                    (u = !0))
                  : i ||
                    n ||
                    ((o || r) &&
                      ((h = e[0].offsetTop - c / 2 + e.width() / 2),
                      (d = e[0].offsetLeft + (o ? e.width() + 15 : -l - 15)) < 0
                        ? (u = !(d = 0))
                        : ((p = d + (o ? -a.width() / 2 : l - a.width() / 2)),
                          (f = h + c / 2 - a.height() / 2),
                          (m = o ? 315 : 135)))),
              h + c > s.height() &&
                ((h = s.height() - c),
                c > s.height() - (e[0].offsetTop + e.height() + 15) &&
                  (u = !0)))
            : (u = !0),
            t.css({ top: (h = h < 0 ? 0 : h), left: d }),
            a.css({ top: f, left: p }),
            u
              ? a.hide()
              : a
                  .css({ left: p, top: f, transform: "rotate(" + m + "deg)" })
                  .show());
        },
        D = function (t) {
          if (t.is(":visible")) {
            var e = t.hasClass("h5p-question-popup"),
              i = t
                .clone()
                .css({
                  position: "absolute",
                  "max-height": "none",
                  width: e ? "" : "100%",
                })
                .appendTo(t.parent()),
              n =
                parseFloat(t.css("margin-left")) +
                parseFloat(t.css("margin-right")),
              e = i.css("width") ? i.css("width") : "100%";
            i.css("width", "calc(" + e + " - " + n + "px)");
            ((e = Math.round(i.get(0).getBoundingClientRect().height)),
              (n = parseFloat(t.css("fontSize"))));
            return (
              t.css("max-height", e / n + "em"),
              i.remove(),
              0 < e &&
                y.buttons &&
                y.buttons.$element === t &&
                (R(y.buttons), setTimeout(O, 150)),
              e
            );
          }
          t.css("max-height", "none");
        },
        A = function (t) {
          for (var e = 0; e < k.length; e++) M(k[e].id);
          ((k = []), t && u.focusButton());
        },
        M = function (t) {
          (w[t].$element.detach(), (w[t].isVisible = !1));
        },
        L = function (t, e, i) {
          if (
            ((e = e || 0),
            (i = i || 5),
            t && t instanceof z && document !== t.get(0) && !(i <= e))
          )
            return "auto" === t.css("overflow-y") ? t : L(t.parent(), e + 1, i);
        },
        O = function () {
          var t;
          w &&
            y.buttons &&
            ((t = function () {
              if (y.buttons.$element.is(":visible")) {
                var t,
                  e = { max: 0, min: 0, current: 0 };
                for (t in w) {
                  var i = w[t];
                  i.isVisible &&
                    (j(w[t]),
                    (e.max += i.width.max),
                    (e.min += i.width.min),
                    (e.current += i.isTruncated ? i.width.min : i.width.max));
                }
                function n(t) {
                  return e.max < t
                    ? (e.max !== e.current && N(e.current, t), !0)
                    : e.min < t && ((e.current > t ? $ : N)(e.current, t), !0);
                }
                (B(!1),
                  n(Math.floor(y.buttons.$element.width()) - 1) ||
                    (B(!0), n(Math.floor(y.buttons.$element.width()) - 1)));
              }
            }),
            y.buttons.$element.is(":visible")
              ? t()
              : (e && clearTimeout(e),
                (e = setTimeout(function () {
                  ((e = void 0), t());
                }, 0))));
        },
        B = function (t) {
          y.scorebar &&
          y.scorebar.$element &&
          y.scorebar.$element.hasClass("h5p-question-visible")
            ? (y.buttons.$element.addClass("has-scorebar"),
              y.buttons.$element.toggleClass("wrap", t),
              y.scorebar.$element.toggleClass("full-width", t))
            : y.buttons.$element.removeClass("has-scorebar");
        },
        $ = function (t, e) {
          for (var i = x.length - 1; 0 <= i; i--) {
            var n = x[i],
              o = w[n];
            if (!o.isTruncated && o.isVisible) {
              var r = o.$element;
              t -= o.width.max - o.width.min;
              n = r.text();
              if (
                (r.attr("data-tooltip", n),
                o.ariaLabel || r.attr("aria-label", n),
                r.html("").addClass("truncated"),
                (o.isTruncated = !0),
                t <= e)
              )
                return;
            }
          }
        },
        N = function (t, e) {
          for (var i = 0; i < x.length; i++) {
            var n = x[i],
              n = w[n];
            if (n.isTruncated && n.isVisible) {
              if (e < (t += n.width.max - n.width.min + 1)) return;
              (n.$element.html(n.text),
                n.$element.removeAttr("data-tooltip"),
                n.ariaLabel || n.$element.removeAttr("aria-label"),
                n.$element.removeClass("truncated"),
                (n.isTruncated = !1));
            }
          }
        },
        R = function (t) {
          (t.$element.addClass("h5p-question-visible"), (t.isVisible = !0));
        },
        F = function (t) {
          (t.$element.css("max-height", ""),
            (t.isVisible = !1),
            setTimeout(function () {
              t.isVisible || t.$element.removeClass("h5p-question-visible");
            }, 150));
        };
      ((u.setBehaviour = function (t) {
        z.extend(_, t);
      }),
        (u.setVideo = function (t) {
          ((y.video = {
            $element: z("<div/>", { class: "h5p-question-video" }),
          }),
            H && t.params.playback && (t.params.playback.autoplay = !1),
            t.params.visuals || (t.params.visuals = {}),
            (t.params.visuals.fit = !1),
            (y.video.instance = H5P.newRunnable(
              t,
              u.contentId,
              y.video.$element,
              !0,
            )));
          var e = !1;
          return (
            y.video.instance.on("resize", function () {
              ((e = !0), u.trigger("resize"), (e = !1));
            }),
            u.on("resize", function () {
              e || y.video.instance.trigger("resize");
            }),
            u
          );
        }),
        (u.setAudio = function (t) {
          return (
            (t.params = t.params || {}),
            (y.audio = {
              $element: z("<div/>", { class: "h5p-question-audio" }),
            }),
            H
              ? (t.params.autoplay = !1)
              : "transparent" === t.params.playerMode &&
                (t.params.autoplay = !0),
            (y.audio.instance = H5P.newRunnable(
              t,
              u.contentId,
              y.audio.$element,
              !0,
            )),
            y.audio.instance.audio &&
              (y.audio.instance.audio.style.height = ""),
            u
          );
        }),
        (u.pause = function () {
          (y.video && y.video.isVisible && y.video.instance.pause(),
            y.audio && y.audio.isVisible && y.audio.instance.pause());
        }),
        (u.play = function () {
          (y.video && y.video.isVisible && y.video.instance.play(),
            y.audio && y.audio.isVisible && y.audio.instance.play());
        }),
        (u.disableAutoPlay = function () {
          H = !0;
        }),
        (u.massageAttributeOutput = function (t) {
          t = new DOMParser().parseFromString(t, "text/html");
          const e = document.createElement("div");
          return (
            (e.innerHTML = t.documentElement.textContent),
            e.textContent || e.innerText || ""
          );
        }),
        (u.setImage = function (t, e) {
          ((e = e || {}),
            (y.image = {}),
            (y.image.$element = z("<div/>", {
              class: "h5p-question-image h5p-question-image-fill-width",
            })));
          var i = z("<div/>", {
              class: "h5p-question-image-wrap",
              appendTo: y.image.$element,
            }),
            n = z("<img/>", {
              src: H5P.getPath(t, u.contentId),
              alt: void 0 === e.alt ? "" : u.massageAttributeOutput(e.alt),
              title:
                void 0 === e.title ? "" : u.massageAttributeOutput(e.title),
              on: {
                load: function () {
                  (u.trigger("imageLoaded", this), u.trigger("resize"));
                },
              },
              appendTo: i,
            });
          if (!e.disableImageZooming) {
            const s = () => {
              var t =
                "true" === i.attr("aria-expanded")
                  ? e.minimizeImage
                  : e.expandImage;
              i.attr("aria-label", t + " " + e.alt);
            };
            var o = !1;
            return (
              u.on("resize", function () {
                !o &&
                  n.is(":visible") &&
                  (i
                    .addClass("h5p-question-image-scalable")
                    .attr("aria-expanded", !1)
                    .attr("role", "button")
                    .attr("tabIndex", "0")
                    .on("click", function (t) {
                      1 === t.which && (a.apply(this), s());
                    })
                    .on("keypress", function (t) {
                      32 === t.which &&
                        (t.preventDefault(), a.apply(this), s());
                    }),
                  s(),
                  y.image.$element.removeClass("h5p-question-image-fill-width"),
                  (o = !0));
              }),
              u
            );
          }
          n.css("maxHeight", "none");
          function r() {
            var t = y.image.$element.get(0).getBoundingClientRect().width;
            i.css({ "-webkit-transition": "none", transition: "none" });
            var e =
              2 *
              (i.get(0).getBoundingClientRect().left -
                y.image.$element.get(0).getBoundingClientRect().left);
            (n.get(0).naturalWidth >= t - e
              ? y.image.$element.addClass("h5p-question-image-fill-width")
              : y.image.$element.removeClass("h5p-question-image-fill-width"),
              i.css({ "-webkit-transition": "", transition: "" }));
          }
          n.is(":visible") ? r() : n.on("load", r);
        }),
        (u.setIntroduction = function (t) {
          return (h("introduction", t), u);
        }),
        (u.setContent = function (t, e) {
          return (
            h("content", t),
            e && e.class && y.content.$element.addClass(e.class),
            u
          );
        }),
        (u.read = function (t) {
          r &&
            (c ? (c += ("." === c.substr(-1, 1) ? " " : ". ") + t) : (c = t),
            r.html(c),
            setTimeout(function () {
              ((c = null), r.html(""));
            }, 100));
        }),
        (u.readFeedback = function () {
          var t;
          _.disableReadSpeaker ||
            !v ||
            !y.feedback ||
            !y.feedback.$element ||
            ((t = z(
              ".h5p-question-feedback-content-text",
              y.feedback.$element,
            )) &&
              t.html() &&
              t.html().length &&
              u.read(t.html()));
        }),
        (u.removeFeedback = function () {
          return (
            clearTimeout(b),
            y.feedback &&
              v &&
              ((v = !1),
              F(y.scorebar),
              F(y.feedback),
              (T = !0),
              (b = setTimeout(function () {
                (v ||
                  (y.feedback.$element.children().detach(),
                  y.scorebar.$element.children().detach(),
                  u.trigger("resize")),
                  (T = !1),
                  g.setScore(0));
              }, 150)),
              f && f.find(".h5p-question-feedback-tail").remove()),
            u
          );
        }),
        (u.setFeedback = function (t, e, i, n, o, r, s) {
          if (_.disableFeedback) return u;
          (p(),
            (m = null != r && null != r.click ? r.click : null),
            clearTimeout(b));
          var a = z("<div>", { class: "h5p-question-feedback-container" }),
            l = z("<div>", { class: "h5p-question-feedback-content" }).appendTo(
              a,
            );
          z("<div>", {
            class: "h5p-question-feedback-content-text",
            html: t,
          }).appendTo(l);
          var c = z("<div>", { class: "h5p-question-scorebar-container" });
          return (
            (g = void 0 === g ? W.createScoreBar(i, n, o, s) : g).appendTo(c),
            l.toggleClass("has-content", void 0 !== t && 0 < t.length),
            !_.disableReadSpeaker &&
              n &&
              u.read(
                n.replace(":num", e).replace(":total", i) + ". " + (t || ""),
              ),
            (v = !0),
            y.feedback
              ? (d("feedback", a), d("scorebar", c))
              : (h("feedback", a),
                h("scorebar", c),
                P &&
                  f &&
                  (I(u.order, "feedback", y, f), I(u.order, "scorebar", y, f))),
            R(y.feedback),
            R(y.scorebar),
            O(),
            null != r && 1 == r.showAsPopup
              ? ((function (t) {
                  var e = y.feedback.$element,
                    i = y.content.$element,
                    n = null != m ? m.$element : null;
                  (e.appendTo(i).addClass("h5p-question-popup"),
                    y.scorebar && y.scorebar.$element.appendTo(e),
                    i.addClass("h5p-has-question-popup"));
                  var o = z("<div/>", { class: "h5p-question-feedback-tail" })
                      .hide()
                      .appendTo(i),
                    t = z("<div/>", {
                      class: "h5p-question-feedback-close",
                      tabindex: 0,
                      title: t,
                      on: {
                        click: function (t) {
                          (e.remove(), o.remove(), t.preventDefault());
                        },
                        keydown: function (t) {
                          switch (t.which) {
                            case 13:
                            case 32:
                              (e.remove(), o.remove(), t.preventDefault());
                          }
                        },
                      },
                    })
                      .hide()
                      .appendTo(e);
                  (null != n &&
                    (n.hasClass("correct")
                      ? (e.addClass("h5p-question-feedback-correct"),
                        t.show(),
                        y.buttons.$element.hide())
                      : y.buttons.$element.appendTo(y.feedback.$element)),
                    E(e, n));
                })(r.closeText),
                g.setScore(e))
              : (b = setTimeout(function () {
                  var t;
                  (D(y.feedback.$element),
                    D(y.scorebar.$element),
                    (T = !0),
                    !f ||
                      (f.hasClass("h5p-standalone") && !H5P.isFullscreen) ||
                      ((t = L(f)) &&
                        t.animate({ scrollTop: f.css("height") }, "slow")),
                    (b = setTimeout(function () {
                      ((T = !1), u.trigger("resize"), g.setScore(e));
                    }, 150)));
                }, 0)),
            u
          );
        }),
        (u.updateFeedbackContent = function (t, e) {
          return (
            y.feedback &&
              y.feedback.$element &&
              (e &&
                (t =
                  z(
                    ".h5p-question-feedback-content",
                    y.feedback.$element,
                  ).html() +
                  " " +
                  t),
              z(".h5p-question-feedback-content", y.feedback.$element)
                .html(t)
                .addClass("has-content"),
              D(y.feedback.$element),
              setTimeout(u.trigger.bind(u, "resize"), 150)),
            u
          );
        }),
        (u.setExplanation = function (t, e) {
          return (
            t
              ? ((t = new H5P.Question.Explainer(e, t)),
                y.explanation
                  ? d("explanation", t.getElement())
                  : (h("explanation", t.getElement()),
                    P && f && I(u.order, "explanation", y, f)))
              : y.explanation && y.explanation.$element.children().detach(),
            u
          );
        }),
        (u.hasButton = function (t) {
          return void 0 !== w[t];
        }),
        (u.addButton = function (t, e, i, n, o, r) {
          if (w[t]) return u;
          (void 0 === y.buttons &&
            (h("buttons"), P && I(u.order, "buttons", y, f)),
            ((r = r || {}).confirmationDialog = r.confirmationDialog || {}),
            (o = o || {}));
          function s() {
            r.confirmationDialog.enable && a
              ? (r.confirmationDialog.$parentElement ||
                  y.popups.$element.removeClass("hidden"),
                a.show(c.position().top))
              : i();
          }
          var a = u.addConfirmationDialogToButton(r.confirmationDialog, i);
          (r.contentData &&
            r.contentData.standalone &&
            (r.contentData.isScoringEnabled ||
              r.contentData.isReportingEnabled) &&
            r.textIfSubmitting &&
            (e = r.textIfSubmitting),
            (w[t] = {
              isTruncated: !1,
              text: e,
              isVisible: !1,
              ariaLabel: o["aria-label"],
            }));
          var l = void 0 !== o.href,
            c = (w[t].$element = W.createButton(
              z.extend(
                {
                  class: "h5p-question-" + t,
                  html: e,
                  on: {
                    click: function (t) {
                      (s(), l && t.preventDefault());
                    },
                  },
                },
                o,
              ),
            ));
          return (
            x.push(t),
            H5P.Tooltip(c.get(0), { tooltipSource: "data-tooltip" }),
            l &&
              c.on("keypress", function (t) {
                32 === t.which && (s(), t.preventDefault());
              }),
            (void 0 !== n && !n) ||
              (c.appendTo(y.buttons.$element),
              (w[t].isVisible = !0),
              R(y.buttons)),
            u
          );
        }));
      var j = function (t) {
        var e = t.$element,
          e = e
            .clone()
            .css({
              position: "absolute",
              "white-space": "nowrap",
              "max-width": "none",
            })
            .removeClass("truncated")
            .html(t.text)
            .appendTo(e.parent());
        ((t.width = {
          max: Math.ceil(
            e.outerWidth() +
              parseFloat(e.css("margin-left")) +
              parseFloat(e.css("margin-right")),
          ),
        }),
          e.html("").addClass("truncated"),
          (t.width.min = Math.ceil(
            e.outerWidth() +
              parseFloat(e.css("margin-left")) +
              parseFloat(e.css("margin-right")),
          )),
          e.remove());
      };
      ((u.addConfirmationDialogToButton = function (e, t) {
        if ((e = e || {}).enable) {
          var i = new H5P.ConfirmationDialog({
            instance: e.instance,
            headerText: e.l10n.header,
            dialogText: e.l10n.body,
            cancelText: e.l10n.cancelLabel,
            confirmText: e.l10n.confirmLabel,
          });
          if (e.$parentElement) {
            const n = e.$parentElement.get(0);
            let t;
            (n.classList.contains("h5p-content") &&
              (t = n.querySelector(".h5p-container")),
              i.appendTo(t ?? n));
          } else
            (void 0 === y.popups &&
              (h("popups"),
              P && I(u.order, "popups", y, f),
              y.popups.$element.addClass("hidden"),
              u.order.push("popups")),
              i.appendTo(y.popups.$element.get(0)));
          return (
            i.on("confirmed", function () {
              (e.$parentElement || y.popups.$element.addClass("hidden"),
                t(),
                u.trigger("confirmed"));
            }),
            i.on("canceled", function () {
              (e.$parentElement || y.popups.$element.addClass("hidden"),
                u.trigger("canceled"));
            }),
            i
          );
        }
      }),
        (u.showButton = function (t, e) {
          var i = -1 !== n(t, "id", k);
          if (void 0 === w[t] || (!0 === w[t].isVisible && !i)) return u;
          e = e || 0;
          i = n(t, "id", C);
          if (-1 !== i) return (C[i].priority < e && (C[i].priority = e), u);
          i = n(t, "id", k);
          return (
            -1 !== i
              ? k[i].priority <= e &&
                (k.splice(i, 1), C.push({ id: t, priority: e }))
              : w[t].$element.is(":visible") || C.push({ id: t, priority: e }),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.hideButton = function (t, e) {
          var i = -1 !== n(t, "id", C);
          if (void 0 === w[t] || (!1 === w[t].isVisible && !i)) return u;
          e = e || 0;
          i = n(t, "id", k);
          if (-1 !== i) return (k[i].priority < e && (k[i].priority = e), u);
          i = n(t, "id", C);
          return (
            -1 !== i
              ? C[i].priority <= e &&
                (C.splice(i, 1), k.push({ id: t, priority: e }))
              : w[t].$element.is(":visible")
                ? k.push({ id: t, priority: e })
                : M(t),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.focusButton = function (t) {
          if (void 0 === t)
            for (var e = 0; e < x.length; e++) {
              var i = w[x[e]];
              if (i && i.isVisible) {
                i.$element.focus();
                break;
              }
            }
          else w[t] && w[t].$element.is(":visible") && w[t].$element.focus();
          return u;
        }),
        (u.toggleReadSpeaker = function (t) {
          _.disableReadSpeaker = t || !_.disableReadSpeaker;
        }),
        (u.insertSectionAtElement = function (t, e) {
          return (
            void 0 === y[t] && h(t),
            (y[t].parent = e),
            P || I([t], t, y, e),
            u
          );
        }),
        (u.attach = function (t) {
          (u.isRoot() && u.setActivityStarted(),
            void 0 === f &&
              (void 0 !== u.registerDomElements &&
                (u.registerDomElements instanceof Function ||
                  "function" == typeof u.registerDomElements) &&
                u.registerDomElements(),
              (r = z("<div/>", {
                "aria-live": "polite",
                class: "h5p-hidden-read",
              })),
              h("read", r),
              u.trigger("registerDomElements")),
            (f = t).html("").addClass("h5p-question h5p-" + o));
          for (var e = [], i = 0; i < u.order.length; i++) {
            var n = u.order[i];
            y[n] &&
              (y[n].parent
                ? y[n].$element.appendTo(y[n].parent)
                : e.push(y[n].$element),
              (y[n].isVisible = !0));
          }
          return (
            t.append(e),
            u.trigger(
              "domChanged",
              {
                $target: t,
                library: u.libraryInfo.machineName,
                contentId: u.contentId,
                key: "newLibrary",
              },
              { bubbles: !0, external: !0 },
            ),
            (P = !0),
            u
          );
        }),
        (u.detachSections = function () {
          for (var t in ((P = !1), y)) y[t].$element.detach();
          return u;
        }),
        u.on("resize", function () {
          !T && y.feedback && v && D(y.feedback.$element);
          var t = y.feedback,
            e = m;
          (null != t &&
            null != t.$element &&
            null != e &&
            null != e.$element &&
            setTimeout(function () {
              E(t.$element, e.$element);
            }, 10),
            O());
        }));
    }
    return (
      (((e.prototype = Object.create(t.prototype)).constructor =
        e).determineOverallFeedback = function (t, e) {
        e = Math.floor(100 * e);
        for (var i = 0; i < t.length; i++) {
          var n = t[i],
            o = void 0 !== n.feedback && 0 !== n.feedback.trim().length;
          if (n.from <= e && n.to >= e && o) return n.feedback;
        }
        return "";
      }),
      e
    );
  })(H5P.jQuery, H5P.EventDispatcher, H5P.JoubelUI)),
  /*!@license H5P.Question-1.5/scripts/explainer.js by Joubel licensed under MIT*/ (H5P.Question.Explainer =
    (function (l) {
      return function (r, s) {
        var a = this;
        (!(function () {
          ((a.$explanation = l("<div>", {
            class: "h5p-question-explanation-container",
          })),
            l("<div>", {
              class: "h5p-question-explanation-title",
              role: "heading",
              html: r,
              appendTo: a.$explanation,
            }));
          for (
            var t = l("<ul>", {
                class: "h5p-question-explanation-list",
                appendTo: a.$explanation,
              }),
              e = 0;
            e < s.length;
            e++
          ) {
            var i = s[e],
              n = l("<li>", {
                class: "h5p-question-explanation-item",
                appendTo: t,
              }),
              o = l("<div>", { class: "h5p-question-explanation-status" });
            (i.correct &&
              l("<span>", {
                class: "h5p-question-explanation-correct",
                html: i.correct,
                appendTo: o,
              }),
              i.wrong &&
                l("<span>", {
                  class: "h5p-question-explanation-wrong",
                  html: i.wrong,
                  appendTo: o,
                }),
              o.appendTo(n),
              i.text &&
                l("<div>", {
                  class: "h5p-question-explanation-text",
                  html: i.text,
                  appendTo: n,
                }));
          }
        })(),
          (a.getElement = function () {
            return a.$explanation;
          }));
      };
    })(H5P.jQuery)),
  (H5P.Question.ScorePoints = function () {
    var i,
      n = [];
    this.getElement = function (t) {
      var e = document.createElement("div");
      return (
        e.classList.add(t ? "h5p-question-plus-one" : "h5p-question-minus-one"),
        e.classList.add("h5p-question-hidden-one"),
        n.push(e),
        i && clearTimeout(i),
        (i = setTimeout(o, 0)),
        e
      );
    };
    var o = function () {
        var t = 0,
          e = 150;
        n.length && n.length > Math.ceil(1e3 / e) && (e = 1e3 / n.length);
        for (var i = 0; i < n.length; i++) (setTimeout(r(n[i]), t), (t += e));
      },
      r = function (t) {
        return function () {
          t.classList.remove("h5p-question-hidden-one");
        };
      };
  }),
  ((H5P = H5P || {}).MultiChoice = function (t, e, i) {
    if (!(this instanceof H5P.MultiChoice)) return new H5P.MultiChoice(t, e, i);
    var s = this;
    ((this.contentId = e),
      (this.contentData = i),
      H5P.Question.call(s, "multichoice"));
    for (
      var a = H5P.jQuery,
        l = a.extend(
          !0,
          {
            image: null,
            question: "No question text provided",
            answers: [
              {
                tipsAndFeedback: {
                  tip: "",
                  chosenFeedback: "",
                  notChosenFeedback: "",
                },
                text: "Answer 1",
                correct: !0,
              },
            ],
            overallFeedback: [],
            weight: 1,
            userAnswers: [],
            UI: {
              checkAnswerButton: "Check",
              submitAnswerButton: "Submit",
              showSolutionButton: "Show solution",
              tryAgainButton: "Try again",
              scoreBarLabel: "You got :num out of :total points",
              tipAvailable: "Tip available",
              feedbackAvailable: "Feedback available",
              readFeedback: "Read feedback",
              shouldCheck: "Should have been checked",
              shouldNotCheck: "Should not have been checked",
              noInput: "Input is required before viewing the solution",
              a11yCheck:
                "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
              a11yShowSolution:
                "Show the solution. The task will be marked with its correct solution.",
              a11yRetry:
                "Retry the task. Reset all responses and start the task over again.",
            },
            behaviour: {
              enableRetry: !0,
              enableSolutionsButton: !0,
              enableCheckButton: !0,
              type: "auto",
              singlePoint: !0,
              randomAnswers: !1,
              showSolutionsRequiresInput: !0,
              autoCheck: !1,
              passPercentage: 100,
              showScorePoints: !0,
            },
          },
          t,
        ),
        n = 0,
        o = 0;
      o < l.answers.length;
      o++
    ) {
      var r = l.answers[o];
      ((r.tipsAndFeedback = r.tipsAndFeedback || {}),
        l.answers[o].correct && n++);
    }
    var c = 0 === n;
    "auto" === l.behaviour.type
      ? (l.behaviour.singleAnswer = 1 === n)
      : (l.behaviour.singleAnswer = "single" === l.behaviour.type);
    function u(t, e) {
      ((d = a(
        '<div class="h5p-feedback-dialog"><div class="h5p-feedback-inner"><div class="h5p-feedback-text">' +
          e +
          "</div></div></div>",
      )),
        t.find(a(".h5p-feedback-dialog")).length ||
          d.appendTo(t.addClass("h5p-has-feedback")));
    }
    var h,
      d,
      p = function () {
        (h.unbind("click", p),
          h.find(".h5p-feedback-button, .h5p-feedback-dialog").remove(),
          h.find(".h5p-has-feedback").removeClass("h5p-has-feedback"),
          d && d.remove());
      },
      f = 0,
      m = !1;
    ((s.registerDomElements = function () {
      var t,
        e = l.media;
      e &&
        e.type &&
        e.type.library &&
        ("H5P.Image" === (t = (e = e.type).library.split(" ")[0])
          ? e.params.file &&
            s.setImage(e.params.file.path, {
              disableImageZooming: l.media.disableImageZooming || !1,
              alt: e.params.alt,
              title: e.params.title,
              expandImage: e.params.expandImage,
              minimizeImage: e.params.minimizeImage,
            })
          : "H5P.Video" === t
            ? e.params.sources && s.setVideo(e)
            : "H5P.Audio" === t && e.params.files && s.setAudio(e));
      for (var i = 0; i < l.answers.length; i++)
        l.answers[i].checkboxOrRadioIcon = (function (t, e) {
          e = t ? (e ? "&#xe603;" : "&#xe600;") : e ? "&#xe601;" : "&#xe602;";
          return e;
        })(l.behaviour.singleAnswer, -1 < l.userAnswers.indexOf(i));
      (s.setIntroduction(
        '<div id="' + l.labelId + '">' + l.question + "</div>",
      ),
        (h = a("<ul>", {
          class: "h5p-answers",
          role: l.role,
          "aria-labelledby": l.labelId,
        })));
      for (let t = 0; t < l.answers.length; t++) {
        const r = l.answers[t];
        ((r.text = r.text ?? "<div></div>"),
          a("<li>", {
            class: "h5p-answer",
            role: r.role,
            tabindex: r.tabindex,
            "aria-checked": r.checked,
            "data-id": t,
            html:
              '<div class="h5p-alternative-container"><span class="h5p-alternative-inner">' +
              r.text +
              "</span></div>",
            appendTo: h,
          }));
      }
      s.setContent(h, {
        class: l.behaviour.singleAnswer ? "h5p-radio" : "h5p-check",
      });
      function n(t) {
        if ("true" !== t.attr("aria-disabled")) {
          s.answered = !0;
          var e = parseInt(t.data("id"));
          if (l.behaviour.singleAnswer)
            ((l.userAnswers = [e]),
              (f = l.answers[e].correct ? 1 : 0),
              o
                .not(t)
                .removeClass("h5p-selected")
                .attr("tabindex", "-1")
                .attr("aria-checked", "false"),
              t
                .addClass("h5p-selected")
                .attr("tabindex", "0")
                .attr("aria-checked", "true"));
          else {
            if ("true" === t.attr("aria-checked")) {
              var i = l.userAnswers.indexOf(e);
              if (
                (-1 !== i && l.userAnswers.splice(i, 1),
                l.behaviour.autoCheck && !l.behaviour.enableRetry)
              )
                return;
              t.removeClass("h5p-selected").attr("aria-checked", "false");
            } else
              (l.userAnswers.push(e),
                t.addClass("h5p-selected").attr("aria-checked", "true"));
            k();
          }
          (s.triggerXAPI("interacted"),
            g(t),
            l.userAnswers.length &&
              (s.showButton("check-answer"),
              s.hideButton("try-again"),
              s.hideButton("show-solution"),
              l.behaviour.autoCheck &&
                (l.behaviour.singleAnswer
                  ? b()
                  : (s.showCheckSolution(!0), f === s.getMaxScore() && b()))));
        }
      }
      var o = a(".h5p-answer", h).each(function (t) {
        var i,
          n = l.answers[t].tipsAndFeedback.tip;
        void 0 !== n &&
          (n = n.trim())
            .replace(/&nbsp;/g, "")
            .replace(/<p>/g, "")
            .replace(/<\/p>/g, "")
            .trim().length &&
          (a(this).addClass("h5p-has-tip"),
          (t = a("<div/>", {
            class: "h5p-multichoice-tipwrap",
            "aria-label": l.UI.tipAvailable + ".",
          })),
          (i = a("<div>", {
            role: "button",
            tabindex: 0,
            title: l.UI.tipsLabel,
            "aria-label": l.UI.tipsLabel,
            "aria-expanded": !1,
            class: "multichoice-tip",
            appendTo: t,
          })).append(
            '<span class="joubel-icon-tip-normal"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>',
          ),
          i
            .click(function () {
              var t = i.parents(".h5p-answer"),
                e = !t.children(".h5p-feedback-dialog").is(d);
              return (
                p(),
                e
                  ? (i.attr("aria-expanded", !0),
                    u(t, n),
                    d.addClass("h5p-has-tip"),
                    s.read(n))
                  : i.attr("aria-expanded", !1),
                s.trigger("resize"),
                setTimeout(function () {
                  h.click(p);
                }, 100),
                !1
              );
            })
            .keydown(function (t) {
              if (32 === t.which) return (a(this).click(), !1);
            }),
          a(".h5p-alternative-container", this).append(t));
      });
      (o
        .click(function () {
          n(a(this));
        })
        .keydown(function (t) {
          if (32 === t.keyCode) return (n(a(this)), !1);
          if (l.behaviour.singleAnswer)
            switch (t.keyCode) {
              case 38:
              case 37:
                var e = a(this).prev();
                return (e.length && n(e.focus()), !1);
              case 40:
              case 39:
                e = a(this).next();
                return (e.length && n(e.focus()), !1);
            }
        }),
        l.behaviour.singleAnswer &&
          o
            .focus(function () {
              "true" !== a(this).attr("aria-disabled") &&
                o.not(this).attr("tabindex", "-1");
            })
            .blur(function () {
              o.filter(".h5p-selected").length ||
                o.first().add(o.last()).attr("tabindex", "0");
            }),
        y(),
        l.behaviour.singleAnswer
          ? (f =
              l.userAnswers.length && l.answers[l.userAnswers[0]].correct
                ? 1
                : 0)
          : k(),
        I &&
          l.behaviour.autoCheck &&
          (l.behaviour.singleAnswer || f === s.getMaxScore()
            ? b()
            : s.showCheckSolution(!0)));
    }),
      (this.showAllSolutions = function () {
        m ||
          ((m = !0),
          h
            .find(".h5p-answer")
            .each(function (t, e) {
              var i = a(e),
                e = l.answers[t],
                t =
                  "h5p-solution-icon-" +
                  (l.behaviour.singleAnswer ? "radio" : "checkbox");
              e.correct
                ? i
                    .addClass("h5p-should")
                    .append(
                      a("<span/>", { class: t, html: l.UI.shouldCheck + "." }),
                    )
                : i
                    .addClass("h5p-should-not")
                    .append(
                      a("<span/>", {
                        class: t,
                        html: l.UI.shouldNotCheck + ".",
                      }),
                    );
            })
            .find(".h5p-question-plus-one, .h5p-question-minus-one")
            .remove(),
          w(),
          h.find(".h5p-answer:first-child").focus(),
          s.hideButton("check-answer"),
          s.hideButton("show-solution"),
          l.behaviour.enableRetry && s.showButton("try-again"),
          s.trigger("resize"));
      }),
      (this.showSolutions = function () {
        (p(),
          s.showCheckSolution(),
          s.showAllSolutions(),
          w(),
          s.hideButton("try-again"));
      }));
    var g = function (t) {
      t.removeClass("h5p-correct")
        .removeClass("h5p-wrong")
        .removeClass("h5p-should")
        .removeClass("h5p-should-not")
        .removeClass("h5p-has-feedback")
        .find(
          ".h5p-question-plus-one, .h5p-question-minus-one, .h5p-answer-icon, .h5p-solution-icon-radio, .h5p-solution-icon-checkbox, .h5p-feedback-dialog",
        )
        .remove();
    };
    ((this.hideSolutions = function () {
      ((m = !1),
        g(a(".h5p-answer", h)),
        this.removeFeedback(),
        s.trigger("resize"));
    }),
      (this.resetTask = function (t = !1) {
        for (let t = 0; t < l.answers.length; t++)
          l.answers[t].checked && delete l.answers[t].checked;
        ((s.answered = !1),
          s.hideSolutions(),
          (l.userAnswers = []),
          C(t),
          s.showButton("check-answer"),
          s.hideButton("try-again"),
          s.hideButton("show-solution"),
          x(),
          h?.find(".h5p-feedback-available").remove());
      }));
    var v = function () {
      if (c) return l.weight;
      for (var t = 0, e = 0; e < l.answers.length; e++) {
        var i = l.answers[e];
        i.correct && (t += void 0 !== i.weight ? i.weight : 1);
      }
      return t;
    };
    this.getMaxScore = function () {
      return l.behaviour.singleAnswer || l.behaviour.singlePoint
        ? l.weight
        : v();
    };
    var b = function () {
        (h.unbind("click", p),
          p(),
          l.behaviour.enableSolutionsButton && s.showButton("show-solution"),
          l.behaviour.enableRetry && s.showButton("try-again"),
          s.hideButton("check-answer"),
          s.showCheckSolution(),
          w());
        var t = s.createXAPIEventTemplate("answered");
        (_(t), S(t), s.trigger(t));
      },
      y = function () {
        var t = a('[data-content-id="' + s.contentId + '"].h5p-content'),
          e = t.parents(".h5p-container"),
          t = 0 !== e.length ? e.last() : 0 !== t.length ? t : a(document.body);
        (s.addButton(
          "show-solution",
          l.UI.showSolutionButton,
          function () {
            l.behaviour.showSolutionsRequiresInput && !s.getAnswerGiven(!0)
              ? (s.updateFeedbackContent(l.UI.noInput), s.read(l.UI.noInput))
              : (k(), s.showAllSolutions());
          },
          !1,
          { "aria-label": l.UI.a11yShowSolution },
        ),
          !l.behaviour.enableCheckButton ||
            (l.behaviour.autoCheck && l.behaviour.singleAnswer) ||
            s.addButton(
              "check-answer",
              l.UI.checkAnswerButton,
              function () {
                ((s.answered = !0),
                  b(),
                  h.find(".h5p-answer:first-child").focus());
              },
              !0,
              { "aria-label": l.UI.a11yCheck },
              {
                confirmationDialog: {
                  enable: l.behaviour.confirmCheckDialog,
                  l10n: l.confirmCheck,
                  instance: s,
                  $parentElement: t,
                },
                contentData: s.contentData,
                textIfSubmitting: l.UI.submitAnswerButton,
              },
            ),
          s.addButton(
            "try-again",
            l.UI.tryAgainButton,
            function () {
              if ((s.resetTask(!0), l.behaviour.randomAnswers)) {
                var t = P;
                P = T();
                var e = h.find(".h5p-answer"),
                  i = [];
                for (o = 0; o < e.length; o++)
                  i[o] = a(e[o]).find(".h5p-multichoice-tipwrap");
                for (o = 0; o < e.length; o++)
                  (a(e[o])
                    .find(".h5p-alternative-inner")
                    .html(l.answers[o].text),
                    a(i[o])
                      .detach()
                      .appendTo(
                        a(e[P.indexOf(t[o])]).find(
                          ".h5p-alternative-container",
                        ),
                      ));
              }
            },
            !1,
            { "aria-label": l.UI.a11yRetry },
            {
              confirmationDialog: {
                enable: l.behaviour.confirmRetryDialog,
                l10n: l.confirmRetry,
                instance: s,
                $parentElement: t,
              },
            },
          ));
      };
    this.showCheckSolution = function (o) {
      var r;
      (l.behaviour.singleAnswer ||
        l.behaviour.singlePoint ||
        !l.behaviour.showScorePoints ||
        (r = new H5P.Question.ScorePoints()),
        h.find(".h5p-answer").each(function (t, e) {
          var i = a(e),
            n = l.answers[t],
            e = "true" === i.attr("aria-checked");
          (e &&
            (n.correct
              ? i.hasClass("h5p-correct") ||
                i
                  .addClass("h5p-correct")
                  .append(
                    a("<span/>", {
                      class: "h5p-answer-icon",
                      html: l.UI.correctAnswer + ".",
                    }),
                  )
              : i.hasClass("h5p-wrong") ||
                i
                  .addClass("h5p-wrong")
                  .append(
                    a("<span/>", {
                      class: "h5p-answer-icon",
                      html: l.UI.wrongAnswer + ".",
                    }),
                  ),
            r &&
              ((t = i[0].querySelector(".h5p-alternative-container")),
              (l.behaviour.autoCheck &&
                null !==
                  t.querySelector(
                    ".h5p-question-plus-one, .h5p-question-minus-one",
                  )) ||
                t.appendChild(r.getElement(n.correct)))),
            o ||
              (e &&
              void 0 !== n.tipsAndFeedback.chosenFeedback &&
              "" !== n.tipsAndFeedback.chosenFeedback
                ? u(i, n.tipsAndFeedback.chosenFeedback)
                : e ||
                  void 0 === n.tipsAndFeedback.notChosenFeedback ||
                  "" === n.tipsAndFeedback.notChosenFeedback ||
                  u(i, n.tipsAndFeedback.notChosenFeedback)));
        }));
      var t,
        e,
        i = s.getMaxScore();
      (f === i &&
        (s.hideButton("check-answer"),
        s.hideButton("try-again"),
        s.hideButton("show-solution")),
        o ||
          this.setFeedback(
            ((t = f),
            (e = i),
            H5P.Question.determineOverallFeedback(l.overallFeedback, t / e)
              .replace("@score", t)
              .replace("@total", e)),
            f,
            i,
            l.UI.scoreBarLabel,
          ),
        s.trigger("resize"));
    };
    var w = function () {
        (a(".h5p-answer", h)
          .attr({ "aria-disabled": "true", tabindex: "-1" })
          .removeAttr("role")
          .removeAttr("aria-checked"),
          a(".h5p-answers").removeAttr("role"));
      },
      x = function () {
        (a(".h5p-answer", h).attr({
          "aria-disabled": "false",
          role: l.behaviour.singleAnswer ? "radio" : "checkbox",
        }),
          a(".h5p-answers").attr("role", l.role));
      },
      k = function () {
        f = 0;
        for (const i of l.userAnswers) {
          var t = l.answers[i],
            e = void 0 !== t.weight ? t.weight : 1;
          t.correct ? (f += e) : (f -= e);
        }
        (f < 0 && (f = 0),
          !l.userAnswers.length && c && (f = l.weight),
          l.behaviour.singlePoint &&
            (f = (100 * f) / v() >= l.behaviour.passPercentage ? l.weight : 0));
      },
      C = function (t) {
        var e = a(".h5p-answer", h)
          .removeClass("h5p-selected")
          .attr("aria-checked", "false");
        ((l.behaviour.singleAnswer ? e.first() : e).attr("tabindex", "0"),
          (t || s.isRoot()) && e.first().focus(),
          k());
      };
    this.getXAPIData = function () {
      var t = this.createXAPIEventTemplate("answered");
      return (_(t), S(t), { statement: t.data.statement });
    };
    for (
      var P,
        _ = function (t) {
          var e = t.getVerifiedStatementValue(["object", "definition"]);
          ((e.description = {
            "en-US": a("<div>" + l.question + "</div>").text(),
          }),
            (e.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
            (e.interactionType = "choice"),
            (e.correctResponsesPattern = []),
            (e.choices = []));
          for (var i = 0; i < l.answers.length; i++)
            ((e.choices[i] = {
              id: l.answers[i].originalOrder + "",
              description: {
                "en-US": a("<div>" + l.answers[i].text + "</div>").text(),
              },
            }),
              l.answers[i].correct &&
                (l.singleAnswer
                  ? e.correctResponsesPattern.push(
                      "" + l.answers[i].originalOrder,
                    )
                  : (e.correctResponsesPattern.length
                      ? (e.correctResponsesPattern[0] += "[,]")
                      : e.correctResponsesPattern.push(""),
                    (e.correctResponsesPattern[0] +=
                      l.answers[i].originalOrder))));
        },
        S = function (t) {
          var e = s.getMaxScore(),
            i = (100 * f) / e >= l.behaviour.passPercentage;
          (t.setScoredResult(f, e, s, !0, i), void 0 === l.userAnswers && k());
          for (var n = "", o = 0; o < l.userAnswers.length; o++)
            ("" !== n && (n += "[,]"),
              (n += void 0 === P ? l.userAnswers[o] : P[l.userAnswers[o]]));
          t.data.statement.result.response = n;
        },
        T = function () {
          l.answers = H5P.shuffleArray(l.answers);
          var t = [];
          for (o = 0; o < l.answers.length; o++)
            t[o] = l.answers[o].originalOrder;
          return t;
        },
        o = 0;
      o < l.answers.length;
      o++
    )
      l.answers[o].originalOrder = o;
    if (
      (l.behaviour.randomAnswers && (P = T()),
      (l.userAnswers = []),
      i && void 0 !== i.previousState && i.previousState.answers)
    ) {
      if (P)
        for (o = 0; o < i.previousState.answers.length; o++)
          for (var H = 0; H < P.length; H++)
            P[H] === i.previousState.answers[o] && l.userAnswers.push(H);
      else l.userAnswers = i.previousState.answers;
      k();
    }
    for (var I = !1, E = 0; E < l.answers.length; E++) {
      var D = l.answers[E];
      (l.behaviour.singleAnswer
        ? ((D.role = "radio"),
          0 === l.userAnswers.length
            ? (0 !== o && o !== l.answers.length) || (D.tabindex = "0")
            : -1 !== l.userAnswers.indexOf(E) &&
              ((D.tabindex = "0"), (D.checked = "true"), (I = !0)))
        : ((D.role = "checkbox"),
          (D.tabindex = "0"),
          -1 !== l.userAnswers.indexOf(E) && ((D.checked = "true"), (I = !0))),
        void 0 === D.tabindex && (D.tabindex = "-1"),
        void 0 === D.checked && (D.checked = "false"));
    }
    ((H5P.MultiChoice.counter =
      void 0 === H5P.MultiChoice.counter ? 0 : H5P.MultiChoice.counter + 1),
      (l.role = l.behaviour.singleAnswer ? "radiogroup" : "group"),
      (l.labelId = "h5p-mcq" + H5P.MultiChoice.counter),
      (this.getCurrentState = function () {
        var t = {};
        if (P) {
          t.answers = [];
          for (var e = 0; e < l.userAnswers.length; e++)
            t.answers.push(P[l.userAnswers[e]]);
        } else t.answers = l.userAnswers;
        return t;
      }),
      (this.getAnswerGiven = function (t) {
        return (!t && this.answered) || 0 < l.userAnswers.length || c;
      }),
      (this.getScore = function () {
        return f;
      }),
      (this.getTitle = function () {
        return H5P.createTitle(
          this.contentData &&
            this.contentData.metadata &&
            this.contentData.metadata.title
            ? this.contentData.metadata.title
            : "Multiple Choice",
        );
      }));
  }),
  (H5P.MultiChoice.prototype = Object.create(H5P.Question.prototype)),
  (H5P.MultiChoice.prototype.constructor =
    H5P.MultiChoice) /*!@license H5P.Video-1.6/scripts/vimeo.js by Joubel licensed under MIT*/,
  (H5P.VideoVimeo = (function (S) {
    let T = 0;
    function t(n, o, r) {
      const s = this;
      let a,
        l = 0,
        c,
        u,
        h = 0,
        d = 0,
        t = 0,
        e = 0,
        i = 1,
        p = [],
        f,
        m = !1,
        g = 9 / 16,
        v = !1;
      const b = 8,
        y = "h5p-vimeo-" + ++T,
        w = S("<div/>"),
        x = S("<div/>", {
          id: y,
          html: `<div class="h5p-video-loading" style="height: 100%; min-height: 200px; display: block; z-index: 100;" aria-label="${r.loading}"></div>`,
        }).appendTo(w),
        k = async () => {
          if (x.is(":visible") && void 0 === a) {
            a = null;
            const i = await H();
            var t = Math.max(w.width(), 200),
              e = o.controls || s.pressToPlay,
              e = {
                url: n[0].path,
                controls: e,
                responsive: !0,
                dnt: !0,
                autoplay: !1,
                loop: !!o.loop,
                playsinline: !0,
                quality: "auto",
                width: t,
                muted: !1,
                keyboard: e,
              };
            ((a = new i.Player(y, e)),
              P(a),
              (f = setTimeout(() => {
                ((m = !0),
                  C(),
                  w.html(
                    `<p class="vimeo-failed-loading">${r.vimeoLoadingError}</p>`,
                  ),
                  w.css({ width: null, height: null }),
                  s.trigger("resize"),
                  s.trigger("error", r.vimeoLoadingError));
              }, 1e3 * b)));
          }
        },
        C = () => {
          x.find("div.h5p-video-loading").remove();
        },
        P = (e) => {
          let i, n;
          (e.on("loaded", async () => {
            ((i = !0), (v = !0), clearTimeout(f));
            var t = await _(e);
            ((n = t.tracks.options),
              (u = n.current),
              (d = t.duration),
              (p = t.qualities),
              (c = "auto"));
            try {
              g = t.dimensions.height / t.dimensions.width;
            } catch (t) {}
            (C(),
              o.startAt && (h = await s.seek(o.startAt)),
              s.trigger("ready"),
              s.trigger("loaded"),
              s.trigger("qualityChange", c),
              s.trigger("resize"));
          }),
            e.on("play", () => {
              i && ((i = !1), n.length && s.trigger("captions", n));
            }),
            e.on("playing", () => s.trigger("stateChange", H5P.Video.PLAYING)),
            e.on("pause", () => s.trigger("stateChange", H5P.Video.PAUSED)),
            e.on("ended", () => s.trigger("stateChange", H5P.Video.ENDED)),
            e.on("progress", (t) => {
              l = 100 * t.percent;
            }),
            e.on("timeupdate", (t) => {
              h = t.seconds;
            }));
        },
        _ = (t) => {
          return Promise.all([
            t.getDuration(),
            t.getQualities(),
            t.getTextTracks(),
            t.getVideoWidth(),
            t.getVideoHeight(),
          ]).then((t) =>
            ((t) => {
              return {
                duration: t[0],
                qualities: t[1].map((t) => ({ name: t.id, label: t.label })),
                tracks: t[2].reduce(
                  (t, e) => {
                    var i = new H5P.Video.LabelValue(e.label, e.language);
                    return (
                      t.options.push(i),
                      "showing" === e.mode && (t.current = i),
                      t
                    );
                  },
                  { current: void 0, options: [] },
                ),
                dimensions: { width: t[3], height: t[4] },
              };
            })(t),
          );
        };
      try {
        !1 === document.featurePolicy.allowsFeature("autoplay") &&
          (s.pressToPlay = !0);
      } catch (t) {}
      ((s.appendTo = (t) => {
        (t.addClass("h5p-vimeo").append(w), k());
      }),
        (s.getQualities = () => p),
        (s.getQuality = () => c),
        (s.setQuality = async (t) => {
          ((c = await a.setQuality(t)), s.trigger("qualityChange", c));
        }),
        (s.play = async () => {
          if (a)
            try {
              await a.play();
            } catch (t) {
              switch (t.name) {
                case "PasswordError":
                  s.trigger("error", r.vimeoPasswordError);
                  break;
                case "PrivacyError":
                  s.trigger("error", r.vimeoPrivacyError);
                  break;
                default:
                  s.trigger("error", r.unknownError);
              }
            }
          else s.on("ready", s.play);
        }),
        (s.pause = () => {
          a && a.pause();
        }),
        (s.seek = async (t) => {
          a && ((h = t), await a.setCurrentTime(t));
        }),
        (s.getCurrentTime = () => h),
        (s.getDuration = () => d),
        (s.getBuffered = () => l),
        (s.mute = async () => {
          t = await a.setMuted(!0);
        }),
        (s.unMute = async () => {
          t = await a.setMuted(!1);
        }),
        (s.isMuted = () => t),
        (s.isLoaded = () => v),
        (s.getVolume = () => e),
        (s.setVolume = async (t) => {
          e = await a.setVolume(t);
        }),
        (s.getPlaybackRates = () => [0.5, 1, 1.5, 2]),
        (s.getPlaybackRate = () => i),
        (s.setPlaybackRate = async (t) => {
          ((i = await a.setPlaybackRate(t)),
            s.trigger("playbackRateChange", t));
        }),
        (s.setCaptionsTrack = (t) => {
          if (!t)
            return a.disableTextTrack().then(() => {
              u = null;
            });
          a.enableTextTrack(t.value).then(() => {
            u = t;
          });
        }),
        (s.getCaptionsTrack = () => u),
        s.on("resize", () => {
          var t, e;
          !m &&
            w.is(":visible") &&
            (void 0 !== a
              ? (w.css({ width: "100%", height: "auto" }),
                (t = w[0].clientWidth),
                0 < (e = o.fit ? w[0].clientHeight : t * g) &&
                  w.css({ width: t + "px", height: e + "px" }))
              : k());
        }));
    }
    t.canPlay = (t) => e(t[0].path);
    const e = (t) => {
        t = t.match(
          /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,
        );
        if (t && t[5]) return t[5];
      },
      H = async () =>
        window.Vimeo
          ? Promise.resolve(window.Vimeo)
          : new Promise((t, e) => {
              const i = document.createElement("script");
              ((i.src = "https://player.vimeo.com/api/player.js"),
                (i.onload = () => t(window.Vimeo)),
                (i.onerror = e),
                document.querySelector("script").before(i));
            });
    return t;
  })(H5P.jQuery)),
  (H5P.videoHandlers = H5P.videoHandlers || []),
  H5P.videoHandlers.push(
    H5P.VideoVimeo,
  ) /*!@license H5P.Video-1.6/scripts/youtube.js by Joubel licensed under MIT*/,
  (H5P.VideoYouTube = (function (t) {
    function e(i, o, r) {
      var s,
        a = this,
        l = 1,
        c = "h5p-youtube-" + m;
      m++;
      var u = t("<div/>"),
        h = t("<div/>", { id: c, text: r.loading }).appendTo(u),
        d = function () {
          var t, n, e;
          h.is(":visible") &&
            void 0 === s &&
            (void 0 !== window.YT
              ? void 0 !== YT.Player &&
                ((t = u.width()) < 200 && (t = 200),
                (n = !0),
                (e = p(i[0].path)),
                (s = new YT.Player(c, {
                  width: t,
                  height: t * (9 / 16),
                  videoId: e,
                  playerVars: {
                    origin: g,
                    autoplay: 0,
                    controls: o.controls ? 1 : 0,
                    disablekb: o.controls ? 0 : 1,
                    fs: 0,
                    loop: o.loop ? 1 : 0,
                    playlist: o.loop ? e : void 0,
                    rel: 0,
                    showinfo: 0,
                    iv_load_policy: 3,
                    wmode: "opaque",
                    start: Math.floor(o.startAt),
                    playsinline: 1,
                  },
                  events: {
                    onReady: function () {
                      (a.trigger("ready"),
                        a.trigger("loaded"),
                        o.autoplay || (a.toPause = !0),
                        o.deactivateSound && a.mute());
                    },
                    onApiChange: function () {
                      var t;
                      n && ((n = !1), s.loadModule("captions"));
                      try {
                        t = s.getOption("captions", "tracklist");
                      } catch (t) {}
                      if (t && t.length) {
                        for (var e = [], i = 0; i < t.length; i++)
                          e.push(
                            new H5P.Video.LabelValue(
                              t[i].displayName,
                              t[i].languageCode,
                            ),
                          );
                        a.trigger("captions", e);
                      }
                    },
                    onStateChange: function (t) {
                      -1 < t.data &&
                        t.data < 4 &&
                        (a.toPause &&
                          (t.data === H5P.Video.BUFFERING
                            ? delete a.toPause
                            : a.pause()),
                        H5P.Video.IE11_PLAYBACK_RATE_FIX &&
                          t.data === H5P.Video.PLAYING &&
                          1 !== l &&
                          (s.setPlaybackRate(1), s.setPlaybackRate(l)),
                        a.trigger("stateChange", t.data));
                    },
                    onPlaybackQualityChange: function (t) {
                      a.trigger("qualityChange", t.data);
                    },
                    onPlaybackRateChange: function (t) {
                      a.trigger("playbackRateChange", t.data);
                    },
                    onError: function (t) {
                      var e;
                      switch (t.data) {
                        case 2:
                          e = r.invalidYtId;
                          break;
                        case 100:
                          e = r.unknownYtId;
                          break;
                        case 101:
                        case 150:
                          e = r.restrictedYt;
                          break;
                        default:
                          e = r.unknownError + " " + t.data;
                      }
                      a.trigger("error", e);
                    },
                  },
                })))
              : f(d));
        };
      if (navigator.userAgent.match(/iPad/i)) a.pressToPlay = !0;
      else
        try {
          !1 === document.featurePolicy.allowsFeature("autoplay") &&
            (a.pressToPlay = !0);
        } catch (t) {}
      ((a.appendTo = function (t) {
        (t.addClass("h5p-youtube").append(u), d());
      }),
        (a.getQualities = function () {
          if (s && s.getAvailableQualityLevels) {
            var t = s.getAvailableQualityLevels();
            if (t.length) {
              for (var e = 0; e < t.length; e++) {
                var i = t[e];
                void 0 !== n[i] && n[i];
                t[e] = { name: i, label: n[i] };
              }
              return t;
            }
          }
        }),
        (a.getQuality = function () {
          if (s && s.getPlaybackQuality) {
            var t = s.getPlaybackQuality();
            return "unknown" === t ? void 0 : t;
          }
        }),
        (a.setQuality = function (t) {
          s && s.setPlaybackQuality && s.setPlaybackQuality(t);
        }),
        (a.play = function () {
          s && s.playVideo ? s.playVideo() : a.on("ready", a.play);
        }),
        (a.pause = function () {
          (delete a.toPause,
            a.off("ready", a.play),
            s && s.pauseVideo && s.pauseVideo());
        }),
        (a.seek = function (t) {
          s && s.seekTo && s.seekTo(t, !0);
        }),
        (a.resetPlayback = function (t) {
          ((o.startAt = t),
            s &&
              (s.getPlayerState() === H5P.Video.PLAYING &&
                (s.pauseVideo(), a.trigger("stateChange", H5P.Video.PAUSED)),
              s.destroy(),
              (s = void 0)),
            d());
        }),
        (a.getCurrentTime = function () {
          if (s && s.getCurrentTime) return s.getCurrentTime();
        }),
        (a.getDuration = function () {
          if (s && s.getDuration) return s.getDuration();
        }),
        (a.getBuffered = function () {
          if (s && s.getVideoLoadedFraction)
            return 100 * s.getVideoLoadedFraction();
        }),
        (a.mute = function () {
          s && s.mute && s.mute();
        }),
        (a.unMute = function () {
          s && s.unMute && s.unMute();
        }),
        (a.isMuted = function () {
          if (s && s.isMuted) return s.isMuted();
        }),
        (a.isLoaded = function () {
          if (s && s.getPlayerState) return 5 === s.getPlayerState();
        }),
        (a.getVolume = function () {
          if (s && s.getVolume) return s.getVolume();
        }),
        (a.setVolume = function (t) {
          s && s.setVolume && s.setVolume(t);
        }),
        (a.getPlaybackRates = function () {
          if (s && s.getAvailablePlaybackRates) {
            var t = s.getAvailablePlaybackRates();
            if (t.length) return t;
          }
        }),
        (a.getPlaybackRate = function () {
          if (s && s.getPlaybackRate) return s.getPlaybackRate();
        }),
        (a.setPlaybackRate = function (t) {
          s && s.setPlaybackRate && ((l = Number(t)), s.setPlaybackRate(l));
        }),
        (a.setCaptionsTrack = function (t) {
          s.setOption("captions", "track", t ? { languageCode: t.value } : {});
        }),
        (a.getCaptionsTrack = function () {
          var t = s.getOption("captions", "track");
          return t.languageCode
            ? new H5P.Video.LabelValue(t.displayName, t.languageCode)
            : null;
        }),
        a.on("resize", function () {
          var t, e;
          u.is(":visible") &&
            (s
              ? (u.css({ width: "100%", height: "100%" }),
                (t = u[0].clientWidth),
                0 < (e = o.fit ? u[0].clientHeight : t * (9 / 16)) &&
                  (u.css({ width: t + "px", height: e + "px" }),
                  s.setSize(t, e)))
              : d());
        }));
    }
    e.canPlay = function (t) {
      return p(t[0].path);
    };
    var p = function (t) {
        t = t.match(
          /(?:(?:youtube.com\/(?:attribution_link\?(?:\S+))?(?:v\/|embed\/|watch\/|(?:user\/(?:\S+)\/)?watch(?:\S+)v\=))|(?:youtu.be\/|y2u.be\/))([A-Za-z0-9_-]{11})/i,
        );
        if (t && t[1]) return t[1];
      },
      f = function (e) {
        var i, t, n;
        void 0 !== window.onYouTubeIframeAPIReady
          ? ((i = window.onYouTubeIframeAPIReady),
            (window.onYouTubeIframeAPIReady = function (t) {
              (e(t), i(t));
            }))
          : (((t = document.createElement("script")).src =
              "https://www.youtube.com/iframe_api"),
            (n =
              document.getElementsByTagName(
                "script",
              )[0]).parentNode.insertBefore(t, n),
            (window.onYouTubeIframeAPIReady = e));
      },
      n = {
        highres: "2160p",
        hd2160: "2160p",
        hd1440: "1440p",
        hd1080: "1080p",
        hd720: "720p",
        large: "480p",
        medium: "360p",
        small: "240p",
        tiny: "144p",
        auto: "Auto",
      },
      m = 0,
      g =
        (g = window.location.href.match(/http[s]?:\/\/[^\/]+/)) &&
        void 0 !== g[0]
          ? g[0]
          : void 0;
    return e;
  })(H5P.jQuery)),
  (H5P.videoHandlers = H5P.videoHandlers || []),
  H5P.videoHandlers.push(
    H5P.VideoYouTube,
  ) /*!@license H5P.Video-1.6/scripts/panopto.js by Joubel licensed under MIT*/,
  (H5P.VideoPanopto = (function (t) {
    function e(i, n, o) {
      var r,
        s = this;
      ((s.volume = 100), (s.toSeek = void 0));
      let a;
      var l = "h5p-panopto-" + v;
      v++;
      let c = !1,
        u = !1;
      var h = t("<div/>"),
        d = t("<div/>", {
          id: l,
          html: "<div>" + o.loading + "</div>",
        }).appendTo(h);
      try {
        !1 !== document.featurePolicy.allowsFeature("autoplay") && (a = !0);
      } catch (t) {}
      var p = function () {
        var t, e;
        d.is(":visible") &&
          void 0 === r &&
          (void 0 !== window.EmbedApi
            ? ((t = h.width()) < 200 && (t = 200),
              (e = m(i[0].path)),
              (r = new EmbedApi(l, {
                width: t,
                height: t * (9 / 16),
                serverName: e[0],
                sessionId: e[1],
                videoParams: {
                  interactivity: "none",
                  showtitle: !1,
                  autohide: !0,
                  offerviewer: !1,
                  autoplay: !1,
                  showbrand: !1,
                  start: 0,
                  hideoverlay: !n.controls,
                },
                events: {
                  onIframeReady: function () {
                    ((u = !0),
                      d.children(0).text(""),
                      n.autoplay && a && (r.loadVideo(), (c = !0)),
                      s.trigger("containerLoaded"),
                      s.trigger("resize"));
                  },
                  onReady: function () {
                    if (
                      ((s.videoLoaded = !0),
                      s.trigger("loaded"),
                      "number" == typeof s.oldTime
                        ? s.seek(s.oldTime)
                        : "number" == typeof s.startAt &&
                          0 < s.startAt &&
                          s.seek(s.startAt),
                      r.hasCaptions())
                    ) {
                      const e = [];
                      var t = r.getCaptionTracks();
                      for (trackIndex in t)
                        e.push(
                          new H5P.Video.LabelValue(t[trackIndex], trackIndex),
                        );
                      ((f = r.getSelectedCaptionTrack()),
                        (f = e[f] || null),
                        s.trigger("captions", e));
                    }
                  },
                  onStateChange: function (t) {
                    ([H5P.Video.PLAYING, H5P.Video.PAUSED].includes(t) &&
                      "number" == typeof s.seekToTime &&
                      (r.seekTo(s.seekToTime), delete s.seekToTime),
                      s.WAS_RESET && (s.WAS_RESET = !1),
                      -1 < t && t < 4 && s.trigger("stateChange", t));
                  },
                  onPlaybackRateChange: function () {
                    s.trigger("playbackRateChange", s.getPlaybackRate());
                  },
                  onError: function (t) {
                    t === ApiError.PlayWithSoundNotAllowed
                      ? (s.pause(), s.unMute())
                      : s.trigger("error", o.unknownError);
                  },
                  onLoginShown: function () {
                    (d.children().first().remove(), s.trigger("loaded"));
                  },
                },
              })))
            : g(p));
      };
      ((s.pressToPlay = !0),
        (s.appendTo = function (t) {
          (t.addClass("h5p-panopto").append(h), p());
        }),
        (s.getQualities = function () {}),
        (s.getQuality = function () {}),
        (s.setQuality = function (t) {}),
        (s.play = function () {
          r &&
            r.playVideo &&
            u &&
            (c || s.videoLoaded ? r.playVideo() : (r.loadVideo(), (c = !0)));
        }),
        (s.pause = function () {
          if (r && r.pauseVideo)
            try {
              r.pauseVideo();
            } catch (t) {}
        }),
        (s.seek = function (t) {
          r &&
            r.seekTo &&
            s.videoLoaded &&
            (r.isReady
              ? (r.seekTo(t),
                s.WAS_RESET && (delete s.seekToTime, (s.WAS_RESET = !1)))
              : (s.seekToTime = t));
        }),
        (s.resetPlayback = function (t) {
          r && r.isReady && s.videoLoaded
            ? (s.seek(t), s.pause())
            : (s.seekToTime = t);
        }),
        (s.getCurrentTime = function () {
          if (r && r.getCurrentTime) return r.getCurrentTime();
        }),
        (s.getDuration = function () {
          if (r && r.getDuration) return r.getDuration();
        }),
        (s.getBuffered = function () {}),
        (s.mute = function () {
          r && r.muteVideo && r.muteVideo();
        }),
        (s.unMute = function () {
          r && r.unmuteVideo && (r.unmuteVideo(), s.setVolume(s.volume));
        }),
        (s.isMuted = function () {
          if (r && r.isMuted) return r.isMuted();
        }),
        (s.isLoaded = function () {
          return u;
        }),
        (s.getVolume = function () {
          if (r && r.getVolume) return 100 * r.getVolume();
        }),
        (s.setVolume = function (t) {
          r && r.setVolume && (r.setVolume(t / 100), (s.volume = t));
        }),
        (s.getPlaybackRates = function () {
          return [0.25, 0.5, 1, 1.25, 1.5, 2];
        }),
        (s.getPlaybackRate = function () {
          if (r && r.getPlaybackRate) return r.getPlaybackRate();
        }),
        (s.setPlaybackRate = function (t) {
          r && r.setPlaybackRate && r.setPlaybackRate(t);
        }),
        (s.setCaptionsTrack = function (t) {
          f = t
            ? (r.enableCaptions(t.value + ""), t)
            : (r.disableCaptions(), null);
        }),
        (s.getCaptionsTrack = function () {
          return f;
        }),
        s.on("resize", function () {
          if (h.is(":visible"))
            if (r) {
              h.css({ width: "100%", height: "100%" });
              var t = h[0].clientWidth,
                e = n.fit ? h[0].clientHeight : t * (9 / 16);
              h.css({ width: t + "px", height: e + "px" });
              const i = d.children("iframe");
              i.length && (i.attr("width", t), i.attr("height", e));
            } else p();
        }));
      let f;
    }
    e.canPlay = function (t) {
      return m(t[0].path);
    };
    var m = function (t) {
        t = t.match(
          /^[^\/]+:\/\/([^\/]*panopto\.[^\/]+)\/Panopto\/.+\?id=(.+)$/,
        );
        if (t && 3 === t.length) return [t[1], t[2]];
      },
      g = function (e) {
        var i, t, n;
        void 0 !== window.onPanoptoEmbedApiReady
          ? ((i = window.onPanoptoEmbedApiReady),
            (window.onPanoptoEmbedApiReady = function (t) {
              (e(t), i(t));
            }))
          : (((t = document.createElement("script")).src =
              "https://developers.panopto.com/scripts/embedapi.min.js"),
            (n =
              document.getElementsByTagName(
                "script",
              )[0]).parentNode.insertBefore(t, n),
            (window.onPanoptoEmbedApiReady = e));
      },
      v = 0;
    return e;
  })(H5P.jQuery)),
  (H5P.videoHandlers = H5P.videoHandlers || []),
  H5P.videoHandlers.push(
    H5P.VideoPanopto,
  ) /*!@license H5P.Video-1.6/scripts/html5.js by Joubel licensed under MIT*/,
  (H5P.VideoHtml5 = (function (k) {
    function t(t, n, i) {
      var o = this;
      function e() {
        var t, e;
        void 0 !== b[u] &&
          (void 0 !== H5P.setSource
            ? H5P.setSource(v, b[u].source, o.contentId)
            : ((t = H5P.getPath(b[u].source.path, o.contentId)),
              void 0 !== H5P.getCrossOrigin &&
                ((e = H5P.getCrossOrigin(t)),
                v.setAttribute("crossorigin", null !== e ? e : "anonymous")),
              (v.src = t)),
          n.poster && (v.poster = r(n.poster)),
          n.tracks.forEach(function (t, e) {
            t = s(t);
            (0 === e && (t.default = !0), t && v.appendChild(t));
          }));
      }
      const r = function (t) {
          let e = H5P.getPath(t.path, o.contentId);
          return (
            null !== v.crossOrigin &&
              H5P.addQueryParameter &&
              H5PIntegration.crossoriginCacheBuster &&
              (e = H5P.addQueryParameter(
                e,
                H5PIntegration.crossoriginCacheBuster,
              )),
            e
          );
        },
        s = function (t) {
          if (t.kind && t.track.path) {
            var e = document.createElement("track");
            return (
              (e.kind = t.kind),
              (e.src = r(t.track)),
              t.label && (e.label = t.label),
              t.srcLang && (e.srcLang = t.srcLang),
              e
            );
          }
        };
      var a,
        l,
        c,
        u,
        h,
        d = k("<div/>", { class: "h5p-video-loading" }),
        p = k("<div/>", { class: "h5p-video-error" }),
        f = !1,
        m = 1,
        g = !1,
        v = document.createElement("video"),
        b = C(t, v);
      for (h in ((numQualities = 0), b)) numQualities++;
      if (1 < numQualities && void 0 !== H5P.VideoHtml5.getExternalQuality)
        H5P.VideoHtml5.getExternalQuality(t, function (t) {
          (void 0 !== b[t] && (u = t), e());
        });
      else {
        if (void 0 === (u = _()) || void 0 === b[u])
          for (u in b) if (b.hasOwnProperty(u)) break;
        e();
      }
      (v.setAttribute("webkit-playsinline", ""),
        v.setAttribute("playsinline", ""),
        v.setAttribute("preload", "metadata"));
      let y = "nodownload";
      (n.disableFullscreen && (y += " nofullscreen"),
        n.disableRemotePlayback && (y += " noremoteplayback"),
        v.setAttribute("controlsList", y),
        (v.disablePictureInPicture = !0),
        (v.disableRemotePlayback = !!n.disableRemotePlayback),
        (v.controls = !!n.controls),
        (v.autoplay = !1),
        (v.loop = !!n.loop),
        (v.className = "h5p-video"),
        (v.style.display = "block"),
        n.fit && ((v.style.width = "100%"), (v.style.height = "100%")));
      function w(t, e, i) {
        v.addEventListener(
          t,
          function () {
            switch (e) {
              case "loaded":
                if (((f = !0), void 0 !== a)) return;
                if ((p.is(":visible") && p.remove(), T)) {
                  var t = function () {
                    (v.removeEventListener("durationchange", t, !1),
                      o.trigger(e));
                  };
                  return void v.addEventListener("durationchange", t, !1);
                }
                v.poster
                  ? k(v).one("play", function () {
                      o.seek(o.getCurrentTime() || n.startAt);
                    })
                  : o.seek(n.startAt);
                break;
              case "error":
                i = x(arguments[0], arguments[1]);
                break;
              case "playbackRateChange":
                if (g) return void (g = !1);
                if (H5P.Video.IE11_PLAYBACK_RATE_FIX && m != v.playbackRate)
                  return ((v.playbackRate = m), void (g = !0));
                i = o.getPlaybackRate();
            }
            o.trigger(e, i);
          },
          !1,
        );
      }
      var x = function (t, e) {
        if (t instanceof Event) {
          if (!t.target.error) return "";
          switch (t.target.error.code) {
            case MediaError.MEDIA_ERR_ABORTED:
              e = i.aborted;
              break;
            case MediaError.MEDIA_ERR_NETWORK:
              e = i.networkFailure;
              break;
            case MediaError.MEDIA_ERR_DECODE:
              e = i.cannotDecode;
              break;
            case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:
              e = i.formatNotSupported;
              break;
            case MediaError.MEDIA_ERR_ENCRYPTED:
              e = i.mediaEncrypted;
          }
        }
        return (
          (e = e || i.unknownError),
          d.remove(),
          p.text(e).insertAfter(v),
          e
        );
      };
      ((o.appendTo = function (t) {
        t.append(v);
      }),
        (o.getQualities = function () {
          var t,
            e = [];
          for (t in b)
            b.hasOwnProperty(t) &&
              e.splice(0, 0, { name: t, label: b[t].label });
          if (!(e.length < 2)) return e;
        }),
        (o.getQuality = function () {
          return u;
        }),
        (o.setQuality = function (t) {
          var e;
          void 0 !== b[t] &&
            t !== u &&
            (P(t),
            a ||
              ((a = c),
              (l = v.currentTime),
              v.addEventListener(
                "loadedmetadata",
                (e = function () {
                  var t;
                  (v.removeEventListener("loadedmetadata", e, !1),
                    T
                      ? v.addEventListener(
                          "durationchange",
                          (t = function () {
                            (v.removeEventListener("durationchange", t, !1),
                              o.seek(l));
                          }),
                          !1,
                        )
                      : o.seek(l),
                    v.play(),
                    a !== H5P.Video.PLAYING && v.pause(),
                    (a = void 0),
                    p.is(":visible") && p.remove());
                }),
                !1,
              )),
            (u = t),
            o.trigger("qualityChange", u),
            o.trigger("stateChange", H5P.Video.BUFFERING),
            (v.src = r(b[t].source)),
            v.removeAttribute("poster"));
        }),
        (o.play = function () {
          if (!p.is(":visible"))
            return f
              ? v.play()
              : (v.load(),
                void v.addEventListener(
                  "loadeddata",
                  function () {
                    v.play();
                  },
                  !1,
                ));
        }),
        (o.pause = function () {
          v.pause();
        }),
        (o.seek = function (t) {
          v.currentTime = t;
          const e = navigator.userAgent.match(/iPad|iPod|iPhone/i)
            ? "canplaythrough"
            : "loadedmetadata";
          function i() {
            ((v.currentTime = t), v.removeEventListener(e, i));
          }
          4 === v.readyState ? i() : v.addEventListener(e, i);
        }),
        (o.getCurrentTime = function () {
          return v.currentTime;
        }),
        (o.getDuration = function () {
          if (!isNaN(v.duration)) return v.duration;
        }),
        (o.getBuffered = function () {
          for (var t = 0, e = 0; e < v.buffered.length; e++) {
            var i = v.buffered.start(e),
              n = v.buffered.end(e);
            if (v.currentTime > i && v.currentTime < n) {
              t = n;
              break;
            }
          }
          return t ? (t / v.duration) * 100 : 0;
        }),
        (o.mute = function () {
          v.muted = !0;
        }),
        (o.unMute = function () {
          v.muted = !1;
        }),
        (o.isMuted = function () {
          return v.muted;
        }),
        (o.getVolume = function () {
          return 100 * v.volume;
        }),
        (o.setVolume = function (t) {
          v.volume = t / 100;
        }),
        (o.getPlaybackRates = function () {
          return H;
        }),
        (o.getPlaybackRate = function () {
          return v.playbackRate;
        }),
        (o.setPlaybackRate = function (t) {
          ((m = t), (v.playbackRate = t));
        }),
        (o.setCaptionsTrack = function (t) {
          for (var e = 0; e < v.textTracks.length; e++)
            v.textTracks[e].mode = t && t.value === e ? "showing" : "disabled";
        }),
        (o.getCaptionsTrack = function () {
          for (var t = 0; t < v.textTracks.length; t++)
            if ("showing" === v.textTracks[t].mode)
              return new H5P.Video.LabelValue(v.textTracks[t].label, t);
          return null;
        }),
        w("ended", "stateChange", H5P.Video.ENDED),
        w("playing", "stateChange", H5P.Video.PLAYING),
        w("pause", "stateChange", H5P.Video.PAUSED),
        w("waiting", "stateChange", H5P.Video.BUFFERING),
        w("loadedmetadata", "loaded"),
        w("canplay", "canplay"),
        w("error", "error"),
        w("ratechange", "playbackRateChange"),
        v.controls ||
          v.addEventListener(
            "contextmenu",
            function (t) {
              t.preventDefault();
            },
            !1,
          ),
        o.on("stateChange", function (t) {
          t = t.data;
          (c = t) === H5P.Video.BUFFERING ? d.insertAfter(v) : d.remove();
        }),
        o.on("loaded", function () {
          S(function () {
            for (var t = [], e = 0; e < v.textTracks.length; e++)
              t.push(new H5P.Video.LabelValue(v.textTracks[e].label, e));
            t.length && o.trigger("captions", t);
          });
        }),
        S(function () {
          o.trigger("ready");
        }),
        (o.isLoaded = function () {
          return f;
        }));
    }
    var e,
      l = function (t) {
        var e,
          i = t.mime;
        return (
          i ||
            ((e = t.path.match(/\.(\w+)$/)) && e[1] && (i = "video/" + e[1])),
          i && t.codecs && (i += '; codecs="' + t.codecs + '"'),
          i
        );
      },
      C = function (t, e) {
        for (var i = {}, n = 1, o = 0; o < t.length; o++) {
          var r,
            s = t[o],
            a = (s.type = l(s));
          a &&
            ("video/unknown" === a || "" !== e.canPlayType(a)) &&
            (void 0 === s.quality &&
              (void 0 === r || i[r].source.type === a
                ? ((s.quality = {
                    name: "q" + n,
                    label:
                      s.metadata && s.metadata.qualityName
                        ? s.metadata.qualityName
                        : "Quality " + n,
                  }),
                  n++)
                : (s.quality = i[r].source.quality)),
            (a = i[(r = s.quality.name)])
              ? s.mime.split("/")[1] === c && (a.source = s)
              : (i[s.quality.name] = { label: s.quality.label, source: s }));
        }
        return i;
      },
      P = function (t) {
        try {
          localStorage.setItem("h5pVideoQuality", t);
        } catch (t) {
          console.warn(
            "Unable to set preferred video quality, localStorage is not available.",
          );
        }
      },
      _ = function () {
        let t;
        try {
          t = localStorage.getItem("h5pVideoQuality");
        } catch (t) {
          console.warn(
            "Unable to retrieve preferred video quality from localStorage.",
          );
        }
        if (!t)
          try {
            for (var e = document.cookie.split(";"), i = 0; i < e.length; i++) {
              var n = e[i].split("=");
              if ("H5PVideoQuality" === n[0]) {
                t = n[1];
                break;
              }
            }
          } catch (t) {
            console.warn(
              "Unable to retrieve preferred video quality from cookie.",
            );
          }
        return t;
      },
      S = function (t) {
        setTimeout(t, 0);
      },
      T = !(t.canPlay = function (t) {
        var e = document.createElement("video");
        if (void 0 === e.canPlayType) return !1;
        for (var i = 0; i < t.length; i++) {
          var n = l(t[i]);
          if (n && "" !== e.canPlayType(n)) return !0;
        }
        return !1;
      }),
      c = "mp4",
      H = [0.25, 0.5, 1, 1.25, 1.5, 2];
    return (
      -1 !== navigator.userAgent.indexOf("Android")
        ? (e = navigator.userAgent.match(/AppleWebKit\/(\d+\.?\d*)/)) &&
          e[1] &&
          Number(e[1]) <= 534.3 &&
          (T = !0)
        : -1 !== navigator.userAgent.indexOf("Chrome") && (c = "webm"),
      t
    );
  })(H5P.jQuery)),
  (H5P.videoHandlers = H5P.videoHandlers || []),
  H5P.videoHandlers.push(
    H5P.VideoHtml5,
  ) /*!@license H5P.Video-1.6/scripts/video.js by Joubel licensed under MIT*/,
  (H5P.Video = (function (d, p) {
    function f(i, t, e = {}) {
      var n = this;
      ((n.oldTime = e.previousState?.time),
        (n.contentId = t),
        (n.WAS_RESET = !1),
        (n.startAt = i.startAt || 0),
        (n.pressToPlay = !1));
      var o = "";
      (H5P.EventDispatcher.call(n),
        ((i = d.extend(!0, i, {
          l10n: {
            name: "Video",
            loading: "Video player loading...",
            noPlayers:
              "Found no video players that supports the given video format.",
            noSources: "Video source is missing.",
            aborted: "Media playback has been aborted.",
            networkFailure: "Network failure.",
            cannotDecode: "Unable to decode media.",
            formatNotSupported: "Video format not supported.",
            mediaEncrypted: "Media encrypted.",
            unknownError: "Unknown error.",
            vimeoPasswordError:
              "Password-protected Vimeo videos are not supported.",
            vimeoPrivacyError:
              "The Vimeo video cannot be used due to its privacy settings.",
            vimeoLoadingError: "The Vimeo video could not be loaded.",
            invalidYtId: "Invalid YouTube ID.",
            unknownYtId: "Unable to find video with the given YouTube ID.",
            restrictedYt:
              "The owner of this video does not allow it to be embedded.",
          },
        })).a11y = i.a11y || []),
        (i.playback = i.playback || {}),
        (i.visuals = d.extend(!0, i.visuals, { disableFullscreen: !1 })));
      var r = [];
      if (i.sources)
        for (var s = 0; s < i.sources.length; s++) {
          var a = d.extend(!0, {}, i.sources[s]);
          ((a.path = m.html(a.path).text()), r.push(a));
        }
      var l,
        c = [];
      i.a11y.forEach(function (t) {
        t = d.extend(!0, {}, t);
        t.track &&
          t.track.path &&
          ((t.track.path = m.html(t.track.path).text()), c.push(t));
      });
      if (
        ((n.attach = function (t) {
          (t.addClass("h5p-video").html(""),
            void 0 !== n.appendTo
              ? (n.appendTo(t),
                void 0 === window.H5PEditor &&
                  (function (t) {
                    let e;
                    (n.on("stateChange", function (t) {
                      e = t.data;
                    }),
                      (n.autoPaused = !n.pressToPlay),
                      new IntersectionObserver(
                        function (t) {
                          t[0].isIntersecting
                            ? i.playback.autoplay &&
                              n.autoPaused &&
                              ((n.autoPaused = !1), n.play())
                            : e !== f.PAUSED &&
                              e !== f.ENDED &&
                              ((n.autoPaused = !0), n.pause());
                        },
                        { root: null, threshold: [0, 1] },
                      ).observe(t.get(0)));
                  })(t))
              : r.length
                ? t.text(i.l10n.noPlayers)
                : t.text(i.l10n.noSources));
        }),
        (n.getHandlerName = function () {
          return o;
        }),
        (n.getCurrentState = function () {
          if (n.getCurrentTime)
            return { time: n.getCurrentTime() || n.oldTime };
        }),
        (n.seek = () => {}),
        (n.pause = () => {}),
        (n.resetTask = function () {
          (delete n.oldTime, n.resetPlayback(i.startAt || 0));
        }),
        (n.resetPlayback = (t) => {
          (n.seek(t), n.pause(), (n.WAS_RESET = !0));
        }),
        n.on("loaded", function () {
          (n.trigger("resize"),
            n.WAS_RESET &&
              (n.seek(i.startAt || 0),
              i.playback.autoplay || n.pause(),
              (n.WAS_RESET = !1)));
        }),
        r.length)
      ) {
        const h = {
          controls: i.visuals.controls,
          autoplay: i.playback.autoplay,
          loop: i.playback.loop,
          fit: i.visuals.fit,
          poster: void 0 === i.visuals.poster ? void 0 : i.visuals.poster,
          tracks: c,
          disableRemotePlayback: !0 === i.visuals.disableRemotePlayback,
          disableFullscreen: !0 === i.visuals.disableFullscreen,
          deactivateSound: i.playback.deactivateSound,
        };
        n.WAS_RESET ||
          (h.startAt = void 0 !== n.oldTime ? n.oldTime : i.startAt || 0);
        for (s = 0; s < p.length; s++) {
          var u = p[s];
          if (void 0 !== u.canPlay && u.canPlay(r))
            return (u.call(n, r, h, i.l10n), void (o = u.name));
          u === H5P.VideoHtml5 && (o = (l = u).name);
        }
        l && l.call(n, r, h, i.l10n);
      }
    }
    ((((f.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = f).ENDED = 0),
      (f.PLAYING = 1),
      (f.PAUSED = 2),
      (f.BUFFERING = 3),
      (f.VIDEO_CUED = 5));
    var m = H5P.jQuery("<div/>");
    return (
      (f.LabelValue = function (t, e) {
        ((this.label = t), (this.value = e));
      }),
      (f.IE11_PLAYBACK_RATE_FIX =
        !!navigator.userAgent.match(/Trident.*rv[ :]*11\./)),
      f
    );
  })(
    H5P.jQuery,
    (H5P.ContentCopyrights, H5P.MediaCopyright, H5P.videoHandlers || []),
  )),
  (/*!@license H5P.QuestionSet-1.20/js/questionset.js by Joubel licensed under MIT*/ (H5P =
    H5P || {}).QuestionSet = function (t, c, r) {
    if (!(this instanceof H5P.QuestionSet)) return new H5P.QuestionSet(t, c, r);
    H5P.EventDispatcher.call(this);
    var u = H5P.jQuery,
      h = this;
    this.contentId = c;
    var e = {
      initialQuestion: 0,
      progressType: "dots",
      passPercentage: 50,
      questions: [],
      introPage: {
        showIntroPage: !1,
        title: "",
        introduction: "",
        startButtonText: "Start",
      },
      texts: {
        prevButton: "Previous question",
        nextButton: "Next question",
        finishButton: "Finish",
        submitButton: "Submit",
        textualProgress: "Question: @current of @total questions",
        jumpToQuestion: "Question %d of %total",
        questionLabel: "Question",
        readSpeakerProgress: "Question @current of @total",
        unansweredText: "Unanswered",
        answeredText: "Answered",
        currentQuestionText: "Current question",
        navigationLabel: "Questions",
      },
      endGame: {
        showResultPage: !0,
        noResultMessage: "Finished",
        message: "Your result:",
        scoreBarLabel: "You got @finals out of @totals points",
        oldFeedback: {
          successGreeting: "",
          successComment: "",
          failGreeting: "",
          failComment: "",
        },
        overallFeedback: [],
        finishButtonText: "Finish",
        submitButtonText: "Submit",
        solutionButtonText: "Show solution",
        retryButtonText: "Retry",
        showAnimations: !1,
        skipButtonText: "Skip video",
        showSolutionButton: !0,
        showRetryButton: !0,
      },
      override: {},
      disableBackwardsNavigation: !1,
    };
    this.isSubmitting = r && (r.isScoringEnabled || r.isReportingEnabled);
    var d,
      p,
      s,
      f = u.extend(!0, {}, e, t),
      n = u.extend(!0, {}, e, t),
      o = 0,
      l = [],
      a = !1,
      m = !1;
    (r = r || {}).previousState &&
      (r.previousState.progress && (o = r.previousState.progress),
      (k = r.previousState.order));
    var g,
      v = function (t) {
        var e = t.map(function (t, e) {
            return [t, e];
          }),
          e = H5P.shuffleArray(e);
        t = [];
        for (var i = 0; i < e.length; i++) t[i] = e[i][0];
        for (var n = [], o = 0; o < e.length; o++)
          r.previousState && r.previousState.questionOrder
            ? (n[o] = k[e[o][1]])
            : (n[o] = e[o][1]);
        return { questions: t, questionOrder: n };
      };
    if (0 < f.poolSize)
      if (r.previousState && r.previousState.poolOrder) {
        for (
          var b = r.previousState.poolOrder, i = [], y = 0;
          y < b.length;
          y++
        )
          i[y] = f.questions[b[y]];
        f.questions = i;
      } else {
        var t = v(f.questions),
          w = t.questions;
        ((b = t.questionOrder),
          (w = w.slice(0, f.poolSize)),
          (b = b.slice(0, f.poolSize)),
          (f.questions = w));
      }
    (f.override.showSolutionButton ||
      f.override.retryButton ||
      !1 === f.override.checkButton) &&
      ((g = {}),
      f.override.showSolutionButton &&
        (g.enableSolutionsButton = "on" === f.override.showSolutionButton),
      f.override.retryButton &&
        (g.enableRetry = "on" === f.override.retryButton),
      !1 === f.override.checkButton &&
        (g.enableCheckButton = f.override.checkButton));
    function x(t) {
      for (var e = [], i = 0; i < t.length; i++) {
        var n = void 0 !== k ? t[k[i]] : t[i];
        (g && u.extend(n.params.behaviour, g), (n.params = n.params || {}));
        var o = r.previousState && r.previousState.answers,
          o = H5P.newRunnable(n, c, void 0, void 0, {
            previousState: o ? r.previousState.answers[i] : void 0,
            parent: h,
          });
        (o.on("resize", function () {
          ((s = !0), h.trigger("resize"));
        }),
          e.push(o));
      }
      return e;
    }
    var k;
    if (
      ((l = x(f.questions)),
      (f.noOfQuestionAnswered = 0),
      r.previousState && r.previousState.answers)
    )
      for (y = 0; y < l.length; y++)
        l[y].getAnswerGiven() && f.noOfQuestionAnswered++;
    ((h.$introPage = ""),
      f.introPage.showIntroPage &&
        0 === f.noOfQuestionAnswered &&
        ((h.$introPage = u("<div>", { class: "intro-page" })),
        f.introPage.title &&
          u("<div>", {
            class: "title",
            html: "<h1>" + f.introPage.title + "</h1>",
            appendTo: h.$introPage,
          }),
        f.introPage.introduction &&
          u("<div>", {
            class: "introduction",
            html: f.introPage.introduction,
            appendTo: h.$introPage,
          }),
        (h.$introButtonsContainer = u("<div>", {
          class: "buttons",
          appendTo: h.$introPage,
        })),
        u("<button>", {
          class: "qs-startbutton h5p-joubelui-button h5p-button",
          html: f.introPage.startButtonText,
          appendTo: h.$introButtonsContainer,
        })),
      (h.$progressAnnouncer = u("<div>", {
        class: "qs-progress-announcer",
        tabindex: "-1",
      })),
      (h.$questionsContainer = u("<div>", {
        class:
          "questionset " +
          (f.introPage.showIntroPage && 0 === f.noOfQuestionAnswered
            ? "hidden"
            : ""),
      })));
    for (let t = 0; t < f.questions.length; t++)
      u("<div>", {
        class: "question-container",
        appendTo: h.$questionsContainer,
      });
    if (
      ((h.$footer = u("<div>", {
        class: "qs-footer",
        appendTo: h.$questionsContainer,
      })),
      (h.$progressBar = u("<div>", {
        class: "qs-progress",
        role: "navigation",
        "aria-label": f.texts.navigationLabel,
        appendTo: h.$footer,
      })),
      "dots" == f.progressType)
    ) {
      h.$dotsContainer = u("<ul>", {
        class: "dots-container",
        appendTo: h.$progressBar,
      });
      for (let t = 0; t < f.questions.length; t++)
        u("<li>", {
          class: "progress-item",
          html:
            '<a href="#" class= "progress-dot unanswered ' +
            (f.disableBackwardsNavigation ? "disabled" : "") +
            '" aria-label="' +
            f.texts.jumpToQuestion
              .replace("%d", t + 1)
              .replace("%total", f.questions.length) +
            ", " +
            f.texts.unansweredText +
            '" tabindex="-1" ' +
            (f.disableBackwardsNavigation ? 'aria-disabled="true"' : "") +
            "></a>",
          appendTo: h.$dotsContainer,
        });
    } else
      "textual" == f.progressType &&
        u("<span>", { class: "progress-text", appendTo: h.$progressBar });
    (f.randomQuestions &&
      void 0 === r.previousState &&
      ((w = v(l)), (l = w.questions), (k = w.questionOrder)),
      h.on("resize", function () {
        if (s) s = !1;
        else for (var t = 0; t < l.length; t++) l[t].trigger("resize");
      }));
    var C = function () {
        f.disableBackwardsNavigation &&
          (l[o].getAnswerGiven() && l.length - 1 !== o
            ? l[o].showButton("next")
            : l[o].hideButton("next"));
        for (var t = !0, e = l.length - 1; 0 <= e; e--)
          t = t && l[e].getAnswerGiven();
        o === f.questions.length - 1 &&
          l[o] &&
          (t ? l[o].showButton("finish") : l[o].hideButton("finish"));
      },
      P = function (t, e) {
        var i, n;
        return (
          (t = t < 0 ? 0 : t) >= f.questions.length &&
            (t = f.questions.length - 1),
          (o = t),
          u(".question-container", d).hide().eq(t).show(),
          l[t] &&
            ((i = l[t]).setActivityStarted(),
            void 0 !== i.$ && i.trigger("resize")),
          "textual" === f.progressType
            ? u(".progress-text", d).text(
                f.texts.textualProgress
                  .replace("@current", t + 1)
                  .replace("@total", f.questions.length),
              )
            : (0 <= (n = u(".progress-dot.current", d).parent().index()) &&
                (A(n, !1), D(n, l[n].getAnswerGiven())),
              A(t, !0)),
          e ||
            setTimeout(function () {
              var t = f.texts.readSpeakerProgress
                .replace("@current", (o + 1).toString())
                .replace("@total", l.length.toString());
              (u(".qs-progress-announcer", d).html(t).show().focus(),
                i && i.readFeedback && i.readFeedback());
            }, 0),
          C(),
          h.trigger("resize"),
          o
        );
      },
      _ = function () {
        m = !0;
        for (var t = 0; t < l.length; t++) {
          (S(!0),
            t < l.length - 1 && l[t].showButton("next"),
            0 < t && l[t].showButton("prev"));
          try {
            (l[t].toggleReadSpeaker(!0),
              l[t].showSolutions(),
              l[t].toggleReadSpeaker(!1));
          } catch (t) {
            (H5P.error(
              "subcontent does not contain a valid showSolutions function",
            ),
              H5P.error(t));
          }
        }
      },
      S = function (t) {
        u(".progress-dot", d).each(function () {
          (u(this).toggleClass("disabled", !t),
            u(this).attr("aria-disabled", t ? "false" : "true"),
            t || u(this).attr("tabindex", "-1"));
        });
      },
      T = !(this.resetTask = function () {
        ((r.previousState = []), (m = !1));
        for (var t, e, i = 0; i < l.length; i++)
          try {
            (l[i].resetTask(),
              f.disableBackwardsNavigation &&
                (S(!1),
                0 === i && l[i].getAnswerGiven()
                  ? l[i].showButton("next")
                  : l[i].hideButton("next"),
                l[i].hideButton("prev")));
          } catch (t) {
            (H5P.error(
              "subcontent does not contain a valid resetTask function",
            ),
              H5P.error(t));
          }
        (l[l.length - 1].hideButton("finish"),
          u(".progress-dot").each(function (t) {
            D(t, !1);
          }),
          (T = !1),
          0 < f.poolSize
            ? ((e = (t = v(n.questions)).questions),
              (b = t.questionOrder),
              (e = e.slice(0, f.poolSize)),
              (b = b.slice(0, f.poolSize)),
              (f.questions = e),
              (l = x(f.questions)),
              O())
            : f.randomQuestions && H());
      });
    this.reRender = function () {
      T = !1;
    };
    var H = function () {
        var t = v(l);
        ((l = t.questions), (k = t.questionOrder), I(l));
      },
      I = function (t) {
        u(".question-container", d).each(function () {
          u(this).children().detach();
        });
        for (var e = 0; e < t.length; e++) {
          var i = t[e];
          (u(".question-container:eq(" + e + ")", d).attr(
            "class",
            "question-container",
          ),
            i.attach(u(".question-container:eq(" + e + ")", d)),
            t[t.length - 1] === i &&
              i.hasButton("finish") &&
              i.showButton("finish"),
            t[t.length - 1] !== i &&
              i.hasButton("next") &&
              i.showButton("next"),
            t[0] !== i &&
              i.hasButton("prev") &&
              !f.disableBackwardsNavigation &&
              i.showButton("prev"),
            t[0] === i && i.hideButton("prev"),
            t[t.length - 1] === i && i.hideButton("next"),
            t[t.length - 1] !== i && i.hideButton("finish"));
        }
      },
      E = function (t) {
        if (f.disableBackwardsNavigation && !l[o].getAnswerGiven())
          return (l[o].hideButton("next"), void l[o].hideButton("finish"));
        o + t >= l.length ? M() : P(o + t);
      },
      D = function (t, e) {
        var i = u(".progress-dot:eq(" + t + ")", d);
        i.hasClass("current") ||
          ((e = !!e),
          (t =
            f.texts.jumpToQuestion
              .replace("%d", (t + 1).toString())
              .replace("%total", u(".progress-dot", d).length) +
            ", " +
            (e ? f.texts.answeredText : f.texts.unansweredText)),
          i
            .toggleClass("unanswered", !e)
            .toggleClass("answered", e)
            .attr("aria-label", t));
      },
      A = function (t, e) {
        var i = u(".progress-dot:eq(" + t + ")", d),
          n = f.texts,
          t = n.jumpToQuestion
            .replace("%d", (t + 1).toString())
            .replace("%total", u(".progress-dot", d).length);
        t += e
          ? ", " + n.currentQuestionText
          : ", " + (i.hasClass("answered") ? n.answeredText : n.unansweredText);
        n = f.disableBackwardsNavigation && !m;
        i.toggleClass("current", e)
          .attr("aria-label", t)
          .attr("tabindex", e && !n ? 0 : -1);
      },
      M = function () {
        if ((u(".progress-dot.current", d).removeClass("current"), T))
          return (
            d.children().hide().filter(".questionset-results").show(),
            void h.trigger("resize")
          );
        (d.children().hide().filter(".questionset-results").remove(), (T = !0));
        function e(t, e) {
          u(t, d)
            .click(e)
            .keypress(function (t) {
              32 === t.which && (e(), t.preventDefault());
            });
        }
        function i() {
          h.triggerXAPICompleted(h.getScore(), h.getMaxScore(), s);
          var t = {
            message: f.endGame.showResultPage
              ? f.endGame.message
              : f.endGame.noResultMessage,
            comment: f.endGame.showResultPage
              ? s
                ? f.endGame.oldFeedback.successGreeting
                : f.endGame.oldFeedback.failGreeting
              : void 0,
            resulttext: f.endGame.showResultPage
              ? s
                ? f.endGame.oldFeedback.successComment
                : f.endGame.oldFeedback.failComment
              : void 0,
            finishButtonText: h.isSubmitting
              ? f.endGame.submitButtonText
              : f.endGame.finishButtonText,
            solutionButtonText: f.endGame.solutionButtonText,
            retryButtonText: f.endGame.retryButtonText,
          };
          ((h.$resultPage = u("<div>", { class: "questionset-results" })),
            u("<div>", {
              class: "greeting",
              html: t.message,
              appendTo: h.$resultPage,
            }),
            u("<div>", {
              class: "feedback-section",
              html: '<div class="feedback-scorebar"></div><div class="feedback-text"></div>',
              appendTo: h.$resultPage,
            }),
            f.comment &&
              u("<div>", {
                class: "result-header",
                html: t.comment,
                appendTo: h.$resultPage,
              }),
            f.resulttext &&
              u("<div>", {
                class: "result-text",
                html: t.resulttext,
                appendTo: h.$resultPage,
              }),
            (h.$buttonsContainer = u("<div>", {
              class: "buttons",
              appendTo: h.$resultPage,
            })),
            f.endGame.showSolutionButton &&
              u("<button>", {
                class: "h5p-joubelui-button h5p-button qs-solutionbutton",
                type: "button",
                html: t.solutionButtonText,
                appendTo: h.$buttonsContainer,
              }),
            f.endGame.showRetryButton &&
              u("<button>", {
                class: "h5p-joubelui-button h5p-button qs-retrybutton",
                type: "button",
                html: t.retryButtonText,
                appendTo: h.$buttonsContainer,
              }),
            d.children().hide(),
            d.append(h.$resultPage),
            f.endGame.showResultPage
              ? (e(".qs-solutionbutton", function () {
                  (_(),
                    d.children().hide().filter(".questionset").show(),
                    P(f.initialQuestion));
                }),
                e(".qs-retrybutton", function () {
                  (h.resetTask(),
                    d.children().hide(),
                    u(".intro-page", d).length
                      ? (u(".intro-page", d).show(),
                        u(".qs-startbutton", d).focus())
                      : (u(".questionset", d).show(), P(f.initialQuestion)));
                }),
                (p =
                  void 0 === p ? H5P.JoubelUI.createScoreBar(o) : p).appendTo(
                  u(".feedback-scorebar", d),
                ),
                u(".feedback-text", d).html(r),
                setTimeout(function () {
                  (u(".qs-progress-announcer", d)
                    .html(
                      t.message +
                        r +
                        "." +
                        f.endGame.scoreBarLabel
                          .replace("@finals", n)
                          .replace("@totals", o) +
                        "." +
                        t.comment +
                        "." +
                        t.resulttext,
                    )
                    .show()
                    .focus(),
                    p.setMaxScore(o),
                    p.setScore(n));
                }, 0))
              : u(
                  ".qs-solutionbutton, .qs-retrybutton, .feedback-section",
                  d,
                ).remove(),
            h.trigger("resize"));
        }
        var n = h.getScore(),
          o = h.getMaxScore(),
          r = H5P.Question.determineOverallFeedback(
            f.endGame.overallFeedback,
            n / o,
          )
            .replace("@score", n)
            .replace("@total", o),
          s = (100 * n) / o >= f.passPercentage;
        if (f.endGame.showAnimations) {
          var t = s ? f.endGame.successVideo : f.endGame.failVideo;
          if (t) {
            d.children().hide();
            var a = u('<div class="video-container"></div>').appendTo(d),
              l = new H5P.Video(
                { sources: t, fitToWrapper: !0, controls: !1, autoplay: !1 },
                c,
              );
            return (
              l.on("stateChange", function (t) {
                t.data === H5P.Video.ENDED && (i(), a.hide());
              }),
              l.attach(a),
              l.on("loaded", function () {
                h.trigger("resize");
              }),
              l.play(),
              void (
                f.endGame.skippable &&
                u(
                  '<a class="h5p-joubelui-button h5p-button skip">' +
                    f.endGame.skipButtonText +
                    "</a>",
                )
                  .click(function () {
                    (l.pause(), a.hide(), i());
                  })
                  .appendTo(a)
              )
            );
          }
        }
        (i(), h.trigger("resize"));
      },
      L = function (t) {
        H5P.on(t, "imageLoaded", function () {
          h.trigger("resize");
        });
      };
    function O() {
      for (var t = 0; t < l.length; t++) {
        var e = l[t];
        (u(".question-container:eq(" + t + ")", d).attr(
          "class",
          "question-container",
        ),
          e.attach(u(".question-container:eq(" + t + ")", d)),
          L(e));
        var i = h.isSubmitting ? f.texts.submitButton : f.texts.finishButton;
        (e.addButton("finish", i, E.bind(this, 1), !1),
          e.addButton(
            "next",
            "",
            E.bind(this, 1),
            !f.disableBackwardsNavigation || !!e.getAnswerGiven(),
            { href: "#", "aria-label": f.texts.nextButton },
          ),
          e.addButton(
            "prev",
            "",
            E.bind(this, -1),
            !(l[0] === e || f.disableBackwardsNavigation),
            { href: "#", "aria-label": f.texts.prevButton },
          ),
          l[l.length - 1] === e && e.hideButton("next"),
          e.on("xAPI", function (t) {
            var e = t.getVerb();
            (("interacted" !== e && "answered" !== e && "attempted" !== e) ||
              (D(o, l[o].getAnswerGiven()), C()),
              "completed" === e && t.setVerb("answered"),
              void 0 === t.data.statement.context.extensions &&
                (t.data.statement.context.extensions = {}),
              (t.data.statement.context.extensions[
                "http://id.tincanapi.com/extension/ending-point"
              ] = o + 1));
          }),
          D(t, e.getAnswerGiven()));
      }
    }
    ((this.attach = function (t) {
      var e, i;
      (this.isRoot() && this.setActivityStarted(),
        (d = u("string" == typeof t ? "#" + t : t)).children().remove(),
        d.append(h.$introPage, h.$progressAnnouncer, h.$questionsContainer),
        void 0 !== f.backgroundImage &&
          d.css({
            overflow: "hidden",
            background:
              '#fff url("' +
              H5P.getPath(f.backgroundImage.path, c) +
              '") no-repeat 50% 50%',
            backgroundSize: "100% auto",
          }),
        void 0 === f.introPage.backgroundImage ||
          ((e = d.find(".intro-page")).length &&
            ((t = (i = f.introPage.backgroundImage).height / i.width),
            e.css({
              background:
                '#fff url("' + H5P.getPath(i.path, c) + '") no-repeat 50% 50%',
              backgroundSize: "auto 100%",
              minHeight:
                t * +window.getComputedStyle(e[0]).width.replace("px", ""),
            }))),
        O(),
        u(".questionset", d).addClass("started"),
        u(".qs-startbutton", d)
          .click(function () {
            (u(this).parents(".intro-page").hide(),
              u(".questionset", d).show(),
              P(f.initialQuestion),
              event.preventDefault());
          })
          .keydown(function (t) {
            switch (t.which) {
              case 13:
              case 32:
                (u(this).parents(".intro-page").hide(),
                  u(".questionset", d).show(),
                  P(f.initialQuestion),
                  t.preventDefault());
            }
          }));
      function n(t) {
        (t.preventDefault(),
          (f.disableBackwardsNavigation && !m) || P(u(this).parent().index()));
      }
      return (
        u(".progress-dot", d)
          .click(n)
          .keydown(function (t) {
            var e = u(this);
            switch (t.which) {
              case 13:
              case 32:
                n.call(this, t);
                break;
              case 37:
              case 38:
                var i = e.parent().prev();
                i.length &&
                  (i.children("a").attr("tabindex", "0").focus(),
                  e.attr("tabindex", "-1"));
                break;
              case 39:
              case 40:
                i = e.parent().next();
                i.length &&
                  (i.children("a").attr("tabindex", "0").focus(),
                  e.attr("tabindex", "-1"));
            }
          }),
        P(o, !0),
        a && _(),
        C(),
        this.trigger("resize"),
        this
      );
    }),
      (this.getScore = function () {
        for (var t = 0, e = l.length - 1; 0 <= e; e--) t += l[e].getScore();
        return t;
      }),
      (this.getMaxScore = function () {
        for (var t = 0, e = l.length - 1; 0 <= e; e--) t += l[e].getMaxScore();
        return t;
      }),
      (this.totalScore = function () {
        return this.getMaxScore();
      }),
      (this.getCopyrights = function () {
        var t,
          e = new H5P.ContentCopyrights();
        (void 0 !== f.introPage &&
          void 0 !== f.introPage.backgroundImage &&
          void 0 !== f.introPage.backgroundImage.copyright &&
          ((t = new H5P.MediaCopyright(
            f.introPage.backgroundImage.copyright,
          )).setThumbnail(
            new H5P.Thumbnail(
              H5P.getPath(f.introPage.backgroundImage.path, c),
              f.introPage.backgroundImage.width,
              f.introPage.backgroundImage.height,
            ),
          ),
          e.addMedia(t)),
          void 0 !== f.backgroundImage &&
            void 0 !== f.backgroundImage.copyright &&
            ((t = new H5P.MediaCopyright(
              f.backgroundImage.copyright,
            )).setThumbnail(
              new H5P.Thumbnail(
                H5P.getPath(f.backgroundImage.path, c),
                f.backgroundImage.width,
                f.backgroundImage.height,
              ),
            ),
            e.addMedia(t)));
        for (var i, n = 0; n < l.length; n++) {
          var o = l[n],
            r = f.questions[n].params,
            s = void 0;
          void 0 === (s = void 0 !== o.getCopyrights ? o.getCopyrights() : s) &&
            ((s = new H5P.ContentCopyrights()),
            H5P.findCopyrights(s, r.params, c, {
              metadata: r.metadata,
              machineName: r.library.split(" ")[0],
            }));
          var a = f.texts.questionLabel + " " + (n + 1);
          (void 0 !== r.params.contentName
            ? (a += ": " + r.params.contentName)
            : void 0 !== o.getTitle && (a += ": " + o.getTitle()),
            s.setLabel(a),
            e.addContent(s));
        }
        return (
          void 0 !== f.endGame.successVideo &&
            0 < f.endGame.successVideo.length &&
            void 0 !== (i = f.endGame.successVideo[0]).copyright &&
            e.addMedia(new H5P.MediaCopyright(i.copyright)),
          void 0 !== f.endGame.failVideo &&
            0 < f.endGame.failVideo.length &&
            void 0 !== (i = f.endGame.failVideo[0]).copyright &&
            e.addMedia(new H5P.MediaCopyright(i.copyright)),
          e
        );
      }),
      (this.getQuestions = function () {
        return l;
      }),
      (this.showSolutions = function () {
        a = !0;
      }),
      (this.getCurrentState = function () {
        return {
          progress: m ? l.length - 1 : o,
          answers: l.map(function (t) {
            return t.getCurrentState();
          }),
          order: k,
          poolOrder: b,
        };
      }));
    var B = function () {
      var t = {
        interactionType: "compound",
        type: "http://adlnet.gov/expapi/activities/cmi.interaction",
        description: { "en-US": "" },
      };
      return t;
    };
    ((this.getXAPIData = function () {
      var t = this.createXAPIEventTemplate("answered");
      return (
        (function (t) {
          t = t.getVerifiedStatementValue(["object", "definition"]);
          u.extend(t, B());
        })(t),
        t.setScoredResult(
          this.getScore(),
          this.getMaxScore(),
          this,
          !0,
          this.getScore() === this.getMaxScore(),
        ),
        {
          statement: t.data.statement,
          children: this.getQuestions().map(function (t) {
            return t.getXAPIData();
          }),
        }
      );
    }),
      (this.getContext = function () {
        let t = { type: "question", value: o + 1 };
        return (f.randomQuestions && (t.actual = k[o] + 1), t);
      }));
  }),
  (H5P.QuestionSet.prototype = Object.create(H5P.EventDispatcher.prototype)),
  (H5P.QuestionSet.prototype.constructor = H5P.QuestionSet),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false.js by Joubel licensed under MIT*/ (H5P.TrueFalse =
    (function (m, g) {
      "use strict";
      var v = Object.freeze({
          ONGOING: 1,
          FINISHED_WRONG: 2,
          FINISHED_CORRECT: 3,
          INTERNAL_SOLUTION: 4,
          EXTERNAL_SOLUTION: 5,
        }),
        b = Object.freeze({
          CHECK: "check-answer",
          TRYAGAIN: "try-again",
          SHOW_SOLUTION: "show-solution",
        });
      function y(t, e, i) {
        var n = this;
        g.call(n, "true-false");
        var o = m.extend(
          !0,
          {
            question: "No question text provided",
            correct: "true",
            l10n: {
              trueText: "True",
              falseText: "False",
              score: "You got @score of @total points",
              checkAnswer: "Check",
              submitAnswer: "Submit",
              showSolutionButton: "Show solution",
              tryAgain: "Retry",
              wrongAnswerMessage: "Wrong answer",
              correctAnswerMessage: "Correct answer",
              scoreBarLabel: "You got :num out of :total points",
              a11yCheck:
                "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
              a11yShowSolution:
                "Show the solution. The task will be marked with its correct solution.",
              a11yRetry:
                "Retry the task. Reset all responses and start the task over again.",
            },
            behaviour: {
              enableRetry: !0,
              enableSolutionsButton: !0,
              enableCheckButton: !0,
              confirmCheckDialog: !1,
              confirmRetryDialog: !1,
              autoCheck: !1,
            },
          },
          t,
        );
        y.counter = void 0 === y.counter ? 0 : y.counter + 1;
        var r = "h5p-tfq" + H5P.TrueFalse.counter;
        ((this.contentId = e), (this.contentData = i));
        var s = new H5P.TrueFalse.AnswerGroup(r, o.correct, o.l10n);
        (void 0 !== i.previousState &&
          void 0 !== i.previousState.answer &&
          s.check(i.previousState.answer),
          s.on("selected", function () {
            (n.triggerXAPI("interacted"), o.behaviour.autoCheck && (f(), a()));
          }));
        var a = function () {
            var t = n.createXAPIEventTemplate("answered");
            (l(t), h(t), n.trigger(t));
          },
          l = function (t) {
            t = t.getVerifiedStatementValue(["object", "definition"]);
            ((t.description = {
              "en-US": m("<div>" + o.question + "</div>").text(),
            }),
              (t.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
              (t.interactionType = "true-false"),
              (t.correctResponsesPattern = [c()]));
          },
          c = function () {
            return "true" === o.correct ? "true" : "false";
          },
          u = function () {
            return "false" === o.correct ? "true" : "false";
          },
          h = function (t) {
            var e = s.isCorrect();
            (t.setScoredResult(e ? 1 : 0, 1, n, !0, e),
              (t.data.statement.result.response = (e ? c : u)()));
          },
          d = function (t, e) {
            !0 === e ? n.showButton(t) : n.hideButton(t);
          },
          p = function (t) {
            (d(b.SHOW_SOLUTION, t === v.FINISHED_WRONG),
              d(b.CHECK, t === v.ONGOING),
              d(
                b.TRYAGAIN,
                t === v.FINISHED_WRONG || t === v.INTERNAL_SOLUTION,
              ));
          },
          f = function () {
            var t,
              e = n.getScore();
            (p(1 === e ? v.FINISHED_CORRECT : v.FINISHED_WRONG),
              (t = (t =
                1 === e && o.behaviour.feedbackOnCorrect
                  ? o.behaviour.feedbackOnCorrect
                  : 0 === e && o.behaviour.feedbackOnWrong
                    ? o.behaviour.feedbackOnWrong
                    : o.l10n.score)
                .replace("@score", e)
                .replace("@total", 1)),
              n.setFeedback(t, e, 1, o.l10n.scoreBarLabel),
              s.reveal());
          };
        ((n.registerDomElements = function () {
          var t,
            e = o.media;
          (e &&
            e.type &&
            e.type.library &&
            ("H5P.Image" === (t = (e = e.type).library.split(" ")[0])
              ? e.params.file &&
                this.setImage(e.params.file.path, {
                  disableImageZooming: o.media.disableImageZooming || !1,
                  alt: e.params.alt,
                  title: e.params.title,
                  expandImage: e.params.expandImage,
                  minimizeImage: e.params.minimizeImage,
                })
              : "H5P.Video" === t
                ? e.params.sources && this.setVideo(e)
                : "H5P.Audio" === t && e.params.files && this.setAudio(e)),
            this.setIntroduction(
              '<div id="' + r + '">' + o.question + "</div>",
            ),
            (this.$content = s.getDomElement()),
            this.setContent(this.$content),
            (t = m('[data-content-id="' + n.contentId + '"].h5p-content')),
            (t =
              0 !== (e = t.parents(".h5p-container")).length
                ? e.last()
                : 0 !== t.length
                  ? t
                  : m(document.body)),
            !0 === o.behaviour.enableSolutionsButton &&
              n.addButton(
                b.SHOW_SOLUTION,
                o.l10n.showSolutionButton,
                function () {
                  n.showSolutions(!0);
                },
                !1,
                { "aria-label": o.l10n.a11yShowSolution },
              ),
            !o.behaviour.autoCheck &&
              o.behaviour.enableCheckButton &&
              n.addButton(
                b.CHECK,
                o.l10n.checkAnswer,
                function () {
                  (f(), a());
                },
                !0,
                { "aria-label": o.l10n.a11yCheck },
                {
                  confirmationDialog: {
                    enable: o.behaviour.confirmCheckDialog,
                    l10n: o.confirmCheck,
                    instance: n,
                    $parentElement: t,
                  },
                  contentData: n.contentData,
                  textIfSubmitting: o.l10n.submitAnswer,
                },
              ),
            !0 === o.behaviour.enableRetry &&
              n.addButton(
                b.TRYAGAIN,
                o.l10n.tryAgain,
                function () {
                  n.resetTask();
                },
                !0,
                { "aria-label": o.l10n.a11yRetry },
                {
                  confirmationDialog: {
                    enable: o.behaviour.confirmRetryDialog,
                    l10n: o.confirmRetry,
                    instance: n,
                    $parentElement: t,
                  },
                },
              ),
            p(v.ONGOING));
        }),
          (n.getCurrentState = function () {
            return { answer: s.getAnswer() };
          }),
          (n.getAnswerGiven = function () {
            return s.hasAnswered();
          }),
          (n.getScore = function () {
            return s.isCorrect() ? 1 : 0;
          }),
          (n.getMaxScore = function () {
            return 1;
          }),
          (n.getTitle = function () {
            return H5P.createTitle(
              n.contentData &&
                n.contentData.metadata &&
                n.contentData.metadata.title
                ? n.contentData.metadata.title
                : "True-False",
            );
          }),
          (n.showSolutions = function (t) {
            (f(),
              s.showSolution(),
              p(t ? v.INTERNAL_SOLUTION : v.EXTERNAL_SOLUTION));
          }),
          (n.resetTask = function () {
            (s.reset(), n.removeFeedback(), p(v.ONGOING));
          }),
          (n.getXAPIData = function () {
            var t = this.createXAPIEventTemplate("answered");
            return (
              this.addQuestionToXAPI(t),
              this.addResponseToXAPI(t),
              { statement: t.data.statement }
            );
          }),
          (n.addQuestionToXAPI = function (t) {
            t = t.getVerifiedStatementValue(["object", "definition"]);
            m.extend(t, this.getxAPIDefinition());
          }),
          (n.getxAPIDefinition = function () {
            var t = {
              interactionType: "true-false",
              type: "http://adlnet.gov/expapi/activities/cmi.interaction",
            };
            return (
              (t.description = {
                "en-US": m("<div>" + o.question + "</div>").text(),
              }),
              (t.correctResponsesPattern = [c()]),
              t
            );
          }),
          (n.addResponseToXAPI = function (t) {
            var e = s.isCorrect(),
              i = "";
            (t.setScoredResult(e ? 1 : 0, 1, n, !0, e),
              void 0 !== n.getCurrentState().answer &&
                (i += (s.isCorrect() ? c : u)()),
              (t.data.statement.result.response = i));
          }));
      }
      return ((y.prototype = Object.create(g.prototype)).constructor = y);
    })(H5P.jQuery, H5P.Question)),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false-answer-group.js by Joubel licensed under MIT*/ (H5P.TrueFalse.AnswerGroup =
    (function (p, f) {
      "use strict";
      function t(t, e, i) {
        var n = this;
        f.call(n);
        function o(t, e) {
          return function () {
            ((r = t), e.uncheck(), n.trigger("selected"));
          };
        }
        var r,
          s = p("<div>", {
            class: "h5p-true-false-answers",
            role: "radiogroup",
            "aria-labelledby": t,
          }),
          a = new H5P.TrueFalse.Answer(
            i.trueText,
            i.correctAnswerMessage,
            i.wrongAnswerMessage,
          ),
          l = new H5P.TrueFalse.Answer(
            i.falseText,
            i.correctAnswerMessage,
            i.wrongAnswerMessage,
          ),
          c = "true" === e ? a : l,
          u = "false" === e ? a : l;
        (a.on("checked", o(!0, l)), l.on("checked", o(!1, a)));
        function h(t, e) {
          return function () {
            ((r = t), e.check(), n.trigger("selected"));
          };
        }
        (a.on("invert", h(!1, l)), l.on("invert", h(!0, a)));
        function d(t, e) {
          return function () {
            (e && n.hasAnswered() && !t.isChecked()) || t.tabable(e);
          };
        }
        (a.on("focus", d(l, !1)),
          l.on("focus", d(a, !1)),
          a.on("blur", d(l, !0)),
          l.on("blur", d(a, !0)),
          s.append(a.getDomElement()),
          s.append(l.getDomElement()),
          (n.getDomElement = function () {
            return s;
          }),
          (n.check = function (t) {
            (t ? a : l).check();
          }),
          (n.getAnswer = function () {
            return r;
          }),
          (n.hasAnswered = function () {
            return void 0 !== r;
          }),
          (n.isCorrect = function () {
            return c.isChecked();
          }),
          (n.enable = function () {
            (a.enable().tabable(!0), l.enable());
          }),
          (n.disable = function () {
            (a.disable(), l.disable());
          }),
          (n.reveal = function () {
            (n.hasAnswered() &&
              (n.isCorrect() ? c.markCorrect() : u.markWrong()),
              n.disable());
          }),
          (n.reset = function () {
            (a.reset(), l.reset(), n.enable(), (r = void 0));
          }),
          (n.showSolution = function () {
            (c.markCorrect(), u.unmark());
          }));
      }
      return ((t.prototype = Object.create(f.prototype)).constructor = t);
    })(H5P.jQuery, H5P.EventDispatcher)),
  /*!@license H5P.TrueFalse-1.8/scripts/h5p-true-false-answer.js by Joubel licensed under MIT*/ (H5P.TrueFalse.Answer =
    (function (c, u) {
      "use strict";
      var h = {
        ENTER: 13,
        SPACE: 32,
        LEFT_ARROW: 37,
        UP_ARROW: 38,
        RIGHT_ARROW: 39,
        DOWN_ARROW: 40,
      };
      function t(t, e, i) {
        var n = this;
        u.call(n);
        function o(t) {
          setTimeout(function () {
            t();
          }, 0);
        }
        var r = !1,
          s = !0,
          a = c("<div>", {
            class: "h5p-true-false-answer",
            role: "radio",
            "aria-checked": !1,
            html: t + '<span class="aria-label"></span>',
            tabindex: 0,
            click: function (t) {
              1 === t.which && n.check();
            },
            keydown: function (t) {
              s &&
                (-1 !== [h.SPACE, h.ENTER].indexOf(t.keyCode)
                  ? (t.preventDefault(), n.check())
                  : -1 !==
                      [
                        h.LEFT_ARROW,
                        h.UP_ARROW,
                        h.RIGHT_ARROW,
                        h.DOWN_ARROW,
                      ].indexOf(t.keyCode) &&
                    (t.preventDefault(), n.uncheck(), n.trigger("invert")));
            },
            focus: function () {
              n.trigger("focus");
            },
            blur: function () {
              n.trigger("blur");
            },
          }),
          l = a.find(".aria-label");
        ((n.getDomElement = function () {
          return a;
        }),
          (n.uncheck = function () {
            return (
              s &&
                (a.blur(),
                (r = !1),
                o(function () {
                  a.attr("aria-checked", r);
                })),
              n
            );
          }),
          (n.tabable = function (t) {
            return (a.attr("tabIndex", t ? 0 : null), n);
          }),
          (n.check = function () {
            return (
              s &&
                ((r = !0),
                o(function () {
                  a.attr("aria-checked", r);
                }),
                n.trigger("checked"),
                a.focus()),
              n
            );
          }),
          (n.isChecked = function () {
            return r;
          }),
          (n.enable = function () {
            return (a.attr({ "aria-disabled": "", tabIndex: 0 }), (s = !0), n);
          }),
          (n.disable = function () {
            return (
              a.attr({ "aria-disabled": !0, tabIndex: null }),
              (s = !1),
              n
            );
          }),
          (n.reset = function () {
            return (n.enable(), n.uncheck(), n.unmark(), l.html(""), n);
          }),
          (n.markWrong = function () {
            return (
              o(function () {
                a.addClass("wrong");
              }),
              l.html("." + i),
              n
            );
          }),
          (n.markCorrect = function () {
            return (
              o(function () {
                a.addClass("correct");
              }),
              l.html("." + e),
              n
            );
          }),
          (n.unmark = function () {
            return (
              o(function () {
                a.removeClass("wrong correct");
              }),
              n
            );
          }));
      }
      return ((t.prototype = Object.create(u.prototype)).constructor = t);
    })(H5P.jQuery, H5P.EventDispatcher)),
  ((H5P = H5P || {}).Summary = H5P.Summary || {}),
  (H5P.Summary.StopWatch = (function () {
    function t() {
      this.duration = 0;
    }
    return (
      (t.prototype.start = function () {
        return ((this.startTime = Date.now()), this);
      }),
      (t.prototype.stop = function () {
        return (
          (this.duration = this.duration + Date.now() - this.startTime),
          this.passedTime()
        );
      }),
      (t.prototype.reset = function () {
        this.duration = 0;
      }),
      (t.prototype.passedTime = function () {
        return Math.round(this.duration / 10) / 100;
      }),
      t
    );
  })()),
  ((H5P = H5P || {}).Summary = H5P.Summary || {}),
  (H5P.Summary.XApiEventBuilder = (function (e, t) {
    function i() {
      (t.call(this), (this.attributes = {}));
    }
    function n() {
      (t.call(this), (this.attributes = {}));
    }
    function o() {
      (t.call(this), (this.attributes = {}));
    }
    ((((i.prototype = Object.create(t.prototype)).constructor =
      i).prototype.name = function (t) {
      return ((this.attributes.name = t), this);
    }),
      (i.prototype.description = function (t) {
        return ((this.attributes.description = t), this);
      }),
      (i.prototype.interactionType = function (t) {
        return ((this.attributes.interactionType = t), this);
      }),
      (i.prototype.correctResponsesPattern = function (t) {
        return ((this.attributes.correctResponsesPattern = t), this);
      }),
      (i.prototype.optional = function (t) {
        return ((this.attributes.optional = t), this);
      }),
      (i.prototype.build = function () {
        var t = {};
        return (
          c(t, "name", r(this.attributes.name)),
          c(t, "description", r(this.attributes.description)),
          c(t, "interactionType", this.attributes.interactionType),
          c(
            t,
            "correctResponsesPattern",
            this.attributes.correctResponsesPattern,
          ),
          c(t, "type", "http://adlnet.gov/expapi/activities/cmi.interaction"),
          this.attributes.optional && e.extend(t, this.attributes.optional),
          t
        );
      }),
      (((n.prototype = Object.create(t.prototype)).constructor =
        n).prototype.completion = function (t) {
        return ((this.attributes.completion = t), this);
      }),
      (n.prototype.success = function (t) {
        return ((this.attributes.success = t), this);
      }),
      (n.prototype.duration = function (t) {
        return ((this.attributes.duration = t), this);
      }),
      (n.prototype.response = function (t) {
        return (
          (this.attributes.response = "string" == typeof t ? t : t.join("[,]")),
          this
        );
      }),
      (n.prototype.score = function (t, e) {
        return (
          (this.attributes.rawScore = t),
          (this.attributes.maxScore = e),
          this
        );
      }),
      (n.prototype.build = function () {
        var t = {};
        return (
          c(t, "response", this.attributes.response),
          c(t, "completion", this.attributes.completion),
          c(t, "success", this.attributes.success),
          l(this.attributes.duration) &&
            c(t, "duration", "PT" + this.attributes.duration + "S"),
          l(this.attributes.rawScore) &&
            ((t.score = {}),
            c(t.score, "raw", this.attributes.rawScore),
            l(this.attributes.maxScore) &&
              0 < this.attributes.maxScore &&
              (c(t.score, "min", 0),
              c(t.score, "max", this.attributes.maxScore),
              c(t.score, "min", 0),
              c(
                t.score,
                "scaled",
                Math.round(
                  (this.attributes.rawScore / this.attributes.maxScore) * 1e4,
                ) / 1e4,
              ))),
          t
        );
      }),
      (((o.prototype = Object.create(t.prototype)).constructor =
        o).prototype.verb = function (t) {
        return ((this.attributes.verb = t), this);
      }),
      (o.prototype.actor = function (t, e, i) {
        return (
          (this.attributes.actor = { name: t, mbox: e, objectType: i }),
          this
        );
      }),
      (o.prototype.contentId = function (t, e) {
        return (
          (this.attributes.contentId = t),
          (this.attributes.subContentId = e),
          this
        );
      }),
      (o.prototype.context = function (t, e) {
        return (
          (this.attributes.parentContentId = t),
          (this.attributes.parentSubContentId = e),
          this
        );
      }),
      (o.prototype.result = function (t) {
        return ((this.attributes.result = t), this);
      }),
      (o.prototype.objectDefinition = function (t) {
        return ((this.attributes.objectDefinition = t), this);
      }),
      (o.prototype.build = function () {
        var t,
          e = new H5P.XAPIEvent();
        return (
          e.setActor(),
          e.setVerb(this.attributes.verb),
          (this.attributes.parentContentId ||
            this.attributes.parentSubContentId) &&
            ((e.data.statement.context = {
              contextActivities: {
                parent: [
                  {
                    id: s(
                      this.attributes.parentContentId,
                      this.attributes.parentSubContentId,
                    ),
                    objectType: "Activity",
                  },
                ],
              },
            }),
            H5P.xApiSessionId &&
              (e.data.statement.context.extensions = {
                "https://h5p.com/xapi/session-id": H5P.xApiSessionId,
              })),
          (e.data.statement.object = {
            id: s(this.attributes.contentId, this.attributes.subContentId),
            objectType: "Activity",
          }),
          c(e.data, "actor", this.attributes.actor),
          c(e.data.statement, "result", this.attributes.result),
          c(
            e.data.statement.object,
            "definition",
            this.attributes.objectDefinition,
          ),
          e.data.statement.object.definition &&
            (this.attributes.contentId || this.attributes.subContentId) &&
            (c(
              (t = e.data.statement.object.definition.extensions = {}),
              "http://h5p.org/x-api/h5p-local-content-id",
              this.attributes.contentId,
            ),
            c(
              t,
              "http://h5p.org/x-api/h5p-subContentId",
              this.attributes.subContentId,
            )),
          e
        );
      }));
    var r = function (t) {
        if (null != t) return { "en-US": a(t) };
      },
      s = function (t, e) {
        var i = "cid-" + t;
        if (
          t &&
          H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[i]
        ) {
          i = H5PIntegration.contents[i].url;
          return (e && (i += "?subContentId=" + e), i);
        }
      },
      a = function (t) {
        return e("<div>" + t + "</div>")
          .text()
          .trim();
      },
      l = function (t) {
        return void 0 !== t;
      };
    function c(t, e, i, n) {
      l(i)
        ? (t[e] = i)
        : n &&
          console.error("xApiEventBuilder: No value for [" + e + "] in", t);
    }
    return (
      (o.create = function () {
        return new o();
      }),
      (o.createDefinition = function () {
        return new i();
      }),
      (o.createResult = function () {
        return new n();
      }),
      (o.createChoice = function (t, e) {
        return { id: t, description: r(e) };
      }),
      (o.createCorrectResponsePattern = function (t) {
        return t.join("[,]");
      }),
      (o.interactionTypes = {
        CHOICE: "choice",
        COMPOUND: "compound",
        FILL_IN: "fill-in",
        MATCHING: "matching",
        TRUE_FALSE: "true-false",
      }),
      (o.verbs = { ANSWERED: "answered" }),
      o
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  /*!@license H5P.Summary-1.10/js/summary.js by Joubel licensed under MIT*/ (H5P.Summary =
    (function (r, s, a, e) {
      var l = 0;
      function t(t, e, i) {
        if (!(this instanceof H5P.Summary)) return new H5P.Summary(t, e);
        if (
          ((this.id = this.contentId = e),
          (this.contentData = i),
          (this.summaryId = l),
          s.call(this, "summary"),
          (this.offset = 0),
          (this.score = 0),
          (this.progress = 0),
          (this.answers = []),
          (this.answer = []),
          (this.errorCounts = []),
          (l += 1),
          (this.userResponses = []),
          (this.dataBitMap = []),
          t.summaries &&
            (t.summaries = t.summaries.filter(function (t) {
              return void 0 !== t.summary;
            })),
          i &&
            void 0 !== i.previousState &&
            void 0 !== i.previousState.progress &&
            i.previousState.answers)
        ) {
          ((this.progress = i.previousState.progress || this.progress),
            (this.answers = i.previousState.answers || this.answers));
          var n = this.progress;
          this.progress >= t.summaries.length && (n = t.summaries.length - 1);
          for (var o = 0; o <= n; o++)
            (void 0 === this.errorCounts[o] && (this.errorCounts[o] = 0),
              this.answers[o] &&
                ((this.score += this.answers[o].length),
                this.errorCounts[o]++));
        }
        ((this.stopWatches = []),
          this.startStopWatch(this.progress),
          (this.options = H5P.jQuery.extend(
            {},
            {
              overallFeedback: [],
              resultLabel: "Your result:",
              intro: "Choose the correct statement.",
              solvedLabel: "Solved:",
              scoreLabel: "Wrong answers:",
              labelCorrect: "Correct.",
              labelIncorrect: "Incorrect! Please try again.",
              labelCorrectAnswers: "List of correct answers.",
              alternativeIncorrectLabel: "Incorrect",
              postUserStatistics: !0 === H5P.postUserStatistics,
              tipButtonLabel: "Show tip",
              scoreBarLabel: "You got :num out of :total points",
              progressText: "Progress :num of :total",
            },
            t,
          )),
          (this.summaries = this.options.summaries),
          this.setBehaviour({ disableReadSpeaker: !0 }),
          (this.showSolutions = function () {}),
          (this.getMaxScore = function () {
            return this.summaries ? this.summaries.length : 0;
          }),
          (this.getScore = function () {
            var n = this;
            return n.summaries
              ? n.summaries.reduce(function (t, e, i) {
                  i = n.userResponses[i] || [];
                  return t + (n.correctOnFirstTry(i) ? 1 : 0);
                }, 0)
              : 0;
          }),
          (this.getTitle = function () {
            return H5P.createTitle(
              this.contentData &&
                this.contentData.metadata &&
                this.contentData.metadata.title
                ? this.contentData.metadata.title
                : "Summary",
            );
          }),
          (this.getCurrentState = function () {
            return { progress: this.progress || null, answers: this.answers };
          }));
      }
      return (
        (((t.prototype = Object.create(s.prototype)).constructor =
          t).prototype.registerDomElements = function () {
          this.setContent(this.createQuestion());
        }),
        (t.prototype.createQuestion = function () {
          var e,
            h = this,
            t = 0,
            d = [],
            p = H5P.jQuery;
          if (
            ((this.$myDom = p("<div>", { class: "summary-content" })),
            (this.$answerAnnouncer = p("<div>", {
              class: "hidden-but-read",
              "aria-live": "assertive",
              appendTo: this.$myDom,
            })),
            void 0 !== h.summaries && 0 !== h.summaries.length)
          ) {
            for (var i = 0; i < h.summaries.length; i++)
              if (h.summaries[i].summary && h.summaries[i].summary.length) {
                d[i] = { tip: h.summaries[i].tip, summaries: [] };
                for (var n = 0; n < h.summaries[i].summary.length; n++)
                  ((h.answer[t] = 0 === n),
                    (h.dataBitMap[i] = this.dataBitMap[i] || []),
                    (h.dataBitMap[i][t] = n),
                    h.answers[i] &&
                      -1 !== h.answers[i].indexOf(t) &&
                      this.storeUserResponse(i, n),
                    (d[i].summaries[n] = {
                      id: t++,
                      text: h.summaries[i].summary[n],
                    }));
                i < h.progress && this.storeUserResponse(i, 0);
                for (var o = d[i].summaries.length - 1; 0 < o; o--) {
                  var r = Math.floor(Math.random() * (o + 1)),
                    s = d[i].summaries[o];
                  ((d[i].summaries[o] = d[i].summaries[r]),
                    (d[i].summaries[r] = s));
                }
              }
            var f = p('<div class="summary-container"></div>'),
              m = p(
                '<ul role="list" aria-labelledby="answerListHeading-' +
                  h.summaryId +
                  '"></ul>',
              ),
              g = p('<div class="summary-evaluation"></div>'),
              v = p(
                '<div id="questionDesc-' +
                  h.summaryId +
                  '" class="summary-evaluation-content">' +
                  h.options.intro +
                  "</div>",
              ),
              b = p('<div class="summary-score" role="status"></div>'),
              a = p('<div class="summary-options"></div>'),
              y = p(
                '<div class="summary-progress" aria-live="polite" role="status"></div>',
              ),
              w = p(
                '<div class="summary-progress-numeric" aria-hidden="true"></div>',
              ),
              x = parseInt(a.css("paddingLeft")),
              l = p(
                '<div id="answerListHeading-' +
                  h.summaryId +
                  '" class="h5p-hidden-read">' +
                  h.options.labelCorrectAnswers +
                  "</div>",
              );
            (b
              .html(h.options.scoreLabel + " " + this.score)
              .toggleClass("visible", 0 < this.score),
              f.attr("aria-hidden", "true"),
              f.html(l),
              f.append(m),
              this.$myDom.append(f),
              this.$myDom.append(g),
              this.$myDom.append(a),
              g.append(v),
              g.append(g),
              g.append(y),
              g.append(w),
              g.append(b));
            function c(t, n) {
              var o,
                e,
                i,
                r,
                s,
                a,
                l,
                c = Number(t.attr("data-bit")),
                u = Number(t.parent().data("panel"));
              "true" != t.attr("aria-checked") &&
                (void 0 === h.errorCounts[u] && (h.errorCounts[u] = 0),
                h.storeUserResponse(u, c),
                h.answer[c]
                  ? (h.announceAnswer(!0),
                    h.stopStopWatch(u),
                    h.progress++,
                    (i = t.position()),
                    (l = m.position()),
                    (o = p('<li role="listitem">' + t.html() + "</li>")),
                    w.html(
                      h.options.solvedLabel +
                        " " +
                        (u + 1) +
                        "/" +
                        h.summaries.length,
                    ),
                    (e = h.options.progressText
                      .replace(":num", u + 1)
                      .replace(":total", h.summaries.length)),
                    y.html(e),
                    t.attr("aria-checked", "true"),
                    m.append(o),
                    f.addClass("has-results"),
                    f.attr("aria-hidden", "false"),
                    h.adjustTargetHeight(f, m, o),
                    o.css({
                      display: "block",
                      width: t.css("width"),
                      height: t.css("height"),
                    }),
                    o.css({ position: "absolute", top: i.top, left: i.left }),
                    o.css({ backgroundColor: "#9dd8bb", border: "" }),
                    setTimeout(function () {
                      o.css({ backgroundColor: "" });
                    }, 1),
                    (i = parseInt(t.parent().attr("data-panel"))),
                    (r = p(".h5p-panel:eq(" + i + ")", h.$myDom)),
                    (s = p(".h5p-panel:eq(" + (i + 1) + ")", h.$myDom)),
                    (a = 0 === s.length),
                    r.addClass("panel-disabled"),
                    v.find(".joubel-tip-container").remove(),
                    void 0 !== d[h.progress] &&
                      void 0 !== d[h.progress].tip &&
                      0 < d[h.progress].tip.trim().length &&
                      v.append(
                        H5P.JoubelUI.createTip(d[h.progress].tip, {
                          tipLabel: h.options.tipButtonLabel,
                        }),
                      ),
                    o.animate(
                      {
                        top: l.top + h.offset,
                        left: "-=" + x + "px",
                        width: "+=" + 2 * x + "px",
                      },
                      {
                        complete: function () {
                          (p(this)
                            .css("position", "")
                            .css({ width: "", height: "", top: "", left: "" }),
                            f.css("height", ""));
                          var t = 2 * parseInt(o.css("paddingTop")),
                            e = parseInt(o.css("marginBottom")),
                            i = parseInt(o.css("height"));
                          ((h.offset += i + t + e + 1),
                            r.fadeOut("fast", function () {
                              (r.parent().css("height", "auto"),
                                a
                                  ? (v.html(h.options.resultLabel),
                                    h.doFinalEvaluation())
                                  : (h.startStopWatch(h.progress),
                                    s.fadeIn("fast"),
                                    n && s.children().get(0).focus()),
                                h.trigger("resize"));
                            }));
                        },
                      },
                    ))
                  : (h.announceAnswer(!1),
                    t.off("click"),
                    t.addClass("summary-failed"),
                    (l = h.options.alternativeIncorrectLabel + ". " + t.text()),
                    t.attr("aria-label", l),
                    t.removeClass("summary-claim-unclicked"),
                    t.attr("aria-checked", "true"),
                    g.children(".summary-score").toggleClass("visible", !0),
                    b.html(h.options.scoreLabel + " " + ++h.score),
                    h.errorCounts[u]++,
                    void 0 === h.answers[u] && (h.answers[u] = []),
                    h.answers[u].push(c)),
                h.trigger("resize"),
                h.triggerXAPI("interacted"),
                1 === h.userResponses[u].length &&
                  h.trigger(
                    h.createXApiAnsweredEvent(
                      h.summaries[u],
                      h.userResponses[u] || [],
                      u,
                      h.timePassedInStopWatch(u),
                    ),
                  ),
                a &&
                  h.triggerXAPIScored(
                    h.getScore(),
                    h.getMaxScore(),
                    "answered",
                  ));
            }
            w.html(
              h.options.solvedLabel +
                " " +
                this.progress +
                "/" +
                h.summaries.length,
            );
            l = h.options.progressText
              .replace(":num", h.progress)
              .replace(":total", h.summaries.length);
            y.html(l);
            for (var u = 0; u < d.length; u++) {
              var k = d[u];
              if (u < h.progress)
                for (r = 0; r < k.summaries.length; r++) {
                  var C = k.summaries[r];
                  if (h.answer[C.id]) {
                    (m.append('<li style="display:block">' + C.text + "</li>"),
                      f.addClass("has-results"));
                    break;
                  }
                }
              var P = p(
                '<ul aria-labelledby="questionDesc-' +
                  h.summaryId +
                  '" role="radiogroup" class="h5p-panel" data-panel="' +
                  u +
                  '"></ul>',
              );
              0 == u &&
                void 0 !== k.tip &&
                0 < k.tip.trim().length &&
                v.append(
                  H5P.JoubelUI.createTip(k.tip, {
                    tipLabel: h.options.tipButtonLabel,
                  }),
                );
              for (r = 0; r < k.summaries.length; r++) {
                var _ = "summary-claim-unclicked";
                if (h.progress === u && h.answers[h.progress])
                  for (o = 0; o < h.answers[h.progress].length; o++)
                    if (h.answers[h.progress][o] === k.summaries[r].id) {
                      _ = "summary-failed";
                      break;
                    }
                var S = p(
                  '<li role="radio" aria-checked="false" data-name="' +
                    r +
                    '" data-bit="' +
                    k.summaries[r].id +
                    '" class="' +
                    _ +
                    '">' +
                    k.summaries[r].text +
                    "</li>",
                );
                (0 == r ? S.attr("tabindex", "0") : S.attr("tabindex", "-1"),
                  S.on("focus", function () {
                    var t = p(this).attr("data-name");
                    T(t);
                  }));
                var T = function (t) {
                  e = t;
                };
                "summary-failed" !== _
                  ? (S.click(function () {
                      c(p(this));
                    }).keydown(function (t) {
                      switch (t.which) {
                        case 13:
                        case 32:
                          (c(p(this), !0), t.preventDefault());
                          break;
                        case 37:
                        case 38:
                          (h.gotoPreviousOption(h, e), t.preventDefault());
                          break;
                        case 39:
                        case 40:
                          (h.gotoNextOption(h, e), t.preventDefault());
                      }
                    }),
                    P.append(S))
                  : P.append(S);
              }
              a.append(P);
            }
            return (
              h.progress === d.length
                ? (v.html(h.options.resultLabel), h.doFinalEvaluation())
                : (p(".h5p-panel:eq(" + h.progress + ")", h.$myDom).css({
                    display: "block",
                  }),
                  h.progress &&
                    (h.offset =
                      p(
                        ".summary-claim-unclicked:visible:first",
                        h.$myDom,
                      ).outerHeight() * h.errorCounts.length)),
              h.trigger("resize"),
              this.$myDom
            );
          }
        }),
        (t.prototype.announceAnswer = function (t) {
          t = t ? this.options.labelCorrect : this.options.labelIncorrect;
          (this.$answerAnnouncer.html(t),
            setTimeout(
              function () {
                this.$answerAnnouncer.html("");
              }.bind(this),
              100,
            ));
        }),
        (t.prototype.getAnswerGiven = function () {
          return 0 < this.errorCounts.length;
        }),
        (t.prototype.gotoPreviousOption = function (t, e) {
          this.currentFocusedOption = e;
          var e = t.summaries[t.progress].summary.length,
            t = r(
              "ul[data-panel=" + t.progress + "] li[role='radio']",
              this.$myDom,
            );
          (t.attr("tabindex", "-1"),
            this.currentFocusedOption--,
            this.currentFocusedOption < 0
              ? (t.eq((e = e - 1)).attr("tabindex", "0"), t.eq(e).focus())
              : (t.eq(this.currentFocusedOption).attr("tabindex", "0"),
                t.eq(this.currentFocusedOption).focus()));
        }),
        (t.prototype.gotoNextOption = function (t, e) {
          this.currentFocusedOption = e;
          ((e = t.summaries[t.progress].summary.length),
            (t = r(
              "ul[data-panel=" + t.progress + "] li[role='radio']",
              this.$myDom,
            )));
          (t.attr("tabindex", "-1"),
            this.currentFocusedOption++,
            this.currentFocusedOption == e
              ? (t.eq(0).attr("tabindex", "0"), t.eq(0).focus())
              : (t.eq(this.currentFocusedOption).attr("tabindex", "0"),
                t.eq(this.currentFocusedOption).focus()));
        }),
        (t.prototype.doFinalEvaluation = function () {
          var t = this,
            e = this.countErrors(),
            i = t.summaries.length,
            n = i - e,
            e = 100 - (e / t.errorCounts.length) * 100,
            e = H5P.Question.determineOverallFeedback(
              t.options.overallFeedback,
              e / 100,
            )
              .replace("@score", n)
              .replace("@total", i)
              .replace("@percent", Math.round(e));
          r(".summary-evaluation-content", this.$myDom).removeAttr("tabindex");
          var o = t.options.scoreBarLabel
            .replace(":num", n)
            .replace(":total", i);
          (this.setFeedback(e, n, i, o),
            setTimeout(function () {
              (t.setBehaviour({ disableReadSpeaker: !1 }),
                t.readFeedback(),
                t.read(o));
            }, 3e3),
            t.trigger("resize"));
        }),
        (t.prototype.resetTask = function () {
          if (
            ((this.offset = 0),
            (this.score = 0),
            (this.progress = 0),
            (this.answers = []),
            (this.answer = []),
            (this.errorCounts = []),
            (this.userResponses = []),
            (this.dataBitMap = []),
            this.$myDom)
          ) {
            const t = this.$myDom[0].parentNode;
            ((t.innerHTML = ""),
              this.createQuestion(),
              t.appendChild(this.$myDom[0]),
              this.removeFeedback());
          }
        }),
        (t.prototype.adjustTargetHeight = function (t, e, i) {
          i =
            parseInt(e.outerHeight()) +
            parseInt(i.outerHeight()) +
            parseInt(i.css("marginBottom")) +
            parseInt(i.css("marginTop"));
          i > parseInt(t.css("height")) && t.animate({ height: i });
        }),
        (t.prototype.countErrors = function () {
          for (var t = 0, e = 0; e < this.summaries.length; e++)
            void 0 === this.errorCounts[e]
              ? t++
              : (t += this.errorCounts[e] ? 1 : 0);
          return t;
        }),
        (t.prototype.getXApiChoices = function (t) {
          return {
            choices: t.map(function (t, e) {
              return a.createChoice(e.toString(), t);
            }),
          };
        }),
        (t.prototype.storeUserResponse = function (t, e) {
          (void 0 === this.userResponses[t] && (this.userResponses[t] = []),
            this.userResponses[t].push(this.dataBitMap[t][e]));
        }),
        (t.prototype.startStopWatch = function (t) {
          ((this.stopWatches[t] = this.stopWatches[t] || new e()),
            this.stopWatches[t].start());
        }),
        (t.prototype.stopStopWatch = function (t) {
          this.stopWatches[t] && this.stopWatches[t].stop();
        }),
        (t.prototype.timePassedInStopWatch = function (t) {
          return void 0 !== this.stopWatches[t]
            ? this.stopWatches[t].passedTime()
            : 0;
        }),
        (t.prototype.getTotalPassedTime = function () {
          return this.stopWatches
            .filter(function (t) {
              return void 0 !== t;
            })
            .reduce(function (t, e) {
              return t + e.passedTime();
            }, 0);
        }),
        (t.prototype.createXApiAnsweredEvent = function (t, e, i, n) {
          var o = a
              .createDefinition()
              .name("Summary statement")
              .description(this.options.intro)
              .interactionType(a.interactionTypes.CHOICE)
              .correctResponsesPattern(["0"])
              .optional(this.getXApiChoices(t.summary))
              .build(),
            e = a
              .createResult()
              .response(e.join("[,]"))
              .duration(n)
              .score(this.correctOnFirstTry(e) ? 1 : 0, 1)
              .build();
          return a
            .create()
            .verb(a.verbs.ANSWERED)
            .objectDefinition(o)
            .context(this.contentId, this.subContentId)
            .contentId(this.contentId, t.subContentId)
            .result(e)
            .build();
        }),
        (t.prototype.correctOnFirstTry = function (t) {
          return 1 === t.length && 0 === t[0];
        }),
        (t.prototype.getXAPIData = function () {
          var o = this,
            t = o.summaries.map(function (t, e) {
              var i = o.userResponses[e] || [],
                n = o.timePassedInStopWatch(e);
              return {
                statement: o.createXApiAnsweredEvent(t, i, e, n).data.statement,
              };
            }),
            e = a
              .createResult()
              .score(o.getScore(), o.getMaxScore())
              .duration(o.getTotalPassedTime())
              .build(),
            i = a
              .createDefinition()
              .interactionType(a.interactionTypes.COMPOUND)
              .name(o.getTitle())
              .description(o.options.intro)
              .build();
          return {
            statement: a
              .create()
              .verb(a.verbs.ANSWERED)
              .contentId(o.contentId, o.subContentId)
              .context(
                o.getParentAttribute("contentId"),
                o.getParentAttribute("subContentId"),
              )
              .objectDefinition(i)
              .result(e)
              .build().data.statement,
            children: t,
          };
        }),
        (t.prototype.getParentAttribute = function (t) {
          if (void 0 !== this.parent) return this.parent[t];
        }),
        t
      );
    })(
      H5P.jQuery,
      H5P.Question,
      H5P.Summary.XApiEventBuilder,
      H5P.Summary.StopWatch,
    )));
/*!@license jQuery.ui-1.10/h5p-jquery-ui.js by Jupiter licensed under MIT*/ var oldJQuery =
    jQuery,
  jQuery = H5P.jQuery;
(!(function (t) {
  "use strict";
  "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery);
})(function (Q) {
  "use strict";
  Q.ui = Q.ui || {};
  Q.ui.version = "1.13.0";
  var o,
    i = 0,
    s = Array.prototype.hasOwnProperty,
    a = Array.prototype.slice;
  ((Q.cleanData =
    ((o = Q.cleanData),
    function (t) {
      for (var e, i, n = 0; null != (i = t[n]); n++)
        (e = Q._data(i, "events")) && e.remove && Q(i).triggerHandler("remove");
      o(t);
    })),
    (Q.widget = function (t, i, e) {
      var n,
        o,
        r,
        s = {},
        a = t.split(".")[0],
        l = a + "-" + (t = t.split(".")[1]);
      return (
        e || ((e = i), (i = Q.Widget)),
        Array.isArray(e) && (e = Q.extend.apply(null, [{}].concat(e))),
        (Q.expr.pseudos[l.toLowerCase()] = function (t) {
          return !!Q.data(t, l);
        }),
        (Q[a] = Q[a] || {}),
        (n = Q[a][t]),
        (o = Q[a][t] =
          function (t, e) {
            if (!this._createWidget) return new o(t, e);
            arguments.length && this._createWidget(t, e);
          }),
        Q.extend(o, n, {
          version: e.version,
          _proto: Q.extend({}, e),
          _childConstructors: [],
        }),
        ((r = new i()).options = Q.widget.extend({}, r.options)),
        Q.each(e, function (e, n) {
          function o() {
            return i.prototype[e].apply(this, arguments);
          }
          function r(t) {
            return i.prototype[e].apply(this, t);
          }
          s[e] =
            "function" == typeof n
              ? function () {
                  var t,
                    e = this._super,
                    i = this._superApply;
                  return (
                    (this._super = o),
                    (this._superApply = r),
                    (t = n.apply(this, arguments)),
                    (this._super = e),
                    (this._superApply = i),
                    t
                  );
                }
              : n;
        }),
        (o.prototype = Q.widget.extend(
          r,
          { widgetEventPrefix: (n && r.widgetEventPrefix) || t },
          s,
          { constructor: o, namespace: a, widgetName: t, widgetFullName: l },
        )),
        n
          ? (Q.each(n._childConstructors, function (t, e) {
              var i = e.prototype;
              Q.widget(i.namespace + "." + i.widgetName, o, e._proto);
            }),
            delete n._childConstructors)
          : i._childConstructors.push(o),
        Q.widget.bridge(t, o),
        o
      );
    }),
    (Q.widget.extend = function (t) {
      for (var e, i, n = a.call(arguments, 1), o = 0, r = n.length; o < r; o++)
        for (e in n[o])
          ((i = n[o][e]),
            s.call(n[o], e) &&
              void 0 !== i &&
              (Q.isPlainObject(i)
                ? (t[e] = Q.isPlainObject(t[e])
                    ? Q.widget.extend({}, t[e], i)
                    : Q.widget.extend({}, i))
                : (t[e] = i)));
      return t;
    }),
    (Q.widget.bridge = function (r, e) {
      var s = e.prototype.widgetFullName || r;
      Q.fn[r] = function (i) {
        var t = "string" == typeof i,
          n = a.call(arguments, 1),
          o = this;
        return (
          t
            ? this.length || "instance" !== i
              ? this.each(function () {
                  var t,
                    e = Q.data(this, s);
                  return "instance" === i
                    ? ((o = e), !1)
                    : e
                      ? "function" != typeof e[i] || "_" === i.charAt(0)
                        ? Q.error(
                            "no such method '" +
                              i +
                              "' for " +
                              r +
                              " widget instance",
                          )
                        : (t = e[i].apply(e, n)) !== e && void 0 !== t
                          ? ((o = t && t.jquery ? o.pushStack(t.get()) : t), !1)
                          : void 0
                      : Q.error(
                          "cannot call methods on " +
                            r +
                            " prior to initialization; attempted to call method '" +
                            i +
                            "'",
                        );
                })
              : (o = void 0)
            : (n.length && (i = Q.widget.extend.apply(null, [i].concat(n))),
              this.each(function () {
                var t = Q.data(this, s);
                t
                  ? (t.option(i || {}), t._init && t._init())
                  : Q.data(this, s, new e(i, this));
              })),
          o
        );
      };
    }),
    (Q.Widget = function () {}),
    (Q.Widget._childConstructors = []),
    (Q.Widget.prototype = {
      widgetName: "widget",
      widgetEventPrefix: "",
      defaultElement: "<div>",
      options: { classes: {}, disabled: !1, create: null },
      _createWidget: function (t, e) {
        ((e = Q(e || this.defaultElement || this)[0]),
          (this.element = Q(e)),
          (this.uuid = i++),
          (this.eventNamespace = "." + this.widgetName + this.uuid),
          (this.bindings = Q()),
          (this.hoverable = Q()),
          (this.focusable = Q()),
          (this.classesElementLookup = {}),
          e !== this &&
            (Q.data(e, this.widgetFullName, this),
            this._on(!0, this.element, {
              remove: function (t) {
                t.target === e && this.destroy();
              },
            }),
            (this.document = Q(e.style ? e.ownerDocument : e.document || e)),
            (this.window = Q(
              this.document[0].defaultView || this.document[0].parentWindow,
            ))),
          (this.options = Q.widget.extend(
            {},
            this.options,
            this._getCreateOptions(),
            t,
          )),
          this._create(),
          this.options.disabled &&
            this._setOptionDisabled(this.options.disabled),
          this._trigger("create", null, this._getCreateEventData()),
          this._init());
      },
      _getCreateOptions: function () {
        return {};
      },
      _getCreateEventData: Q.noop,
      _create: Q.noop,
      _init: Q.noop,
      destroy: function () {
        var i = this;
        (this._destroy(),
          Q.each(this.classesElementLookup, function (t, e) {
            i._removeClass(e, t);
          }),
          this.element.off(this.eventNamespace).removeData(this.widgetFullName),
          this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
          this.bindings.off(this.eventNamespace));
      },
      _destroy: Q.noop,
      widget: function () {
        return this.element;
      },
      option: function (t, e) {
        var i,
          n,
          o,
          r = t;
        if (0 === arguments.length) return Q.widget.extend({}, this.options);
        if ("string" == typeof t)
          if (((r = {}), (t = (i = t.split(".")).shift()), i.length)) {
            for (
              n = r[t] = Q.widget.extend({}, this.options[t]), o = 0;
              o < i.length - 1;
              o++
            )
              ((n[i[o]] = n[i[o]] || {}), (n = n[i[o]]));
            if (((t = i.pop()), 1 === arguments.length))
              return void 0 === n[t] ? null : n[t];
            n[t] = e;
          } else {
            if (1 === arguments.length)
              return void 0 === this.options[t] ? null : this.options[t];
            r[t] = e;
          }
        return (this._setOptions(r), this);
      },
      _setOptions: function (t) {
        for (var e in t) this._setOption(e, t[e]);
        return this;
      },
      _setOption: function (t, e) {
        return (
          "classes" === t && this._setOptionClasses(e),
          (this.options[t] = e),
          "disabled" === t && this._setOptionDisabled(e),
          this
        );
      },
      _setOptionClasses: function (t) {
        var e, i, n;
        for (e in t)
          ((n = this.classesElementLookup[e]),
            t[e] !== this.options.classes[e] &&
              n &&
              n.length &&
              ((i = Q(n.get())),
              this._removeClass(n, e),
              i.addClass(
                this._classes({ element: i, keys: e, classes: t, add: !0 }),
              )));
      },
      _setOptionDisabled: function (t) {
        (this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !!t,
        ),
          t &&
            (this._removeClass(this.hoverable, null, "ui-state-hover"),
            this._removeClass(this.focusable, null, "ui-state-focus")));
      },
      enable: function () {
        return this._setOptions({ disabled: !1 });
      },
      disable: function () {
        return this._setOptions({ disabled: !0 });
      },
      _classes: function (o) {
        var r = [],
          s = this;
        function t(t, e) {
          for (var i, n = 0; n < t.length; n++)
            ((i = s.classesElementLookup[t[n]] || Q()),
              (i = o.add
                ? (o.element.each(function (t, e) {
                    Q.map(s.classesElementLookup, function (t) {
                      return t;
                    }).some(function (t) {
                      return t.is(e);
                    }) || s._on(Q(e), { remove: "_untrackClassesElement" });
                  }),
                  Q(Q.uniqueSort(i.get().concat(o.element.get()))))
                : Q(i.not(o.element).get())),
              (s.classesElementLookup[t[n]] = i),
              r.push(t[n]),
              e && o.classes[t[n]] && r.push(o.classes[t[n]]));
        }
        return (
          (o = Q.extend(
            { element: this.element, classes: this.options.classes || {} },
            o,
          )).keys && t(o.keys.match(/\S+/g) || [], !0),
          o.extra && t(o.extra.match(/\S+/g) || []),
          r.join(" ")
        );
      },
      _untrackClassesElement: function (i) {
        var n = this;
        (Q.each(n.classesElementLookup, function (t, e) {
          -1 !== Q.inArray(i.target, e) &&
            (n.classesElementLookup[t] = Q(e.not(i.target).get()));
        }),
          this._off(Q(i.target)));
      },
      _removeClass: function (t, e, i) {
        return this._toggleClass(t, e, i, !1);
      },
      _addClass: function (t, e, i) {
        return this._toggleClass(t, e, i, !0);
      },
      _toggleClass: function (t, e, i, n) {
        var o = "string" == typeof t || null === t,
          i = {
            extra: o ? e : i,
            keys: o ? t : e,
            element: o ? this.element : t,
            add: (n = "boolean" == typeof n ? n : i),
          };
        return (i.element.toggleClass(this._classes(i), n), this);
      },
      _on: function (o, r, t) {
        var s,
          a = this;
        ("boolean" != typeof o && ((t = r), (r = o), (o = !1)),
          t
            ? ((r = s = Q(r)), (this.bindings = this.bindings.add(r)))
            : ((t = r), (r = this.element), (s = this.widget())),
          Q.each(t, function (t, e) {
            function i() {
              if (
                o ||
                (!0 !== a.options.disabled &&
                  !Q(this).hasClass("ui-state-disabled"))
              )
                return ("string" == typeof e ? a[e] : e).apply(a, arguments);
            }
            "string" != typeof e &&
              (i.guid = e.guid = e.guid || i.guid || Q.guid++);
            var n = t.match(/^([\w:-]*)\s*(.*)$/),
              t = n[1] + a.eventNamespace,
              n = n[2];
            n ? s.on(t, n, i) : r.on(t, i);
          }));
      },
      _off: function (t, e) {
        ((e =
          (e || "").split(" ").join(this.eventNamespace + " ") +
          this.eventNamespace),
          t.off(e),
          (this.bindings = Q(this.bindings.not(t).get())),
          (this.focusable = Q(this.focusable.not(t).get())),
          (this.hoverable = Q(this.hoverable.not(t).get())));
      },
      _delay: function (t, e) {
        var i = this;
        return setTimeout(function () {
          return ("string" == typeof t ? i[t] : t).apply(i, arguments);
        }, e || 0);
      },
      _hoverable: function (t) {
        ((this.hoverable = this.hoverable.add(t)),
          this._on(t, {
            mouseenter: function (t) {
              this._addClass(Q(t.currentTarget), null, "ui-state-hover");
            },
            mouseleave: function (t) {
              this._removeClass(Q(t.currentTarget), null, "ui-state-hover");
            },
          }));
      },
      _focusable: function (t) {
        ((this.focusable = this.focusable.add(t)),
          this._on(t, {
            focusin: function (t) {
              this._addClass(Q(t.currentTarget), null, "ui-state-focus");
            },
            focusout: function (t) {
              this._removeClass(Q(t.currentTarget), null, "ui-state-focus");
            },
          }));
      },
      _trigger: function (t, e, i) {
        var n,
          o,
          r = this.options[t];
        if (
          ((i = i || {}),
          ((e = Q.Event(e)).type = (
            t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t
          ).toLowerCase()),
          (e.target = this.element[0]),
          (o = e.originalEvent))
        )
          for (n in o) n in e || (e[n] = o[n]);
        return (
          this.element.trigger(e, i),
          !(
            ("function" == typeof r &&
              !1 === r.apply(this.element[0], [e].concat(i))) ||
            e.isDefaultPrevented()
          )
        );
      },
    }),
    Q.each({ show: "fadeIn", hide: "fadeOut" }, function (r, s) {
      Q.Widget.prototype["_" + r] = function (e, t, i) {
        var n,
          o = (t = "string" == typeof t ? { effect: t } : t)
            ? (!0 !== t && "number" != typeof t && t.effect) || s
            : r;
        ("number" == typeof (t = t || {})
          ? (t = { duration: t })
          : !0 === t && (t = {}),
          (n = !Q.isEmptyObject(t)),
          (t.complete = i),
          t.delay && e.delay(t.delay),
          n && Q.effects && Q.effects.effect[o]
            ? e[r](t)
            : o !== r && e[o]
              ? e[o](t.duration, t.easing, i)
              : e.queue(function (t) {
                  (Q(this)[r](), i && i.call(e[0]), t());
                }));
      };
    }));
  var n, k, C, r, l, c, u, h, P;
  Q.widget;
  function _(t, e, i) {
    return [
      parseFloat(t[0]) * (h.test(t[0]) ? e / 100 : 1),
      parseFloat(t[1]) * (h.test(t[1]) ? i / 100 : 1),
    ];
  }
  function S(t, e) {
    return parseInt(Q.css(t, e), 10) || 0;
  }
  function T(t) {
    return null != t && t === t.window;
  }
  ((k = Math.max),
    (C = Math.abs),
    (r = /left|center|right/),
    (l = /top|center|bottom/),
    (c = /[\+\-]\d+(\.[\d]+)?%?/),
    (u = /^\w+/),
    (h = /%$/),
    (P = Q.fn.position),
    (Q.position = {
      scrollbarWidth: function () {
        if (void 0 !== n) return n;
        var t,
          e = Q(
            "<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>",
          ),
          i = e.children()[0];
        return (
          Q("body").append(e),
          (t = i.offsetWidth),
          e.css("overflow", "scroll"),
          t === (i = i.offsetWidth) && (i = e[0].clientWidth),
          e.remove(),
          (n = t - i)
        );
      },
      getScrollInfo: function (t) {
        var e = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"),
          i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"),
          e =
            "scroll" === e ||
            ("auto" === e && t.width < t.element[0].scrollWidth);
        return {
          width:
            "scroll" === i ||
            ("auto" === i && t.height < t.element[0].scrollHeight)
              ? Q.position.scrollbarWidth()
              : 0,
          height: e ? Q.position.scrollbarWidth() : 0,
        };
      },
      getWithinInfo: function (t) {
        var e = Q(t || window),
          i = T(e[0]),
          n = !!e[0] && 9 === e[0].nodeType;
        return {
          element: e,
          isWindow: i,
          isDocument: n,
          offset: !i && !n ? Q(t).offset() : { left: 0, top: 0 },
          scrollLeft: e.scrollLeft(),
          scrollTop: e.scrollTop(),
          width: e.outerWidth(),
          height: e.outerHeight(),
        };
      },
    }),
    (Q.fn.position = function (h) {
      if (!h || !h.of) return P.apply(this, arguments);
      var d,
        p,
        f,
        m,
        g,
        t,
        v =
          "string" == typeof (h = Q.extend({}, h)).of
            ? Q(document).find(h.of)
            : Q(h.of),
        b = Q.position.getWithinInfo(h.within),
        y = Q.position.getScrollInfo(b),
        w = (h.collision || "flip").split(" "),
        x = {},
        e =
          9 === (t = (e = v)[0]).nodeType
            ? {
                width: e.width(),
                height: e.height(),
                offset: { top: 0, left: 0 },
              }
            : T(t)
              ? {
                  width: e.width(),
                  height: e.height(),
                  offset: { top: e.scrollTop(), left: e.scrollLeft() },
                }
              : t.preventDefault
                ? {
                    width: 0,
                    height: 0,
                    offset: { top: t.pageY, left: t.pageX },
                  }
                : {
                    width: e.outerWidth(),
                    height: e.outerHeight(),
                    offset: e.offset(),
                  };
      return (
        v[0].preventDefault && (h.at = "left top"),
        (p = e.width),
        (f = e.height),
        (g = Q.extend({}, (m = e.offset))),
        Q.each(["my", "at"], function () {
          var t,
            e,
            i = (h[this] || "").split(" ");
          (((i =
            1 === i.length
              ? r.test(i[0])
                ? i.concat(["center"])
                : l.test(i[0])
                  ? ["center"].concat(i)
                  : ["center", "center"]
              : i)[0] = r.test(i[0]) ? i[0] : "center"),
            (i[1] = l.test(i[1]) ? i[1] : "center"),
            (t = c.exec(i[0])),
            (e = c.exec(i[1])),
            (x[this] = [t ? t[0] : 0, e ? e[0] : 0]),
            (h[this] = [u.exec(i[0])[0], u.exec(i[1])[0]]));
        }),
        1 === w.length && (w[1] = w[0]),
        "right" === h.at[0]
          ? (g.left += p)
          : "center" === h.at[0] && (g.left += p / 2),
        "bottom" === h.at[1]
          ? (g.top += f)
          : "center" === h.at[1] && (g.top += f / 2),
        (d = _(x.at, p, f)),
        (g.left += d[0]),
        (g.top += d[1]),
        this.each(function () {
          var i,
            t,
            s = Q(this),
            a = s.outerWidth(),
            l = s.outerHeight(),
            e = S(this, "marginLeft"),
            n = S(this, "marginTop"),
            o = a + e + S(this, "marginRight") + y.width,
            r = l + n + S(this, "marginBottom") + y.height,
            c = Q.extend({}, g),
            u = _(x.my, s.outerWidth(), s.outerHeight());
          ("right" === h.my[0]
            ? (c.left -= a)
            : "center" === h.my[0] && (c.left -= a / 2),
            "bottom" === h.my[1]
              ? (c.top -= l)
              : "center" === h.my[1] && (c.top -= l / 2),
            (c.left += u[0]),
            (c.top += u[1]),
            (i = { marginLeft: e, marginTop: n }),
            Q.each(["left", "top"], function (t, e) {
              Q.ui.position[w[t]] &&
                Q.ui.position[w[t]][e](c, {
                  targetWidth: p,
                  targetHeight: f,
                  elemWidth: a,
                  elemHeight: l,
                  collisionPosition: i,
                  collisionWidth: o,
                  collisionHeight: r,
                  offset: [d[0] + u[0], d[1] + u[1]],
                  my: h.my,
                  at: h.at,
                  within: b,
                  elem: s,
                });
            }),
            h.using &&
              (t = function (t) {
                var e = m.left - c.left,
                  i = e + p - a,
                  n = m.top - c.top,
                  o = n + f - l,
                  r = {
                    target: {
                      element: v,
                      left: m.left,
                      top: m.top,
                      width: p,
                      height: f,
                    },
                    element: {
                      element: s,
                      left: c.left,
                      top: c.top,
                      width: a,
                      height: l,
                    },
                    horizontal: i < 0 ? "left" : 0 < e ? "right" : "center",
                    vertical: o < 0 ? "top" : 0 < n ? "bottom" : "middle",
                  };
                (p < a && C(e + i) < p && (r.horizontal = "center"),
                  f < l && C(n + o) < f && (r.vertical = "middle"),
                  k(C(e), C(i)) > k(C(n), C(o))
                    ? (r.important = "horizontal")
                    : (r.important = "vertical"),
                  h.using.call(this, t, r));
              }),
            s.offset(Q.extend(c, { using: t })));
        })
      );
    }),
    (Q.ui.position = {
      fit: {
        left: function (t, e) {
          var i = e.within,
            n = i.isWindow ? i.scrollLeft : i.offset.left,
            o = i.width,
            r = t.left - e.collisionPosition.marginLeft,
            s = n - r,
            a = r + e.collisionWidth - o - n;
          e.collisionWidth > o
            ? 0 < s && a <= 0
              ? ((i = t.left + s + e.collisionWidth - o - n), (t.left += s - i))
              : (t.left =
                  !(0 < a && s <= 0) && a < s ? n + o - e.collisionWidth : n)
            : 0 < s
              ? (t.left += s)
              : 0 < a
                ? (t.left -= a)
                : (t.left = k(t.left - r, t.left));
        },
        top: function (t, e) {
          var i = e.within,
            n = i.isWindow ? i.scrollTop : i.offset.top,
            o = e.within.height,
            r = t.top - e.collisionPosition.marginTop,
            s = n - r,
            a = r + e.collisionHeight - o - n;
          e.collisionHeight > o
            ? 0 < s && a <= 0
              ? ((i = t.top + s + e.collisionHeight - o - n), (t.top += s - i))
              : (t.top =
                  !(0 < a && s <= 0) && a < s ? n + o - e.collisionHeight : n)
            : 0 < s
              ? (t.top += s)
              : 0 < a
                ? (t.top -= a)
                : (t.top = k(t.top - r, t.top));
        },
      },
      flip: {
        left: function (t, e) {
          var i = e.within,
            n = i.offset.left + i.scrollLeft,
            o = i.width,
            r = i.isWindow ? i.scrollLeft : i.offset.left,
            s = t.left - e.collisionPosition.marginLeft,
            a = s - r,
            l = s + e.collisionWidth - o - r,
            c =
              "left" === e.my[0]
                ? -e.elemWidth
                : "right" === e.my[0]
                  ? e.elemWidth
                  : 0,
            i =
              "left" === e.at[0]
                ? e.targetWidth
                : "right" === e.at[0]
                  ? -e.targetWidth
                  : 0,
            s = -2 * e.offset[0];
          a < 0
            ? ((n = t.left + c + i + s + e.collisionWidth - o - n) < 0 ||
                n < C(a)) &&
              (t.left += c + i + s)
            : 0 < l &&
              (0 <
                (r = t.left - e.collisionPosition.marginLeft + c + i + s - r) ||
                C(r) < l) &&
              (t.left += c + i + s);
        },
        top: function (t, e) {
          var i = e.within,
            n = i.offset.top + i.scrollTop,
            o = i.height,
            r = i.isWindow ? i.scrollTop : i.offset.top,
            s = t.top - e.collisionPosition.marginTop,
            a = s - r,
            l = s + e.collisionHeight - o - r,
            c =
              "top" === e.my[1]
                ? -e.elemHeight
                : "bottom" === e.my[1]
                  ? e.elemHeight
                  : 0,
            i =
              "top" === e.at[1]
                ? e.targetHeight
                : "bottom" === e.at[1]
                  ? -e.targetHeight
                  : 0,
            s = -2 * e.offset[1];
          a < 0
            ? ((n = t.top + c + i + s + e.collisionHeight - o - n) < 0 ||
                n < C(a)) &&
              (t.top += c + i + s)
            : 0 < l &&
              (0 <
                (r = t.top - e.collisionPosition.marginTop + c + i + s - r) ||
                C(r) < l) &&
              (t.top += c + i + s);
        },
      },
      flipfit: {
        left: function () {
          (Q.ui.position.flip.left.apply(this, arguments),
            Q.ui.position.fit.left.apply(this, arguments));
        },
        top: function () {
          (Q.ui.position.flip.top.apply(this, arguments),
            Q.ui.position.fit.top.apply(this, arguments));
        },
      },
    }));
  (Q.ui.position,
    Q.extend(Q.expr.pseudos, {
      data: Q.expr.createPseudo
        ? Q.expr.createPseudo(function (e) {
            return function (t) {
              return !!Q.data(t, e);
            };
          })
        : function (t, e, i) {
            return !!Q.data(t, i[3]);
          },
    }),
    Q.fn.extend({
      disableSelection:
        ((t =
          "onselectstart" in document.createElement("div")
            ? "selectstart"
            : "mousedown"),
        function () {
          return this.on(t + ".ui-disableSelection", function (t) {
            t.preventDefault();
          });
        }),
      enableSelection: function () {
        return this.off(".ui-disableSelection");
      },
    }));
  var t,
    d = Q,
    p = {},
    e = p.toString,
    f = /^([\-+])=\s*(\d+\.?\d*)/,
    m = [
      {
        re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (t) {
          return [t[1], t[2], t[3], t[4]];
        },
      },
      {
        re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (t) {
          return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]];
        },
      },
      {
        re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
        parse: function (t) {
          return [
            parseInt(t[1], 16),
            parseInt(t[2], 16),
            parseInt(t[3], 16),
            t[4] ? (parseInt(t[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
        parse: function (t) {
          return [
            parseInt(t[1] + t[1], 16),
            parseInt(t[2] + t[2], 16),
            parseInt(t[3] + t[3], 16),
            t[4] ? (parseInt(t[4] + t[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        space: "hsla",
        parse: function (t) {
          return [t[1], t[2] / 100, t[3] / 100, t[4]];
        },
      },
    ],
    g = (d.Color = function (t, e, i, n) {
      return new d.Color.fn.parse(t, e, i, n);
    }),
    v = {
      rgba: {
        props: {
          red: { idx: 0, type: "byte" },
          green: { idx: 1, type: "byte" },
          blue: { idx: 2, type: "byte" },
        },
      },
      hsla: {
        props: {
          hue: { idx: 0, type: "degrees" },
          saturation: { idx: 1, type: "percent" },
          lightness: { idx: 2, type: "percent" },
        },
      },
    },
    b = {
      byte: { floor: !0, max: 255 },
      percent: { max: 1 },
      degrees: { mod: 360, floor: !0 },
    },
    y = (g.support = {}),
    w = d("<p>")[0],
    x = d.each;
  function H(t) {
    return null == t
      ? t + ""
      : "object" == typeof t
        ? p[e.call(t)] || "object"
        : typeof t;
  }
  function I(t, e, i) {
    var n = b[e.type] || {};
    return null == t
      ? i || !e.def
        ? null
        : e.def
      : ((t = n.floor ? ~~t : parseFloat(t)),
        isNaN(t)
          ? e.def
          : n.mod
            ? (t + n.mod) % n.mod
            : Math.min(n.max, Math.max(0, t)));
  }
  function E(n) {
    var o = g(),
      r = (o._rgba = []);
    return (
      (n = n.toLowerCase()),
      x(m, function (t, e) {
        var i = e.re.exec(n),
          i = i && e.parse(i),
          e = e.space || "rgba";
        if (i)
          return (
            (i = o[e](i)),
            (o[v[e].cache] = i[v[e].cache]),
            (r = o._rgba = i._rgba),
            !1
          );
      }),
      r.length
        ? ("0,0,0,0" === r.join() && d.extend(r, z.transparent), o)
        : z[n]
    );
  }
  function D(t, e, i) {
    return 6 * (i = (i + 1) % 1) < 1
      ? t + (e - t) * i * 6
      : 2 * i < 1
        ? e
        : 3 * i < 2
          ? t + (e - t) * (2 / 3 - i) * 6
          : t;
  }
  ((w.style.cssText = "background-color:rgba(1,1,1,.5)"),
    (y.rgba = -1 < w.style.backgroundColor.indexOf("rgba")),
    x(v, function (t, e) {
      ((e.cache = "_" + t),
        (e.props.alpha = { idx: 3, type: "percent", def: 1 }));
    }),
    d.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (t, e) {
        p["[object " + e + "]"] = e.toLowerCase();
      },
    ),
    ((g.fn = d.extend(g.prototype, {
      parse: function (o, t, e, i) {
        if (void 0 === o)
          return ((this._rgba = [null, null, null, null]), this);
        (o.jquery || o.nodeType) && ((o = d(o).css(t)), (t = void 0));
        var r = this,
          n = H(o),
          s = (this._rgba = []);
        return (
          void 0 !== t && ((o = [o, t, e, i]), (n = "array")),
          "string" === n
            ? this.parse(E(o) || z._default)
            : "array" === n
              ? (x(v.rgba.props, function (t, e) {
                  s[e.idx] = I(o[e.idx], e);
                }),
                this)
              : "object" === n
                ? (x(
                    v,
                    o instanceof g
                      ? function (t, e) {
                          o[e.cache] && (r[e.cache] = o[e.cache].slice());
                        }
                      : function (t, i) {
                          var n = i.cache;
                          (x(i.props, function (t, e) {
                            if (!r[n] && i.to) {
                              if ("alpha" === t || null == o[t]) return;
                              r[n] = i.to(r._rgba);
                            }
                            r[n][e.idx] = I(o[t], e, !0);
                          }),
                            r[n] &&
                              d.inArray(null, r[n].slice(0, 3)) < 0 &&
                              (null == r[n][3] && (r[n][3] = 1),
                              i.from && (r._rgba = i.from(r[n]))));
                        },
                  ),
                  this)
                : void 0
        );
      },
      is: function (t) {
        var o = g(t),
          r = !0,
          s = this;
        return (
          x(v, function (t, e) {
            var i,
              n = o[e.cache];
            return (
              n &&
                ((i = s[e.cache] || (e.to && e.to(s._rgba)) || []),
                x(e.props, function (t, e) {
                  if (null != n[e.idx]) return (r = n[e.idx] === i[e.idx]);
                })),
              r
            );
          }),
          r
        );
      },
      _space: function () {
        var i = [],
          n = this;
        return (
          x(v, function (t, e) {
            n[e.cache] && i.push(t);
          }),
          i.pop()
        );
      },
      transition: function (t, s) {
        var e = (c = g(t))._space(),
          i = v[e],
          t = 0 === this.alpha() ? g("transparent") : this,
          a = t[i.cache] || i.to(t._rgba),
          l = a.slice(),
          c = c[i.cache];
        return (
          x(i.props, function (t, e) {
            var i = e.idx,
              n = a[i],
              o = c[i],
              r = b[e.type] || {};
            null !== o &&
              (null === n
                ? (l[i] = o)
                : (r.mod &&
                    (o - n > r.mod / 2
                      ? (n += r.mod)
                      : n - o > r.mod / 2 && (n -= r.mod)),
                  (l[i] = I((o - n) * s + n, e))));
          }),
          this[e](l)
        );
      },
      blend: function (t) {
        if (1 === this._rgba[3]) return this;
        var e = this._rgba.slice(),
          i = e.pop(),
          n = g(t)._rgba;
        return g(
          d.map(e, function (t, e) {
            return (1 - i) * n[e] + i * t;
          }),
        );
      },
      toRgbaString: function () {
        var t = "rgba(",
          e = d.map(this._rgba, function (t, e) {
            return null != t ? t : 2 < e ? 1 : 0;
          });
        return (1 === e[3] && (e.pop(), (t = "rgb(")), t + e.join() + ")");
      },
      toHslaString: function () {
        var t = "hsla(",
          e = d.map(this.hsla(), function (t, e) {
            return (
              null == t && (t = 2 < e ? 1 : 0),
              (t = e && e < 3 ? Math.round(100 * t) + "%" : t)
            );
          });
        return (1 === e[3] && (e.pop(), (t = "hsl(")), t + e.join() + ")");
      },
      toHexString: function (t) {
        var e = this._rgba.slice(),
          i = e.pop();
        return (
          t && e.push(~~(255 * i)),
          "#" +
            d
              .map(e, function (t) {
                return 1 === (t = (t || 0).toString(16)).length ? "0" + t : t;
              })
              .join("")
        );
      },
      toString: function () {
        return 0 === this._rgba[3] ? "transparent" : this.toRgbaString();
      },
    })).parse.prototype = g.fn),
    (v.hsla.to = function (t) {
      if (null == t[0] || null == t[1] || null == t[2])
        return [null, null, null, t[3]];
      var e = t[0] / 255,
        i = t[1] / 255,
        n = t[2] / 255,
        o = t[3],
        r = Math.max(e, i, n),
        s = Math.min(e, i, n),
        a = r - s,
        l = r + s,
        t = 0.5 * l,
        i =
          s === r
            ? 0
            : e === r
              ? (60 * (i - n)) / a + 360
              : i === r
                ? (60 * (n - e)) / a + 120
                : (60 * (e - i)) / a + 240,
        l = 0 == a ? 0 : t <= 0.5 ? a / l : a / (2 - l);
      return [Math.round(i) % 360, l, t, null == o ? 1 : o];
    }),
    (v.hsla.from = function (t) {
      if (null == t[0] || null == t[1] || null == t[2])
        return [null, null, null, t[3]];
      var e = t[0] / 360,
        i = t[1],
        n = t[2],
        t = t[3],
        i = n <= 0.5 ? n * (1 + i) : n + i - n * i,
        n = 2 * n - i;
      return [
        Math.round(255 * D(n, i, e + 1 / 3)),
        Math.round(255 * D(n, i, e)),
        Math.round(255 * D(n, i, e - 1 / 3)),
        t,
      ];
    }),
    x(v, function (l, t) {
      var e = t.props,
        r = t.cache,
        s = t.to,
        a = t.from;
      ((g.fn[l] = function (t) {
        if ((s && !this[r] && (this[r] = s(this._rgba)), void 0 === t))
          return this[r].slice();
        var i = H(t),
          n = "array" === i || "object" === i ? t : arguments,
          o = this[r].slice();
        return (
          x(e, function (t, e) {
            t = n["object" === i ? t : e.idx];
            (null == t && (t = o[e.idx]), (o[e.idx] = I(t, e)));
          }),
          a ? (((t = g(a(o)))[r] = o), t) : g(o)
        );
      }),
        x(e, function (s, a) {
          g.fn[s] ||
            (g.fn[s] = function (t) {
              var e,
                i = H(t),
                n = "alpha" === s ? (this._hsla ? "hsla" : "rgba") : l,
                o = this[n](),
                r = o[a.idx];
              return "undefined" === i
                ? r
                : ("function" === i && (i = H((t = t.call(this, r)))),
                  null == t && a.empty
                    ? this
                    : ("string" === i &&
                        (e = f.exec(t)) &&
                        (t = r + parseFloat(e[2]) * ("+" === e[1] ? 1 : -1)),
                      (o[a.idx] = t),
                      this[n](o)));
            });
        }));
    }),
    (g.hook = function (t) {
      t = t.split(" ");
      x(t, function (t, r) {
        ((d.cssHooks[r] = {
          set: function (t, e) {
            var i,
              n,
              o = "";
            if ("transparent" !== e && ("string" !== H(e) || (i = E(e)))) {
              if (((e = g(i || e)), !y.rgba && 1 !== e._rgba[3])) {
                for (
                  n = "backgroundColor" === r ? t.parentNode : t;
                  ("" === o || "transparent" === o) && n && n.style;
                )
                  try {
                    ((o = d.css(n, "backgroundColor")), (n = n.parentNode));
                  } catch (t) {}
                e = e.blend(o && "transparent" !== o ? o : "_default");
              }
              e = e.toRgbaString();
            }
            try {
              t.style[r] = e;
            } catch (t) {}
          },
        }),
          (d.fx.step[r] = function (t) {
            (t.colorInit ||
              ((t.start = g(t.elem, r)),
              (t.end = g(t.end)),
              (t.colorInit = !0)),
              d.cssHooks[r].set(t.elem, t.start.transition(t.end, t.pos)));
          }));
      });
    })(
      "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    ),
    (d.cssHooks.borderColor = {
      expand: function (i) {
        var n = {};
        return (
          x(["Top", "Right", "Bottom", "Left"], function (t, e) {
            n["border" + e + "Color"] = i;
          }),
          n
        );
      },
    }));
  var A,
    M,
    L,
    O,
    B,
    $,
    N,
    R,
    F,
    j,
    z = (d.Color.names = {
      aqua: "#00ffff",
      black: "#000000",
      blue: "#0000ff",
      fuchsia: "#ff00ff",
      gray: "#808080",
      green: "#008000",
      lime: "#00ff00",
      maroon: "#800000",
      navy: "#000080",
      olive: "#808000",
      purple: "#800080",
      red: "#ff0000",
      silver: "#c0c0c0",
      teal: "#008080",
      white: "#ffffff",
      yellow: "#ffff00",
      transparent: [null, null, null, 0],
      _default: "#ffffff",
    }),
    W = "ui-effects-",
    q = "ui-effects-style",
    V = "ui-effects-animated";
  function U(t) {
    var e,
      i,
      n = t.ownerDocument.defaultView
        ? t.ownerDocument.defaultView.getComputedStyle(t, null)
        : t.currentStyle,
      o = {};
    if (n && n.length && n[0] && n[n[0]])
      for (i = n.length; i--; )
        "string" == typeof n[(e = n[i])] &&
          (o[
            e.replace(/-([\da-z])/gi, function (t, e) {
              return e.toUpperCase();
            })
          ] = n[e]);
    else for (e in n) "string" == typeof n[e] && (o[e] = n[e]);
    return o;
  }
  function Y(t, e, i, n) {
    return (
      (t = { effect: (t = Q.isPlainObject(t) ? (e = t).effect : t) }),
      "function" == typeof (e = null == e ? {} : e) &&
        ((n = e), (i = null), (e = {})),
      ("number" != typeof e && !Q.fx.speeds[e]) || ((n = i), (i = e), (e = {})),
      "function" == typeof i && ((n = i), (i = null)),
      e && Q.extend(t, e),
      (i = i || e.duration),
      (t.duration = Q.fx.off
        ? 0
        : "number" == typeof i
          ? i
          : i in Q.fx.speeds
            ? Q.fx.speeds[i]
            : Q.fx.speeds._default),
      (t.complete = n || e.complete),
      t
    );
  }
  function G(t) {
    return (
      !t ||
      "number" == typeof t ||
      Q.fx.speeds[t] ||
      ("string" == typeof t && !Q.effects.effect[t]) ||
      "function" == typeof t ||
      ("object" == typeof t && !t.effect)
    );
  }
  function X(t, e) {
    var i = e.outerWidth(),
      e = e.outerHeight(),
      t =
        /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(
          t,
        ) || ["", 0, i, e, 0];
    return {
      top: parseFloat(t[1]) || 0,
      right: "auto" === t[2] ? i : parseFloat(t[2]),
      bottom: "auto" === t[3] ? e : parseFloat(t[3]),
      left: parseFloat(t[4]) || 0,
    };
  }
  ((Q.effects = { effect: {} }),
    (O = ["add", "remove", "toggle"]),
    (B = {
      border: 1,
      borderBottom: 1,
      borderColor: 1,
      borderLeft: 1,
      borderRight: 1,
      borderTop: 1,
      borderWidth: 1,
      margin: 1,
      padding: 1,
    }),
    Q.each(
      [
        "borderLeftStyle",
        "borderRightStyle",
        "borderBottomStyle",
        "borderTopStyle",
      ],
      function (t, e) {
        Q.fx.step[e] = function (t) {
          (("none" !== t.end && !t.setAttr) || (1 === t.pos && !t.setAttr)) &&
            (d.style(t.elem, e, t.end), (t.setAttr = !0));
        };
      },
    ),
    Q.fn.addBack ||
      (Q.fn.addBack = function (t) {
        return this.add(
          null == t ? this.prevObject : this.prevObject.filter(t),
        );
      }),
    (Q.effects.animateClass = function (o, t, e, i) {
      var r = Q.speed(t, e, i);
      return this.queue(function () {
        var i = Q(this),
          t = i.attr("class") || "",
          e = (e = r.children ? i.find("*").addBack() : i).map(function () {
            return { el: Q(this), start: U(this) };
          }),
          n = function () {
            Q.each(O, function (t, e) {
              o[e] && i[e + "Class"](o[e]);
            });
          };
        (n(),
          (e = e.map(function () {
            return (
              (this.end = U(this.el[0])),
              (this.diff = (function (t, e) {
                var i,
                  n,
                  o = {};
                for (i in e)
                  ((n = e[i]),
                    t[i] !== n &&
                      (B[i] ||
                        (!Q.fx.step[i] && isNaN(parseFloat(n))) ||
                        (o[i] = n)));
                return o;
              })(this.start, this.end)),
              this
            );
          })),
          i.attr("class", t),
          (e = e.map(function () {
            var t = this,
              e = Q.Deferred(),
              i = Q.extend({}, r, {
                queue: !1,
                complete: function () {
                  e.resolve(t);
                },
              });
            return (this.el.animate(this.diff, i), e.promise());
          })),
          Q.when.apply(Q, e.get()).done(function () {
            (n(),
              Q.each(arguments, function () {
                var e = this.el;
                Q.each(this.diff, function (t) {
                  e.css(t, "");
                });
              }),
              r.complete.call(i[0]));
          }));
      });
    }),
    Q.fn.extend({
      addClass:
        ((L = Q.fn.addClass),
        function (t, e, i, n) {
          return e
            ? Q.effects.animateClass.call(this, { add: t }, e, i, n)
            : L.apply(this, arguments);
        }),
      removeClass:
        ((M = Q.fn.removeClass),
        function (t, e, i, n) {
          return 1 < arguments.length
            ? Q.effects.animateClass.call(this, { remove: t }, e, i, n)
            : M.apply(this, arguments);
        }),
      toggleClass:
        ((A = Q.fn.toggleClass),
        function (t, e, i, n, o) {
          return "boolean" == typeof e || void 0 === e
            ? i
              ? Q.effects.animateClass.call(
                  this,
                  e ? { add: t } : { remove: t },
                  i,
                  n,
                  o,
                )
              : A.apply(this, arguments)
            : Q.effects.animateClass.call(this, { toggle: t }, e, i, n);
        }),
      switchClass: function (t, e, i, n, o) {
        return Q.effects.animateClass.call(
          this,
          { add: e, remove: t },
          i,
          n,
          o,
        );
      },
    }),
    Q.expr &&
      Q.expr.pseudos &&
      Q.expr.pseudos.animated &&
      (Q.expr.pseudos.animated =
        (($ = Q.expr.pseudos.animated),
        function (t) {
          return !!Q(t).data(V) || $(t);
        })),
    !1 !== Q.uiBackCompat &&
      Q.extend(Q.effects, {
        save: function (t, e) {
          for (var i = 0, n = e.length; i < n; i++)
            null !== e[i] && t.data(W + e[i], t[0].style[e[i]]);
        },
        restore: function (t, e) {
          for (var i, n = 0, o = e.length; n < o; n++)
            null !== e[n] && ((i = t.data(W + e[n])), t.css(e[n], i));
        },
        setMode: function (t, e) {
          return (e = "toggle" === e ? (t.is(":hidden") ? "show" : "hide") : e);
        },
        createWrapper: function (i) {
          if (i.parent().is(".ui-effects-wrapper")) return i.parent();
          var n = {
              width: i.outerWidth(!0),
              height: i.outerHeight(!0),
              float: i.css("float"),
            },
            t = Q("<div></div>")
              .addClass("ui-effects-wrapper")
              .css({
                fontSize: "100%",
                background: "transparent",
                border: "none",
                margin: 0,
                padding: 0,
              }),
            e = { width: i.width(), height: i.height() },
            o = document.activeElement;
          try {
            o.id;
          } catch (t) {
            o = document.body;
          }
          return (
            i.wrap(t),
            (i[0] !== o && !Q.contains(i[0], o)) || Q(o).trigger("focus"),
            (t = i.parent()),
            "static" === i.css("position")
              ? (t.css({ position: "relative" }),
                i.css({ position: "relative" }))
              : (Q.extend(n, {
                  position: i.css("position"),
                  zIndex: i.css("z-index"),
                }),
                Q.each(["top", "left", "bottom", "right"], function (t, e) {
                  ((n[e] = i.css(e)),
                    isNaN(parseInt(n[e], 10)) && (n[e] = "auto"));
                }),
                i.css({
                  position: "relative",
                  top: 0,
                  left: 0,
                  right: "auto",
                  bottom: "auto",
                })),
            i.css(e),
            t.css(n).show()
          );
        },
        removeWrapper: function (t) {
          var e = document.activeElement;
          return (
            t.parent().is(".ui-effects-wrapper") &&
              (t.parent().replaceWith(t),
              (t[0] !== e && !Q.contains(t[0], e)) || Q(e).trigger("focus")),
            t
          );
        },
      }),
    Q.extend(Q.effects, {
      version: "1.13.0",
      define: function (t, e, i) {
        return (
          i || ((i = e), (e = "effect")),
          (Q.effects.effect[t] = i),
          (Q.effects.effect[t].mode = e),
          i
        );
      },
      scaledDimensions: function (t, e, i) {
        if (0 === e)
          return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };
        var n = "horizontal" !== i ? (e || 100) / 100 : 1,
          e = "vertical" !== i ? (e || 100) / 100 : 1;
        return {
          height: t.height() * e,
          width: t.width() * n,
          outerHeight: t.outerHeight() * e,
          outerWidth: t.outerWidth() * n,
        };
      },
      clipToBox: function (t) {
        return {
          width: t.clip.right - t.clip.left,
          height: t.clip.bottom - t.clip.top,
          left: t.clip.left,
          top: t.clip.top,
        };
      },
      unshift: function (t, e, i) {
        var n = t.queue();
        (1 < e && n.splice.apply(n, [1, 0].concat(n.splice(e, i))),
          t.dequeue());
      },
      saveStyle: function (t) {
        t.data(q, t[0].style.cssText);
      },
      restoreStyle: function (t) {
        ((t[0].style.cssText = t.data(q) || ""), t.removeData(q));
      },
      mode: function (t, e) {
        t = t.is(":hidden");
        return (
          "toggle" === e && (e = t ? "show" : "hide"),
          (e = (t ? "hide" === e : "show" === e) ? "none" : e)
        );
      },
      getBaseline: function (t, e) {
        var i, n;
        switch (t[0]) {
          case "top":
            i = 0;
            break;
          case "middle":
            i = 0.5;
            break;
          case "bottom":
            i = 1;
            break;
          default:
            i = t[0] / e.height;
        }
        switch (t[1]) {
          case "left":
            n = 0;
            break;
          case "center":
            n = 0.5;
            break;
          case "right":
            n = 1;
            break;
          default:
            n = t[1] / e.width;
        }
        return { x: n, y: i };
      },
      createPlaceholder: function (t) {
        var e,
          i = t.css("position"),
          n = t.position();
        return (
          t
            .css({
              marginTop: t.css("marginTop"),
              marginBottom: t.css("marginBottom"),
              marginLeft: t.css("marginLeft"),
              marginRight: t.css("marginRight"),
            })
            .outerWidth(t.outerWidth())
            .outerHeight(t.outerHeight()),
          /^(static|relative)/.test(i) &&
            ((i = "absolute"),
            (e = Q("<" + t[0].nodeName + ">")
              .insertAfter(t)
              .css({
                display: /^(inline|ruby)/.test(t.css("display"))
                  ? "inline-block"
                  : "block",
                visibility: "hidden",
                marginTop: t.css("marginTop"),
                marginBottom: t.css("marginBottom"),
                marginLeft: t.css("marginLeft"),
                marginRight: t.css("marginRight"),
                float: t.css("float"),
              })
              .outerWidth(t.outerWidth())
              .outerHeight(t.outerHeight())
              .addClass("ui-effects-placeholder")),
            t.data(W + "placeholder", e)),
          t.css({ position: i, left: n.left, top: n.top }),
          e
        );
      },
      removePlaceholder: function (t) {
        var e = W + "placeholder",
          i = t.data(e);
        i && (i.remove(), t.removeData(e));
      },
      cleanUp: function (t) {
        (Q.effects.restoreStyle(t), Q.effects.removePlaceholder(t));
      },
      setTransition: function (n, t, o, r) {
        return (
          (r = r || {}),
          Q.each(t, function (t, e) {
            var i = n.cssUnit(e);
            0 < i[0] && (r[e] = i[0] * o + i[1]);
          }),
          r
        );
      },
    }),
    Q.fn.extend({
      effect: function () {
        function t(t) {
          var e = Q(this),
            i = Q.effects.mode(e, a) || r;
          (e.data(V, !0),
            l.push(i),
            r && ("show" === i || (i === r && "hide" === i)) && e.show(),
            (r && "none" === i) || Q.effects.saveStyle(e),
            "function" == typeof t && t());
        }
        var n = Y.apply(this, arguments),
          o = Q.effects.effect[n.effect],
          r = o.mode,
          e = n.queue,
          i = e || "fx",
          s = n.complete,
          a = n.mode,
          l = [];
        return Q.fx.off || !o
          ? a
            ? this[a](n.duration, s)
            : this.each(function () {
                s && s.call(this);
              })
          : !1 === e
            ? this.each(t).each(c)
            : this.queue(i, t).queue(i, c);
        function c(t) {
          var e = Q(this);
          function i() {
            ("function" == typeof s && s.call(e[0]),
              "function" == typeof t && t());
          }
          ((n.mode = l.shift()),
            !1 === Q.uiBackCompat || r
              ? "none" === n.mode
                ? (e[a](), i())
                : o.call(e[0], n, function () {
                    (e.removeData(V),
                      Q.effects.cleanUp(e),
                      "hide" === n.mode && e.hide(),
                      i());
                  })
              : (e.is(":hidden") ? "hide" === a : "show" === a)
                ? (e[a](), i())
                : o.call(e[0], n, i));
        }
      },
      show:
        ((F = Q.fn.show),
        function (t) {
          if (G(t)) return F.apply(this, arguments);
          t = Y.apply(this, arguments);
          return ((t.mode = "show"), this.effect.call(this, t));
        }),
      hide:
        ((R = Q.fn.hide),
        function (t) {
          if (G(t)) return R.apply(this, arguments);
          t = Y.apply(this, arguments);
          return ((t.mode = "hide"), this.effect.call(this, t));
        }),
      toggle:
        ((N = Q.fn.toggle),
        function (t) {
          if (G(t) || "boolean" == typeof t) return N.apply(this, arguments);
          t = Y.apply(this, arguments);
          return ((t.mode = "toggle"), this.effect.call(this, t));
        }),
      cssUnit: function (t) {
        var i = this.css(t),
          n = [];
        return (
          Q.each(["em", "px", "%", "pt"], function (t, e) {
            0 < i.indexOf(e) && (n = [parseFloat(i), e]);
          }),
          n
        );
      },
      cssClip: function (t) {
        return t
          ? this.css(
              "clip",
              "rect(" +
                t.top +
                "px " +
                t.right +
                "px " +
                t.bottom +
                "px " +
                t.left +
                "px)",
            )
          : X(this.css("clip"), this);
      },
      transfer: function (t, e) {
        var i = Q(this),
          n = Q(t.to),
          o = "fixed" === n.css("position"),
          r = Q("body"),
          s = o ? r.scrollTop() : 0,
          a = o ? r.scrollLeft() : 0,
          r = n.offset(),
          r = {
            top: r.top - s,
            left: r.left - a,
            height: n.innerHeight(),
            width: n.innerWidth(),
          },
          n = i.offset(),
          l = Q("<div class='ui-effects-transfer'></div>");
        l.appendTo("body")
          .addClass(t.className)
          .css({
            top: n.top - s,
            left: n.left - a,
            height: i.innerHeight(),
            width: i.innerWidth(),
            position: o ? "fixed" : "absolute",
          })
          .animate(r, t.duration, t.easing, function () {
            (l.remove(), "function" == typeof e && e());
          });
      },
    }),
    (Q.fx.step.clip = function (t) {
      (t.clipInit ||
        ((t.start = Q(t.elem).cssClip()),
        "string" == typeof t.end && (t.end = X(t.end, t.elem)),
        (t.clipInit = !0)),
        Q(t.elem).cssClip({
          top: t.pos * (t.end.top - t.start.top) + t.start.top,
          right: t.pos * (t.end.right - t.start.right) + t.start.right,
          bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom,
          left: t.pos * (t.end.left - t.start.left) + t.start.left,
        }));
    }),
    (j = {}),
    Q.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, t) {
      j[t] = function (t) {
        return Math.pow(t, e + 2);
      };
    }),
    Q.extend(j, {
      Sine: function (t) {
        return 1 - Math.cos((t * Math.PI) / 2);
      },
      Circ: function (t) {
        return 1 - Math.sqrt(1 - t * t);
      },
      Elastic: function (t) {
        return 0 === t || 1 === t
          ? t
          : -Math.pow(2, 8 * (t - 1)) *
              Math.sin(((80 * (t - 1) - 7.5) * Math.PI) / 15);
      },
      Back: function (t) {
        return t * t * (3 * t - 2);
      },
      Bounce: function (t) {
        for (var e, i = 4; t < ((e = Math.pow(2, --i)) - 1) / 11; );
        return (
          1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
        );
      },
    }),
    Q.each(j, function (t, e) {
      ((Q.easing["easeIn" + t] = e),
        (Q.easing["easeOut" + t] = function (t) {
          return 1 - e(1 - t);
        }),
        (Q.easing["easeInOut" + t] = function (t) {
          return t < 0.5 ? e(2 * t) / 2 : 1 - e(-2 * t + 2) / 2;
        }));
    }));
  var w = Q.effects;
  (Q.effects.define("blind", "hide", function (t, e) {
    var i = {
        up: ["bottom", "top"],
        vertical: ["bottom", "top"],
        down: ["top", "bottom"],
        left: ["right", "left"],
        horizontal: ["right", "left"],
        right: ["left", "right"],
      },
      n = Q(this),
      o = t.direction || "up",
      r = n.cssClip(),
      s = { clip: Q.extend({}, r) },
      a = Q.effects.createPlaceholder(n);
    ((s.clip[i[o][0]] = s.clip[i[o][1]]),
      "show" === t.mode &&
        (n.cssClip(s.clip), a && a.css(Q.effects.clipToBox(s)), (s.clip = r)),
      a && a.animate(Q.effects.clipToBox(s), t.duration, t.easing),
      n.animate(s, {
        queue: !1,
        duration: t.duration,
        easing: t.easing,
        complete: e,
      }));
  }),
    Q.effects.define("bounce", function (t, e) {
      var i,
        n,
        o = Q(this),
        r = t.mode,
        s = "hide" === r,
        a = "show" === r,
        l = t.direction || "up",
        c = t.distance,
        u = t.times || 5,
        r = 2 * u + (a || s ? 1 : 0),
        h = t.duration / r,
        d = t.easing,
        p = "up" === l || "down" === l ? "top" : "left",
        f = "up" === l || "left" === l,
        m = 0,
        t = o.queue().length;
      for (
        Q.effects.createPlaceholder(o),
          l = o.css(p),
          c = c || o["top" == p ? "outerHeight" : "outerWidth"]() / 3,
          a &&
            (((n = { opacity: 1 })[p] = l),
            o
              .css("opacity", 0)
              .css(p, f ? 2 * -c : 2 * c)
              .animate(n, h, d)),
          s && (c /= Math.pow(2, u - 1)),
          (n = {})[p] = l;
        m < u;
        m++
      )
        (((i = {})[p] = (f ? "-=" : "+=") + c),
          o.animate(i, h, d).animate(n, h, d),
          (c = s ? 2 * c : c / 2));
      (s &&
        (((i = { opacity: 0 })[p] = (f ? "-=" : "+=") + c), o.animate(i, h, d)),
        o.queue(e),
        Q.effects.unshift(o, t, 1 + r));
    }),
    Q.effects.define("clip", "hide", function (t, e) {
      var i = {},
        n = Q(this),
        o = t.direction || "vertical",
        r = "both" === o,
        s = r || "horizontal" === o,
        r = r || "vertical" === o,
        o = n.cssClip();
      ((i.clip = {
        top: r ? (o.bottom - o.top) / 2 : o.top,
        right: s ? (o.right - o.left) / 2 : o.right,
        bottom: r ? (o.bottom - o.top) / 2 : o.bottom,
        left: s ? (o.right - o.left) / 2 : o.left,
      }),
        Q.effects.createPlaceholder(n),
        "show" === t.mode && (n.cssClip(i.clip), (i.clip = o)),
        n.animate(i, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        }));
    }),
    Q.effects.define("drop", "hide", function (t, e) {
      var i = Q(this),
        n = "show" === t.mode,
        o = t.direction || "left",
        r = "up" === o || "down" === o ? "top" : "left",
        s = "up" === o || "left" === o ? "-=" : "+=",
        a = "+=" == s ? "-=" : "+=",
        l = { opacity: 0 };
      (Q.effects.createPlaceholder(i),
        (o =
          t.distance || i["top" == r ? "outerHeight" : "outerWidth"](!0) / 2),
        (l[r] = s + o),
        n && (i.css(l), (l[r] = a + o), (l.opacity = 1)),
        i.animate(l, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        }));
    }),
    Q.effects.define("explode", "hide", function (t, e) {
      var i,
        n,
        o,
        r,
        s,
        a,
        l = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3,
        c = l,
        u = Q(this),
        h = "show" === t.mode,
        d = u.show().css("visibility", "hidden").offset(),
        p = Math.ceil(u.outerWidth() / c),
        f = Math.ceil(u.outerHeight() / l),
        m = [];
      function g() {
        (m.push(this),
          m.length === l * c &&
            (u.css({ visibility: "visible" }), Q(m).remove(), e()));
      }
      for (i = 0; i < l; i++)
        for (r = d.top + i * f, a = i - (l - 1) / 2, n = 0; n < c; n++)
          ((o = d.left + n * p),
            (s = n - (c - 1) / 2),
            u
              .clone()
              .appendTo("body")
              .wrap("<div></div>")
              .css({
                position: "absolute",
                visibility: "visible",
                left: -n * p,
                top: -i * f,
              })
              .parent()
              .addClass("ui-effects-explode")
              .css({
                position: "absolute",
                overflow: "hidden",
                width: p,
                height: f,
                left: o + (h ? s * p : 0),
                top: r + (h ? a * f : 0),
                opacity: h ? 0 : 1,
              })
              .animate(
                {
                  left: o + (h ? 0 : s * p),
                  top: r + (h ? 0 : a * f),
                  opacity: h ? 1 : 0,
                },
                t.duration || 500,
                t.easing,
                g,
              ));
    }),
    Q.effects.define("fade", "toggle", function (t, e) {
      var i = "show" === t.mode;
      Q(this)
        .css("opacity", i ? 0 : 1)
        .animate(
          { opacity: i ? 1 : 0 },
          { queue: !1, duration: t.duration, easing: t.easing, complete: e },
        );
    }),
    Q.effects.define("fold", "hide", function (e, t) {
      var i = Q(this),
        n = e.mode,
        o = "show" === n,
        r = "hide" === n,
        s = e.size || 15,
        a = /([0-9]+)%/.exec(s),
        l = !!e.horizFirst ? ["right", "bottom"] : ["bottom", "right"],
        c = e.duration / 2,
        u = Q.effects.createPlaceholder(i),
        h = i.cssClip(),
        d = { clip: Q.extend({}, h) },
        p = { clip: Q.extend({}, h) },
        f = [h[l[0]], h[l[1]]],
        n = i.queue().length;
      (a && (s = (parseInt(a[1], 10) / 100) * f[r ? 0 : 1]),
        (d.clip[l[0]] = s),
        (p.clip[l[0]] = s),
        (p.clip[l[1]] = 0),
        o &&
          (i.cssClip(p.clip), u && u.css(Q.effects.clipToBox(p)), (p.clip = h)),
        i
          .queue(function (t) {
            (u &&
              u
                .animate(Q.effects.clipToBox(d), c, e.easing)
                .animate(Q.effects.clipToBox(p), c, e.easing),
              t());
          })
          .animate(d, c, e.easing)
          .animate(p, c, e.easing)
          .queue(t),
        Q.effects.unshift(i, n, 4));
    }),
    Q.effects.define("highlight", "show", function (t, e) {
      var i = Q(this),
        n = { backgroundColor: i.css("backgroundColor") };
      ("hide" === t.mode && (n.opacity = 0),
        Q.effects.saveStyle(i),
        i
          .css({
            backgroundImage: "none",
            backgroundColor: t.color || "#ffff99",
          })
          .animate(n, {
            queue: !1,
            duration: t.duration,
            easing: t.easing,
            complete: e,
          }));
    }),
    Q.effects.define("size", function (n, e) {
      var o,
        i = Q(this),
        t = ["fontSize"],
        r = [
          "borderTopWidth",
          "borderBottomWidth",
          "paddingTop",
          "paddingBottom",
        ],
        s = [
          "borderLeftWidth",
          "borderRightWidth",
          "paddingLeft",
          "paddingRight",
        ],
        a = n.mode,
        l = "effect" !== a,
        c = n.scale || "both",
        u = n.origin || ["middle", "center"],
        h = i.css("position"),
        d = i.position(),
        p = Q.effects.scaledDimensions(i),
        f = n.from || p,
        m = n.to || Q.effects.scaledDimensions(i, 0);
      (Q.effects.createPlaceholder(i),
        "show" === a && ((a = f), (f = m), (m = a)),
        (o = {
          from: { y: f.height / p.height, x: f.width / p.width },
          to: { y: m.height / p.height, x: m.width / p.width },
        }),
        ("box" !== c && "both" !== c) ||
          (o.from.y !== o.to.y &&
            ((f = Q.effects.setTransition(i, r, o.from.y, f)),
            (m = Q.effects.setTransition(i, r, o.to.y, m))),
          o.from.x !== o.to.x &&
            ((f = Q.effects.setTransition(i, s, o.from.x, f)),
            (m = Q.effects.setTransition(i, s, o.to.x, m)))),
        ("content" !== c && "both" !== c) ||
          (o.from.y !== o.to.y &&
            ((f = Q.effects.setTransition(i, t, o.from.y, f)),
            (m = Q.effects.setTransition(i, t, o.to.y, m)))),
        u &&
          ((u = Q.effects.getBaseline(u, p)),
          (f.top = (p.outerHeight - f.outerHeight) * u.y + d.top),
          (f.left = (p.outerWidth - f.outerWidth) * u.x + d.left),
          (m.top = (p.outerHeight - m.outerHeight) * u.y + d.top),
          (m.left = (p.outerWidth - m.outerWidth) * u.x + d.left)),
        delete f.outerHeight,
        delete f.outerWidth,
        i.css(f),
        ("content" !== c && "both" !== c) ||
          ((r = r.concat(["marginTop", "marginBottom"]).concat(t)),
          (s = s.concat(["marginLeft", "marginRight"])),
          i.find("*[width]").each(function () {
            var t = Q(this),
              e = Q.effects.scaledDimensions(t),
              i = {
                height: e.height * o.from.y,
                width: e.width * o.from.x,
                outerHeight: e.outerHeight * o.from.y,
                outerWidth: e.outerWidth * o.from.x,
              },
              e = {
                height: e.height * o.to.y,
                width: e.width * o.to.x,
                outerHeight: e.height * o.to.y,
                outerWidth: e.width * o.to.x,
              };
            (o.from.y !== o.to.y &&
              ((i = Q.effects.setTransition(t, r, o.from.y, i)),
              (e = Q.effects.setTransition(t, r, o.to.y, e))),
              o.from.x !== o.to.x &&
                ((i = Q.effects.setTransition(t, s, o.from.x, i)),
                (e = Q.effects.setTransition(t, s, o.to.x, e))),
              l && Q.effects.saveStyle(t),
              t.css(i),
              t.animate(e, n.duration, n.easing, function () {
                l && Q.effects.restoreStyle(t);
              }));
          })),
        i.animate(m, {
          queue: !1,
          duration: n.duration,
          easing: n.easing,
          complete: function () {
            var t = i.offset();
            (0 === m.opacity && i.css("opacity", f.opacity),
              l ||
                (i.css("position", "static" === h ? "relative" : h).offset(t),
                Q.effects.saveStyle(i)),
              e());
          },
        }));
    }),
    Q.effects.define("scale", function (t, e) {
      var i = Q(this),
        n = t.mode,
        n =
          parseInt(t.percent, 10) ||
          (0 === parseInt(t.percent, 10) || "effect" !== n ? 0 : 100),
        n = Q.extend(
          !0,
          {
            from: Q.effects.scaledDimensions(i),
            to: Q.effects.scaledDimensions(i, n, t.direction || "both"),
            origin: t.origin || ["middle", "center"],
          },
          t,
        );
      (t.fade && ((n.from.opacity = 1), (n.to.opacity = 0)),
        Q.effects.effect.size.call(this, n, e));
    }),
    Q.effects.define("puff", "hide", function (t, e) {
      t = Q.extend(!0, {}, t, {
        fade: !0,
        percent: parseInt(t.percent, 10) || 150,
      });
      Q.effects.effect.scale.call(this, t, e);
    }),
    Q.effects.define("pulsate", "show", function (t, e) {
      var i = Q(this),
        n = t.mode,
        o = "show" === n,
        r = 2 * (t.times || 5) + (o || "hide" === n ? 1 : 0),
        s = t.duration / r,
        a = 0,
        l = 1,
        n = i.queue().length;
      for (
        (!o && i.is(":visible")) || (i.css("opacity", 0).show(), (a = 1));
        l < r;
        l++
      )
        (i.animate({ opacity: a }, s, t.easing), (a = 1 - a));
      (i.animate({ opacity: a }, s, t.easing),
        i.queue(e),
        Q.effects.unshift(i, n, 1 + r));
    }),
    Q.effects.define("shake", function (t, e) {
      var i = 1,
        n = Q(this),
        o = t.direction || "left",
        r = t.distance || 20,
        s = t.times || 3,
        a = 2 * s + 1,
        l = Math.round(t.duration / a),
        c = "up" === o || "down" === o ? "top" : "left",
        u = "up" === o || "left" === o,
        h = {},
        d = {},
        p = {},
        o = n.queue().length;
      for (
        Q.effects.createPlaceholder(n),
          h[c] = (u ? "-=" : "+=") + r,
          d[c] = (u ? "+=" : "-=") + 2 * r,
          p[c] = (u ? "-=" : "+=") + 2 * r,
          n.animate(h, l, t.easing);
        i < s;
        i++
      )
        n.animate(d, l, t.easing).animate(p, l, t.easing);
      (n
        .animate(d, l, t.easing)
        .animate(h, l / 2, t.easing)
        .queue(e),
        Q.effects.unshift(n, o, 1 + a));
    }),
    Q.effects.define("slide", "show", function (t, e) {
      var i,
        n,
        o = Q(this),
        r = {
          up: ["bottom", "top"],
          down: ["top", "bottom"],
          left: ["right", "left"],
          right: ["left", "right"],
        },
        s = t.mode,
        a = t.direction || "left",
        l = "up" === a || "down" === a ? "top" : "left",
        c = "up" === a || "left" === a,
        u = t.distance || o["top" == l ? "outerHeight" : "outerWidth"](!0),
        h = {};
      (Q.effects.createPlaceholder(o),
        (i = o.cssClip()),
        (n = o.position()[l]),
        (h[l] = (c ? -1 : 1) * u + n),
        (h.clip = o.cssClip()),
        (h.clip[r[a][1]] = h.clip[r[a][0]]),
        "show" === s &&
          (o.cssClip(h.clip), o.css(l, h[l]), (h.clip = i), (h[l] = n)),
        o.animate(h, {
          queue: !1,
          duration: t.duration,
          easing: t.easing,
          complete: e,
        }));
    }),
    (w =
      !1 !== Q.uiBackCompat
        ? Q.effects.define("transfer", function (t, e) {
            Q(this).transfer(t, e);
          })
        : w));
  ((Q.ui.focusable = function (t, e) {
    var i,
      n,
      o,
      r,
      s = t.nodeName.toLowerCase();
    return "area" === s
      ? ((n = (i = t.parentNode).name),
        !(!t.href || !n || "map" !== i.nodeName.toLowerCase()) &&
          0 < (n = Q("img[usemap='#" + n + "']")).length &&
          n.is(":visible"))
      : (/^(input|select|textarea|button|object)$/.test(s)
          ? (o = !t.disabled) &&
            (r = Q(t).closest("fieldset")[0]) &&
            (o = !r.disabled)
          : (o = ("a" === s && t.href) || e),
        o &&
          Q(t).is(":visible") &&
          (function (t) {
            var e = t.css("visibility");
            for (; "inherit" === e; )
              ((t = t.parent()), (e = t.css("visibility")));
            return "visible" === e;
          })(Q(t)));
  }),
    Q.extend(Q.expr.pseudos, {
      focusable: function (t) {
        return Q.ui.focusable(t, null != Q.attr(t, "tabindex"));
      },
    }));
  var K, J;
  (Q.ui.focusable,
    (Q.fn._form = function () {
      return "string" == typeof this[0].form
        ? this.closest("form")
        : Q(this[0].form);
    }),
    (Q.ui.formResetMixin = {
      _formResetHandler: function () {
        var e = Q(this);
        setTimeout(function () {
          var t = e.data("ui-form-reset-instances");
          Q.each(t, function () {
            this.refresh();
          });
        });
      },
      _bindFormResetHandler: function () {
        var t;
        ((this.form = this.element._form()),
          this.form.length &&
            ((t = this.form.data("ui-form-reset-instances") || []).length ||
              this.form.on("reset.ui-form-reset", this._formResetHandler),
            t.push(this),
            this.form.data("ui-form-reset-instances", t)));
      },
      _unbindFormResetHandler: function () {
        var t;
        this.form.length &&
          ((t = this.form.data("ui-form-reset-instances")).splice(
            Q.inArray(this, t),
            1,
          ),
          t.length
            ? this.form.data("ui-form-reset-instances", t)
            : this.form
                .removeData("ui-form-reset-instances")
                .off("reset.ui-form-reset"));
      },
    }));
  (Q.expr.pseudos || (Q.expr.pseudos = Q.expr[":"]),
    Q.uniqueSort || (Q.uniqueSort = Q.unique),
    Q.escapeSelector ||
      ((K = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g),
      (J = function (t, e) {
        return e
          ? "\0" === t
            ? "�"
            : t.slice(0, -1) +
              "\\" +
              t.charCodeAt(t.length - 1).toString(16) +
              " "
          : "\\" + t;
      }),
      (Q.escapeSelector = function (t) {
        return (t + "").replace(K, J);
      })),
    (Q.fn.even && Q.fn.odd) ||
      Q.fn.extend({
        even: function () {
          return this.filter(function (t) {
            return t % 2 == 0;
          });
        },
        odd: function () {
          return this.filter(function (t) {
            return t % 2 == 1;
          });
        },
      }));
  var Z;
  ((Q.ui.keyCode = {
    BACKSPACE: 8,
    COMMA: 188,
    DELETE: 46,
    DOWN: 40,
    END: 35,
    ENTER: 13,
    ESCAPE: 27,
    HOME: 36,
    LEFT: 37,
    PAGE_DOWN: 34,
    PAGE_UP: 33,
    PERIOD: 190,
    RIGHT: 39,
    SPACE: 32,
    TAB: 9,
    UP: 38,
  }),
    (Q.fn.labels = function () {
      var t, e, i;
      return this.length
        ? this[0].labels && this[0].labels.length
          ? this.pushStack(this[0].labels)
          : ((e = this.eq(0).parents("label")),
            (t = this.attr("id")) &&
              ((i = (i = this.eq(0).parents().last()).add(
                (i.length ? i : this).siblings(),
              )),
              (t = "label[for='" + Q.escapeSelector(t) + "']"),
              (e = e.add(i.find(t).addBack(t)))),
            this.pushStack(e))
        : this.pushStack([]);
    }),
    (Q.fn.scrollParent = function (t) {
      var e = this.css("position"),
        i = "absolute" === e,
        n = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
        t = this.parents()
          .filter(function () {
            var t = Q(this);
            return (
              (!i || "static" !== t.css("position")) &&
              n.test(
                t.css("overflow") + t.css("overflow-y") + t.css("overflow-x"),
              )
            );
          })
          .eq(0);
      return "fixed" !== e && t.length
        ? t
        : Q(this[0].ownerDocument || document);
    }),
    Q.extend(Q.expr.pseudos, {
      tabbable: function (t) {
        var e = Q.attr(t, "tabindex"),
          i = null != e;
        return (!i || 0 <= e) && Q.ui.focusable(t, i);
      },
    }),
    Q.fn.extend({
      uniqueId:
        ((Z = 0),
        function () {
          return this.each(function () {
            this.id || (this.id = "ui-id-" + ++Z);
          });
        }),
      removeUniqueId: function () {
        return this.each(function () {
          /^ui-id-\d+$/.test(this.id) && Q(this).removeAttr("id");
        });
      },
    }),
    Q.widget("ui.accordion", {
      version: "1.13.0",
      options: {
        active: 0,
        animate: {},
        classes: {
          "ui-accordion-header": "ui-corner-top",
          "ui-accordion-header-collapsed": "ui-corner-all",
          "ui-accordion-content": "ui-corner-bottom",
        },
        collapsible: !1,
        event: "click",
        header: function (t) {
          return t.find("> li > :first-child").add(t.find("> :not(li)").even());
        },
        heightStyle: "auto",
        icons: {
          activeHeader: "ui-icon-triangle-1-s",
          header: "ui-icon-triangle-1-e",
        },
        activate: null,
        beforeActivate: null,
      },
      hideProps: {
        borderTopWidth: "hide",
        borderBottomWidth: "hide",
        paddingTop: "hide",
        paddingBottom: "hide",
        height: "hide",
      },
      showProps: {
        borderTopWidth: "show",
        borderBottomWidth: "show",
        paddingTop: "show",
        paddingBottom: "show",
        height: "show",
      },
      _create: function () {
        var t = this.options;
        ((this.prevShow = this.prevHide = Q()),
          this._addClass("ui-accordion", "ui-widget ui-helper-reset"),
          this.element.attr("role", "tablist"),
          t.collapsible ||
            (!1 !== t.active && null != t.active) ||
            (t.active = 0),
          this._processPanels(),
          t.active < 0 && (t.active += this.headers.length),
          this._refresh());
      },
      _getCreateEventData: function () {
        return {
          header: this.active,
          panel: this.active.length ? this.active.next() : Q(),
        };
      },
      _createIcons: function () {
        var t,
          e = this.options.icons;
        e &&
          ((t = Q("<span>")),
          this._addClass(t, "ui-accordion-header-icon", "ui-icon " + e.header),
          t.prependTo(this.headers),
          (t = this.active.children(".ui-accordion-header-icon")),
          this._removeClass(t, e.header)
            ._addClass(t, null, e.activeHeader)
            ._addClass(this.headers, "ui-accordion-icons"));
      },
      _destroyIcons: function () {
        (this._removeClass(this.headers, "ui-accordion-icons"),
          this.headers.children(".ui-accordion-header-icon").remove());
      },
      _destroy: function () {
        var t;
        (this.element.removeAttr("role"),
          this.headers
            .removeAttr(
              "role aria-expanded aria-selected aria-controls tabIndex",
            )
            .removeUniqueId(),
          this._destroyIcons(),
          (t = this.headers
            .next()
            .css("display", "")
            .removeAttr("role aria-hidden aria-labelledby")
            .removeUniqueId()),
          "content" !== this.options.heightStyle && t.css("height", ""));
      },
      _setOption: function (t, e) {
        "active" !== t
          ? ("event" === t &&
              (this.options.event &&
                this._off(this.headers, this.options.event),
              this._setupEvents(e)),
            this._super(t, e),
            "collapsible" !== t ||
              e ||
              !1 !== this.options.active ||
              this._activate(0),
            "icons" === t && (this._destroyIcons(), e && this._createIcons()))
          : this._activate(e);
      },
      _setOptionDisabled: function (t) {
        (this._super(t),
          this.element.attr("aria-disabled", t),
          this._toggleClass(null, "ui-state-disabled", !!t),
          this._toggleClass(
            this.headers.add(this.headers.next()),
            null,
            "ui-state-disabled",
            !!t,
          ));
      },
      _keydown: function (t) {
        if (!t.altKey && !t.ctrlKey) {
          var e = Q.ui.keyCode,
            i = this.headers.length,
            n = this.headers.index(t.target),
            o = !1;
          switch (t.keyCode) {
            case e.RIGHT:
            case e.DOWN:
              o = this.headers[(n + 1) % i];
              break;
            case e.LEFT:
            case e.UP:
              o = this.headers[(n - 1 + i) % i];
              break;
            case e.SPACE:
            case e.ENTER:
              this._eventHandler(t);
              break;
            case e.HOME:
              o = this.headers[0];
              break;
            case e.END:
              o = this.headers[i - 1];
          }
          o &&
            (Q(t.target).attr("tabIndex", -1),
            Q(o).attr("tabIndex", 0),
            Q(o).trigger("focus"),
            t.preventDefault());
        }
      },
      _panelKeyDown: function (t) {
        t.keyCode === Q.ui.keyCode.UP &&
          t.ctrlKey &&
          Q(t.currentTarget).prev().trigger("focus");
      },
      refresh: function () {
        var t = this.options;
        (this._processPanels(),
          (!1 === t.active && !0 === t.collapsible) || !this.headers.length
            ? ((t.active = !1), (this.active = Q()))
            : !1 === t.active
              ? this._activate(0)
              : this.active.length &&
                  !Q.contains(this.element[0], this.active[0])
                ? this.headers.length ===
                  this.headers.find(".ui-state-disabled").length
                  ? ((t.active = !1), (this.active = Q()))
                  : this._activate(Math.max(0, t.active - 1))
                : (t.active = this.headers.index(this.active)),
          this._destroyIcons(),
          this._refresh());
      },
      _processPanels: function () {
        var t = this.headers,
          e = this.panels;
        ("function" == typeof this.options.header
          ? (this.headers = this.options.header(this.element))
          : (this.headers = this.element.find(this.options.header)),
          this._addClass(
            this.headers,
            "ui-accordion-header ui-accordion-header-collapsed",
            "ui-state-default",
          ),
          (this.panels = this.headers
            .next()
            .filter(":not(.ui-accordion-content-active)")
            .hide()),
          this._addClass(
            this.panels,
            "ui-accordion-content",
            "ui-helper-reset ui-widget-content",
          ),
          e && (this._off(t.not(this.headers)), this._off(e.not(this.panels))));
      },
      _refresh: function () {
        var i,
          t = this.options,
          e = t.heightStyle,
          n = this.element.parent();
        ((this.active = this._findActive(t.active)),
          this._addClass(
            this.active,
            "ui-accordion-header-active",
            "ui-state-active",
          )._removeClass(this.active, "ui-accordion-header-collapsed"),
          this._addClass(this.active.next(), "ui-accordion-content-active"),
          this.active.next().show(),
          this.headers
            .attr("role", "tab")
            .each(function () {
              var t = Q(this),
                e = t.uniqueId().attr("id"),
                i = t.next(),
                n = i.uniqueId().attr("id");
              (t.attr("aria-controls", n), i.attr("aria-labelledby", e));
            })
            .next()
            .attr("role", "tabpanel"),
          this.headers
            .not(this.active)
            .attr({
              "aria-selected": "false",
              "aria-expanded": "false",
              tabIndex: -1,
            })
            .next()
            .attr({ "aria-hidden": "true" })
            .hide(),
          this.active.length
            ? this.active
                .attr({
                  "aria-selected": "true",
                  "aria-expanded": "true",
                  tabIndex: 0,
                })
                .next()
                .attr({ "aria-hidden": "false" })
            : this.headers.eq(0).attr("tabIndex", 0),
          this._createIcons(),
          this._setupEvents(t.event),
          "fill" === e
            ? ((i = n.height()),
              this.element.siblings(":visible").each(function () {
                var t = Q(this),
                  e = t.css("position");
                "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0));
              }),
              this.headers.each(function () {
                i -= Q(this).outerHeight(!0);
              }),
              this.headers
                .next()
                .each(function () {
                  Q(this).height(
                    Math.max(0, i - Q(this).innerHeight() + Q(this).height()),
                  );
                })
                .css("overflow", "auto"))
            : "auto" === e &&
              ((i = 0),
              this.headers
                .next()
                .each(function () {
                  var t = Q(this).is(":visible");
                  (t || Q(this).show(),
                    (i = Math.max(i, Q(this).css("height", "").height())),
                    t || Q(this).hide());
                })
                .height(i)));
      },
      _activate: function (t) {
        t = this._findActive(t)[0];
        t !== this.active[0] &&
          ((t = t || this.active[0]),
          this._eventHandler({
            target: t,
            currentTarget: t,
            preventDefault: Q.noop,
          }));
      },
      _findActive: function (t) {
        return "number" == typeof t ? this.headers.eq(t) : Q();
      },
      _setupEvents: function (t) {
        var i = { keydown: "_keydown" };
        (t &&
          Q.each(t.split(" "), function (t, e) {
            i[e] = "_eventHandler";
          }),
          this._off(this.headers.add(this.headers.next())),
          this._on(this.headers, i),
          this._on(this.headers.next(), { keydown: "_panelKeyDown" }),
          this._hoverable(this.headers),
          this._focusable(this.headers));
      },
      _eventHandler: function (t) {
        var e = this.options,
          i = this.active,
          n = Q(t.currentTarget),
          o = n[0] === i[0],
          r = o && e.collapsible,
          s = r ? Q() : n.next(),
          a = i.next(),
          s = {
            oldHeader: i,
            oldPanel: a,
            newHeader: r ? Q() : n,
            newPanel: s,
          };
        (t.preventDefault(),
          (o && !e.collapsible) ||
            !1 === this._trigger("beforeActivate", t, s) ||
            ((e.active = !r && this.headers.index(n)),
            (this.active = o ? Q() : n),
            this._toggle(s),
            this._removeClass(
              i,
              "ui-accordion-header-active",
              "ui-state-active",
            ),
            e.icons &&
              ((i = i.children(".ui-accordion-header-icon")),
              this._removeClass(i, null, e.icons.activeHeader)._addClass(
                i,
                null,
                e.icons.header,
              )),
            o ||
              (this._removeClass(n, "ui-accordion-header-collapsed")._addClass(
                n,
                "ui-accordion-header-active",
                "ui-state-active",
              ),
              e.icons &&
                ((o = n.children(".ui-accordion-header-icon")),
                this._removeClass(o, null, e.icons.header)._addClass(
                  o,
                  null,
                  e.icons.activeHeader,
                )),
              this._addClass(n.next(), "ui-accordion-content-active"))));
      },
      _toggle: function (t) {
        var e = t.newPanel,
          i = this.prevShow.length ? this.prevShow : t.oldPanel;
        (this.prevShow.add(this.prevHide).stop(!0, !0),
          (this.prevShow = e),
          (this.prevHide = i),
          this.options.animate
            ? this._animate(e, i, t)
            : (i.hide(), e.show(), this._toggleComplete(t)),
          i.attr({ "aria-hidden": "true" }),
          i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }),
          e.length && i.length
            ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" })
            : e.length &&
              this.headers
                .filter(function () {
                  return 0 === parseInt(Q(this).attr("tabIndex"), 10);
                })
                .attr("tabIndex", -1),
          e
            .attr("aria-hidden", "false")
            .prev()
            .attr({
              "aria-selected": "true",
              "aria-expanded": "true",
              tabIndex: 0,
            }));
      },
      _animate: function (t, i, e) {
        function n() {
          a._toggleComplete(e);
        }
        var o,
          r,
          s,
          a = this,
          l = 0,
          c = t.css("box-sizing"),
          u = t.length && (!i.length || t.index() < i.index()),
          h = this.options.animate || {},
          u = (u && h.down) || h;
        return (
          (r = (r = "string" == typeof u ? u : r) || u.easing || h.easing),
          (s = (s = "number" == typeof u ? u : s) || u.duration || h.duration),
          i.length
            ? t.length
              ? ((o = t.show().outerHeight()),
                i.animate(this.hideProps, {
                  duration: s,
                  easing: r,
                  step: function (t, e) {
                    e.now = Math.round(t);
                  },
                }),
                void t.hide().animate(this.showProps, {
                  duration: s,
                  easing: r,
                  complete: n,
                  step: function (t, e) {
                    ((e.now = Math.round(t)),
                      "height" !== e.prop
                        ? "content-box" === c && (l += e.now)
                        : "content" !== a.options.heightStyle &&
                          ((e.now = Math.round(o - i.outerHeight() - l)),
                          (l = 0)));
                  },
                }))
              : i.animate(this.hideProps, s, r, n)
            : t.animate(this.showProps, s, r, n)
        );
      },
      _toggleComplete: function (t) {
        var e = t.oldPanel,
          i = e.prev();
        (this._removeClass(e, "ui-accordion-content-active"),
          this._removeClass(i, "ui-accordion-header-active")._addClass(
            i,
            "ui-accordion-header-collapsed",
          ),
          e.length && (e.parent()[0].className = e.parent()[0].className),
          this._trigger("activate", null, t));
      },
    }),
    (Q.ui.safeActiveElement = function (e) {
      var i;
      try {
        i = e.activeElement;
      } catch (t) {
        i = e.body;
      }
      return (i = !(i = i || e.body).nodeName ? e.body : i);
    }),
    Q.widget("ui.menu", {
      version: "1.13.0",
      defaultElement: "<ul>",
      delay: 300,
      options: {
        icons: { submenu: "ui-icon-caret-1-e" },
        items: "> *",
        menus: "ul",
        position: { my: "left top", at: "right top" },
        role: "menu",
        blur: null,
        focus: null,
        select: null,
      },
      _create: function () {
        ((this.activeMenu = this.element),
          (this.mouseHandled = !1),
          (this.lastMousePosition = { x: null, y: null }),
          this.element
            .uniqueId()
            .attr({ role: this.options.role, tabIndex: 0 }),
          this._addClass("ui-menu", "ui-widget ui-widget-content"),
          this._on({
            "mousedown .ui-menu-item": function (t) {
              (t.preventDefault(), this._activateItem(t));
            },
            "click .ui-menu-item": function (t) {
              var e = Q(t.target),
                i = Q(Q.ui.safeActiveElement(this.document[0]));
              !this.mouseHandled &&
                e.not(".ui-state-disabled").length &&
                (this.select(t),
                t.isPropagationStopped() || (this.mouseHandled = !0),
                e.has(".ui-menu").length
                  ? this.expand(t)
                  : !this.element.is(":focus") &&
                    i.closest(".ui-menu").length &&
                    (this.element.trigger("focus", [!0]),
                    this.active &&
                      1 === this.active.parents(".ui-menu").length &&
                      clearTimeout(this.timer)));
            },
            "mouseenter .ui-menu-item": "_activateItem",
            "mousemove .ui-menu-item": "_activateItem",
            mouseleave: "collapseAll",
            "mouseleave .ui-menu": "collapseAll",
            focus: function (t, e) {
              var i = this.active || this._menuItems().first();
              e || this.focus(t, i);
            },
            blur: function (t) {
              this._delay(function () {
                Q.contains(
                  this.element[0],
                  Q.ui.safeActiveElement(this.document[0]),
                ) || this.collapseAll(t);
              });
            },
            keydown: "_keydown",
          }),
          this.refresh(),
          this._on(this.document, {
            click: function (t) {
              (this._closeOnDocumentClick(t) && this.collapseAll(t, !0),
                (this.mouseHandled = !1));
            },
          }));
      },
      _activateItem: function (t) {
        var e, i;
        this.previousFilter ||
          (t.clientX === this.lastMousePosition.x &&
            t.clientY === this.lastMousePosition.y) ||
          ((this.lastMousePosition = { x: t.clientX, y: t.clientY }),
          (e = Q(t.target).closest(".ui-menu-item")),
          (i = Q(t.currentTarget)),
          e[0] === i[0] &&
            (i.is(".ui-state-active") ||
              (this._removeClass(
                i.siblings().children(".ui-state-active"),
                null,
                "ui-state-active",
              ),
              this.focus(t, i))));
      },
      _destroy: function () {
        var t = this.element
          .find(".ui-menu-item")
          .removeAttr("role aria-disabled")
          .children(".ui-menu-item-wrapper")
          .removeUniqueId()
          .removeAttr("tabIndex role aria-haspopup");
        (this.element
          .removeAttr("aria-activedescendant")
          .find(".ui-menu")
          .addBack()
          .removeAttr(
            "role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex",
          )
          .removeUniqueId()
          .show(),
          t.children().each(function () {
            var t = Q(this);
            t.data("ui-menu-submenu-caret") && t.remove();
          }));
      },
      _keydown: function (t) {
        var e,
          i,
          n,
          o = !0;
        switch (t.keyCode) {
          case Q.ui.keyCode.PAGE_UP:
            this.previousPage(t);
            break;
          case Q.ui.keyCode.PAGE_DOWN:
            this.nextPage(t);
            break;
          case Q.ui.keyCode.HOME:
            this._move("first", "first", t);
            break;
          case Q.ui.keyCode.END:
            this._move("last", "last", t);
            break;
          case Q.ui.keyCode.UP:
            this.previous(t);
            break;
          case Q.ui.keyCode.DOWN:
            this.next(t);
            break;
          case Q.ui.keyCode.LEFT:
            this.collapse(t);
            break;
          case Q.ui.keyCode.RIGHT:
            this.active &&
              !this.active.is(".ui-state-disabled") &&
              this.expand(t);
            break;
          case Q.ui.keyCode.ENTER:
          case Q.ui.keyCode.SPACE:
            this._activate(t);
            break;
          case Q.ui.keyCode.ESCAPE:
            this.collapse(t);
            break;
          default:
            ((e = this.previousFilter || ""),
              (n = o = !1),
              (i =
                96 <= t.keyCode && t.keyCode <= 105
                  ? (t.keyCode - 96).toString()
                  : String.fromCharCode(t.keyCode)),
              clearTimeout(this.filterTimer),
              i === e ? (n = !0) : (i = e + i),
              (e = this._filterMenuItems(i)),
              (e =
                n && -1 !== e.index(this.active.next())
                  ? this.active.nextAll(".ui-menu-item")
                  : e).length ||
                ((i = String.fromCharCode(t.keyCode)),
                (e = this._filterMenuItems(i))),
              e.length
                ? (this.focus(t, e),
                  (this.previousFilter = i),
                  (this.filterTimer = this._delay(function () {
                    delete this.previousFilter;
                  }, 1e3)))
                : delete this.previousFilter);
        }
        o && t.preventDefault();
      },
      _activate: function (t) {
        this.active &&
          !this.active.is(".ui-state-disabled") &&
          (this.active.children("[aria-haspopup='true']").length
            ? this.expand(t)
            : this.select(t));
      },
      refresh: function () {
        var t,
          e,
          n = this,
          o = this.options.icons.submenu,
          i = this.element.find(this.options.menus);
        (this._toggleClass(
          "ui-menu-icons",
          null,
          !!this.element.find(".ui-icon").length,
        ),
          (e = i
            .filter(":not(.ui-menu)")
            .hide()
            .attr({
              role: this.options.role,
              "aria-hidden": "true",
              "aria-expanded": "false",
            })
            .each(function () {
              var t = Q(this),
                e = t.prev(),
                i = Q("<span>").data("ui-menu-submenu-caret", !0);
              (n._addClass(i, "ui-menu-icon", "ui-icon " + o),
                e.attr("aria-haspopup", "true").prepend(i),
                t.attr("aria-labelledby", e.attr("id")));
            })),
          this._addClass(e, "ui-menu", "ui-widget ui-widget-content ui-front"),
          (t = i.add(this.element).find(this.options.items))
            .not(".ui-menu-item")
            .each(function () {
              var t = Q(this);
              n._isDivider(t) &&
                n._addClass(t, "ui-menu-divider", "ui-widget-content");
            }),
          (i = (e = t.not(".ui-menu-item, .ui-menu-divider"))
            .children()
            .not(".ui-menu")
            .uniqueId()
            .attr({ tabIndex: -1, role: this._itemRole() })),
          this._addClass(e, "ui-menu-item")._addClass(
            i,
            "ui-menu-item-wrapper",
          ),
          t.filter(".ui-state-disabled").attr("aria-disabled", "true"),
          this.active &&
            !Q.contains(this.element[0], this.active[0]) &&
            this.blur());
      },
      _itemRole: function () {
        return { menu: "menuitem", listbox: "option" }[this.options.role];
      },
      _setOption: function (t, e) {
        var i;
        ("icons" === t &&
          ((i = this.element.find(".ui-menu-icon")),
          this._removeClass(i, null, this.options.icons.submenu)._addClass(
            i,
            null,
            e.submenu,
          )),
          this._super(t, e));
      },
      _setOptionDisabled: function (t) {
        (this._super(t),
          this.element.attr("aria-disabled", String(t)),
          this._toggleClass(null, "ui-state-disabled", !!t));
      },
      focus: function (t, e) {
        var i;
        (this.blur(t, t && "focus" === t.type),
          this._scrollIntoView(e),
          (this.active = e.first()),
          (i = this.active.children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          this.options.role &&
            this.element.attr("aria-activedescendant", i.attr("id")),
          (i = this.active
            .parent()
            .closest(".ui-menu-item")
            .children(".ui-menu-item-wrapper")),
          this._addClass(i, null, "ui-state-active"),
          t && "keydown" === t.type
            ? this._close()
            : (this.timer = this._delay(function () {
                this._close();
              }, this.delay)),
          (i = e.children(".ui-menu")).length &&
            t &&
            /^mouse/.test(t.type) &&
            this._startOpening(i),
          (this.activeMenu = e.parent()),
          this._trigger("focus", t, { item: e }));
      },
      _scrollIntoView: function (t) {
        var e, i, n;
        this._hasScroll() &&
          ((i = parseFloat(Q.css(this.activeMenu[0], "borderTopWidth")) || 0),
          (n = parseFloat(Q.css(this.activeMenu[0], "paddingTop")) || 0),
          (e = t.offset().top - this.activeMenu.offset().top - i - n),
          (i = this.activeMenu.scrollTop()),
          (n = this.activeMenu.height()),
          (t = t.outerHeight()),
          e < 0
            ? this.activeMenu.scrollTop(i + e)
            : n < e + t && this.activeMenu.scrollTop(i + e - n + t));
      },
      blur: function (t, e) {
        (e || clearTimeout(this.timer),
          this.active &&
            (this._removeClass(
              this.active.children(".ui-menu-item-wrapper"),
              null,
              "ui-state-active",
            ),
            this._trigger("blur", t, { item: this.active }),
            (this.active = null)));
      },
      _startOpening: function (t) {
        (clearTimeout(this.timer),
          "true" === t.attr("aria-hidden") &&
            (this.timer = this._delay(function () {
              (this._close(), this._open(t));
            }, this.delay)));
      },
      _open: function (t) {
        var e = Q.extend({ of: this.active }, this.options.position);
        (clearTimeout(this.timer),
          this.element
            .find(".ui-menu")
            .not(t.parents(".ui-menu"))
            .hide()
            .attr("aria-hidden", "true"),
          t
            .show()
            .removeAttr("aria-hidden")
            .attr("aria-expanded", "true")
            .position(e));
      },
      collapseAll: function (e, i) {
        (clearTimeout(this.timer),
          (this.timer = this._delay(
            function () {
              var t = i
                ? this.element
                : Q(e && e.target).closest(this.element.find(".ui-menu"));
              (t.length || (t = this.element),
                this._close(t),
                this.blur(e),
                this._removeClass(
                  t.find(".ui-state-active"),
                  null,
                  "ui-state-active",
                ),
                (this.activeMenu = t));
            },
            i ? 0 : this.delay,
          )));
      },
      _close: function (t) {
        (t = t || (this.active ? this.active.parent() : this.element))
          .find(".ui-menu")
          .hide()
          .attr("aria-hidden", "true")
          .attr("aria-expanded", "false");
      },
      _closeOnDocumentClick: function (t) {
        return !Q(t.target).closest(".ui-menu").length;
      },
      _isDivider: function (t) {
        return !/[^\-\u2014\u2013\s]/.test(t.text());
      },
      collapse: function (t) {
        var e =
          this.active &&
          this.active.parent().closest(".ui-menu-item", this.element);
        e && e.length && (this._close(), this.focus(t, e));
      },
      expand: function (t) {
        var e =
          this.active &&
          this._menuItems(this.active.children(".ui-menu")).first();
        e &&
          e.length &&
          (this._open(e.parent()),
          this._delay(function () {
            this.focus(t, e);
          }));
      },
      next: function (t) {
        this._move("next", "first", t);
      },
      previous: function (t) {
        this._move("prev", "last", t);
      },
      isFirstItem: function () {
        return this.active && !this.active.prevAll(".ui-menu-item").length;
      },
      isLastItem: function () {
        return this.active && !this.active.nextAll(".ui-menu-item").length;
      },
      _menuItems: function (t) {
        return (t || this.element)
          .find(this.options.items)
          .filter(".ui-menu-item");
      },
      _move: function (t, e, i) {
        var n;
        (((n = this.active
          ? "first" === t || "last" === t
            ? this.active["first" === t ? "prevAll" : "nextAll"](
                ".ui-menu-item",
              ).last()
            : this.active[t + "All"](".ui-menu-item").first()
          : n) &&
          n.length &&
          this.active) ||
          (n = this._menuItems(this.activeMenu)[e]()),
          this.focus(i, n));
      },
      nextPage: function (t) {
        var e, i, n;
        this.active
          ? this.isLastItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Q.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.nextAll(".ui-menu-item").each(function () {
                  return (e = Q(this)).offset().top - i - n < 0;
                }),
                this.focus(t, e))
              : this.focus(
                  t,
                  this._menuItems(this.activeMenu)[
                    this.active ? "last" : "first"
                  ](),
                ))
          : this.next(t);
      },
      previousPage: function (t) {
        var e, i, n;
        this.active
          ? this.isFirstItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Q.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.prevAll(".ui-menu-item").each(function () {
                  return 0 < (e = Q(this)).offset().top - i + n;
                }),
                this.focus(t, e))
              : this.focus(t, this._menuItems(this.activeMenu).first()))
          : this.next(t);
      },
      _hasScroll: function () {
        return this.element.outerHeight() < this.element.prop("scrollHeight");
      },
      select: function (t) {
        this.active = this.active || Q(t.target).closest(".ui-menu-item");
        var e = { item: this.active };
        (this.active.has(".ui-menu").length || this.collapseAll(t, !0),
          this._trigger("select", t, e));
      },
      _filterMenuItems: function (t) {
        var t = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"),
          e = new RegExp("^" + t, "i");
        return this.activeMenu
          .find(this.options.items)
          .filter(".ui-menu-item")
          .filter(function () {
            return e.test(
              String.prototype.trim.call(
                Q(this).children(".ui-menu-item-wrapper").text(),
              ),
            );
          });
      },
    }));
  (Q.widget("ui.autocomplete", {
    version: "1.13.0",
    defaultElement: "<input>",
    options: {
      appendTo: null,
      autoFocus: !1,
      delay: 300,
      minLength: 1,
      position: { my: "left top", at: "left bottom", collision: "none" },
      source: null,
      change: null,
      close: null,
      focus: null,
      open: null,
      response: null,
      search: null,
      select: null,
    },
    requestIndex: 0,
    pending: 0,
    _create: function () {
      var i,
        n,
        o,
        t = this.element[0].nodeName.toLowerCase(),
        e = "textarea" === t,
        t = "input" === t;
      ((this.isMultiLine = e || (!t && this._isContentEditable(this.element))),
        (this.valueMethod = this.element[e || t ? "val" : "text"]),
        (this.isNewMenu = !0),
        this._addClass("ui-autocomplete-input"),
        this.element.attr("autocomplete", "off"),
        this._on(this.element, {
          keydown: function (t) {
            if (this.element.prop("readOnly")) n = o = i = !0;
            else {
              n = o = i = !1;
              var e = Q.ui.keyCode;
              switch (t.keyCode) {
                case e.PAGE_UP:
                  ((i = !0), this._move("previousPage", t));
                  break;
                case e.PAGE_DOWN:
                  ((i = !0), this._move("nextPage", t));
                  break;
                case e.UP:
                  ((i = !0), this._keyEvent("previous", t));
                  break;
                case e.DOWN:
                  ((i = !0), this._keyEvent("next", t));
                  break;
                case e.ENTER:
                  this.menu.active &&
                    ((i = !0), t.preventDefault(), this.menu.select(t));
                  break;
                case e.TAB:
                  this.menu.active && this.menu.select(t);
                  break;
                case e.ESCAPE:
                  this.menu.element.is(":visible") &&
                    (this.isMultiLine || this._value(this.term),
                    this.close(t),
                    t.preventDefault());
                  break;
                default:
                  ((n = !0), this._searchTimeout(t));
              }
            }
          },
          keypress: function (t) {
            if (i)
              return (
                (i = !1),
                void (
                  (this.isMultiLine && !this.menu.element.is(":visible")) ||
                  t.preventDefault()
                )
              );
            if (!n) {
              var e = Q.ui.keyCode;
              switch (t.keyCode) {
                case e.PAGE_UP:
                  this._move("previousPage", t);
                  break;
                case e.PAGE_DOWN:
                  this._move("nextPage", t);
                  break;
                case e.UP:
                  this._keyEvent("previous", t);
                  break;
                case e.DOWN:
                  this._keyEvent("next", t);
              }
            }
          },
          input: function (t) {
            if (o) return ((o = !1), void t.preventDefault());
            this._searchTimeout(t);
          },
          focus: function () {
            ((this.selectedItem = null), (this.previous = this._value()));
          },
          blur: function (t) {
            (clearTimeout(this.searching), this.close(t), this._change(t));
          },
        }),
        this._initSource(),
        (this.menu = Q("<ul>")
          .appendTo(this._appendTo())
          .menu({ role: null })
          .hide()
          .attr({ unselectable: "on" })
          .menu("instance")),
        this._addClass(this.menu.element, "ui-autocomplete", "ui-front"),
        this._on(this.menu.element, {
          mousedown: function (t) {
            t.preventDefault();
          },
          menufocus: function (t, e) {
            var i;
            if (
              this.isNewMenu &&
              ((this.isNewMenu = !1),
              t.originalEvent && /^mouse/.test(t.originalEvent.type))
            )
              return (
                this.menu.blur(),
                void this.document.one("mousemove", function () {
                  Q(t.target).trigger(t.originalEvent);
                })
              );
            ((i = e.item.data("ui-autocomplete-item")),
              !1 !== this._trigger("focus", t, { item: i }) &&
                t.originalEvent &&
                /^key/.test(t.originalEvent.type) &&
                this._value(i.value),
              (i = e.item.attr("aria-label") || i.value) &&
                String.prototype.trim.call(i).length &&
                (this.liveRegion.children().hide(),
                Q("<div>").text(i).appendTo(this.liveRegion)));
          },
          menuselect: function (t, e) {
            var i = e.item.data("ui-autocomplete-item"),
              n = this.previous;
            (this.element[0] !== Q.ui.safeActiveElement(this.document[0]) &&
              (this.element.trigger("focus"),
              (this.previous = n),
              this._delay(function () {
                ((this.previous = n), (this.selectedItem = i));
              })),
              !1 !== this._trigger("select", t, { item: i }) &&
                this._value(i.value),
              (this.term = this._value()),
              this.close(t),
              (this.selectedItem = i));
          },
        }),
        (this.liveRegion = Q("<div>", {
          role: "status",
          "aria-live": "assertive",
          "aria-relevant": "additions",
        }).appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        }));
    },
    _destroy: function () {
      (clearTimeout(this.searching),
        this.element.removeAttr("autocomplete"),
        this.menu.element.remove(),
        this.liveRegion.remove());
    },
    _setOption: function (t, e) {
      (this._super(t, e),
        "source" === t && this._initSource(),
        "appendTo" === t && this.menu.element.appendTo(this._appendTo()),
        "disabled" === t && e && this.xhr && this.xhr.abort());
    },
    _isEventTargetInWidget: function (t) {
      var e = this.menu.element[0];
      return (
        t.target === this.element[0] ||
        t.target === e ||
        Q.contains(e, t.target)
      );
    },
    _closeOnClickOutside: function (t) {
      this._isEventTargetInWidget(t) || this.close();
    },
    _appendTo: function () {
      var t = this.options.appendTo;
      return (t = !(t =
        !(t =
          t && (t.jquery || t.nodeType ? Q(t) : this.document.find(t).eq(0))) ||
        !t[0]
          ? this.element.closest(".ui-front, dialog")
          : t).length
        ? this.document[0].body
        : t);
    },
    _initSource: function () {
      var i,
        n,
        o = this;
      Array.isArray(this.options.source)
        ? ((i = this.options.source),
          (this.source = function (t, e) {
            e(Q.ui.autocomplete.filter(i, t.term));
          }))
        : "string" == typeof this.options.source
          ? ((n = this.options.source),
            (this.source = function (t, e) {
              (o.xhr && o.xhr.abort(),
                (o.xhr = Q.ajax({
                  url: n,
                  data: t,
                  dataType: "json",
                  success: function (t) {
                    e(t);
                  },
                  error: function () {
                    e([]);
                  },
                })));
            }))
          : (this.source = this.options.source);
    },
    _searchTimeout: function (n) {
      (clearTimeout(this.searching),
        (this.searching = this._delay(function () {
          var t = this.term === this._value(),
            e = this.menu.element.is(":visible"),
            i = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
          (t && (e || i)) || ((this.selectedItem = null), this.search(null, n));
        }, this.options.delay)));
    },
    search: function (t, e) {
      return (
        (t = null != t ? t : this._value()),
        (this.term = this._value()),
        t.length < this.options.minLength
          ? this.close(e)
          : !1 !== this._trigger("search", e)
            ? this._search(t)
            : void 0
      );
    },
    _search: function (t) {
      (this.pending++,
        this._addClass("ui-autocomplete-loading"),
        (this.cancelSearch = !1),
        this.source({ term: t }, this._response()));
    },
    _response: function () {
      var e = ++this.requestIndex;
      return function (t) {
        (e === this.requestIndex && this.__response(t),
          this.pending--,
          this.pending || this._removeClass("ui-autocomplete-loading"));
      }.bind(this);
    },
    __response: function (t) {
      ((t = t && this._normalize(t)),
        this._trigger("response", null, { content: t }),
        !this.options.disabled && t && t.length && !this.cancelSearch
          ? (this._suggest(t), this._trigger("open"))
          : this._close());
    },
    close: function (t) {
      ((this.cancelSearch = !0), this._close(t));
    },
    _close: function (t) {
      (this._off(this.document, "mousedown"),
        this.menu.element.is(":visible") &&
          (this.menu.element.hide(),
          this.menu.blur(),
          (this.isNewMenu = !0),
          this._trigger("close", t)));
    },
    _change: function (t) {
      this.previous !== this._value() &&
        this._trigger("change", t, { item: this.selectedItem });
    },
    _normalize: function (t) {
      return t.length && t[0].label && t[0].value
        ? t
        : Q.map(t, function (t) {
            return "string" == typeof t
              ? { label: t, value: t }
              : Q.extend({}, t, {
                  label: t.label || t.value,
                  value: t.value || t.label,
                });
          });
    },
    _suggest: function (t) {
      var e = this.menu.element.empty();
      (this._renderMenu(e, t),
        (this.isNewMenu = !0),
        this.menu.refresh(),
        e.show(),
        this._resizeMenu(),
        e.position(Q.extend({ of: this.element }, this.options.position)),
        this.options.autoFocus && this.menu.next(),
        this._on(this.document, { mousedown: "_closeOnClickOutside" }));
    },
    _resizeMenu: function () {
      var t = this.menu.element;
      t.outerWidth(
        Math.max(t.width("").outerWidth() + 1, this.element.outerWidth()),
      );
    },
    _renderMenu: function (i, t) {
      var n = this;
      Q.each(t, function (t, e) {
        n._renderItemData(i, e);
      });
    },
    _renderItemData: function (t, e) {
      return this._renderItem(t, e).data("ui-autocomplete-item", e);
    },
    _renderItem: function (t, e) {
      return Q("<li>").append(Q("<div>").text(e.label)).appendTo(t);
    },
    _move: function (t, e) {
      if (this.menu.element.is(":visible"))
        return (this.menu.isFirstItem() && /^previous/.test(t)) ||
          (this.menu.isLastItem() && /^next/.test(t))
          ? (this.isMultiLine || this._value(this.term), void this.menu.blur())
          : void this.menu[t](e);
      this.search(null, e);
    },
    widget: function () {
      return this.menu.element;
    },
    _value: function () {
      return this.valueMethod.apply(this.element, arguments);
    },
    _keyEvent: function (t, e) {
      (this.isMultiLine && !this.menu.element.is(":visible")) ||
        (this._move(t, e), e.preventDefault());
    },
    _isContentEditable: function (t) {
      if (!t.length) return !1;
      var e = t.prop("contentEditable");
      return "inherit" === e
        ? this._isContentEditable(t.parent())
        : "true" === e;
    },
  }),
    Q.extend(Q.ui.autocomplete, {
      escapeRegex: function (t) {
        return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
      },
      filter: function (t, e) {
        var i = new RegExp(Q.ui.autocomplete.escapeRegex(e), "i");
        return Q.grep(t, function (t) {
          return i.test(t.label || t.value || t);
        });
      },
    }),
    Q.widget("ui.autocomplete", Q.ui.autocomplete, {
      options: {
        messages: {
          noResults: "No search results.",
          results: function (t) {
            return (
              t +
              (1 < t ? " results are" : " result is") +
              " available, use up and down arrow keys to navigate."
            );
          },
        },
      },
      __response: function (t) {
        (this._superApply(arguments),
          this.options.disabled ||
            this.cancelSearch ||
            ((t =
              t && t.length
                ? this.options.messages.results(t.length)
                : this.options.messages.noResults),
            this.liveRegion.children().hide(),
            Q("<div>").text(t).appendTo(this.liveRegion)));
      },
    }));
  Q.ui.autocomplete;
  var tt = /ui-corner-([a-z]){2,6}/g;
  Q.widget("ui.controlgroup", {
    version: "1.13.0",
    defaultElement: "<div>",
    options: {
      direction: "horizontal",
      disabled: null,
      onlyVisible: !0,
      items: {
        button:
          "input[type=button], input[type=submit], input[type=reset], button, a",
        controlgroupLabel: ".ui-controlgroup-label",
        checkboxradio: "input[type='checkbox'], input[type='radio']",
        selectmenu: "select",
        spinner: ".ui-spinner-input",
      },
    },
    _create: function () {
      this._enhance();
    },
    _enhance: function () {
      (this.element.attr("role", "toolbar"), this.refresh());
    },
    _destroy: function () {
      (this._callChildMethod("destroy"),
        this.childWidgets.removeData("ui-controlgroup-data"),
        this.element.removeAttr("role"),
        this.options.items.controlgroupLabel &&
          this.element
            .find(this.options.items.controlgroupLabel)
            .find(".ui-controlgroup-label-contents")
            .contents()
            .unwrap());
    },
    _initWidgets: function () {
      var r = this,
        s = [];
      (Q.each(this.options.items, function (n, t) {
        var e,
          o = {};
        if (t)
          return "controlgroupLabel" === n
            ? ((e = r.element.find(t)).each(function () {
                var t = Q(this);
                t.children(".ui-controlgroup-label-contents").length ||
                  t
                    .contents()
                    .wrapAll(
                      "<span class='ui-controlgroup-label-contents'></span>",
                    );
              }),
              r._addClass(
                e,
                null,
                "ui-widget ui-widget-content ui-state-default",
              ),
              void (s = s.concat(e.get())))
            : void (
                Q.fn[n] &&
                ((o = r["_" + n + "Options"]
                  ? r["_" + n + "Options"]("middle")
                  : { classes: {} }),
                r.element.find(t).each(function () {
                  var t = Q(this),
                    e = t[n]("instance"),
                    i = Q.widget.extend({}, o);
                  ("button" === n && t.parent(".ui-spinner").length) ||
                    ((e = e || t[n]()[n]("instance")) &&
                      (i.classes = r._resolveClassesValues(i.classes, e)),
                    t[n](i),
                    (i = t[n]("widget")),
                    Q.data(i[0], "ui-controlgroup-data", e || t[n]("instance")),
                    s.push(i[0]));
                }))
              );
      }),
        (this.childWidgets = Q(Q.uniqueSort(s))),
        this._addClass(this.childWidgets, "ui-controlgroup-item"));
    },
    _callChildMethod: function (e) {
      this.childWidgets.each(function () {
        var t = Q(this).data("ui-controlgroup-data");
        t && t[e] && t[e]();
      });
    },
    _updateCornerClass: function (t, e) {
      e = this._buildSimpleOptions(e, "label").classes.label;
      (this._removeClass(
        t,
        null,
        "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",
      ),
        this._addClass(t, null, e));
    },
    _buildSimpleOptions: function (t, e) {
      var i = "vertical" === this.options.direction,
        n = { classes: {} };
      return (
        (n.classes[e] = {
          middle: "",
          first: "ui-corner-" + (i ? "top" : "left"),
          last: "ui-corner-" + (i ? "bottom" : "right"),
          only: "ui-corner-all",
        }[t]),
        n
      );
    },
    _spinnerOptions: function (t) {
      t = this._buildSimpleOptions(t, "ui-spinner");
      return (
        (t.classes["ui-spinner-up"] = ""),
        (t.classes["ui-spinner-down"] = ""),
        t
      );
    },
    _buttonOptions: function (t) {
      return this._buildSimpleOptions(t, "ui-button");
    },
    _checkboxradioOptions: function (t) {
      return this._buildSimpleOptions(t, "ui-checkboxradio-label");
    },
    _selectmenuOptions: function (t) {
      var e = "vertical" === this.options.direction;
      return {
        width: e && "auto",
        classes: {
          middle: {
            "ui-selectmenu-button-open": "",
            "ui-selectmenu-button-closed": "",
          },
          first: {
            "ui-selectmenu-button-open": "ui-corner-" + (e ? "top" : "tl"),
            "ui-selectmenu-button-closed": "ui-corner-" + (e ? "top" : "left"),
          },
          last: {
            "ui-selectmenu-button-open": e ? "" : "ui-corner-tr",
            "ui-selectmenu-button-closed":
              "ui-corner-" + (e ? "bottom" : "right"),
          },
          only: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
        }[t],
      };
    },
    _resolveClassesValues: function (i, n) {
      var o = {};
      return (
        Q.each(i, function (t) {
          var e = n.options.classes[t] || "",
            e = String.prototype.trim.call(e.replace(tt, ""));
          o[t] = (e + " " + i[t]).replace(/\s+/g, " ");
        }),
        o
      );
    },
    _setOption: function (t, e) {
      ("direction" === t &&
        this._removeClass("ui-controlgroup-" + this.options.direction),
        this._super(t, e),
        "disabled" !== t
          ? this.refresh()
          : this._callChildMethod(e ? "disable" : "enable"));
    },
    refresh: function () {
      var o,
        r = this;
      (this._addClass(
        "ui-controlgroup ui-controlgroup-" + this.options.direction,
      ),
        "horizontal" === this.options.direction &&
          this._addClass(null, "ui-helper-clearfix"),
        this._initWidgets(),
        (o = this.childWidgets),
        (o = this.options.onlyVisible ? o.filter(":visible") : o).length &&
          (Q.each(["first", "last"], function (t, e) {
            var i,
              n = o[e]().data("ui-controlgroup-data");
            n && r["_" + n.widgetName + "Options"]
              ? (((i = r["_" + n.widgetName + "Options"](
                  1 === o.length ? "only" : e,
                )).classes = r._resolveClassesValues(i.classes, n)),
                n.element[n.widgetName](i))
              : r._updateCornerClass(o[e](), e);
          }),
          this._callChildMethod("refresh")));
    },
  });
  Q.widget("ui.checkboxradio", [
    Q.ui.formResetMixin,
    {
      version: "1.13.0",
      options: {
        disabled: null,
        label: null,
        icon: !0,
        classes: {
          "ui-checkboxradio-label": "ui-corner-all",
          "ui-checkboxradio-icon": "ui-corner-all",
        },
      },
      _getCreateOptions: function () {
        var t,
          e = this,
          i = this._super() || {};
        return (
          this._readType(),
          (t = this.element.labels()),
          (this.label = Q(t[t.length - 1])),
          this.label.length ||
            Q.error("No label found for checkboxradio widget"),
          (this.originalLabel = ""),
          this.label
            .contents()
            .not(this.element[0])
            .each(function () {
              e.originalLabel +=
                3 === this.nodeType ? Q(this).text() : this.outerHTML;
            }),
          this.originalLabel && (i.label = this.originalLabel),
          null != (t = this.element[0].disabled) && (i.disabled = t),
          i
        );
      },
      _create: function () {
        var t = this.element[0].checked;
        (this._bindFormResetHandler(),
          null == this.options.disabled &&
            (this.options.disabled = this.element[0].disabled),
          this._setOption("disabled", this.options.disabled),
          this._addClass("ui-checkboxradio", "ui-helper-hidden-accessible"),
          this._addClass(
            this.label,
            "ui-checkboxradio-label",
            "ui-button ui-widget",
          ),
          "radio" === this.type &&
            this._addClass(this.label, "ui-checkboxradio-radio-label"),
          this.options.label && this.options.label !== this.originalLabel
            ? this._updateLabel()
            : this.originalLabel && (this.options.label = this.originalLabel),
          this._enhance(),
          t &&
            this._addClass(
              this.label,
              "ui-checkboxradio-checked",
              "ui-state-active",
            ),
          this._on({
            change: "_toggleClasses",
            focus: function () {
              this._addClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus",
              );
            },
            blur: function () {
              this._removeClass(
                this.label,
                null,
                "ui-state-focus ui-visual-focus",
              );
            },
          }));
      },
      _readType: function () {
        var t = this.element[0].nodeName.toLowerCase();
        ((this.type = this.element[0].type),
          ("input" === t && /radio|checkbox/.test(this.type)) ||
            Q.error(
              "Can't create checkboxradio on element.nodeName=" +
                t +
                " and element.type=" +
                this.type,
            ));
      },
      _enhance: function () {
        this._updateIcon(this.element[0].checked);
      },
      widget: function () {
        return this.label;
      },
      _getRadioGroup: function () {
        var t = this.element[0].name,
          e = "input[name='" + Q.escapeSelector(t) + "']";
        return t
          ? (this.form.length
              ? Q(this.form[0].elements).filter(e)
              : Q(e).filter(function () {
                  return 0 === Q(this)._form().length;
                })
            ).not(this.element)
          : Q([]);
      },
      _toggleClasses: function () {
        var t = this.element[0].checked;
        (this._toggleClass(
          this.label,
          "ui-checkboxradio-checked",
          "ui-state-active",
          t,
        ),
          this.options.icon &&
            "checkbox" === this.type &&
            this._toggleClass(
              this.icon,
              null,
              "ui-icon-check ui-state-checked",
              t,
            )._toggleClass(this.icon, null, "ui-icon-blank", !t),
          "radio" === this.type &&
            this._getRadioGroup().each(function () {
              var t = Q(this).checkboxradio("instance");
              t &&
                t._removeClass(
                  t.label,
                  "ui-checkboxradio-checked",
                  "ui-state-active",
                );
            }));
      },
      _destroy: function () {
        (this._unbindFormResetHandler(),
          this.icon && (this.icon.remove(), this.iconSpace.remove()));
      },
      _setOption: function (t, e) {
        if ("label" !== t || e) {
          if ((this._super(t, e), "disabled" === t))
            return (
              this._toggleClass(this.label, null, "ui-state-disabled", e),
              void (this.element[0].disabled = e)
            );
          this.refresh();
        }
      },
      _updateIcon: function (t) {
        var e = "ui-icon ui-icon-background ";
        this.options.icon
          ? (this.icon ||
              ((this.icon = Q("<span>")),
              (this.iconSpace = Q("<span> </span>")),
              this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")),
            "checkbox" === this.type
              ? ((e += t ? "ui-icon-check ui-state-checked" : "ui-icon-blank"),
                this._removeClass(
                  this.icon,
                  null,
                  t ? "ui-icon-blank" : "ui-icon-check",
                ))
              : (e += "ui-icon-blank"),
            this._addClass(this.icon, "ui-checkboxradio-icon", e),
            t ||
              this._removeClass(
                this.icon,
                null,
                "ui-icon-check ui-state-checked",
              ),
            this.icon.prependTo(this.label).after(this.iconSpace))
          : void 0 !== this.icon &&
            (this.icon.remove(), this.iconSpace.remove(), delete this.icon);
      },
      _updateLabel: function () {
        var t = this.label.contents().not(this.element[0]);
        (this.icon && (t = t.not(this.icon[0])),
          (t = this.iconSpace ? t.not(this.iconSpace[0]) : t).remove(),
          this.label.append(this.options.label));
      },
      refresh: function () {
        var t = this.element[0].checked,
          e = this.element[0].disabled;
        (this._updateIcon(t),
          this._toggleClass(
            this.label,
            "ui-checkboxradio-checked",
            "ui-state-active",
            t,
          ),
          null !== this.options.label && this._updateLabel(),
          e !== this.options.disabled && this._setOptions({ disabled: e }));
      },
    },
  ]);
  var et;
  Q.ui.checkboxradio;
  (Q.widget("ui.button", {
    version: "1.13.0",
    defaultElement: "<button>",
    options: {
      classes: { "ui-button": "ui-corner-all" },
      disabled: null,
      icon: null,
      iconPosition: "beginning",
      label: null,
      showLabel: !0,
    },
    _getCreateOptions: function () {
      var t,
        e = this._super() || {};
      return (
        (this.isInput = this.element.is("input")),
        null != (t = this.element[0].disabled) && (e.disabled = t),
        (this.originalLabel = this.isInput
          ? this.element.val()
          : this.element.html()),
        this.originalLabel && (e.label = this.originalLabel),
        e
      );
    },
    _create: function () {
      (!this.option.showLabel & !this.options.icon &&
        (this.options.showLabel = !0),
        null == this.options.disabled &&
          (this.options.disabled = this.element[0].disabled || !1),
        (this.hasTitle = !!this.element.attr("title")),
        this.options.label &&
          this.options.label !== this.originalLabel &&
          (this.isInput
            ? this.element.val(this.options.label)
            : this.element.html(this.options.label)),
        this._addClass("ui-button", "ui-widget"),
        this._setOption("disabled", this.options.disabled),
        this._enhance(),
        this.element.is("a") &&
          this._on({
            keyup: function (t) {
              t.keyCode === Q.ui.keyCode.SPACE &&
                (t.preventDefault(),
                this.element[0].click
                  ? this.element[0].click()
                  : this.element.trigger("click"));
            },
          }));
    },
    _enhance: function () {
      (this.element.is("button") || this.element.attr("role", "button"),
        this.options.icon &&
          (this._updateIcon("icon", this.options.icon), this._updateTooltip()));
    },
    _updateTooltip: function () {
      ((this.title = this.element.attr("title")),
        this.options.showLabel ||
          this.title ||
          this.element.attr("title", this.options.label));
    },
    _updateIcon: function (t, e) {
      var i = "iconPosition" !== t,
        n = i ? this.options.iconPosition : e,
        t = "top" === n || "bottom" === n;
      (this.icon
        ? i && this._removeClass(this.icon, null, this.options.icon)
        : ((this.icon = Q("<span>")),
          this._addClass(this.icon, "ui-button-icon", "ui-icon"),
          this.options.showLabel || this._addClass("ui-button-icon-only")),
        i && this._addClass(this.icon, null, e),
        this._attachIcon(n),
        t
          ? (this._addClass(this.icon, null, "ui-widget-icon-block"),
            this.iconSpace && this.iconSpace.remove())
          : (this.iconSpace ||
              ((this.iconSpace = Q("<span> </span>")),
              this._addClass(this.iconSpace, "ui-button-icon-space")),
            this._removeClass(this.icon, null, "ui-wiget-icon-block"),
            this._attachIconSpace(n)));
    },
    _destroy: function () {
      (this.element.removeAttr("role"),
        this.icon && this.icon.remove(),
        this.iconSpace && this.iconSpace.remove(),
        this.hasTitle || this.element.removeAttr("title"));
    },
    _attachIconSpace: function (t) {
      this.icon[/^(?:end|bottom)/.test(t) ? "before" : "after"](this.iconSpace);
    },
    _attachIcon: function (t) {
      this.element[/^(?:end|bottom)/.test(t) ? "append" : "prepend"](this.icon);
    },
    _setOptions: function (t) {
      var e = (void 0 === t.showLabel ? this.options : t).showLabel,
        i = (void 0 === t.icon ? this.options : t).icon;
      (e || i || (t.showLabel = !0), this._super(t));
    },
    _setOption: function (t, e) {
      ("icon" === t &&
        (e
          ? this._updateIcon(t, e)
          : this.icon &&
            (this.icon.remove(), this.iconSpace && this.iconSpace.remove())),
        "iconPosition" === t && this._updateIcon(t, e),
        "showLabel" === t &&
          (this._toggleClass("ui-button-icon-only", null, !e),
          this._updateTooltip()),
        "label" === t &&
          (this.isInput
            ? this.element.val(e)
            : (this.element.html(e),
              this.icon &&
                (this._attachIcon(this.options.iconPosition),
                this._attachIconSpace(this.options.iconPosition)))),
        this._super(t, e),
        "disabled" === t &&
          (this._toggleClass(null, "ui-state-disabled", e),
          (this.element[0].disabled = e) && this.element.trigger("blur")));
    },
    refresh: function () {
      var t = this.element.is("input, button")
        ? this.element[0].disabled
        : this.element.hasClass("ui-button-disabled");
      (t !== this.options.disabled && this._setOptions({ disabled: t }),
        this._updateTooltip());
    },
  }),
    !1 !== Q.uiBackCompat &&
      (Q.widget("ui.button", Q.ui.button, {
        options: { text: !0, icons: { primary: null, secondary: null } },
        _create: function () {
          (this.options.showLabel &&
            !this.options.text &&
            (this.options.showLabel = this.options.text),
            !this.options.showLabel &&
              this.options.text &&
              (this.options.text = this.options.showLabel),
            this.options.icon ||
            (!this.options.icons.primary && !this.options.icons.secondary)
              ? this.options.icon &&
                (this.options.icons.primary = this.options.icon)
              : this.options.icons.primary
                ? (this.options.icon = this.options.icons.primary)
                : ((this.options.icon = this.options.icons.secondary),
                  (this.options.iconPosition = "end")),
            this._super());
        },
        _setOption: function (t, e) {
          "text" !== t
            ? ("showLabel" === t && (this.options.text = e),
              "icon" === t && (this.options.icons.primary = e),
              "icons" === t &&
                (e.primary
                  ? (this._super("icon", e.primary),
                    this._super("iconPosition", "beginning"))
                  : e.secondary &&
                    (this._super("icon", e.secondary),
                    this._super("iconPosition", "end"))),
              this._superApply(arguments))
            : this._super("showLabel", e);
        },
      }),
      (Q.fn.button =
        ((et = Q.fn.button),
        function (i) {
          var t = "string" == typeof i,
            n = Array.prototype.slice.call(arguments, 1),
            o = this;
          return (
            t
              ? this.length || "instance" !== i
                ? this.each(function () {
                    var t = Q(this).attr("type"),
                      e = Q.data(
                        this,
                        "ui-" +
                          ("checkbox" !== t && "radio" !== t
                            ? "button"
                            : "checkboxradio"),
                      );
                    return "instance" === i
                      ? ((o = e), !1)
                      : e
                        ? "function" != typeof e[i] || "_" === i.charAt(0)
                          ? Q.error(
                              "no such method '" +
                                i +
                                "' for button widget instance",
                            )
                          : (t = e[i].apply(e, n)) !== e && void 0 !== t
                            ? ((o = t && t.jquery ? o.pushStack(t.get()) : t),
                              !1)
                            : void 0
                        : Q.error(
                            "cannot call methods on button prior to initialization; attempted to call method '" +
                              i +
                              "'",
                          );
                  })
                : (o = void 0)
              : (n.length && (i = Q.widget.extend.apply(null, [i].concat(n))),
                this.each(function () {
                  var t = Q(this).attr("type"),
                    e =
                      "checkbox" !== t && "radio" !== t
                        ? "button"
                        : "checkboxradio",
                    t = Q.data(this, "ui-" + e);
                  t
                    ? (t.option(i || {}), t._init && t._init())
                    : "button" != e
                      ? Q(this).checkboxradio(Q.extend({ icon: !1 }, i))
                      : et.call(Q(this), i);
                })),
            o
          );
        })),
      (Q.fn.buttonset = function () {
        return (
          Q.ui.controlgroup || Q.error("Controlgroup widget missing"),
          "option" === arguments[0] && "items" === arguments[1] && arguments[2]
            ? this.controlgroup.apply(this, [
                arguments[0],
                "items.button",
                arguments[2],
              ])
            : "option" === arguments[0] && "items" === arguments[1]
              ? this.controlgroup.apply(this, [arguments[0], "items.button"])
              : ("object" == typeof arguments[0] &&
                  arguments[0].items &&
                  (arguments[0].items = { button: arguments[0].items }),
                this.controlgroup.apply(this, arguments))
        );
      })));
  var it;
  Q.ui.button;
  function nt() {
    ((this._curInst = null),
      (this._keyEvent = !1),
      (this._disabledInputs = []),
      (this._datepickerShowing = !1),
      (this._inDialog = !1),
      (this._mainDivId = "ui-datepicker-div"),
      (this._inlineClass = "ui-datepicker-inline"),
      (this._appendClass = "ui-datepicker-append"),
      (this._triggerClass = "ui-datepicker-trigger"),
      (this._dialogClass = "ui-datepicker-dialog"),
      (this._disableClass = "ui-datepicker-disabled"),
      (this._unselectableClass = "ui-datepicker-unselectable"),
      (this._currentClass = "ui-datepicker-current-day"),
      (this._dayOverClass = "ui-datepicker-days-cell-over"),
      (this.regional = []),
      (this.regional[""] = {
        closeText: "Done",
        prevText: "Prev",
        nextText: "Next",
        currentText: "Today",
        monthNames: [
          "January",
          "February",
          "March",
          "April",
          "May",
          "June",
          "July",
          "August",
          "September",
          "October",
          "November",
          "December",
        ],
        monthNamesShort: [
          "Jan",
          "Feb",
          "Mar",
          "Apr",
          "May",
          "Jun",
          "Jul",
          "Aug",
          "Sep",
          "Oct",
          "Nov",
          "Dec",
        ],
        dayNames: [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday",
        ],
        dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
        weekHeader: "Wk",
        dateFormat: "mm/dd/yy",
        firstDay: 0,
        isRTL: !1,
        showMonthAfterYear: !1,
        yearSuffix: "",
        selectMonthLabel: "Select month",
        selectYearLabel: "Select year",
      }),
      (this._defaults = {
        showOn: "focus",
        showAnim: "fadeIn",
        showOptions: {},
        defaultDate: null,
        appendText: "",
        buttonText: "...",
        buttonImage: "",
        buttonImageOnly: !1,
        hideIfNoPrevNext: !1,
        navigationAsDateFormat: !1,
        gotoCurrent: !1,
        changeMonth: !1,
        changeYear: !1,
        yearRange: "c-10:c+10",
        showOtherMonths: !1,
        selectOtherMonths: !1,
        showWeek: !1,
        calculateWeek: this.iso8601Week,
        shortYearCutoff: "+10",
        minDate: null,
        maxDate: null,
        duration: "fast",
        beforeShowDay: null,
        beforeShow: null,
        onSelect: null,
        onChangeMonthYear: null,
        onClose: null,
        onUpdateDatepicker: null,
        numberOfMonths: 1,
        showCurrentAtPos: 0,
        stepMonths: 1,
        stepBigMonths: 12,
        altField: "",
        altFormat: "",
        constrainInput: !0,
        showButtonPanel: !1,
        autoSize: !1,
        disabled: !1,
      }),
      Q.extend(this._defaults, this.regional[""]),
      (this.regional.en = Q.extend(!0, {}, this.regional[""])),
      (this.regional["en-US"] = Q.extend(!0, {}, this.regional.en)),
      (this.dpDiv = ot(
        Q(
          "<div id='" +
            this._mainDivId +
            "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
        ),
      )));
  }
  function ot(t) {
    var e =
      "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
    return t
      .on("mouseout", e, function () {
        (Q(this).removeClass("ui-state-hover"),
          -1 !== this.className.indexOf("ui-datepicker-prev") &&
            Q(this).removeClass("ui-datepicker-prev-hover"),
          -1 !== this.className.indexOf("ui-datepicker-next") &&
            Q(this).removeClass("ui-datepicker-next-hover"));
      })
      .on("mouseover", e, rt);
  }
  function rt() {
    Q.datepicker._isDisabledDatepicker(
      (it.inline ? it.dpDiv.parent() : it.input)[0],
    ) ||
      (Q(this)
        .parents(".ui-datepicker-calendar")
        .find("a")
        .removeClass("ui-state-hover"),
      Q(this).addClass("ui-state-hover"),
      -1 !== this.className.indexOf("ui-datepicker-prev") &&
        Q(this).addClass("ui-datepicker-prev-hover"),
      -1 !== this.className.indexOf("ui-datepicker-next") &&
        Q(this).addClass("ui-datepicker-next-hover"));
  }
  function st(t, e) {
    for (var i in (Q.extend(t, e), e)) null == e[i] && (t[i] = e[i]);
    return t;
  }
  (Q.extend(Q.ui, { datepicker: { version: "1.13.0" } }),
    Q.extend(nt.prototype, {
      markerClassName: "hasDatepicker",
      maxRows: 4,
      _widgetDatepicker: function () {
        return this.dpDiv;
      },
      setDefaults: function (t) {
        return (st(this._defaults, t || {}), this);
      },
      _attachDatepicker: function (t, e) {
        var i,
          n = t.nodeName.toLowerCase(),
          o = "div" === n || "span" === n;
        (t.id || ((this.uuid += 1), (t.id = "dp" + this.uuid)),
          ((i = this._newInst(Q(t), o)).settings = Q.extend({}, e || {})),
          "input" === n
            ? this._connectDatepicker(t, i)
            : o && this._inlineDatepicker(t, i));
      },
      _newInst: function (t, e) {
        return {
          id: t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
          input: t,
          selectedDay: 0,
          selectedMonth: 0,
          selectedYear: 0,
          drawMonth: 0,
          drawYear: 0,
          inline: e,
          dpDiv: e
            ? ot(
                Q(
                  "<div class='" +
                    this._inlineClass +
                    " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
                ),
              )
            : this.dpDiv,
        };
      },
      _connectDatepicker: function (t, e) {
        var i = Q(t);
        ((e.append = Q([])),
          (e.trigger = Q([])),
          i.hasClass(this.markerClassName) ||
            (this._attachments(i, e),
            i
              .addClass(this.markerClassName)
              .on("keydown", this._doKeyDown)
              .on("keypress", this._doKeyPress)
              .on("keyup", this._doKeyUp),
            this._autoSize(e),
            Q.data(t, "datepicker", e),
            e.settings.disabled && this._disableDatepicker(t)));
      },
      _attachments: function (t, e) {
        var i,
          n = this._get(e, "appendText"),
          o = this._get(e, "isRTL");
        (e.append && e.append.remove(),
          n &&
            ((e.append = Q("<span>").addClass(this._appendClass).text(n)),
            t[o ? "before" : "after"](e.append)),
          t.off("focus", this._showDatepicker),
          e.trigger && e.trigger.remove(),
          ("focus" !== (i = this._get(e, "showOn")) && "both" !== i) ||
            t.on("focus", this._showDatepicker),
          ("button" !== i && "both" !== i) ||
            ((n = this._get(e, "buttonText")),
            (i = this._get(e, "buttonImage")),
            this._get(e, "buttonImageOnly")
              ? (e.trigger = Q("<img>")
                  .addClass(this._triggerClass)
                  .attr({ src: i, alt: n, title: n }))
              : ((e.trigger = Q("<button type='button'>").addClass(
                  this._triggerClass,
                )),
                i
                  ? e.trigger.html(
                      Q("<img>").attr({ src: i, alt: n, title: n }),
                    )
                  : e.trigger.text(n)),
            t[o ? "before" : "after"](e.trigger),
            e.trigger.on("click", function () {
              return (
                Q.datepicker._datepickerShowing &&
                Q.datepicker._lastInput === t[0]
                  ? Q.datepicker._hideDatepicker()
                  : (Q.datepicker._datepickerShowing &&
                      Q.datepicker._lastInput !== t[0] &&
                      Q.datepicker._hideDatepicker(),
                    Q.datepicker._showDatepicker(t[0])),
                !1
              );
            })));
      },
      _autoSize: function (t) {
        var e, i, n, o, r, s;
        this._get(t, "autoSize") &&
          !t.inline &&
          ((r = new Date(2009, 11, 20)),
          (s = this._get(t, "dateFormat")).match(/[DM]/) &&
            (r.setMonth(
              (e = function (t) {
                for (o = n = i = 0; o < t.length; o++)
                  t[o].length > i && ((i = t[o].length), (n = o));
                return n;
              })(
                this._get(t, s.match(/MM/) ? "monthNames" : "monthNamesShort"),
              ),
            ),
            r.setDate(
              e(this._get(t, s.match(/DD/) ? "dayNames" : "dayNamesShort")) +
                20 -
                r.getDay(),
            )),
          t.input.attr("size", this._formatDate(t, r).length));
      },
      _inlineDatepicker: function (t, e) {
        var i = Q(t);
        i.hasClass(this.markerClassName) ||
          (i.addClass(this.markerClassName).append(e.dpDiv),
          Q.data(t, "datepicker", e),
          this._setDate(e, this._getDefaultDate(e), !0),
          this._updateDatepicker(e),
          this._updateAlternate(e),
          e.settings.disabled && this._disableDatepicker(t),
          e.dpDiv.css("display", "block"));
      },
      _dialogDatepicker: function (t, e, i, n, o) {
        var r,
          s = this._dialogInst;
        return (
          s ||
            ((this.uuid += 1),
            (r = "dp" + this.uuid),
            (this._dialogInput = Q(
              "<input type='text' id='" +
                r +
                "' style='position: absolute; top: -100px; width: 0px;'/>",
            )),
            this._dialogInput.on("keydown", this._doKeyDown),
            Q("body").append(this._dialogInput),
            ((s = this._dialogInst =
              this._newInst(this._dialogInput, !1)).settings = {}),
            Q.data(this._dialogInput[0], "datepicker", s)),
          st(s.settings, n || {}),
          (e = e && e.constructor === Date ? this._formatDate(s, e) : e),
          this._dialogInput.val(e),
          (this._pos = o ? (o.length ? o : [o.pageX, o.pageY]) : null),
          this._pos ||
            ((r = document.documentElement.clientWidth),
            (n = document.documentElement.clientHeight),
            (e =
              document.documentElement.scrollLeft || document.body.scrollLeft),
            (o = document.documentElement.scrollTop || document.body.scrollTop),
            (this._pos = [r / 2 - 100 + e, n / 2 - 150 + o])),
          this._dialogInput
            .css("left", this._pos[0] + 20 + "px")
            .css("top", this._pos[1] + "px"),
          (s.settings.onSelect = i),
          (this._inDialog = !0),
          this.dpDiv.addClass(this._dialogClass),
          this._showDatepicker(this._dialogInput[0]),
          Q.blockUI && Q.blockUI(this.dpDiv),
          Q.data(this._dialogInput[0], "datepicker", s),
          this
        );
      },
      _destroyDatepicker: function (t) {
        var e,
          i = Q(t),
          n = Q.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ((e = t.nodeName.toLowerCase()),
          Q.removeData(t, "datepicker"),
          "input" === e
            ? (n.append.remove(),
              n.trigger.remove(),
              i
                .removeClass(this.markerClassName)
                .off("focus", this._showDatepicker)
                .off("keydown", this._doKeyDown)
                .off("keypress", this._doKeyPress)
                .off("keyup", this._doKeyUp))
            : ("div" !== e && "span" !== e) ||
              i.removeClass(this.markerClassName).empty(),
          it === n && ((it = null), (this._curInst = null)));
      },
      _enableDatepicker: function (e) {
        var t,
          i = Q(e),
          n = Q.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (t = e.nodeName.toLowerCase())
            ? ((e.disabled = !1),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !1;
                })
                .end()
                .filter("img")
                .css({ opacity: "1.0", cursor: "" }))
            : ("div" !== t && "span" !== t) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .removeClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !1)),
          (this._disabledInputs = Q.map(this._disabledInputs, function (t) {
            return t === e ? null : t;
          })));
      },
      _disableDatepicker: function (e) {
        var t,
          i = Q(e),
          n = Q.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (t = e.nodeName.toLowerCase())
            ? ((e.disabled = !0),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !0;
                })
                .end()
                .filter("img")
                .css({ opacity: "0.5", cursor: "default" }))
            : ("div" !== t && "span" !== t) ||
              ((i = i.children("." + this._inlineClass))
                .children()
                .addClass("ui-state-disabled"),
              i
                .find("select.ui-datepicker-month, select.ui-datepicker-year")
                .prop("disabled", !0)),
          (this._disabledInputs = Q.map(this._disabledInputs, function (t) {
            return t === e ? null : t;
          })),
          (this._disabledInputs[this._disabledInputs.length] = e));
      },
      _isDisabledDatepicker: function (t) {
        if (!t) return !1;
        for (var e = 0; e < this._disabledInputs.length; e++)
          if (this._disabledInputs[e] === t) return !0;
        return !1;
      },
      _getInst: function (t) {
        try {
          return Q.data(t, "datepicker");
        } catch (t) {
          throw "Missing instance data for this datepicker";
        }
      },
      _optionDatepicker: function (t, e, i) {
        var n,
          o,
          r = this._getInst(t);
        if (2 === arguments.length && "string" == typeof e)
          return "defaults" === e
            ? Q.extend({}, Q.datepicker._defaults)
            : r
              ? "all" === e
                ? Q.extend({}, r.settings)
                : this._get(r, e)
              : null;
        ((n = e || {}),
          "string" == typeof e && ((n = {})[e] = i),
          r &&
            (this._curInst === r && this._hideDatepicker(),
            (o = this._getDateDatepicker(t, !0)),
            (e = this._getMinMaxDate(r, "min")),
            (i = this._getMinMaxDate(r, "max")),
            st(r.settings, n),
            null !== e &&
              void 0 !== n.dateFormat &&
              void 0 === n.minDate &&
              (r.settings.minDate = this._formatDate(r, e)),
            null !== i &&
              void 0 !== n.dateFormat &&
              void 0 === n.maxDate &&
              (r.settings.maxDate = this._formatDate(r, i)),
            "disabled" in n &&
              (n.disabled
                ? this._disableDatepicker(t)
                : this._enableDatepicker(t)),
            this._attachments(Q(t), r),
            this._autoSize(r),
            this._setDate(r, o),
            this._updateAlternate(r),
            this._updateDatepicker(r)));
      },
      _changeDatepicker: function (t, e, i) {
        this._optionDatepicker(t, e, i);
      },
      _refreshDatepicker: function (t) {
        t = this._getInst(t);
        t && this._updateDatepicker(t);
      },
      _setDateDatepicker: function (t, e) {
        t = this._getInst(t);
        t &&
          (this._setDate(t, e),
          this._updateDatepicker(t),
          this._updateAlternate(t));
      },
      _getDateDatepicker: function (t, e) {
        t = this._getInst(t);
        return (
          t && !t.inline && this._setDateFromField(t, e),
          t ? this._getDate(t) : null
        );
      },
      _doKeyDown: function (t) {
        var e,
          i,
          n = Q.datepicker._getInst(t.target),
          o = !0,
          r = n.dpDiv.is(".ui-datepicker-rtl");
        if (((n._keyEvent = !0), Q.datepicker._datepickerShowing))
          switch (t.keyCode) {
            case 9:
              (Q.datepicker._hideDatepicker(), (o = !1));
              break;
            case 13:
              return (
                (i = Q(
                  "td." +
                    Q.datepicker._dayOverClass +
                    ":not(." +
                    Q.datepicker._currentClass +
                    ")",
                  n.dpDiv,
                ))[0] &&
                  Q.datepicker._selectDay(
                    t.target,
                    n.selectedMonth,
                    n.selectedYear,
                    i[0],
                  ),
                (e = Q.datepicker._get(n, "onSelect"))
                  ? ((i = Q.datepicker._formatDate(n)),
                    e.apply(n.input ? n.input[0] : null, [i, n]))
                  : Q.datepicker._hideDatepicker(),
                !1
              );
            case 27:
              Q.datepicker._hideDatepicker();
              break;
            case 33:
              Q.datepicker._adjustDate(
                t.target,
                t.ctrlKey
                  ? -Q.datepicker._get(n, "stepBigMonths")
                  : -Q.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 34:
              Q.datepicker._adjustDate(
                t.target,
                t.ctrlKey
                  ? +Q.datepicker._get(n, "stepBigMonths")
                  : +Q.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 35:
              ((t.ctrlKey || t.metaKey) && Q.datepicker._clearDate(t.target),
                (o = t.ctrlKey || t.metaKey));
              break;
            case 36:
              ((t.ctrlKey || t.metaKey) && Q.datepicker._gotoToday(t.target),
                (o = t.ctrlKey || t.metaKey));
              break;
            case 37:
              ((t.ctrlKey || t.metaKey) &&
                Q.datepicker._adjustDate(t.target, r ? 1 : -1, "D"),
                (o = t.ctrlKey || t.metaKey),
                t.originalEvent.altKey &&
                  Q.datepicker._adjustDate(
                    t.target,
                    t.ctrlKey
                      ? -Q.datepicker._get(n, "stepBigMonths")
                      : -Q.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 38:
              ((t.ctrlKey || t.metaKey) &&
                Q.datepicker._adjustDate(t.target, -7, "D"),
                (o = t.ctrlKey || t.metaKey));
              break;
            case 39:
              ((t.ctrlKey || t.metaKey) &&
                Q.datepicker._adjustDate(t.target, r ? -1 : 1, "D"),
                (o = t.ctrlKey || t.metaKey),
                t.originalEvent.altKey &&
                  Q.datepicker._adjustDate(
                    t.target,
                    t.ctrlKey
                      ? +Q.datepicker._get(n, "stepBigMonths")
                      : +Q.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 40:
              ((t.ctrlKey || t.metaKey) &&
                Q.datepicker._adjustDate(t.target, 7, "D"),
                (o = t.ctrlKey || t.metaKey));
              break;
            default:
              o = !1;
          }
        else
          36 === t.keyCode && t.ctrlKey
            ? Q.datepicker._showDatepicker(this)
            : (o = !1);
        o && (t.preventDefault(), t.stopPropagation());
      },
      _doKeyPress: function (t) {
        var e,
          i = Q.datepicker._getInst(t.target);
        if (Q.datepicker._get(i, "constrainInput"))
          return (
            (e = Q.datepicker._possibleChars(
              Q.datepicker._get(i, "dateFormat"),
            )),
            (i = String.fromCharCode(
              null == t.charCode ? t.keyCode : t.charCode,
            )),
            t.ctrlKey || t.metaKey || i < " " || !e || -1 < e.indexOf(i)
          );
      },
      _doKeyUp: function (t) {
        t = Q.datepicker._getInst(t.target);
        if (t.input.val() !== t.lastVal)
          try {
            Q.datepicker.parseDate(
              Q.datepicker._get(t, "dateFormat"),
              t.input ? t.input.val() : null,
              Q.datepicker._getFormatConfig(t),
            ) &&
              (Q.datepicker._setDateFromField(t),
              Q.datepicker._updateAlternate(t),
              Q.datepicker._updateDatepicker(t));
          } catch (t) {}
        return !0;
      },
      _showDatepicker: function (t) {
        var e, i, n, o;
        ("input" !== (t = t.target || t).nodeName.toLowerCase() &&
          (t = Q("input", t.parentNode)[0]),
          Q.datepicker._isDisabledDatepicker(t) ||
            Q.datepicker._lastInput === t ||
            ((o = Q.datepicker._getInst(t)),
            Q.datepicker._curInst &&
              Q.datepicker._curInst !== o &&
              (Q.datepicker._curInst.dpDiv.stop(!0, !0),
              o &&
                Q.datepicker._datepickerShowing &&
                Q.datepicker._hideDatepicker(Q.datepicker._curInst.input[0])),
            !1 !==
              (i = (n = Q.datepicker._get(o, "beforeShow"))
                ? n.apply(t, [t, o])
                : {}) &&
              (st(o.settings, i),
              (o.lastVal = null),
              (Q.datepicker._lastInput = t),
              Q.datepicker._setDateFromField(o),
              Q.datepicker._inDialog && (t.value = ""),
              Q.datepicker._pos ||
                ((Q.datepicker._pos = Q.datepicker._findPos(t)),
                (Q.datepicker._pos[1] += t.offsetHeight)),
              (e = !1),
              Q(t)
                .parents()
                .each(function () {
                  return !(e |= "fixed" === Q(this).css("position"));
                }),
              (n = { left: Q.datepicker._pos[0], top: Q.datepicker._pos[1] }),
              (Q.datepicker._pos = null),
              o.dpDiv.empty(),
              o.dpDiv.css({
                position: "absolute",
                display: "block",
                top: "-1000px",
              }),
              Q.datepicker._updateDatepicker(o),
              (n = Q.datepicker._checkOffset(o, n, e)),
              o.dpDiv.css({
                position:
                  Q.datepicker._inDialog && Q.blockUI
                    ? "static"
                    : e
                      ? "fixed"
                      : "absolute",
                display: "none",
                left: n.left + "px",
                top: n.top + "px",
              }),
              o.inline ||
                ((i = Q.datepicker._get(o, "showAnim")),
                (n = Q.datepicker._get(o, "duration")),
                o.dpDiv.css(
                  "z-index",
                  (function (t) {
                    for (var e, i; t.length && t[0] !== document; ) {
                      if (
                        ("absolute" === (e = t.css("position")) ||
                          "relative" === e ||
                          "fixed" === e) &&
                        ((i = parseInt(t.css("zIndex"), 10)),
                        !isNaN(i) && 0 !== i)
                      )
                        return i;
                      t = t.parent();
                    }
                    return 0;
                  })(Q(t)) + 1,
                ),
                (Q.datepicker._datepickerShowing = !0),
                Q.effects && Q.effects.effect[i]
                  ? o.dpDiv.show(i, Q.datepicker._get(o, "showOptions"), n)
                  : o.dpDiv[i || "show"](i ? n : null),
                Q.datepicker._shouldFocusInput(o) && o.input.trigger("focus"),
                (Q.datepicker._curInst = o)))));
      },
      _updateDatepicker: function (t) {
        ((this.maxRows = 4),
          (it = t).dpDiv.empty().append(this._generateHTML(t)),
          this._attachHandlers(t));
        var e,
          i = this._getNumberOfMonths(t),
          n = i[1],
          o = t.dpDiv.find("." + this._dayOverClass + " a"),
          r = Q.datepicker._get(t, "onUpdateDatepicker");
        (0 < o.length && rt.apply(o.get(0)),
          t.dpDiv
            .removeClass(
              "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4",
            )
            .width(""),
          1 < n &&
            t.dpDiv
              .addClass("ui-datepicker-multi-" + n)
              .css("width", 17 * n + "em"),
          t.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"](
            "ui-datepicker-multi",
          ),
          t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"](
            "ui-datepicker-rtl",
          ),
          t === Q.datepicker._curInst &&
            Q.datepicker._datepickerShowing &&
            Q.datepicker._shouldFocusInput(t) &&
            t.input.trigger("focus"),
          t.yearshtml &&
            ((e = t.yearshtml),
            setTimeout(function () {
              (e === t.yearshtml &&
                t.yearshtml &&
                t.dpDiv
                  .find("select.ui-datepicker-year")
                  .first()
                  .replaceWith(t.yearshtml),
                (e = t.yearshtml = null));
            }, 0)),
          r && r.apply(t.input ? t.input[0] : null, [t]));
      },
      _shouldFocusInput: function (t) {
        return (
          t.input &&
          t.input.is(":visible") &&
          !t.input.is(":disabled") &&
          !t.input.is(":focus")
        );
      },
      _checkOffset: function (t, e, i) {
        var n = t.dpDiv.outerWidth(),
          o = t.dpDiv.outerHeight(),
          r = t.input ? t.input.outerWidth() : 0,
          s = t.input ? t.input.outerHeight() : 0,
          a =
            document.documentElement.clientWidth +
            (i ? 0 : Q(document).scrollLeft()),
          l =
            document.documentElement.clientHeight +
            (i ? 0 : Q(document).scrollTop());
        return (
          (e.left -= this._get(t, "isRTL") ? n - r : 0),
          (e.left -=
            i && e.left === t.input.offset().left
              ? Q(document).scrollLeft()
              : 0),
          (e.top -=
            i && e.top === t.input.offset().top + s
              ? Q(document).scrollTop()
              : 0),
          (e.left -= Math.min(
            e.left,
            e.left + n > a && n < a ? Math.abs(e.left + n - a) : 0,
          )),
          (e.top -= Math.min(
            e.top,
            e.top + o > l && o < l ? Math.abs(o + s) : 0,
          )),
          e
        );
      },
      _findPos: function (t) {
        for (
          var e = this._getInst(t), i = this._get(e, "isRTL");
          t &&
          ("hidden" === t.type || 1 !== t.nodeType || Q.expr.pseudos.hidden(t));
        )
          t = t[i ? "previousSibling" : "nextSibling"];
        return [(e = Q(t).offset()).left, e.top];
      },
      _hideDatepicker: function (t) {
        var e,
          i,
          n = this._curInst;
        !n ||
          (t && n !== Q.data(t, "datepicker")) ||
          (this._datepickerShowing &&
            ((e = this._get(n, "showAnim")),
            (i = this._get(n, "duration")),
            (t = function () {
              Q.datepicker._tidyDialog(n);
            }),
            Q.effects && (Q.effects.effect[e] || Q.effects[e])
              ? n.dpDiv.hide(e, Q.datepicker._get(n, "showOptions"), i, t)
              : n.dpDiv[
                  "slideDown" === e
                    ? "slideUp"
                    : "fadeIn" === e
                      ? "fadeOut"
                      : "hide"
                ](e ? i : null, t),
            e || t(),
            (this._datepickerShowing = !1),
            (t = this._get(n, "onClose")) &&
              t.apply(n.input ? n.input[0] : null, [
                n.input ? n.input.val() : "",
                n,
              ]),
            (this._lastInput = null),
            this._inDialog &&
              (this._dialogInput.css({
                position: "absolute",
                left: "0",
                top: "-100px",
              }),
              Q.blockUI && (Q.unblockUI(), Q("body").append(this.dpDiv))),
            (this._inDialog = !1)));
      },
      _tidyDialog: function (t) {
        t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
      },
      _checkExternalClick: function (t) {
        var e;
        Q.datepicker._curInst &&
          ((e = Q(t.target)),
          (t = Q.datepicker._getInst(e[0])),
          ((e[0].id === Q.datepicker._mainDivId ||
            0 !== e.parents("#" + Q.datepicker._mainDivId).length ||
            e.hasClass(Q.datepicker.markerClassName) ||
            e.closest("." + Q.datepicker._triggerClass).length ||
            !Q.datepicker._datepickerShowing ||
            (Q.datepicker._inDialog && Q.blockUI)) &&
            (!e.hasClass(Q.datepicker.markerClassName) ||
              Q.datepicker._curInst === t)) ||
            Q.datepicker._hideDatepicker());
      },
      _adjustDate: function (t, e, i) {
        var n = Q(t),
          t = this._getInst(n[0]);
        this._isDisabledDatepicker(n[0]) ||
          (this._adjustInstDate(t, e, i), this._updateDatepicker(t));
      },
      _gotoToday: function (t) {
        var e = Q(t),
          i = this._getInst(e[0]);
        (this._get(i, "gotoCurrent") && i.currentDay
          ? ((i.selectedDay = i.currentDay),
            (i.drawMonth = i.selectedMonth = i.currentMonth),
            (i.drawYear = i.selectedYear = i.currentYear))
          : ((t = new Date()),
            (i.selectedDay = t.getDate()),
            (i.drawMonth = i.selectedMonth = t.getMonth()),
            (i.drawYear = i.selectedYear = t.getFullYear())),
          this._notifyChange(i),
          this._adjustDate(e));
      },
      _selectMonthYear: function (t, e, i) {
        var n = Q(t),
          t = this._getInst(n[0]);
        ((t["selected" + ("M" === i ? "Month" : "Year")] = t[
          "draw" + ("M" === i ? "Month" : "Year")
        ] =
          parseInt(e.options[e.selectedIndex].value, 10)),
          this._notifyChange(t),
          this._adjustDate(n));
      },
      _selectDay: function (t, e, i, n) {
        var o = Q(t);
        Q(n).hasClass(this._unselectableClass) ||
          this._isDisabledDatepicker(o[0]) ||
          (((o = this._getInst(o[0])).selectedDay = o.currentDay =
            parseInt(Q("a", n).attr("data-date"))),
          (o.selectedMonth = o.currentMonth = e),
          (o.selectedYear = o.currentYear = i),
          this._selectDate(
            t,
            this._formatDate(o, o.currentDay, o.currentMonth, o.currentYear),
          ));
      },
      _clearDate: function (t) {
        t = Q(t);
        this._selectDate(t, "");
      },
      _selectDate: function (t, e) {
        var i = Q(t),
          t = this._getInst(i[0]);
        ((e = null != e ? e : this._formatDate(t)),
          t.input && t.input.val(e),
          this._updateAlternate(t),
          (i = this._get(t, "onSelect"))
            ? i.apply(t.input ? t.input[0] : null, [e, t])
            : t.input && t.input.trigger("change"),
          t.inline
            ? this._updateDatepicker(t)
            : (this._hideDatepicker(),
              (this._lastInput = t.input[0]),
              "object" != typeof t.input[0] && t.input.trigger("focus"),
              (this._lastInput = null)));
      },
      _updateAlternate: function (t) {
        var e,
          i,
          n = this._get(t, "altField");
        n &&
          ((e = this._get(t, "altFormat") || this._get(t, "dateFormat")),
          (i = this._getDate(t)),
          (t = this.formatDate(e, i, this._getFormatConfig(t))),
          Q(document).find(n).val(t));
      },
      noWeekends: function (t) {
        t = t.getDay();
        return [0 < t && t < 6, ""];
      },
      iso8601Week: function (t) {
        var e = new Date(t.getTime());
        return (
          e.setDate(e.getDate() + 4 - (e.getDay() || 7)),
          (t = e.getTime()),
          e.setMonth(0),
          e.setDate(1),
          Math.floor(Math.round((t - e) / 864e5) / 7) + 1
        );
      },
      parseDate: function (e, o, t) {
        if (null == e || null == o) throw "Invalid arguments";
        if ("" === (o = "object" == typeof o ? o.toString() : o + ""))
          return null;
        for (
          var i,
            n,
            r,
            s = 0,
            a =
              (t ? t.shortYearCutoff : null) || this._defaults.shortYearCutoff,
            a =
              "string" != typeof a
                ? a
                : (new Date().getFullYear() % 100) + parseInt(a, 10),
            l = (t ? t.dayNamesShort : null) || this._defaults.dayNamesShort,
            c = (t ? t.dayNames : null) || this._defaults.dayNames,
            u =
              (t ? t.monthNamesShort : null) || this._defaults.monthNamesShort,
            h = (t ? t.monthNames : null) || this._defaults.monthNames,
            d = -1,
            p = -1,
            f = -1,
            m = -1,
            g = !1,
            v = function (t) {
              t = x + 1 < e.length && e.charAt(x + 1) === t;
              return (t && x++, t);
            },
            b = function (t) {
              var e = v(t),
                e =
                  "@" === t
                    ? 14
                    : "!" === t
                      ? 20
                      : "y" === t && e
                        ? 4
                        : "o" === t
                          ? 3
                          : 2,
                e = new RegExp("^\\d{" + ("y" === t ? e : 1) + "," + e + "}"),
                e = o.substring(s).match(e);
              if (!e) throw "Missing number at position " + s;
              return ((s += e[0].length), parseInt(e[0], 10));
            },
            y = function (t, e, i) {
              var n = -1,
                e = Q.map(v(t) ? i : e, function (t, e) {
                  return [[e, t]];
                }).sort(function (t, e) {
                  return -(t[1].length - e[1].length);
                });
              if (
                (Q.each(e, function (t, e) {
                  var i = e[1];
                  if (o.substr(s, i.length).toLowerCase() === i.toLowerCase())
                    return ((n = e[0]), (s += i.length), !1);
                }),
                -1 !== n)
              )
                return n + 1;
              throw "Unknown name at position " + s;
            },
            w = function () {
              if (o.charAt(s) !== e.charAt(x))
                throw "Unexpected literal at position " + s;
              s++;
            },
            x = 0;
          x < e.length;
          x++
        )
          if (g) "'" !== e.charAt(x) || v("'") ? w() : (g = !1);
          else
            switch (e.charAt(x)) {
              case "d":
                f = b("d");
                break;
              case "D":
                y("D", l, c);
                break;
              case "o":
                m = b("o");
                break;
              case "m":
                p = b("m");
                break;
              case "M":
                p = y("M", u, h);
                break;
              case "y":
                d = b("y");
                break;
              case "@":
                ((d = (r = new Date(b("@"))).getFullYear()),
                  (p = r.getMonth() + 1),
                  (f = r.getDate()));
                break;
              case "!":
                ((d = (r = new Date(
                  (b("!") - this._ticksTo1970) / 1e4,
                )).getFullYear()),
                  (p = r.getMonth() + 1),
                  (f = r.getDate()));
                break;
              case "'":
                v("'") ? w() : (g = !0);
                break;
              default:
                w();
            }
        if (s < o.length && ((n = o.substr(s)), !/^\s+/.test(n)))
          throw "Extra/unparsed characters found in date: " + n;
        if (
          (-1 === d
            ? (d = new Date().getFullYear())
            : d < 100 &&
              (d +=
                new Date().getFullYear() -
                (new Date().getFullYear() % 100) +
                (d <= a ? 0 : -100)),
          -1 < m)
        )
          for (p = 1, f = m; ; ) {
            if (f <= (i = this._getDaysInMonth(d, p - 1))) break;
            (p++, (f -= i));
          }
        if (
          (r = this._daylightSavingAdjust(
            new Date(d, p - 1, f),
          )).getFullYear() !== d ||
          r.getMonth() + 1 !== p ||
          r.getDate() !== f
        )
          throw "Invalid date";
        return r;
      },
      ATOM: "yy-mm-dd",
      COOKIE: "D, dd M yy",
      ISO_8601: "yy-mm-dd",
      RFC_822: "D, d M y",
      RFC_850: "DD, dd-M-y",
      RFC_1036: "D, d M y",
      RFC_1123: "D, d M yy",
      RFC_2822: "D, d M yy",
      RSS: "D, d M y",
      TICKS: "!",
      TIMESTAMP: "@",
      W3C: "yy-mm-dd",
      _ticksTo1970:
        24 *
        (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) *
        60 *
        60 *
        1e7,
      formatDate: function (e, t, i) {
        if (!t) return "";
        function n(t, e, i) {
          var n = "" + e;
          if (u(t)) for (; n.length < i; ) n = "0" + n;
          return n;
        }
        function o(t, e, i, n) {
          return (u(t) ? n : i)[e];
        }
        var r,
          s = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,
          a = (i ? i.dayNames : null) || this._defaults.dayNames,
          l = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,
          c = (i ? i.monthNames : null) || this._defaults.monthNames,
          u = function (t) {
            t = r + 1 < e.length && e.charAt(r + 1) === t;
            return (t && r++, t);
          },
          h = "",
          d = !1;
        if (t)
          for (r = 0; r < e.length; r++)
            if (d)
              "'" !== e.charAt(r) || u("'") ? (h += e.charAt(r)) : (d = !1);
            else
              switch (e.charAt(r)) {
                case "d":
                  h += n("d", t.getDate(), 2);
                  break;
                case "D":
                  h += o("D", t.getDay(), s, a);
                  break;
                case "o":
                  h += n(
                    "o",
                    Math.round(
                      (new Date(
                        t.getFullYear(),
                        t.getMonth(),
                        t.getDate(),
                      ).getTime() -
                        new Date(t.getFullYear(), 0, 0).getTime()) /
                        864e5,
                    ),
                    3,
                  );
                  break;
                case "m":
                  h += n("m", t.getMonth() + 1, 2);
                  break;
                case "M":
                  h += o("M", t.getMonth(), l, c);
                  break;
                case "y":
                  h += u("y")
                    ? t.getFullYear()
                    : (t.getFullYear() % 100 < 10 ? "0" : "") +
                      (t.getFullYear() % 100);
                  break;
                case "@":
                  h += t.getTime();
                  break;
                case "!":
                  h += 1e4 * t.getTime() + this._ticksTo1970;
                  break;
                case "'":
                  u("'") ? (h += "'") : (d = !0);
                  break;
                default:
                  h += e.charAt(r);
              }
        return h;
      },
      _possibleChars: function (e) {
        for (
          var t = "",
            i = !1,
            n = function (t) {
              t = o + 1 < e.length && e.charAt(o + 1) === t;
              return (t && o++, t);
            },
            o = 0;
          o < e.length;
          o++
        )
          if (i) "'" !== e.charAt(o) || n("'") ? (t += e.charAt(o)) : (i = !1);
          else
            switch (e.charAt(o)) {
              case "d":
              case "m":
              case "y":
              case "@":
                t += "0123456789";
                break;
              case "D":
              case "M":
                return null;
              case "'":
                n("'") ? (t += "'") : (i = !0);
                break;
              default:
                t += e.charAt(o);
            }
        return t;
      },
      _get: function (t, e) {
        return (void 0 !== t.settings[e] ? t.settings : this._defaults)[e];
      },
      _setDateFromField: function (t, e) {
        if (t.input.val() !== t.lastVal) {
          var i = this._get(t, "dateFormat"),
            n = (t.lastVal = t.input ? t.input.val() : null),
            o = this._getDefaultDate(t),
            r = o,
            s = this._getFormatConfig(t);
          try {
            r = this.parseDate(i, n, s) || o;
          } catch (t) {
            n = e ? "" : n;
          }
          ((t.selectedDay = r.getDate()),
            (t.drawMonth = t.selectedMonth = r.getMonth()),
            (t.drawYear = t.selectedYear = r.getFullYear()),
            (t.currentDay = n ? r.getDate() : 0),
            (t.currentMonth = n ? r.getMonth() : 0),
            (t.currentYear = n ? r.getFullYear() : 0),
            this._adjustInstDate(t));
        }
      },
      _getDefaultDate: function (t) {
        return this._restrictMinMax(
          t,
          this._determineDate(t, this._get(t, "defaultDate"), new Date()),
        );
      },
      _determineDate: function (a, t, e) {
        var i,
          n,
          t =
            null == t || "" === t
              ? e
              : "string" == typeof t
                ? (function (t) {
                    try {
                      return Q.datepicker.parseDate(
                        Q.datepicker._get(a, "dateFormat"),
                        t,
                        Q.datepicker._getFormatConfig(a),
                      );
                    } catch (t) {}
                    for (
                      var e =
                          (t.toLowerCase().match(/^c/)
                            ? Q.datepicker._getDate(a)
                            : null) || new Date(),
                        i = e.getFullYear(),
                        n = e.getMonth(),
                        o = e.getDate(),
                        r = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
                        s = r.exec(t);
                      s;
                    ) {
                      switch (s[2] || "d") {
                        case "d":
                        case "D":
                          o += parseInt(s[1], 10);
                          break;
                        case "w":
                        case "W":
                          o += 7 * parseInt(s[1], 10);
                          break;
                        case "m":
                        case "M":
                          ((n += parseInt(s[1], 10)),
                            (o = Math.min(
                              o,
                              Q.datepicker._getDaysInMonth(i, n),
                            )));
                          break;
                        case "y":
                        case "Y":
                          ((i += parseInt(s[1], 10)),
                            (o = Math.min(
                              o,
                              Q.datepicker._getDaysInMonth(i, n),
                            )));
                      }
                      s = r.exec(t);
                    }
                    return new Date(i, n, o);
                  })(t)
                : "number" == typeof t
                  ? isNaN(t)
                    ? e
                    : ((i = t), (n = new Date()).setDate(n.getDate() + i), n)
                  : new Date(t.getTime());
        return (
          (t = t && "Invalid Date" === t.toString() ? e : t) &&
            (t.setHours(0),
            t.setMinutes(0),
            t.setSeconds(0),
            t.setMilliseconds(0)),
          this._daylightSavingAdjust(t)
        );
      },
      _daylightSavingAdjust: function (t) {
        return t
          ? (t.setHours(12 < t.getHours() ? t.getHours() + 2 : 0), t)
          : null;
      },
      _setDate: function (t, e, i) {
        var n = !e,
          o = t.selectedMonth,
          r = t.selectedYear,
          e = this._restrictMinMax(t, this._determineDate(t, e, new Date()));
        ((t.selectedDay = t.currentDay = e.getDate()),
          (t.drawMonth = t.selectedMonth = t.currentMonth = e.getMonth()),
          (t.drawYear = t.selectedYear = t.currentYear = e.getFullYear()),
          (o === t.selectedMonth && r === t.selectedYear) ||
            i ||
            this._notifyChange(t),
          this._adjustInstDate(t),
          t.input && t.input.val(n ? "" : this._formatDate(t)));
      },
      _getDate: function (t) {
        return !t.currentYear || (t.input && "" === t.input.val())
          ? null
          : this._daylightSavingAdjust(
              new Date(t.currentYear, t.currentMonth, t.currentDay),
            );
      },
      _attachHandlers: function (t) {
        var e = this._get(t, "stepMonths"),
          i = "#" + t.id.replace(/\\\\/g, "\\");
        t.dpDiv.find("[data-handler]").map(function () {
          var t = {
            prev: function () {
              Q.datepicker._adjustDate(i, -e, "M");
            },
            next: function () {
              Q.datepicker._adjustDate(i, +e, "M");
            },
            hide: function () {
              Q.datepicker._hideDatepicker();
            },
            today: function () {
              Q.datepicker._gotoToday(i);
            },
            selectDay: function () {
              return (
                Q.datepicker._selectDay(
                  i,
                  +this.getAttribute("data-month"),
                  +this.getAttribute("data-year"),
                  this,
                ),
                !1
              );
            },
            selectMonth: function () {
              return (Q.datepicker._selectMonthYear(i, this, "M"), !1);
            },
            selectYear: function () {
              return (Q.datepicker._selectMonthYear(i, this, "Y"), !1);
            },
          };
          Q(this).on(
            this.getAttribute("data-event"),
            t[this.getAttribute("data-handler")],
          );
        });
      },
      _generateHTML: function (t) {
        var e,
          i,
          n,
          o,
          r,
          s,
          a,
          l,
          c,
          u,
          h,
          d,
          p,
          f,
          m,
          g,
          v,
          b,
          y,
          w,
          x,
          k,
          C,
          P,
          _,
          S,
          T,
          H,
          I,
          E,
          D,
          A,
          M = new Date(),
          L = this._daylightSavingAdjust(
            new Date(M.getFullYear(), M.getMonth(), M.getDate()),
          ),
          O = this._get(t, "isRTL"),
          B = this._get(t, "showButtonPanel"),
          $ = this._get(t, "hideIfNoPrevNext"),
          N = this._get(t, "navigationAsDateFormat"),
          R = this._getNumberOfMonths(t),
          F = this._get(t, "showCurrentAtPos"),
          M = this._get(t, "stepMonths"),
          j = 1 !== R[0] || 1 !== R[1],
          z = this._daylightSavingAdjust(
            t.currentDay
              ? new Date(t.currentYear, t.currentMonth, t.currentDay)
              : new Date(9999, 9, 9),
          ),
          W = this._getMinMaxDate(t, "min"),
          q = this._getMinMaxDate(t, "max"),
          V = t.drawMonth - F,
          U = t.drawYear;
        if ((V < 0 && ((V += 12), U--), q))
          for (
            e = this._daylightSavingAdjust(
              new Date(
                q.getFullYear(),
                q.getMonth() - R[0] * R[1] + 1,
                q.getDate(),
              ),
            ),
              e = W && e < W ? W : e;
            this._daylightSavingAdjust(new Date(U, V, 1)) > e;
          )
            --V < 0 && ((V = 11), U--);
        for (
          t.drawMonth = V,
            t.drawYear = U,
            F = this._get(t, "prevText"),
            F = N
              ? this.formatDate(
                  F,
                  this._daylightSavingAdjust(new Date(U, V - M, 1)),
                  this._getFormatConfig(t),
                )
              : F,
            i = this._canAdjustMonth(t, -1, U, V)
              ? Q("<a>")
                  .attr({
                    class: "ui-datepicker-prev ui-corner-all",
                    "data-handler": "prev",
                    "data-event": "click",
                    title: F,
                  })
                  .append(
                    Q("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (O ? "e" : "w"),
                      )
                      .text(F),
                  )[0].outerHTML
              : $
                ? ""
                : Q("<a>")
                    .attr({
                      class:
                        "ui-datepicker-prev ui-corner-all ui-state-disabled",
                      title: F,
                    })
                    .append(
                      Q("<span>")
                        .addClass(
                          "ui-icon ui-icon-circle-triangle-" + (O ? "e" : "w"),
                        )
                        .text(F),
                    )[0].outerHTML,
            F = this._get(t, "nextText"),
            F = N
              ? this.formatDate(
                  F,
                  this._daylightSavingAdjust(new Date(U, V + M, 1)),
                  this._getFormatConfig(t),
                )
              : F,
            n = this._canAdjustMonth(t, 1, U, V)
              ? Q("<a>")
                  .attr({
                    class: "ui-datepicker-next ui-corner-all",
                    "data-handler": "next",
                    "data-event": "click",
                    title: F,
                  })
                  .append(
                    Q("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (O ? "w" : "e"),
                      )
                      .text(F),
                  )[0].outerHTML
              : $
                ? ""
                : Q("<a>")
                    .attr({
                      class:
                        "ui-datepicker-next ui-corner-all ui-state-disabled",
                      title: F,
                    })
                    .append(
                      Q("<span>")
                        .attr(
                          "class",
                          "ui-icon ui-icon-circle-triangle-" + (O ? "w" : "e"),
                        )
                        .text(F),
                    )[0].outerHTML,
            M = this._get(t, "currentText"),
            $ = this._get(t, "gotoCurrent") && t.currentDay ? z : L,
            M = N ? this.formatDate(M, $, this._getFormatConfig(t)) : M,
            F = "",
            t.inline ||
              (F = Q("<button>")
                .attr({
                  type: "button",
                  class:
                    "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
                  "data-handler": "hide",
                  "data-event": "click",
                })
                .text(this._get(t, "closeText"))[0].outerHTML),
            N = "",
            B &&
              (N = Q("<div class='ui-datepicker-buttonpane ui-widget-content'>")
                .append(O ? F : "")
                .append(
                  this._isInRange(t, $)
                    ? Q("<button>")
                        .attr({
                          type: "button",
                          class:
                            "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
                          "data-handler": "today",
                          "data-event": "click",
                        })
                        .text(M)
                    : "",
                )
                .append(O ? "" : F)[0].outerHTML),
            o = parseInt(this._get(t, "firstDay"), 10),
            o = isNaN(o) ? 0 : o,
            r = this._get(t, "showWeek"),
            s = this._get(t, "dayNames"),
            a = this._get(t, "dayNamesMin"),
            l = this._get(t, "monthNames"),
            c = this._get(t, "monthNamesShort"),
            u = this._get(t, "beforeShowDay"),
            h = this._get(t, "showOtherMonths"),
            d = this._get(t, "selectOtherMonths"),
            p = this._getDefaultDate(t),
            f = "",
            g = 0;
          g < R[0];
          g++
        ) {
          for (v = "", this.maxRows = 4, b = 0; b < R[1]; b++) {
            if (
              ((y = this._daylightSavingAdjust(new Date(U, V, t.selectedDay))),
              (w = " ui-corner-all"),
              (x = ""),
              j)
            ) {
              if (((x += "<div class='ui-datepicker-group"), 1 < R[1]))
                switch (b) {
                  case 0:
                    ((x += " ui-datepicker-group-first"),
                      (w = " ui-corner-" + (O ? "right" : "left")));
                    break;
                  case R[1] - 1:
                    ((x += " ui-datepicker-group-last"),
                      (w = " ui-corner-" + (O ? "left" : "right")));
                    break;
                  default:
                    ((x += " ui-datepicker-group-middle"), (w = ""));
                }
              x += "'>";
            }
            for (
              x +=
                "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" +
                w +
                "'>" +
                (/all|left/.test(w) && 0 === g ? (O ? n : i) : "") +
                (/all|right/.test(w) && 0 === g ? (O ? i : n) : "") +
                this._generateMonthYearHeader(
                  t,
                  V,
                  U,
                  W,
                  q,
                  0 < g || 0 < b,
                  l,
                  c,
                ) +
                "</div><table class='ui-datepicker-calendar'><thead><tr>",
                k = r
                  ? "<th class='ui-datepicker-week-col'>" +
                    this._get(t, "weekHeader") +
                    "</th>"
                  : "",
                m = 0;
              m < 7;
              m++
            )
              k +=
                "<th scope='col'" +
                (5 <= (m + o + 6) % 7
                  ? " class='ui-datepicker-week-end'"
                  : "") +
                "><span title='" +
                s[(C = (m + o) % 7)] +
                "'>" +
                a[C] +
                "</span></th>";
            for (
              x += k + "</tr></thead><tbody>",
                _ = this._getDaysInMonth(U, V),
                U === t.selectedYear &&
                  V === t.selectedMonth &&
                  (t.selectedDay = Math.min(t.selectedDay, _)),
                P = (this._getFirstDayOfMonth(U, V) - o + 7) % 7,
                _ = Math.ceil((P + _) / 7),
                S = j && this.maxRows > _ ? this.maxRows : _,
                this.maxRows = S,
                T = this._daylightSavingAdjust(new Date(U, V, 1 - P)),
                H = 0;
              H < S;
              H++
            ) {
              for (
                x += "<tr>",
                  I = r
                    ? "<td class='ui-datepicker-week-col'>" +
                      this._get(t, "calculateWeek")(T) +
                      "</td>"
                    : "",
                  m = 0;
                m < 7;
                m++
              )
                ((E = u ? u.apply(t.input ? t.input[0] : null, [T]) : [!0, ""]),
                  (A =
                    ((D = T.getMonth() !== V) && !d) ||
                    !E[0] ||
                    (W && T < W) ||
                    (q && q < T)),
                  (I +=
                    "<td class='" +
                    (5 <= (m + o + 6) % 7 ? " ui-datepicker-week-end" : "") +
                    (D ? " ui-datepicker-other-month" : "") +
                    ((T.getTime() === y.getTime() &&
                      V === t.selectedMonth &&
                      t._keyEvent) ||
                    (p.getTime() === T.getTime() && p.getTime() === y.getTime())
                      ? " " + this._dayOverClass
                      : "") +
                    (A
                      ? " " + this._unselectableClass + " ui-state-disabled"
                      : "") +
                    (D && !h
                      ? ""
                      : " " +
                        E[1] +
                        (T.getTime() === z.getTime()
                          ? " " + this._currentClass
                          : "") +
                        (T.getTime() === L.getTime()
                          ? " ui-datepicker-today"
                          : "")) +
                    "'" +
                    ((D && !h) || !E[2]
                      ? ""
                      : " title='" + E[2].replace(/'/g, "&#39;") + "'") +
                    (A
                      ? ""
                      : " data-handler='selectDay' data-event='click' data-month='" +
                        T.getMonth() +
                        "' data-year='" +
                        T.getFullYear() +
                        "'") +
                    ">" +
                    (D && !h
                      ? "&#xa0;"
                      : A
                        ? "<span class='ui-state-default'>" +
                          T.getDate() +
                          "</span>"
                        : "<a class='ui-state-default" +
                          (T.getTime() === L.getTime()
                            ? " ui-state-highlight"
                            : "") +
                          (T.getTime() === z.getTime()
                            ? " ui-state-active"
                            : "") +
                          (D ? " ui-priority-secondary" : "") +
                          "' href='#' aria-current='" +
                          (T.getTime() === z.getTime() ? "true" : "false") +
                          "' data-date='" +
                          T.getDate() +
                          "'>" +
                          T.getDate() +
                          "</a>") +
                    "</td>"),
                  T.setDate(T.getDate() + 1),
                  (T = this._daylightSavingAdjust(T)));
              x += I + "</tr>";
            }
            (11 < ++V && ((V = 0), U++),
              (v += x +=
                "</tbody></table>" +
                (j
                  ? "</div>" +
                    (0 < R[0] && b === R[1] - 1
                      ? "<div class='ui-datepicker-row-break'></div>"
                      : "")
                  : "")));
          }
          f += v;
        }
        return ((f += N), (t._keyEvent = !1), f);
      },
      _generateMonthYearHeader: function (t, e, i, n, o, r, s, a) {
        var l,
          c,
          u,
          h,
          d,
          p,
          f = this._get(t, "changeMonth"),
          m = this._get(t, "changeYear"),
          g = this._get(t, "showMonthAfterYear"),
          v = this._get(t, "selectMonthLabel"),
          b = this._get(t, "selectYearLabel"),
          y = "<div class='ui-datepicker-title'>",
          w = "";
        if (r || !f)
          w += "<span class='ui-datepicker-month'>" + s[e] + "</span>";
        else {
          for (
            l = n && n.getFullYear() === i,
              c = o && o.getFullYear() === i,
              w +=
                "<select class='ui-datepicker-month' aria-label='" +
                v +
                "' data-handler='selectMonth' data-event='change'>",
              u = 0;
            u < 12;
            u++
          )
            (!l || u >= n.getMonth()) &&
              (!c || u <= o.getMonth()) &&
              (w +=
                "<option value='" +
                u +
                "'" +
                (u === e ? " selected='selected'" : "") +
                ">" +
                a[u] +
                "</option>");
          w += "</select>";
        }
        if ((g || (y += w + (!r && f && m ? "" : "&#xa0;")), !t.yearshtml))
          if (((t.yearshtml = ""), r || !m))
            y += "<span class='ui-datepicker-year'>" + i + "</span>";
          else {
            for (
              s = this._get(t, "yearRange").split(":"),
                h = new Date().getFullYear(),
                d = (v = function (t) {
                  t = t.match(/c[+\-].*/)
                    ? i + parseInt(t.substring(1), 10)
                    : t.match(/[+\-].*/)
                      ? h + parseInt(t, 10)
                      : parseInt(t, 10);
                  return isNaN(t) ? h : t;
                })(s[0]),
                p = Math.max(d, v(s[1] || "")),
                d = n ? Math.max(d, n.getFullYear()) : d,
                p = o ? Math.min(p, o.getFullYear()) : p,
                t.yearshtml +=
                  "<select class='ui-datepicker-year' aria-label='" +
                  b +
                  "' data-handler='selectYear' data-event='change'>";
              d <= p;
              d++
            )
              t.yearshtml +=
                "<option value='" +
                d +
                "'" +
                (d === i ? " selected='selected'" : "") +
                ">" +
                d +
                "</option>";
            ((t.yearshtml += "</select>"),
              (y += t.yearshtml),
              (t.yearshtml = null));
          }
        return (
          (y += this._get(t, "yearSuffix")),
          g && (y += (!r && f && m ? "" : "&#xa0;") + w),
          (y += "</div>")
        );
      },
      _adjustInstDate: function (t, e, i) {
        var n = t.selectedYear + ("Y" === i ? e : 0),
          o = t.selectedMonth + ("M" === i ? e : 0),
          e =
            Math.min(t.selectedDay, this._getDaysInMonth(n, o)) +
            ("D" === i ? e : 0),
          e = this._restrictMinMax(
            t,
            this._daylightSavingAdjust(new Date(n, o, e)),
          );
        ((t.selectedDay = e.getDate()),
          (t.drawMonth = t.selectedMonth = e.getMonth()),
          (t.drawYear = t.selectedYear = e.getFullYear()),
          ("M" !== i && "Y" !== i) || this._notifyChange(t));
      },
      _restrictMinMax: function (t, e) {
        var i = this._getMinMaxDate(t, "min"),
          t = this._getMinMaxDate(t, "max"),
          e = i && e < i ? i : e;
        return t && t < e ? t : e;
      },
      _notifyChange: function (t) {
        var e = this._get(t, "onChangeMonthYear");
        e &&
          e.apply(t.input ? t.input[0] : null, [
            t.selectedYear,
            t.selectedMonth + 1,
            t,
          ]);
      },
      _getNumberOfMonths: function (t) {
        t = this._get(t, "numberOfMonths");
        return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t;
      },
      _getMinMaxDate: function (t, e) {
        return this._determineDate(t, this._get(t, e + "Date"), null);
      },
      _getDaysInMonth: function (t, e) {
        return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate();
      },
      _getFirstDayOfMonth: function (t, e) {
        return new Date(t, e, 1).getDay();
      },
      _canAdjustMonth: function (t, e, i, n) {
        var o = this._getNumberOfMonths(t),
          o = this._daylightSavingAdjust(
            new Date(i, n + (e < 0 ? e : o[0] * o[1]), 1),
          );
        return (
          e < 0 &&
            o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())),
          this._isInRange(t, o)
        );
      },
      _isInRange: function (t, e) {
        var i = this._getMinMaxDate(t, "min"),
          n = this._getMinMaxDate(t, "max"),
          o = null,
          r = null,
          s = this._get(t, "yearRange");
        return (
          s &&
            ((t = s.split(":")),
            (s = new Date().getFullYear()),
            (o = parseInt(t[0], 10)),
            (r = parseInt(t[1], 10)),
            t[0].match(/[+\-].*/) && (o += s),
            t[1].match(/[+\-].*/) && (r += s)),
          (!i || e.getTime() >= i.getTime()) &&
            (!n || e.getTime() <= n.getTime()) &&
            (!o || e.getFullYear() >= o) &&
            (!r || e.getFullYear() <= r)
        );
      },
      _getFormatConfig: function (t) {
        var e = this._get(t, "shortYearCutoff");
        return {
          shortYearCutoff: (e =
            "string" != typeof e
              ? e
              : (new Date().getFullYear() % 100) + parseInt(e, 10)),
          dayNamesShort: this._get(t, "dayNamesShort"),
          dayNames: this._get(t, "dayNames"),
          monthNamesShort: this._get(t, "monthNamesShort"),
          monthNames: this._get(t, "monthNames"),
        };
      },
      _formatDate: function (t, e, i, n) {
        e ||
          ((t.currentDay = t.selectedDay),
          (t.currentMonth = t.selectedMonth),
          (t.currentYear = t.selectedYear));
        e = e
          ? "object" == typeof e
            ? e
            : this._daylightSavingAdjust(new Date(n, i, e))
          : this._daylightSavingAdjust(
              new Date(t.currentYear, t.currentMonth, t.currentDay),
            );
        return this.formatDate(
          this._get(t, "dateFormat"),
          e,
          this._getFormatConfig(t),
        );
      },
    }),
    (Q.fn.datepicker = function (t) {
      if (!this.length) return this;
      (Q.datepicker.initialized ||
        (Q(document).on("mousedown", Q.datepicker._checkExternalClick),
        (Q.datepicker.initialized = !0)),
        0 === Q("#" + Q.datepicker._mainDivId).length &&
          Q("body").append(Q.datepicker.dpDiv));
      var e = Array.prototype.slice.call(arguments, 1);
      return ("string" == typeof t &&
        ("isDisabled" === t || "getDate" === t || "widget" === t)) ||
        ("option" === t &&
          2 === arguments.length &&
          "string" == typeof arguments[1])
        ? Q.datepicker["_" + t + "Datepicker"].apply(
            Q.datepicker,
            [this[0]].concat(e),
          )
        : this.each(function () {
            "string" == typeof t
              ? Q.datepicker["_" + t + "Datepicker"].apply(
                  Q.datepicker,
                  [this].concat(e),
                )
              : Q.datepicker._attachDatepicker(this, t);
          });
    }),
    (Q.datepicker = new nt()),
    (Q.datepicker.initialized = !1),
    (Q.datepicker.uuid = new Date().getTime()),
    (Q.datepicker.version = "1.13.0"));
  (Q.datepicker,
    (Q.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())));
  var at = !1;
  Q(document).on("mouseup", function () {
    at = !1;
  });
  (Q.widget("ui.mouse", {
    version: "1.13.0",
    options: {
      cancel: "input, textarea, button, select, option",
      distance: 1,
      delay: 0,
    },
    _mouseInit: function () {
      var e = this;
      (this.element
        .on("mousedown." + this.widgetName, function (t) {
          return e._mouseDown(t);
        })
        .on("click." + this.widgetName, function (t) {
          if (!0 === Q.data(t.target, e.widgetName + ".preventClickEvent"))
            return (
              Q.removeData(t.target, e.widgetName + ".preventClickEvent"),
              t.stopImmediatePropagation(),
              !1
            );
        }),
        (this.started = !1));
    },
    _mouseDestroy: function () {
      (this.element.off("." + this.widgetName),
        this._mouseMoveDelegate &&
          this.document
            .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
            .off("mouseup." + this.widgetName, this._mouseUpDelegate));
    },
    _mouseDown: function (t) {
      if (!at) {
        ((this._mouseMoved = !1),
          this._mouseStarted && this._mouseUp(t),
          (this._mouseDownEvent = t));
        var e = this,
          i = 1 === t.which,
          n =
            !("string" != typeof this.options.cancel || !t.target.nodeName) &&
            Q(t.target).closest(this.options.cancel).length;
        return i && !n && this._mouseCapture(t)
          ? ((this.mouseDelayMet = !this.options.delay),
            this.mouseDelayMet ||
              (this._mouseDelayTimer = setTimeout(function () {
                e.mouseDelayMet = !0;
              }, this.options.delay)),
            this._mouseDistanceMet(t) &&
            this._mouseDelayMet(t) &&
            ((this._mouseStarted = !1 !== this._mouseStart(t)),
            !this._mouseStarted)
              ? (t.preventDefault(), !0)
              : (!0 ===
                  Q.data(t.target, this.widgetName + ".preventClickEvent") &&
                  Q.removeData(
                    t.target,
                    this.widgetName + ".preventClickEvent",
                  ),
                (this._mouseMoveDelegate = function (t) {
                  return e._mouseMove(t);
                }),
                (this._mouseUpDelegate = function (t) {
                  return e._mouseUp(t);
                }),
                this.document
                  .on("mousemove." + this.widgetName, this._mouseMoveDelegate)
                  .on("mouseup." + this.widgetName, this._mouseUpDelegate),
                "slider" === this.widgetName && t.preventDefault(),
                (at = !0)))
          : !0;
      }
    },
    _mouseMove: function (t) {
      if (this._mouseMoved) {
        if (
          Q.ui.ie &&
          (!document.documentMode || document.documentMode < 9) &&
          !t.button
        )
          return this._mouseUp(t);
        if (!t.which)
          if (
            t.originalEvent.altKey ||
            t.originalEvent.ctrlKey ||
            t.originalEvent.metaKey ||
            t.originalEvent.shiftKey
          )
            this.ignoreMissingWhich = !0;
          else if (!this.ignoreMissingWhich) return this._mouseUp(t);
      }
      return (
        (t.which || t.button) && (this._mouseMoved = !0),
        this._mouseStarted
          ? (this._mouseDrag(t), t.preventDefault())
          : (this._mouseDistanceMet(t) &&
              this._mouseDelayMet(t) &&
              ((this._mouseStarted =
                !1 !== this._mouseStart(this._mouseDownEvent, t)),
              this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)),
            !this._mouseStarted)
      );
    },
    _mouseUp: function (t) {
      (this.document
        .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
        .off("mouseup." + this.widgetName, this._mouseUpDelegate),
        this._mouseStarted &&
          ((this._mouseStarted = !1),
          t.target === this._mouseDownEvent.target &&
            Q.data(t.target, this.widgetName + ".preventClickEvent", !0),
          this._mouseStop(t)),
        this._mouseDelayTimer &&
          (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer),
        (this.ignoreMissingWhich = !1),
        (at = !1),
        t.preventDefault());
    },
    _mouseDistanceMet: function (t) {
      return (
        Math.max(
          Math.abs(this._mouseDownEvent.pageX - t.pageX),
          Math.abs(this._mouseDownEvent.pageY - t.pageY),
        ) >= this.options.distance
      );
    },
    _mouseDelayMet: function () {
      return this.mouseDelayMet;
    },
    _mouseStart: function () {},
    _mouseDrag: function () {},
    _mouseStop: function () {},
    _mouseCapture: function () {
      return !0;
    },
  }),
    (Q.ui.plugin = {
      add: function (t, e, i) {
        var n,
          o = Q.ui[t].prototype;
        for (n in i)
          ((o.plugins[n] = o.plugins[n] || []), o.plugins[n].push([e, i[n]]));
      },
      call: function (t, e, i, n) {
        var o,
          r = t.plugins[e];
        if (
          r &&
          (n ||
            (t.element[0].parentNode &&
              11 !== t.element[0].parentNode.nodeType))
        )
          for (o = 0; o < r.length; o++)
            t.options[r[o][0]] && r[o][1].apply(t.element, i);
      },
    }),
    (Q.ui.safeBlur = function (t) {
      t && "body" !== t.nodeName.toLowerCase() && Q(t).trigger("blur");
    }));
  (Q.widget("ui.draggable", Q.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "drag",
    options: {
      addClasses: !0,
      appendTo: "parent",
      axis: !1,
      connectToSortable: !1,
      containment: !1,
      cursor: "auto",
      cursorAt: !1,
      grid: !1,
      handle: !1,
      helper: "original",
      iframeFix: !1,
      opacity: !1,
      refreshPositions: !1,
      revert: !1,
      revertDuration: 500,
      scope: "default",
      scroll: !0,
      scrollSensitivity: 20,
      scrollSpeed: 20,
      snap: !1,
      snapMode: "both",
      snapTolerance: 20,
      stack: !1,
      zIndex: !1,
      drag: null,
      start: null,
      stop: null,
    },
    _create: function () {
      ("original" === this.options.helper && this._setPositionRelative(),
        this.options.addClasses && this._addClass("ui-draggable"),
        this._setHandleClassName(),
        this._mouseInit());
    },
    _setOption: function (t, e) {
      (this._super(t, e),
        "handle" === t &&
          (this._removeHandleClassName(), this._setHandleClassName()));
    },
    _destroy: function () {
      (this.helper || this.element).is(".ui-draggable-dragging")
        ? (this.destroyOnClear = !0)
        : (this._removeHandleClassName(), this._mouseDestroy());
    },
    _mouseCapture: function (t) {
      var e = this.options;
      return (
        !(
          this.helper ||
          e.disabled ||
          0 < Q(t.target).closest(".ui-resizable-handle").length
        ) &&
        ((this.handle = this._getHandle(t)),
        !!this.handle &&
          (this._blurActiveElement(t),
          this._blockFrames(!0 === e.iframeFix ? "iframe" : e.iframeFix),
          !0))
      );
    },
    _blockFrames: function (t) {
      this.iframeBlocks = this.document.find(t).map(function () {
        var t = Q(this);
        return Q("<div>")
          .css("position", "absolute")
          .appendTo(t.parent())
          .outerWidth(t.outerWidth())
          .outerHeight(t.outerHeight())
          .offset(t.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _blurActiveElement: function (t) {
      var e = Q.ui.safeActiveElement(this.document[0]);
      Q(t.target).closest(e).length || Q.ui.safeBlur(e);
    },
    _mouseStart: function (t) {
      var e = this.options;
      return (
        (this.helper = this._createHelper(t)),
        this._addClass(this.helper, "ui-draggable-dragging"),
        this._cacheHelperProportions(),
        Q.ui.ddmanager && (Q.ui.ddmanager.current = this),
        this._cacheMargins(),
        (this.cssPosition = this.helper.css("position")),
        (this.scrollParent = this.helper.scrollParent(!0)),
        (this.offsetParent = this.helper.offsetParent()),
        (this.hasFixedAncestor =
          0 <
          this.helper.parents().filter(function () {
            return "fixed" === Q(this).css("position");
          }).length),
        (this.positionAbs = this.element.offset()),
        this._refreshOffsets(t),
        (this.originalPosition = this.position = this._generatePosition(t, !1)),
        (this.originalPageX = t.pageX),
        (this.originalPageY = t.pageY),
        e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt),
        this._setContainment(),
        !1 === this._trigger("start", t)
          ? (this._clear(), !1)
          : (this._cacheHelperProportions(),
            Q.ui.ddmanager &&
              !e.dropBehaviour &&
              Q.ui.ddmanager.prepareOffsets(this, t),
            this._mouseDrag(t, !0),
            Q.ui.ddmanager && Q.ui.ddmanager.dragStart(this, t),
            !0)
      );
    },
    _refreshOffsets: function (t) {
      ((this.offset = {
        top: this.positionAbs.top - this.margins.top,
        left: this.positionAbs.left - this.margins.left,
        scroll: !1,
        parent: this._getParentOffset(),
        relative: this._getRelativeOffset(),
      }),
        (this.offset.click = {
          left: t.pageX - this.offset.left,
          top: t.pageY - this.offset.top,
        }));
    },
    _mouseDrag: function (t, e) {
      if (
        (this.hasFixedAncestor &&
          (this.offset.parent = this._getParentOffset()),
        (this.position = this._generatePosition(t, !0)),
        (this.positionAbs = this._convertPositionTo("absolute")),
        !e)
      ) {
        e = this._uiHash();
        if (!1 === this._trigger("drag", t, e))
          return (this._mouseUp(new Q.Event("mouseup", t)), !1);
        this.position = e.position;
      }
      return (
        (this.helper[0].style.left = this.position.left + "px"),
        (this.helper[0].style.top = this.position.top + "px"),
        Q.ui.ddmanager && Q.ui.ddmanager.drag(this, t),
        !1
      );
    },
    _mouseStop: function (t) {
      var e = this,
        i = !1;
      return (
        Q.ui.ddmanager &&
          !this.options.dropBehaviour &&
          (i = Q.ui.ddmanager.drop(this, t)),
        this.dropped && ((i = this.dropped), (this.dropped = !1)),
        ("invalid" === this.options.revert && !i) ||
        ("valid" === this.options.revert && i) ||
        !0 === this.options.revert ||
        ("function" == typeof this.options.revert &&
          this.options.revert.call(this.element, i))
          ? Q(this.helper).animate(
              this.originalPosition,
              parseInt(this.options.revertDuration, 10),
              function () {
                !1 !== e._trigger("stop", t) && e._clear();
              },
            )
          : !1 !== this._trigger("stop", t) && this._clear(),
        !1
      );
    },
    _mouseUp: function (t) {
      return (
        this._unblockFrames(),
        Q.ui.ddmanager && Q.ui.ddmanager.dragStop(this, t),
        this.handleElement.is(t.target) && this.element.trigger("focus"),
        Q.ui.mouse.prototype._mouseUp.call(this, t)
      );
    },
    cancel: function () {
      return (
        this.helper.is(".ui-draggable-dragging")
          ? this._mouseUp(new Q.Event("mouseup", { target: this.element[0] }))
          : this._clear(),
        this
      );
    },
    _getHandle: function (t) {
      return (
        !this.options.handle ||
        !!Q(t.target).closest(this.element.find(this.options.handle)).length
      );
    },
    _setHandleClassName: function () {
      ((this.handleElement = this.options.handle
        ? this.element.find(this.options.handle)
        : this.element),
        this._addClass(this.handleElement, "ui-draggable-handle"));
    },
    _removeHandleClassName: function () {
      this._removeClass(this.handleElement, "ui-draggable-handle");
    },
    _createHelper: function (t) {
      var e = this.options,
        i = "function" == typeof e.helper,
        t = i
          ? Q(e.helper.apply(this.element[0], [t]))
          : "clone" === e.helper
            ? this.element.clone().removeAttr("id")
            : this.element;
      return (
        t.parents("body").length ||
          t.appendTo(
            "parent" === e.appendTo ? this.element[0].parentNode : e.appendTo,
          ),
        i && t[0] === this.element[0] && this._setPositionRelative(),
        t[0] === this.element[0] ||
          /(fixed|absolute)/.test(t.css("position")) ||
          t.css("position", "absolute"),
        t
      );
    },
    _setPositionRelative: function () {
      /^(?:r|a|f)/.test(this.element.css("position")) ||
        (this.element[0].style.position = "relative");
    },
    _adjustOffsetFromHelper: function (t) {
      ("string" == typeof t && (t = t.split(" ")),
        "left" in
          (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : t) &&
          (this.offset.click.left = t.left + this.margins.left),
        "right" in t &&
          (this.offset.click.left =
            this.helperProportions.width - t.right + this.margins.left),
        "top" in t && (this.offset.click.top = t.top + this.margins.top),
        "bottom" in t &&
          (this.offset.click.top =
            this.helperProportions.height - t.bottom + this.margins.top));
    },
    _isRootNode: function (t) {
      return /(html|body)/i.test(t.tagName) || t === this.document[0];
    },
    _getParentOffset: function () {
      var t = this.offsetParent.offset(),
        e = this.document[0];
      return (
        "absolute" === this.cssPosition &&
          this.scrollParent[0] !== e &&
          Q.contains(this.scrollParent[0], this.offsetParent[0]) &&
          ((t.left += this.scrollParent.scrollLeft()),
          (t.top += this.scrollParent.scrollTop())),
        {
          top:
            (t = this._isRootNode(this.offsetParent[0])
              ? { top: 0, left: 0 }
              : t).top +
            (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
          left:
            t.left +
            (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
        }
      );
    },
    _getRelativeOffset: function () {
      if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
      var t = this.element.position(),
        e = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          t.top -
          (parseInt(this.helper.css("top"), 10) || 0) +
          (e ? 0 : this.scrollParent.scrollTop()),
        left:
          t.left -
          (parseInt(this.helper.css("left"), 10) || 0) +
          (e ? 0 : this.scrollParent.scrollLeft()),
      };
    },
    _cacheMargins: function () {
      this.margins = {
        left: parseInt(this.element.css("marginLeft"), 10) || 0,
        top: parseInt(this.element.css("marginTop"), 10) || 0,
        right: parseInt(this.element.css("marginRight"), 10) || 0,
        bottom: parseInt(this.element.css("marginBottom"), 10) || 0,
      };
    },
    _cacheHelperProportions: function () {
      this.helperProportions = {
        width: this.helper.outerWidth(),
        height: this.helper.outerHeight(),
      };
    },
    _setContainment: function () {
      var t,
        e,
        i,
        n = this.options,
        o = this.document[0];
      ((this.relativeContainer = null),
        n.containment
          ? "window" !== n.containment
            ? "document" !== n.containment
              ? n.containment.constructor !== Array
                ? ("parent" === n.containment &&
                    (n.containment = this.helper[0].parentNode),
                  (i = (e = Q(n.containment))[0]) &&
                    ((t = /(scroll|auto)/.test(e.css("overflow"))),
                    (this.containment = [
                      (parseInt(e.css("borderLeftWidth"), 10) || 0) +
                        (parseInt(e.css("paddingLeft"), 10) || 0),
                      (parseInt(e.css("borderTopWidth"), 10) || 0) +
                        (parseInt(e.css("paddingTop"), 10) || 0),
                      (t
                        ? Math.max(i.scrollWidth, i.offsetWidth)
                        : i.offsetWidth) -
                        (parseInt(e.css("borderRightWidth"), 10) || 0) -
                        (parseInt(e.css("paddingRight"), 10) || 0) -
                        this.helperProportions.width -
                        this.margins.left -
                        this.margins.right,
                      (t
                        ? Math.max(i.scrollHeight, i.offsetHeight)
                        : i.offsetHeight) -
                        (parseInt(e.css("borderBottomWidth"), 10) || 0) -
                        (parseInt(e.css("paddingBottom"), 10) || 0) -
                        this.helperProportions.height -
                        this.margins.top -
                        this.margins.bottom,
                    ]),
                    (this.relativeContainer = e)))
                : (this.containment = n.containment)
              : (this.containment = [
                  0,
                  0,
                  Q(o).width() -
                    this.helperProportions.width -
                    this.margins.left,
                  (Q(o).height() || o.body.parentNode.scrollHeight) -
                    this.helperProportions.height -
                    this.margins.top,
                ])
            : (this.containment = [
                Q(window).scrollLeft() -
                  this.offset.relative.left -
                  this.offset.parent.left,
                Q(window).scrollTop() -
                  this.offset.relative.top -
                  this.offset.parent.top,
                Q(window).scrollLeft() +
                  Q(window).width() -
                  this.helperProportions.width -
                  this.margins.left,
                Q(window).scrollTop() +
                  (Q(window).height() || o.body.parentNode.scrollHeight) -
                  this.helperProportions.height -
                  this.margins.top,
              ])
          : (this.containment = null));
    },
    _convertPositionTo: function (t, e) {
      e = e || this.position;
      var i = "absolute" === t ? 1 : -1,
        t = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          e.top +
          this.offset.relative.top * i +
          this.offset.parent.top * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.top
            : t
              ? 0
              : this.offset.scroll.top) *
            i,
        left:
          e.left +
          this.offset.relative.left * i +
          this.offset.parent.left * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.left
            : t
              ? 0
              : this.offset.scroll.left) *
            i,
      };
    },
    _generatePosition: function (t, e) {
      var i,
        n = this.options,
        o = this._isRootNode(this.scrollParent[0]),
        r = t.pageX,
        s = t.pageY;
      return (
        (o && this.offset.scroll) ||
          (this.offset.scroll = {
            top: this.scrollParent.scrollTop(),
            left: this.scrollParent.scrollLeft(),
          }),
        e &&
          (this.containment &&
            ((i = this.relativeContainer
              ? ((i = this.relativeContainer.offset()),
                [
                  this.containment[0] + i.left,
                  this.containment[1] + i.top,
                  this.containment[2] + i.left,
                  this.containment[3] + i.top,
                ])
              : this.containment),
            t.pageX - this.offset.click.left < i[0] &&
              (r = i[0] + this.offset.click.left),
            t.pageY - this.offset.click.top < i[1] &&
              (s = i[1] + this.offset.click.top),
            t.pageX - this.offset.click.left > i[2] &&
              (r = i[2] + this.offset.click.left),
            t.pageY - this.offset.click.top > i[3] &&
              (s = i[3] + this.offset.click.top)),
          n.grid &&
            ((t = n.grid[1]
              ? this.originalPageY +
                Math.round((s - this.originalPageY) / n.grid[1]) * n.grid[1]
              : this.originalPageY),
            (s =
              !i ||
              t - this.offset.click.top >= i[1] ||
              t - this.offset.click.top > i[3]
                ? t
                : t - this.offset.click.top >= i[1]
                  ? t - n.grid[1]
                  : t + n.grid[1]),
            (t = n.grid[0]
              ? this.originalPageX +
                Math.round((r - this.originalPageX) / n.grid[0]) * n.grid[0]
              : this.originalPageX),
            (r =
              !i ||
              t - this.offset.click.left >= i[0] ||
              t - this.offset.click.left > i[2]
                ? t
                : t - this.offset.click.left >= i[0]
                  ? t - n.grid[0]
                  : t + n.grid[0])),
          "y" === n.axis && (r = this.originalPageX),
          "x" === n.axis && (s = this.originalPageY)),
        {
          top:
            s -
            this.offset.click.top -
            this.offset.relative.top -
            this.offset.parent.top +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.top
              : o
                ? 0
                : this.offset.scroll.top),
          left:
            r -
            this.offset.click.left -
            this.offset.relative.left -
            this.offset.parent.left +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.left
              : o
                ? 0
                : this.offset.scroll.left),
        }
      );
    },
    _clear: function () {
      (this._removeClass(this.helper, "ui-draggable-dragging"),
        this.helper[0] === this.element[0] ||
          this.cancelHelperRemoval ||
          this.helper.remove(),
        (this.helper = null),
        (this.cancelHelperRemoval = !1),
        this.destroyOnClear && this.destroy());
    },
    _trigger: function (t, e, i) {
      return (
        (i = i || this._uiHash()),
        Q.ui.plugin.call(this, t, [e, i, this], !0),
        /^(drag|start|stop)/.test(t) &&
          ((this.positionAbs = this._convertPositionTo("absolute")),
          (i.offset = this.positionAbs)),
        Q.Widget.prototype._trigger.call(this, t, e, i)
      );
    },
    plugins: {},
    _uiHash: function () {
      return {
        helper: this.helper,
        position: this.position,
        originalPosition: this.originalPosition,
        offset: this.positionAbs,
      };
    },
  }),
    Q.ui.plugin.add("draggable", "connectToSortable", {
      start: function (e, t, i) {
        var n = Q.extend({}, t, { item: i.element });
        ((i.sortables = []),
          Q(i.options.connectToSortable).each(function () {
            var t = Q(this).sortable("instance");
            t &&
              !t.options.disabled &&
              (i.sortables.push(t),
              t.refreshPositions(),
              t._trigger("activate", e, n));
          }));
      },
      stop: function (e, t, i) {
        var n = Q.extend({}, t, { item: i.element });
        ((i.cancelHelperRemoval = !1),
          Q.each(i.sortables, function () {
            var t = this;
            t.isOver
              ? ((t.isOver = 0),
                (i.cancelHelperRemoval = !0),
                (t.cancelHelperRemoval = !1),
                (t._storedCSS = {
                  position: t.placeholder.css("position"),
                  top: t.placeholder.css("top"),
                  left: t.placeholder.css("left"),
                }),
                t._mouseStop(e),
                (t.options.helper = t.options._helper))
              : ((t.cancelHelperRemoval = !0), t._trigger("deactivate", e, n));
          }));
      },
      drag: function (i, n, o) {
        Q.each(o.sortables, function () {
          var t = !1,
            e = this;
          ((e.positionAbs = o.positionAbs),
            (e.helperProportions = o.helperProportions),
            (e.offset.click = o.offset.click),
            e._intersectsWith(e.containerCache) &&
              ((t = !0),
              Q.each(o.sortables, function () {
                return (
                  (this.positionAbs = o.positionAbs),
                  (this.helperProportions = o.helperProportions),
                  (this.offset.click = o.offset.click),
                  (t =
                    this !== e &&
                    this._intersectsWith(this.containerCache) &&
                    Q.contains(e.element[0], this.element[0])
                      ? !1
                      : t)
                );
              })),
            t
              ? (e.isOver ||
                  ((e.isOver = 1),
                  (o._parent = n.helper.parent()),
                  (e.currentItem = n.helper
                    .appendTo(e.element)
                    .data("ui-sortable-item", !0)),
                  (e.options._helper = e.options.helper),
                  (e.options.helper = function () {
                    return n.helper[0];
                  }),
                  (i.target = e.currentItem[0]),
                  e._mouseCapture(i, !0),
                  e._mouseStart(i, !0, !0),
                  (e.offset.click.top = o.offset.click.top),
                  (e.offset.click.left = o.offset.click.left),
                  (e.offset.parent.left -=
                    o.offset.parent.left - e.offset.parent.left),
                  (e.offset.parent.top -=
                    o.offset.parent.top - e.offset.parent.top),
                  o._trigger("toSortable", i),
                  (o.dropped = e.element),
                  Q.each(o.sortables, function () {
                    this.refreshPositions();
                  }),
                  (o.currentItem = o.element),
                  (e.fromOutside = o)),
                e.currentItem && (e._mouseDrag(i), (n.position = e.position)))
              : e.isOver &&
                ((e.isOver = 0),
                (e.cancelHelperRemoval = !0),
                (e.options._revert = e.options.revert),
                (e.options.revert = !1),
                e._trigger("out", i, e._uiHash(e)),
                e._mouseStop(i, !0),
                (e.options.revert = e.options._revert),
                (e.options.helper = e.options._helper),
                e.placeholder && e.placeholder.remove(),
                n.helper.appendTo(o._parent),
                o._refreshOffsets(i),
                (n.position = o._generatePosition(i, !0)),
                o._trigger("fromSortable", i),
                (o.dropped = !1),
                Q.each(o.sortables, function () {
                  this.refreshPositions();
                })));
        });
      },
    }),
    Q.ui.plugin.add("draggable", "cursor", {
      start: function (t, e, i) {
        var n = Q("body"),
          i = i.options;
        (n.css("cursor") && (i._cursor = n.css("cursor")),
          n.css("cursor", i.cursor));
      },
      stop: function (t, e, i) {
        i = i.options;
        i._cursor && Q("body").css("cursor", i._cursor);
      },
    }),
    Q.ui.plugin.add("draggable", "opacity", {
      start: function (t, e, i) {
        ((e = Q(e.helper)), (i = i.options));
        (e.css("opacity") && (i._opacity = e.css("opacity")),
          e.css("opacity", i.opacity));
      },
      stop: function (t, e, i) {
        i = i.options;
        i._opacity && Q(e.helper).css("opacity", i._opacity);
      },
    }),
    Q.ui.plugin.add("draggable", "scroll", {
      start: function (t, e, i) {
        (i.scrollParentNotHidden ||
          (i.scrollParentNotHidden = i.helper.scrollParent(!1)),
          i.scrollParentNotHidden[0] !== i.document[0] &&
            "HTML" !== i.scrollParentNotHidden[0].tagName &&
            (i.overflowOffset = i.scrollParentNotHidden.offset()));
      },
      drag: function (t, e, i) {
        var n = i.options,
          o = !1,
          r = i.scrollParentNotHidden[0],
          s = i.document[0];
        (r !== s && "HTML" !== r.tagName
          ? ((n.axis && "x" === n.axis) ||
              (i.overflowOffset.top + r.offsetHeight - t.pageY <
              n.scrollSensitivity
                ? (r.scrollTop = o = r.scrollTop + n.scrollSpeed)
                : t.pageY - i.overflowOffset.top < n.scrollSensitivity &&
                  (r.scrollTop = o = r.scrollTop - n.scrollSpeed)),
            (n.axis && "y" === n.axis) ||
              (i.overflowOffset.left + r.offsetWidth - t.pageX <
              n.scrollSensitivity
                ? (r.scrollLeft = o = r.scrollLeft + n.scrollSpeed)
                : t.pageX - i.overflowOffset.left < n.scrollSensitivity &&
                  (r.scrollLeft = o = r.scrollLeft - n.scrollSpeed)))
          : ((n.axis && "x" === n.axis) ||
              (t.pageY - Q(s).scrollTop() < n.scrollSensitivity
                ? (o = Q(s).scrollTop(Q(s).scrollTop() - n.scrollSpeed))
                : Q(window).height() - (t.pageY - Q(s).scrollTop()) <
                    n.scrollSensitivity &&
                  (o = Q(s).scrollTop(Q(s).scrollTop() + n.scrollSpeed))),
            (n.axis && "y" === n.axis) ||
              (t.pageX - Q(s).scrollLeft() < n.scrollSensitivity
                ? (o = Q(s).scrollLeft(Q(s).scrollLeft() - n.scrollSpeed))
                : Q(window).width() - (t.pageX - Q(s).scrollLeft()) <
                    n.scrollSensitivity &&
                  (o = Q(s).scrollLeft(Q(s).scrollLeft() + n.scrollSpeed)))),
          !1 !== o &&
            Q.ui.ddmanager &&
            !n.dropBehaviour &&
            Q.ui.ddmanager.prepareOffsets(i, t));
      },
    }),
    Q.ui.plugin.add("draggable", "snap", {
      start: function (t, e, i) {
        var n = i.options;
        ((i.snapElements = []),
          Q(
            n.snap.constructor !== String
              ? n.snap.items || ":data(ui-draggable)"
              : n.snap,
          ).each(function () {
            var t = Q(this),
              e = t.offset();
            this !== i.element[0] &&
              i.snapElements.push({
                item: this,
                width: t.outerWidth(),
                height: t.outerHeight(),
                top: e.top,
                left: e.left,
              });
          }));
      },
      drag: function (t, e, i) {
        for (
          var n,
            o,
            r,
            s,
            a,
            l,
            c,
            u,
            h,
            d = i.options,
            p = d.snapTolerance,
            f = e.offset.left,
            m = f + i.helperProportions.width,
            g = e.offset.top,
            v = g + i.helperProportions.height,
            b = i.snapElements.length - 1;
          0 <= b;
          b--
        )
          ((l =
            (a = i.snapElements[b].left - i.margins.left) +
            i.snapElements[b].width),
            (u =
              (c = i.snapElements[b].top - i.margins.top) +
              i.snapElements[b].height),
            m < a - p ||
            l + p < f ||
            v < c - p ||
            u + p < g ||
            !Q.contains(
              i.snapElements[b].item.ownerDocument,
              i.snapElements[b].item,
            )
              ? (i.snapElements[b].snapping &&
                  i.options.snap.release &&
                  i.options.snap.release.call(
                    i.element,
                    t,
                    Q.extend(i._uiHash(), { snapItem: i.snapElements[b].item }),
                  ),
                (i.snapElements[b].snapping = !1))
              : ("inner" !== d.snapMode &&
                  ((n = Math.abs(c - v) <= p),
                  (o = Math.abs(u - g) <= p),
                  (r = Math.abs(a - m) <= p),
                  (s = Math.abs(l - f) <= p),
                  n &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: c - i.helperProportions.height,
                      left: 0,
                    }).top),
                  o &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: u,
                      left: 0,
                    }).top),
                  r &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a - i.helperProportions.width,
                    }).left),
                  s &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l,
                    }).left)),
                (h = n || o || r || s),
                "outer" !== d.snapMode &&
                  ((n = Math.abs(c - g) <= p),
                  (o = Math.abs(u - v) <= p),
                  (r = Math.abs(a - f) <= p),
                  (s = Math.abs(l - m) <= p),
                  n &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: c,
                      left: 0,
                    }).top),
                  o &&
                    (e.position.top = i._convertPositionTo("relative", {
                      top: u - i.helperProportions.height,
                      left: 0,
                    }).top),
                  r &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a,
                    }).left),
                  s &&
                    (e.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l - i.helperProportions.width,
                    }).left)),
                !i.snapElements[b].snapping &&
                  (n || o || r || s || h) &&
                  i.options.snap.snap &&
                  i.options.snap.snap.call(
                    i.element,
                    t,
                    Q.extend(i._uiHash(), { snapItem: i.snapElements[b].item }),
                  ),
                (i.snapElements[b].snapping = n || o || r || s || h)));
      },
    }),
    Q.ui.plugin.add("draggable", "stack", {
      start: function (t, e, i) {
        var n,
          i = i.options,
          i = Q.makeArray(Q(i.stack)).sort(function (t, e) {
            return (
              (parseInt(Q(t).css("zIndex"), 10) || 0) -
              (parseInt(Q(e).css("zIndex"), 10) || 0)
            );
          });
        i.length &&
          ((n = parseInt(Q(i[0]).css("zIndex"), 10) || 0),
          Q(i).each(function (t) {
            Q(this).css("zIndex", n + t);
          }),
          this.css("zIndex", n + i.length));
      },
    }),
    Q.ui.plugin.add("draggable", "zIndex", {
      start: function (t, e, i) {
        ((e = Q(e.helper)), (i = i.options));
        (e.css("zIndex") && (i._zIndex = e.css("zIndex")),
          e.css("zIndex", i.zIndex));
      },
      stop: function (t, e, i) {
        i = i.options;
        i._zIndex && Q(e.helper).css("zIndex", i._zIndex);
      },
    }));
  Q.ui.draggable;
  (Q.widget("ui.resizable", Q.ui.mouse, {
    version: "1.13.0",
    widgetEventPrefix: "resize",
    options: {
      alsoResize: !1,
      animate: !1,
      animateDuration: "slow",
      animateEasing: "swing",
      aspectRatio: !1,
      autoHide: !1,
      classes: { "ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se" },
      containment: !1,
      ghost: !1,
      grid: !1,
      handles: "e,s,se",
      helper: !1,
      maxHeight: null,
      maxWidth: null,
      minHeight: 10,
      minWidth: 10,
      zIndex: 90,
      resize: null,
      start: null,
      stop: null,
    },
    _num: function (t) {
      return parseFloat(t) || 0;
    },
    _isNumber: function (t) {
      return !isNaN(parseFloat(t));
    },
    _hasScroll: function (t, e) {
      if ("hidden" === Q(t).css("overflow")) return !1;
      var i = e && "left" === e ? "scrollLeft" : "scrollTop",
        e = !1;
      if (0 < t[i]) return !0;
      try {
        ((t[i] = 1), (e = 0 < t[i]), (t[i] = 0));
      } catch (t) {}
      return e;
    },
    _create: function () {
      var t,
        e = this.options,
        i = this;
      (this._addClass("ui-resizable"),
        Q.extend(this, {
          _aspectRatio: !!e.aspectRatio,
          aspectRatio: e.aspectRatio,
          originalElement: this.element,
          _proportionallyResizeElements: [],
          _helper:
            e.helper || e.ghost || e.animate
              ? e.helper || "ui-resizable-helper"
              : null,
        }),
        this.element[0].nodeName.match(
          /^(canvas|textarea|input|select|button|img)$/i,
        ) &&
          (this.element.wrap(
            Q("<div class='ui-wrapper'></div>").css({
              overflow: "hidden",
              position: this.element.css("position"),
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              top: this.element.css("top"),
              left: this.element.css("left"),
            }),
          ),
          (this.element = this.element
            .parent()
            .data("ui-resizable", this.element.resizable("instance"))),
          (this.elementIsWrapper = !0),
          (t = {
            marginTop: this.originalElement.css("marginTop"),
            marginRight: this.originalElement.css("marginRight"),
            marginBottom: this.originalElement.css("marginBottom"),
            marginLeft: this.originalElement.css("marginLeft"),
          }),
          this.element.css(t),
          this.originalElement.css("margin", 0),
          (this.originalResizeStyle = this.originalElement.css("resize")),
          this.originalElement.css("resize", "none"),
          this._proportionallyResizeElements.push(
            this.originalElement.css({
              position: "static",
              zoom: 1,
              display: "block",
            }),
          ),
          this.originalElement.css(t),
          this._proportionallyResize()),
        this._setupHandles(),
        e.autoHide &&
          Q(this.element)
            .on("mouseenter", function () {
              e.disabled ||
                (i._removeClass("ui-resizable-autohide"), i._handles.show());
            })
            .on("mouseleave", function () {
              e.disabled ||
                i.resizing ||
                (i._addClass("ui-resizable-autohide"), i._handles.hide());
            }),
        this._mouseInit());
    },
    _destroy: function () {
      (this._mouseDestroy(), this._addedHandles.remove());
      function t(t) {
        Q(t)
          .removeData("resizable")
          .removeData("ui-resizable")
          .off(".resizable");
      }
      var e;
      return (
        this.elementIsWrapper &&
          (t(this.element),
          (e = this.element),
          this.originalElement
            .css({
              position: e.css("position"),
              width: e.outerWidth(),
              height: e.outerHeight(),
              top: e.css("top"),
              left: e.css("left"),
            })
            .insertAfter(e),
          e.remove()),
        this.originalElement.css("resize", this.originalResizeStyle),
        t(this.originalElement),
        this
      );
    },
    _setOption: function (t, e) {
      switch ((this._super(t, e), t)) {
        case "handles":
          (this._removeHandles(), this._setupHandles());
          break;
        case "aspectRatio":
          this._aspectRatio = !!e;
      }
    },
    _setupHandles: function () {
      var t,
        e,
        i,
        n,
        o,
        r = this.options,
        s = this;
      if (
        ((this.handles =
          r.handles ||
          (Q(".ui-resizable-handle", this.element).length
            ? {
                n: ".ui-resizable-n",
                e: ".ui-resizable-e",
                s: ".ui-resizable-s",
                w: ".ui-resizable-w",
                se: ".ui-resizable-se",
                sw: ".ui-resizable-sw",
                ne: ".ui-resizable-ne",
                nw: ".ui-resizable-nw",
              }
            : "e,s,se")),
        (this._handles = Q()),
        (this._addedHandles = Q()),
        this.handles.constructor === String)
      )
        for (
          "all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"),
            i = this.handles.split(","),
            this.handles = {},
            e = 0;
          e < i.length;
          e++
        )
          ((n = "ui-resizable-" + (t = String.prototype.trim.call(i[e]))),
            (o = Q("<div>")),
            this._addClass(o, "ui-resizable-handle " + n),
            o.css({ zIndex: r.zIndex }),
            (this.handles[t] = ".ui-resizable-" + t),
            this.element.children(this.handles[t]).length ||
              (this.element.append(o),
              (this._addedHandles = this._addedHandles.add(o))));
      ((this._renderAxis = function (t) {
        var e, i, n;
        for (e in ((t = t || this.element), this.handles))
          (this.handles[e].constructor === String
            ? (this.handles[e] = this.element
                .children(this.handles[e])
                .first()
                .show())
            : (this.handles[e].jquery || this.handles[e].nodeType) &&
              ((this.handles[e] = Q(this.handles[e])),
              this._on(this.handles[e], { mousedown: s._mouseDown })),
            this.elementIsWrapper &&
              this.originalElement[0].nodeName.match(
                /^(textarea|input|select|button)$/i,
              ) &&
              ((i = Q(this.handles[e], this.element)),
              (n = /sw|ne|nw|se|n|s/.test(e)
                ? i.outerHeight()
                : i.outerWidth()),
              (i = [
                "padding",
                /ne|nw|n/.test(e)
                  ? "Top"
                  : /se|sw|s/.test(e)
                    ? "Bottom"
                    : /^e$/.test(e)
                      ? "Right"
                      : "Left",
              ].join("")),
              t.css(i, n),
              this._proportionallyResize()),
            (this._handles = this._handles.add(this.handles[e])));
      }),
        this._renderAxis(this.element),
        (this._handles = this._handles.add(
          this.element.find(".ui-resizable-handle"),
        )),
        this._handles.disableSelection(),
        this._handles.on("mouseover", function () {
          s.resizing ||
            (this.className &&
              (o = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),
            (s.axis = o && o[1] ? o[1] : "se"));
        }),
        r.autoHide &&
          (this._handles.hide(), this._addClass("ui-resizable-autohide")));
    },
    _removeHandles: function () {
      this._addedHandles.remove();
    },
    _mouseCapture: function (t) {
      var e,
        i,
        n = !1;
      for (e in this.handles)
        ((i = Q(this.handles[e])[0]) !== t.target &&
          !Q.contains(i, t.target)) ||
          (n = !0);
      return !this.options.disabled && n;
    },
    _mouseStart: function (t) {
      var e,
        i,
        n = this.options,
        o = this.element;
      return (
        (this.resizing = !0),
        this._renderProxy(),
        (e = this._num(this.helper.css("left"))),
        (i = this._num(this.helper.css("top"))),
        n.containment &&
          ((e += Q(n.containment).scrollLeft() || 0),
          (i += Q(n.containment).scrollTop() || 0)),
        (this.offset = this.helper.offset()),
        (this.position = { left: e, top: i }),
        (this.size = this._helper
          ? { width: this.helper.width(), height: this.helper.height() }
          : { width: o.width(), height: o.height() }),
        (this.originalSize = this._helper
          ? { width: o.outerWidth(), height: o.outerHeight() }
          : { width: o.width(), height: o.height() }),
        (this.sizeDiff = {
          width: o.outerWidth() - o.width(),
          height: o.outerHeight() - o.height(),
        }),
        (this.originalPosition = { left: e, top: i }),
        (this.originalMousePosition = { left: t.pageX, top: t.pageY }),
        (this.aspectRatio =
          "number" == typeof n.aspectRatio
            ? n.aspectRatio
            : this.originalSize.width / this.originalSize.height || 1),
        (n = Q(".ui-resizable-" + this.axis).css("cursor")),
        Q("body").css("cursor", "auto" === n ? this.axis + "-resize" : n),
        this._addClass("ui-resizable-resizing"),
        this._propagate("start", t),
        !0
      );
    },
    _mouseDrag: function (t) {
      var e = this.originalMousePosition,
        i = this.axis,
        n = t.pageX - e.left || 0,
        e = t.pageY - e.top || 0,
        i = this._change[i];
      return (
        this._updatePrevProperties(),
        i &&
          ((e = i.apply(this, [t, n, e])),
          this._updateVirtualBoundaries(t.shiftKey),
          (this._aspectRatio || t.shiftKey) && (e = this._updateRatio(e, t)),
          (e = this._respectSize(e, t)),
          this._updateCache(e),
          this._propagate("resize", t),
          (e = this._applyChanges()),
          !this._helper &&
            this._proportionallyResizeElements.length &&
            this._proportionallyResize(),
          Q.isEmptyObject(e) ||
            (this._updatePrevProperties(),
            this._trigger("resize", t, this.ui()),
            this._applyChanges())),
        !1
      );
    },
    _mouseStop: function (t) {
      this.resizing = !1;
      var e,
        i,
        n,
        o = this.options,
        r = this;
      return (
        this._helper &&
          ((n =
            (e =
              (i = this._proportionallyResizeElements).length &&
              /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left")
              ? 0
              : r.sizeDiff.height),
          (i = e ? 0 : r.sizeDiff.width),
          (e = { width: r.helper.width() - i, height: r.helper.height() - n }),
          (i =
            parseFloat(r.element.css("left")) +
              (r.position.left - r.originalPosition.left) || null),
          (n =
            parseFloat(r.element.css("top")) +
              (r.position.top - r.originalPosition.top) || null),
          o.animate || this.element.css(Q.extend(e, { top: n, left: i })),
          r.helper.height(r.size.height),
          r.helper.width(r.size.width),
          this._helper && !o.animate && this._proportionallyResize()),
        Q("body").css("cursor", "auto"),
        this._removeClass("ui-resizable-resizing"),
        this._propagate("stop", t),
        this._helper && this.helper.remove(),
        !1
      );
    },
    _updatePrevProperties: function () {
      ((this.prevPosition = {
        top: this.position.top,
        left: this.position.left,
      }),
        (this.prevSize = { width: this.size.width, height: this.size.height }));
    },
    _applyChanges: function () {
      var t = {};
      return (
        this.position.top !== this.prevPosition.top &&
          (t.top = this.position.top + "px"),
        this.position.left !== this.prevPosition.left &&
          (t.left = this.position.left + "px"),
        this.size.width !== this.prevSize.width &&
          (t.width = this.size.width + "px"),
        this.size.height !== this.prevSize.height &&
          (t.height = this.size.height + "px"),
        this.helper.css(t),
        t
      );
    },
    _updateVirtualBoundaries: function (t) {
      var e,
        i,
        n = this.options,
        o = {
          minWidth: this._isNumber(n.minWidth) ? n.minWidth : 0,
          maxWidth: this._isNumber(n.maxWidth) ? n.maxWidth : 1 / 0,
          minHeight: this._isNumber(n.minHeight) ? n.minHeight : 0,
          maxHeight: this._isNumber(n.maxHeight) ? n.maxHeight : 1 / 0,
        };
      ((this._aspectRatio || t) &&
        ((e = o.minHeight * this.aspectRatio),
        (i = o.minWidth / this.aspectRatio),
        (n = o.maxHeight * this.aspectRatio),
        (t = o.maxWidth / this.aspectRatio),
        e > o.minWidth && (o.minWidth = e),
        i > o.minHeight && (o.minHeight = i),
        n < o.maxWidth && (o.maxWidth = n),
        t < o.maxHeight && (o.maxHeight = t)),
        (this._vBoundaries = o));
    },
    _updateCache: function (t) {
      ((this.offset = this.helper.offset()),
        this._isNumber(t.left) && (this.position.left = t.left),
        this._isNumber(t.top) && (this.position.top = t.top),
        this._isNumber(t.height) && (this.size.height = t.height),
        this._isNumber(t.width) && (this.size.width = t.width));
    },
    _updateRatio: function (t) {
      var e = this.position,
        i = this.size,
        n = this.axis;
      return (
        this._isNumber(t.height)
          ? (t.width = t.height * this.aspectRatio)
          : this._isNumber(t.width) && (t.height = t.width / this.aspectRatio),
        "sw" === n && ((t.left = e.left + (i.width - t.width)), (t.top = null)),
        "nw" === n &&
          ((t.top = e.top + (i.height - t.height)),
          (t.left = e.left + (i.width - t.width))),
        t
      );
    },
    _respectSize: function (t) {
      var e = this._vBoundaries,
        i = this.axis,
        n = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width,
        o = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height,
        r = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width,
        s = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height,
        a = this.originalPosition.left + this.originalSize.width,
        l = this.originalPosition.top + this.originalSize.height,
        c = /sw|nw|w/.test(i),
        i = /nw|ne|n/.test(i);
      return (
        r && (t.width = e.minWidth),
        s && (t.height = e.minHeight),
        n && (t.width = e.maxWidth),
        o && (t.height = e.maxHeight),
        r && c && (t.left = a - e.minWidth),
        n && c && (t.left = a - e.maxWidth),
        s && i && (t.top = l - e.minHeight),
        o && i && (t.top = l - e.maxHeight),
        t.width || t.height || t.left || !t.top
          ? t.width || t.height || t.top || !t.left || (t.left = null)
          : (t.top = null),
        t
      );
    },
    _getPaddingPlusBorderDimensions: function (t) {
      for (
        var e = 0,
          i = [],
          n = [
            t.css("borderTopWidth"),
            t.css("borderRightWidth"),
            t.css("borderBottomWidth"),
            t.css("borderLeftWidth"),
          ],
          o = [
            t.css("paddingTop"),
            t.css("paddingRight"),
            t.css("paddingBottom"),
            t.css("paddingLeft"),
          ];
        e < 4;
        e++
      )
        ((i[e] = parseFloat(n[e]) || 0), (i[e] += parseFloat(o[e]) || 0));
      return { height: i[0] + i[2], width: i[1] + i[3] };
    },
    _proportionallyResize: function () {
      if (this._proportionallyResizeElements.length)
        for (
          var t, e = 0, i = this.helper || this.element;
          e < this._proportionallyResizeElements.length;
          e++
        )
          ((t = this._proportionallyResizeElements[e]),
            this.outerDimensions ||
              (this.outerDimensions = this._getPaddingPlusBorderDimensions(t)),
            t.css({
              height: i.height() - this.outerDimensions.height || 0,
              width: i.width() - this.outerDimensions.width || 0,
            }));
    },
    _renderProxy: function () {
      var t = this.element,
        e = this.options;
      ((this.elementOffset = t.offset()),
        this._helper
          ? ((this.helper =
              this.helper || Q("<div></div>").css({ overflow: "hidden" })),
            this._addClass(this.helper, this._helper),
            this.helper.css({
              width: this.element.outerWidth(),
              height: this.element.outerHeight(),
              position: "absolute",
              left: this.elementOffset.left + "px",
              top: this.elementOffset.top + "px",
              zIndex: ++e.zIndex,
            }),
            this.helper.appendTo("body").disableSelection())
          : (this.helper = this.element));
    },
    _change: {
      e: function (t, e) {
        return { width: this.originalSize.width + e };
      },
      w: function (t, e) {
        var i = this.originalSize;
        return { left: this.originalPosition.left + e, width: i.width - e };
      },
      n: function (t, e, i) {
        var n = this.originalSize;
        return { top: this.originalPosition.top + i, height: n.height - i };
      },
      s: function (t, e, i) {
        return { height: this.originalSize.height + i };
      },
      se: function (t, e, i) {
        return Q.extend(
          this._change.s.apply(this, arguments),
          this._change.e.apply(this, [t, e, i]),
        );
      },
      sw: function (t, e, i) {
        return Q.extend(
          this._change.s.apply(this, arguments),
          this._change.w.apply(this, [t, e, i]),
        );
      },
      ne: function (t, e, i) {
        return Q.extend(
          this._change.n.apply(this, arguments),
          this._change.e.apply(this, [t, e, i]),
        );
      },
      nw: function (t, e, i) {
        return Q.extend(
          this._change.n.apply(this, arguments),
          this._change.w.apply(this, [t, e, i]),
        );
      },
    },
    _propagate: function (t, e) {
      (Q.ui.plugin.call(this, t, [e, this.ui()]),
        "resize" !== t && this._trigger(t, e, this.ui()));
    },
    plugins: {},
    ui: function () {
      return {
        originalElement: this.originalElement,
        element: this.element,
        helper: this.helper,
        position: this.position,
        size: this.size,
        originalSize: this.originalSize,
        originalPosition: this.originalPosition,
      };
    },
  }),
    Q.ui.plugin.add("resizable", "animate", {
      stop: function (e) {
        var i = Q(this).resizable("instance"),
          t = i.options,
          n = i._proportionallyResizeElements,
          o = n.length && /textarea/i.test(n[0].nodeName),
          r = o && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height,
          s = o ? 0 : i.sizeDiff.width,
          o = { width: i.size.width - s, height: i.size.height - r },
          s =
            parseFloat(i.element.css("left")) +
              (i.position.left - i.originalPosition.left) || null,
          r =
            parseFloat(i.element.css("top")) +
              (i.position.top - i.originalPosition.top) || null;
        i.element.animate(Q.extend(o, r && s ? { top: r, left: s } : {}), {
          duration: t.animateDuration,
          easing: t.animateEasing,
          step: function () {
            var t = {
              width: parseFloat(i.element.css("width")),
              height: parseFloat(i.element.css("height")),
              top: parseFloat(i.element.css("top")),
              left: parseFloat(i.element.css("left")),
            };
            (n && n.length && Q(n[0]).css({ width: t.width, height: t.height }),
              i._updateCache(t),
              i._propagate("resize", e));
          },
        });
      },
    }),
    Q.ui.plugin.add("resizable", "containment", {
      start: function () {
        var i,
          n,
          o = Q(this).resizable("instance"),
          t = o.options,
          e = o.element,
          r = t.containment,
          s =
            r instanceof Q
              ? r.get(0)
              : /parent/.test(r)
                ? e.parent().get(0)
                : r;
        s &&
          ((o.containerElement = Q(s)),
          /document/.test(r) || r === document
            ? ((o.containerOffset = { left: 0, top: 0 }),
              (o.containerPosition = { left: 0, top: 0 }),
              (o.parentData = {
                element: Q(document),
                left: 0,
                top: 0,
                width: Q(document).width(),
                height:
                  Q(document).height() || document.body.parentNode.scrollHeight,
              }))
            : ((i = Q(s)),
              (n = []),
              Q(["Top", "Right", "Left", "Bottom"]).each(function (t, e) {
                n[t] = o._num(i.css("padding" + e));
              }),
              (o.containerOffset = i.offset()),
              (o.containerPosition = i.position()),
              (o.containerSize = {
                height: i.innerHeight() - n[3],
                width: i.innerWidth() - n[1],
              }),
              (t = o.containerOffset),
              (e = o.containerSize.height),
              (r = o.containerSize.width),
              (r = o._hasScroll(s, "left") ? s.scrollWidth : r),
              (e = o._hasScroll(s) ? s.scrollHeight : e),
              (o.parentData = {
                element: s,
                left: t.left,
                top: t.top,
                width: r,
                height: e,
              })));
      },
      resize: function (t) {
        var e = Q(this).resizable("instance"),
          i = e.options,
          n = e.containerOffset,
          o = e.position,
          r = e._aspectRatio || t.shiftKey,
          s = { top: 0, left: 0 },
          a = e.containerElement,
          t = !0;
        (a[0] !== document && /static/.test(a.css("position")) && (s = n),
          o.left < (e._helper ? n.left : 0) &&
            ((e.size.width =
              e.size.width +
              (e._helper
                ? e.position.left - n.left
                : e.position.left - s.left)),
            r && ((e.size.height = e.size.width / e.aspectRatio), (t = !1)),
            (e.position.left = i.helper ? n.left : 0)),
          o.top < (e._helper ? n.top : 0) &&
            ((e.size.height =
              e.size.height +
              (e._helper ? e.position.top - n.top : e.position.top)),
            r && ((e.size.width = e.size.height * e.aspectRatio), (t = !1)),
            (e.position.top = e._helper ? n.top : 0)),
          (i = e.containerElement.get(0) === e.element.parent().get(0)),
          (o = /relative|absolute/.test(e.containerElement.css("position"))),
          i && o
            ? ((e.offset.left = e.parentData.left + e.position.left),
              (e.offset.top = e.parentData.top + e.position.top))
            : ((e.offset.left = e.element.offset().left),
              (e.offset.top = e.element.offset().top)),
          (o = Math.abs(
            e.sizeDiff.width +
              (e._helper ? e.offset.left - s.left : e.offset.left - n.left),
          )),
          (n = Math.abs(
            e.sizeDiff.height +
              (e._helper ? e.offset.top - s.top : e.offset.top - n.top),
          )),
          o + e.size.width >= e.parentData.width &&
            ((e.size.width = e.parentData.width - o),
            r && ((e.size.height = e.size.width / e.aspectRatio), (t = !1))),
          n + e.size.height >= e.parentData.height &&
            ((e.size.height = e.parentData.height - n),
            r && ((e.size.width = e.size.height * e.aspectRatio), (t = !1))),
          t ||
            ((e.position.left = e.prevPosition.left),
            (e.position.top = e.prevPosition.top),
            (e.size.width = e.prevSize.width),
            (e.size.height = e.prevSize.height)));
      },
      stop: function () {
        var t = Q(this).resizable("instance"),
          e = t.options,
          i = t.containerOffset,
          n = t.containerPosition,
          o = t.containerElement,
          r = Q(t.helper),
          s = r.offset(),
          a = r.outerWidth() - t.sizeDiff.width,
          r = r.outerHeight() - t.sizeDiff.height;
        (t._helper &&
          !e.animate &&
          /relative/.test(o.css("position")) &&
          Q(this).css({ left: s.left - n.left - i.left, width: a, height: r }),
          t._helper &&
            !e.animate &&
            /static/.test(o.css("position")) &&
            Q(this).css({
              left: s.left - n.left - i.left,
              width: a,
              height: r,
            }));
      },
    }),
    Q.ui.plugin.add("resizable", "alsoResize", {
      start: function () {
        var t = Q(this).resizable("instance").options;
        Q(t.alsoResize).each(function () {
          var t = Q(this);
          t.data("ui-resizable-alsoresize", {
            width: parseFloat(t.width()),
            height: parseFloat(t.height()),
            left: parseFloat(t.css("left")),
            top: parseFloat(t.css("top")),
          });
        });
      },
      resize: function (t, i) {
        var e = Q(this).resizable("instance"),
          n = e.options,
          o = e.originalSize,
          r = e.originalPosition,
          s = {
            height: e.size.height - o.height || 0,
            width: e.size.width - o.width || 0,
            top: e.position.top - r.top || 0,
            left: e.position.left - r.left || 0,
          };
        Q(n.alsoResize).each(function () {
          var t = Q(this),
            n = Q(this).data("ui-resizable-alsoresize"),
            o = {},
            e = t.parents(i.originalElement[0]).length
              ? ["width", "height"]
              : ["width", "height", "top", "left"];
          (Q.each(e, function (t, e) {
            var i = (n[e] || 0) + (s[e] || 0);
            i && 0 <= i && (o[e] = i || null);
          }),
            t.css(o));
        });
      },
      stop: function () {
        Q(this).removeData("ui-resizable-alsoresize");
      },
    }),
    Q.ui.plugin.add("resizable", "ghost", {
      start: function () {
        var t = Q(this).resizable("instance"),
          e = t.size;
        ((t.ghost = t.originalElement.clone()),
          t.ghost.css({
            opacity: 0.25,
            display: "block",
            position: "relative",
            height: e.height,
            width: e.width,
            margin: 0,
            left: 0,
            top: 0,
          }),
          t._addClass(t.ghost, "ui-resizable-ghost"),
          !1 !== Q.uiBackCompat &&
            "string" == typeof t.options.ghost &&
            t.ghost.addClass(this.options.ghost),
          t.ghost.appendTo(t.helper));
      },
      resize: function () {
        var t = Q(this).resizable("instance");
        t.ghost &&
          t.ghost.css({
            position: "relative",
            height: t.size.height,
            width: t.size.width,
          });
      },
      stop: function () {
        var t = Q(this).resizable("instance");
        t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0));
      },
    }),
    Q.ui.plugin.add("resizable", "grid", {
      resize: function () {
        var t,
          e = Q(this).resizable("instance"),
          i = e.options,
          n = e.size,
          o = e.originalSize,
          r = e.originalPosition,
          s = e.axis,
          a = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
          l = a[0] || 1,
          c = a[1] || 1,
          u = Math.round((n.width - o.width) / l) * l,
          h = Math.round((n.height - o.height) / c) * c,
          d = o.width + u,
          p = o.height + h,
          f = i.maxWidth && i.maxWidth < d,
          m = i.maxHeight && i.maxHeight < p,
          g = i.minWidth && i.minWidth > d,
          n = i.minHeight && i.minHeight > p;
        ((i.grid = a),
          g && (d += l),
          n && (p += c),
          f && (d -= l),
          m && (p -= c),
          /^(se|s|e)$/.test(s)
            ? ((e.size.width = d), (e.size.height = p))
            : /^(ne)$/.test(s)
              ? ((e.size.width = d),
                (e.size.height = p),
                (e.position.top = r.top - h))
              : /^(sw)$/.test(s)
                ? ((e.size.width = d),
                  (e.size.height = p),
                  (e.position.left = r.left - u))
                : ((p - c <= 0 || d - l <= 0) &&
                    (t = e._getPaddingPlusBorderDimensions(this)),
                  0 < p - c
                    ? ((e.size.height = p), (e.position.top = r.top - h))
                    : ((p = c - t.height),
                      (e.size.height = p),
                      (e.position.top = r.top + o.height - p)),
                  0 < d - l
                    ? ((e.size.width = d), (e.position.left = r.left - u))
                    : ((d = l - t.width),
                      (e.size.width = d),
                      (e.position.left = r.left + o.width - d))));
      },
    }));
  Q.ui.resizable;
  (Q.widget("ui.dialog", {
    version: "1.13.0",
    options: {
      appendTo: "body",
      autoOpen: !0,
      buttons: [],
      classes: {
        "ui-dialog": "ui-corner-all",
        "ui-dialog-titlebar": "ui-corner-all",
      },
      closeOnEscape: !0,
      closeText: "Close",
      draggable: !0,
      hide: null,
      height: "auto",
      maxHeight: null,
      maxWidth: null,
      minHeight: 150,
      minWidth: 150,
      modal: !1,
      position: {
        my: "center",
        at: "center",
        of: window,
        collision: "fit",
        using: function (t) {
          var e = Q(this).css(t).offset().top;
          e < 0 && Q(this).css("top", t.top - e);
        },
      },
      resizable: !0,
      show: null,
      title: null,
      width: 300,
      beforeClose: null,
      close: null,
      drag: null,
      dragStart: null,
      dragStop: null,
      focus: null,
      open: null,
      resize: null,
      resizeStart: null,
      resizeStop: null,
    },
    sizeRelatedOptions: {
      buttons: !0,
      height: !0,
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
      width: !0,
    },
    resizableRelatedOptions: {
      maxHeight: !0,
      maxWidth: !0,
      minHeight: !0,
      minWidth: !0,
    },
    _create: function () {
      ((this.originalCss = {
        display: this.element[0].style.display,
        width: this.element[0].style.width,
        minHeight: this.element[0].style.minHeight,
        maxHeight: this.element[0].style.maxHeight,
        height: this.element[0].style.height,
      }),
        (this.originalPosition = {
          parent: this.element.parent(),
          index: this.element.parent().children().index(this.element),
        }),
        (this.originalTitle = this.element.attr("title")),
        null == this.options.title &&
          null != this.originalTitle &&
          (this.options.title = this.originalTitle),
        this.options.disabled && (this.options.disabled = !1),
        this._createWrapper(),
        this.element.show().removeAttr("title").appendTo(this.uiDialog),
        this._addClass("ui-dialog-content", "ui-widget-content"),
        this._createTitlebar(),
        this._createButtonPane(),
        this.options.draggable && Q.fn.draggable && this._makeDraggable(),
        this.options.resizable && Q.fn.resizable && this._makeResizable(),
        (this._isOpen = !1),
        this._trackFocus());
    },
    _init: function () {
      this.options.autoOpen && this.open();
    },
    _appendTo: function () {
      var t = this.options.appendTo;
      return t && (t.jquery || t.nodeType)
        ? Q(t)
        : this.document.find(t || "body").eq(0);
    },
    _destroy: function () {
      var t,
        e = this.originalPosition;
      (this._untrackInstance(),
        this._destroyOverlay(),
        this.element.removeUniqueId().css(this.originalCss).detach(),
        this.uiDialog.remove(),
        this.originalTitle && this.element.attr("title", this.originalTitle),
        (t = e.parent.children().eq(e.index)).length && t[0] !== this.element[0]
          ? t.before(this.element)
          : e.parent.append(this.element));
    },
    widget: function () {
      return this.uiDialog;
    },
    disable: Q.noop,
    enable: Q.noop,
    close: function (t) {
      var e = this;
      this._isOpen &&
        !1 !== this._trigger("beforeClose", t) &&
        ((this._isOpen = !1),
        (this._focusedElement = null),
        this._destroyOverlay(),
        this._untrackInstance(),
        this.opener.filter(":focusable").trigger("focus").length ||
          Q.ui.safeBlur(Q.ui.safeActiveElement(this.document[0])),
        this._hide(this.uiDialog, this.options.hide, function () {
          e._trigger("close", t);
        }));
    },
    isOpen: function () {
      return this._isOpen;
    },
    moveToTop: function () {
      this._moveToTop();
    },
    _moveToTop: function (t, e) {
      var i = !1,
        n = this.uiDialog
          .siblings(".ui-front:visible")
          .map(function () {
            return +Q(this).css("z-index");
          })
          .get(),
        n = Math.max.apply(null, n);
      return (
        n >= +this.uiDialog.css("z-index") &&
          (this.uiDialog.css("z-index", n + 1), (i = !0)),
        i && !e && this._trigger("focus", t),
        i
      );
    },
    open: function () {
      var t = this;
      this._isOpen
        ? this._moveToTop() && this._focusTabbable()
        : ((this._isOpen = !0),
          (this.opener = Q(Q.ui.safeActiveElement(this.document[0]))),
          this._size(),
          this._position(),
          this._createOverlay(),
          this._moveToTop(null, !0),
          this.overlay &&
            this.overlay.css("z-index", this.uiDialog.css("z-index") - 1),
          this._show(this.uiDialog, this.options.show, function () {
            (t._focusTabbable(), t._trigger("focus"));
          }),
          this._makeFocusTarget(),
          this._trigger("open"));
    },
    _focusTabbable: function () {
      var t = this._focusedElement;
      (t = !(t = !(t = !(t = !(t = t || this.element.find("[autofocus]")).length
        ? this.element.find(":tabbable")
        : t).length
        ? this.uiDialogButtonPane.find(":tabbable")
        : t).length
        ? this.uiDialogTitlebarClose.filter(":tabbable")
        : t).length
        ? this.uiDialog
        : t)
        .eq(0)
        .trigger("focus");
    },
    _restoreTabbableFocus: function () {
      var t = Q.ui.safeActiveElement(this.document[0]);
      this.uiDialog[0] === t ||
        Q.contains(this.uiDialog[0], t) ||
        this._focusTabbable();
    },
    _keepFocus: function (t) {
      (t.preventDefault(),
        this._restoreTabbableFocus(),
        this._delay(this._restoreTabbableFocus));
    },
    _createWrapper: function () {
      ((this.uiDialog = Q("<div>")
        .hide()
        .attr({ tabIndex: -1, role: "dialog" })
        .appendTo(this._appendTo())),
        this._addClass(
          this.uiDialog,
          "ui-dialog",
          "ui-widget ui-widget-content ui-front",
        ),
        this._on(this.uiDialog, {
          keydown: function (t) {
            if (
              this.options.closeOnEscape &&
              !t.isDefaultPrevented() &&
              t.keyCode &&
              t.keyCode === Q.ui.keyCode.ESCAPE
            )
              return (t.preventDefault(), void this.close(t));
            var e, i, n;
            t.keyCode !== Q.ui.keyCode.TAB ||
              t.isDefaultPrevented() ||
              ((e = this.uiDialog.find(":tabbable")),
              (i = e.first()),
              (n = e.last()),
              (t.target !== n[0] && t.target !== this.uiDialog[0]) || t.shiftKey
                ? (t.target !== i[0] && t.target !== this.uiDialog[0]) ||
                  !t.shiftKey ||
                  (this._delay(function () {
                    n.trigger("focus");
                  }),
                  t.preventDefault())
                : (this._delay(function () {
                    i.trigger("focus");
                  }),
                  t.preventDefault()));
          },
          mousedown: function (t) {
            this._moveToTop(t) && this._focusTabbable();
          },
        }),
        this.element.find("[aria-describedby]").length ||
          this.uiDialog.attr({
            "aria-describedby": this.element.uniqueId().attr("id"),
          }));
    },
    _createTitlebar: function () {
      var t;
      ((this.uiDialogTitlebar = Q("<div>")),
        this._addClass(
          this.uiDialogTitlebar,
          "ui-dialog-titlebar",
          "ui-widget-header ui-helper-clearfix",
        ),
        this._on(this.uiDialogTitlebar, {
          mousedown: function (t) {
            Q(t.target).closest(".ui-dialog-titlebar-close") ||
              this.uiDialog.trigger("focus");
          },
        }),
        (this.uiDialogTitlebarClose = Q("<button type='button'></button>")
          .button({
            label: Q("<a>").text(this.options.closeText).html(),
            icon: "ui-icon-closethick",
            showLabel: !1,
          })
          .appendTo(this.uiDialogTitlebar)),
        this._addClass(this.uiDialogTitlebarClose, "ui-dialog-titlebar-close"),
        this._on(this.uiDialogTitlebarClose, {
          click: function (t) {
            (t.preventDefault(), this.close(t));
          },
        }),
        (t = Q("<span>").uniqueId().prependTo(this.uiDialogTitlebar)),
        this._addClass(t, "ui-dialog-title"),
        this._title(t),
        this.uiDialogTitlebar.prependTo(this.uiDialog),
        this.uiDialog.attr({ "aria-labelledby": t.attr("id") }));
    },
    _title: function (t) {
      this.options.title ? t.text(this.options.title) : t.html("&#160;");
    },
    _createButtonPane: function () {
      ((this.uiDialogButtonPane = Q("<div>")),
        this._addClass(
          this.uiDialogButtonPane,
          "ui-dialog-buttonpane",
          "ui-widget-content ui-helper-clearfix",
        ),
        (this.uiButtonSet = Q("<div>").appendTo(this.uiDialogButtonPane)),
        this._addClass(this.uiButtonSet, "ui-dialog-buttonset"),
        this._createButtons());
    },
    _createButtons: function () {
      var n = this,
        t = this.options.buttons;
      (this.uiDialogButtonPane.remove(),
        this.uiButtonSet.empty(),
        Q.isEmptyObject(t) || (Array.isArray(t) && !t.length)
          ? this._removeClass(this.uiDialog, "ui-dialog-buttons")
          : (Q.each(t, function (t, e) {
              var i;
              ((e = Q.extend(
                { type: "button" },
                (e = "function" == typeof e ? { click: e, text: t } : e),
              )),
                (i = e.click),
                (t = {
                  icon: e.icon,
                  iconPosition: e.iconPosition,
                  showLabel: e.showLabel,
                  icons: e.icons,
                  text: e.text,
                }),
                delete e.click,
                delete e.icon,
                delete e.iconPosition,
                delete e.showLabel,
                delete e.icons,
                "boolean" == typeof e.text && delete e.text,
                Q("<button></button>", e)
                  .button(t)
                  .appendTo(n.uiButtonSet)
                  .on("click", function () {
                    i.apply(n.element[0], arguments);
                  }));
            }),
            this._addClass(this.uiDialog, "ui-dialog-buttons"),
            this.uiDialogButtonPane.appendTo(this.uiDialog)));
    },
    _makeDraggable: function () {
      var o = this,
        r = this.options;
      function s(t) {
        return { position: t.position, offset: t.offset };
      }
      this.uiDialog.draggable({
        cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
        handle: ".ui-dialog-titlebar",
        containment: "document",
        start: function (t, e) {
          (o._addClass(Q(this), "ui-dialog-dragging"),
            o._blockFrames(),
            o._trigger("dragStart", t, s(e)));
        },
        drag: function (t, e) {
          o._trigger("drag", t, s(e));
        },
        stop: function (t, e) {
          var i = e.offset.left - o.document.scrollLeft(),
            n = e.offset.top - o.document.scrollTop();
          ((r.position = {
            my: "left top",
            at:
              "left" +
              (0 <= i ? "+" : "") +
              i +
              " top" +
              (0 <= n ? "+" : "") +
              n,
            of: o.window,
          }),
            o._removeClass(Q(this), "ui-dialog-dragging"),
            o._unblockFrames(),
            o._trigger("dragStop", t, s(e)));
        },
      });
    },
    _makeResizable: function () {
      var o = this,
        r = this.options,
        t = r.resizable,
        e = this.uiDialog.css("position"),
        t = "string" == typeof t ? t : "n,e,s,w,se,sw,ne,nw";
      function s(t) {
        return {
          originalPosition: t.originalPosition,
          originalSize: t.originalSize,
          position: t.position,
          size: t.size,
        };
      }
      this.uiDialog
        .resizable({
          cancel: ".ui-dialog-content",
          containment: "document",
          alsoResize: this.element,
          maxWidth: r.maxWidth,
          maxHeight: r.maxHeight,
          minWidth: r.minWidth,
          minHeight: this._minHeight(),
          handles: t,
          start: function (t, e) {
            (o._addClass(Q(this), "ui-dialog-resizing"),
              o._blockFrames(),
              o._trigger("resizeStart", t, s(e)));
          },
          resize: function (t, e) {
            o._trigger("resize", t, s(e));
          },
          stop: function (t, e) {
            var i = o.uiDialog.offset(),
              n = i.left - o.document.scrollLeft(),
              i = i.top - o.document.scrollTop();
            ((r.height = o.uiDialog.height()),
              (r.width = o.uiDialog.width()),
              (r.position = {
                my: "left top",
                at:
                  "left" +
                  (0 <= n ? "+" : "") +
                  n +
                  " top" +
                  (0 <= i ? "+" : "") +
                  i,
                of: o.window,
              }),
              o._removeClass(Q(this), "ui-dialog-resizing"),
              o._unblockFrames(),
              o._trigger("resizeStop", t, s(e)));
          },
        })
        .css("position", e);
    },
    _trackFocus: function () {
      this._on(this.widget(), {
        focusin: function (t) {
          (this._makeFocusTarget(), (this._focusedElement = Q(t.target)));
        },
      });
    },
    _makeFocusTarget: function () {
      (this._untrackInstance(), this._trackingInstances().unshift(this));
    },
    _untrackInstance: function () {
      var t = this._trackingInstances(),
        e = Q.inArray(this, t);
      -1 !== e && t.splice(e, 1);
    },
    _trackingInstances: function () {
      var t = this.document.data("ui-dialog-instances");
      return (t || this.document.data("ui-dialog-instances", (t = [])), t);
    },
    _minHeight: function () {
      var t = this.options;
      return "auto" === t.height
        ? t.minHeight
        : Math.min(t.minHeight, t.height);
    },
    _position: function () {
      var t = this.uiDialog.is(":visible");
      (t || this.uiDialog.show(),
        this.uiDialog.position(this.options.position),
        t || this.uiDialog.hide());
    },
    _setOptions: function (t) {
      var i = this,
        n = !1,
        o = {};
      (Q.each(t, function (t, e) {
        (i._setOption(t, e),
          t in i.sizeRelatedOptions && (n = !0),
          t in i.resizableRelatedOptions && (o[t] = e));
      }),
        n && (this._size(), this._position()),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", o));
    },
    _setOption: function (t, e) {
      var i,
        n = this.uiDialog;
      "disabled" !== t &&
        (this._super(t, e),
        "appendTo" === t && this.uiDialog.appendTo(this._appendTo()),
        "buttons" === t && this._createButtons(),
        "closeText" === t &&
          this.uiDialogTitlebarClose.button({
            label: Q("<a>")
              .text("" + this.options.closeText)
              .html(),
          }),
        "draggable" === t &&
          ((i = n.is(":data(ui-draggable)")) && !e && n.draggable("destroy"),
          !i && e && this._makeDraggable()),
        "position" === t && this._position(),
        "resizable" === t &&
          ((i = n.is(":data(ui-resizable)")) && !e && n.resizable("destroy"),
          i && "string" == typeof e && n.resizable("option", "handles", e),
          i || !1 === e || this._makeResizable()),
        "title" === t &&
          this._title(this.uiDialogTitlebar.find(".ui-dialog-title")));
    },
    _size: function () {
      var t,
        e,
        i,
        n = this.options;
      (this.element
        .show()
        .css({ width: "auto", minHeight: 0, maxHeight: "none", height: 0 }),
        n.minWidth > n.width && (n.width = n.minWidth),
        (t = this.uiDialog
          .css({ height: "auto", width: n.width })
          .outerHeight()),
        (e = Math.max(0, n.minHeight - t)),
        (i =
          "number" == typeof n.maxHeight
            ? Math.max(0, n.maxHeight - t)
            : "none"),
        "auto" === n.height
          ? this.element.css({ minHeight: e, maxHeight: i, height: "auto" })
          : this.element.height(Math.max(0, n.height - t)),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", "minHeight", this._minHeight()));
    },
    _blockFrames: function () {
      this.iframeBlocks = this.document.find("iframe").map(function () {
        var t = Q(this);
        return Q("<div>")
          .css({
            position: "absolute",
            width: t.outerWidth(),
            height: t.outerHeight(),
          })
          .appendTo(t.parent())
          .offset(t.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _allowInteraction: function (t) {
      return (
        !!Q(t.target).closest(".ui-dialog").length ||
        !!Q(t.target).closest(".ui-datepicker").length
      );
    },
    _createOverlay: function () {
      var i, n;
      this.options.modal &&
        ((i = Q.fn.jquery.substring(0, 4)),
        (n = !0),
        this._delay(function () {
          n = !1;
        }),
        this.document.data("ui-dialog-overlays") ||
          this.document.on(
            "focusin.ui-dialog",
            function (t) {
              var e;
              n ||
                (e = this._trackingInstances()[0])._allowInteraction(t) ||
                (t.preventDefault(),
                e._focusTabbable(),
                ("3.4." !== i && "3.5." !== i) ||
                  e._delay(e._restoreTabbableFocus));
            }.bind(this),
          ),
        (this.overlay = Q("<div>").appendTo(this._appendTo())),
        this._addClass(this.overlay, null, "ui-widget-overlay ui-front"),
        this._on(this.overlay, { mousedown: "_keepFocus" }),
        this.document.data(
          "ui-dialog-overlays",
          (this.document.data("ui-dialog-overlays") || 0) + 1,
        ));
    },
    _destroyOverlay: function () {
      var t;
      this.options.modal &&
        this.overlay &&
        ((t = this.document.data("ui-dialog-overlays") - 1)
          ? this.document.data("ui-dialog-overlays", t)
          : (this.document.off("focusin.ui-dialog"),
            this.document.removeData("ui-dialog-overlays")),
        this.overlay.remove(),
        (this.overlay = null));
    },
  }),
    !1 !== Q.uiBackCompat &&
      Q.widget("ui.dialog", Q.ui.dialog, {
        options: { dialogClass: "" },
        _createWrapper: function () {
          (this._super(), this.uiDialog.addClass(this.options.dialogClass));
        },
        _setOption: function (t, e) {
          ("dialogClass" === t &&
            this.uiDialog.removeClass(this.options.dialogClass).addClass(e),
            this._superApply(arguments));
        },
      }));
  Q.ui.dialog;
  function lt(t, e, i) {
    return e <= t && t < e + i;
  }
  (Q.widget("ui.droppable", {
    version: "1.13.0",
    widgetEventPrefix: "drop",
    options: {
      accept: "*",
      addClasses: !0,
      greedy: !1,
      scope: "default",
      tolerance: "intersect",
      activate: null,
      deactivate: null,
      drop: null,
      out: null,
      over: null,
    },
    _create: function () {
      var t,
        e = this.options,
        i = e.accept;
      ((this.isover = !1),
        (this.isout = !0),
        (this.accept =
          "function" == typeof i
            ? i
            : function (t) {
                return t.is(i);
              }),
        (this.proportions = function () {
          if (!arguments.length)
            return (t = t || {
              width: this.element[0].offsetWidth,
              height: this.element[0].offsetHeight,
            });
          t = arguments[0];
        }),
        this._addToManager(e.scope),
        e.addClasses && this._addClass("ui-droppable"));
    },
    _addToManager: function (t) {
      ((Q.ui.ddmanager.droppables[t] = Q.ui.ddmanager.droppables[t] || []),
        Q.ui.ddmanager.droppables[t].push(this));
    },
    _splice: function (t) {
      for (var e = 0; e < t.length; e++) t[e] === this && t.splice(e, 1);
    },
    _destroy: function () {
      var t = Q.ui.ddmanager.droppables[this.options.scope];
      this._splice(t);
    },
    _setOption: function (t, e) {
      var i;
      ("accept" === t
        ? (this.accept =
            "function" == typeof e
              ? e
              : function (t) {
                  return t.is(e);
                })
        : "scope" === t &&
          ((i = Q.ui.ddmanager.droppables[this.options.scope]),
          this._splice(i),
          this._addToManager(e)),
        this._super(t, e));
    },
    _activate: function (t) {
      var e = Q.ui.ddmanager.current;
      (this._addActiveClass(), e && this._trigger("activate", t, this.ui(e)));
    },
    _deactivate: function (t) {
      var e = Q.ui.ddmanager.current;
      (this._removeActiveClass(),
        e && this._trigger("deactivate", t, this.ui(e)));
    },
    _over: function (t) {
      var e = Q.ui.ddmanager.current;
      e &&
        (e.currentItem || e.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], e.currentItem || e.element) &&
        (this._addHoverClass(), this._trigger("over", t, this.ui(e)));
    },
    _out: function (t) {
      var e = Q.ui.ddmanager.current;
      e &&
        (e.currentItem || e.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], e.currentItem || e.element) &&
        (this._removeHoverClass(), this._trigger("out", t, this.ui(e)));
    },
    _drop: function (e, t) {
      var i = t || Q.ui.ddmanager.current,
        n = !1;
      return (
        !(!i || (i.currentItem || i.element)[0] === this.element[0]) &&
        (this.element
          .find(":data(ui-droppable)")
          .not(".ui-draggable-dragging")
          .each(function () {
            var t = Q(this).droppable("instance");
            if (
              t.options.greedy &&
              !t.options.disabled &&
              t.options.scope === i.options.scope &&
              t.accept.call(t.element[0], i.currentItem || i.element) &&
              Q.ui.intersect(
                i,
                Q.extend(t, { offset: t.element.offset() }),
                t.options.tolerance,
                e,
              )
            )
              return !(n = !0);
          }),
        !n &&
          !!this.accept.call(this.element[0], i.currentItem || i.element) &&
          (this._removeActiveClass(),
          this._removeHoverClass(),
          this._trigger("drop", e, this.ui(i)),
          this.element))
      );
    },
    ui: function (t) {
      return {
        draggable: t.currentItem || t.element,
        helper: t.helper,
        position: t.position,
        offset: t.positionAbs,
      };
    },
    _addHoverClass: function () {
      this._addClass("ui-droppable-hover");
    },
    _removeHoverClass: function () {
      this._removeClass("ui-droppable-hover");
    },
    _addActiveClass: function () {
      this._addClass("ui-droppable-active");
    },
    _removeActiveClass: function () {
      this._removeClass("ui-droppable-active");
    },
  }),
    (Q.ui.intersect = function (t, e, i, n) {
      if (!e.offset) return !1;
      var o = (t.positionAbs || t.position.absolute).left + t.margins.left,
        r = (t.positionAbs || t.position.absolute).top + t.margins.top,
        s = o + t.helperProportions.width,
        a = r + t.helperProportions.height,
        l = e.offset.left,
        c = e.offset.top,
        u = l + e.proportions().width,
        h = c + e.proportions().height;
      switch (i) {
        case "fit":
          return l <= o && s <= u && c <= r && a <= h;
        case "intersect":
          return (
            l < o + t.helperProportions.width / 2 &&
            s - t.helperProportions.width / 2 < u &&
            c < r + t.helperProportions.height / 2 &&
            a - t.helperProportions.height / 2 < h
          );
        case "pointer":
          return (
            lt(n.pageY, c, e.proportions().height) &&
            lt(n.pageX, l, e.proportions().width)
          );
        case "touch":
          return (
            ((c <= r && r <= h) || (c <= a && a <= h) || (r < c && h < a)) &&
            ((l <= o && o <= u) || (l <= s && s <= u) || (o < l && u < s))
          );
        default:
          return !1;
      }
    }),
    !(Q.ui.ddmanager = {
      current: null,
      droppables: { default: [] },
      prepareOffsets: function (t, e) {
        var i,
          n,
          o = Q.ui.ddmanager.droppables[t.options.scope] || [],
          r = e ? e.type : null,
          s = (t.currentItem || t.element)
            .find(":data(ui-droppable)")
            .addBack();
        t: for (i = 0; i < o.length; i++)
          if (
            !(
              o[i].options.disabled ||
              (t &&
                !o[i].accept.call(o[i].element[0], t.currentItem || t.element))
            )
          ) {
            for (n = 0; n < s.length; n++)
              if (s[n] === o[i].element[0]) {
                o[i].proportions().height = 0;
                continue t;
              }
            ((o[i].visible = "none" !== o[i].element.css("display")),
              o[i].visible &&
                ("mousedown" === r && o[i]._activate.call(o[i], e),
                (o[i].offset = o[i].element.offset()),
                o[i].proportions({
                  width: o[i].element[0].offsetWidth,
                  height: o[i].element[0].offsetHeight,
                })));
          }
      },
      drop: function (t, e) {
        var i = !1;
        return (
          Q.each(
            (Q.ui.ddmanager.droppables[t.options.scope] || []).slice(),
            function () {
              this.options &&
                (!this.options.disabled &&
                  this.visible &&
                  Q.ui.intersect(t, this, this.options.tolerance, e) &&
                  (i = this._drop.call(this, e) || i),
                !this.options.disabled &&
                  this.visible &&
                  this.accept.call(
                    this.element[0],
                    t.currentItem || t.element,
                  ) &&
                  ((this.isout = !0),
                  (this.isover = !1),
                  this._deactivate.call(this, e)));
            },
          ),
          i
        );
      },
      dragStart: function (t, e) {
        t.element.parentsUntil("body").on("scroll.droppable", function () {
          t.options.refreshPositions || Q.ui.ddmanager.prepareOffsets(t, e);
        });
      },
      drag: function (o, r) {
        (o.options.refreshPositions && Q.ui.ddmanager.prepareOffsets(o, r),
          Q.each(Q.ui.ddmanager.droppables[o.options.scope] || [], function () {
            var t, e, i, n;
            this.options.disabled ||
              this.greedyChild ||
              !this.visible ||
              ((n =
                !(i = Q.ui.intersect(o, this, this.options.tolerance, r)) &&
                this.isover
                  ? "isout"
                  : i && !this.isover
                    ? "isover"
                    : null) &&
                (this.options.greedy &&
                  ((e = this.options.scope),
                  (i = this.element
                    .parents(":data(ui-droppable)")
                    .filter(function () {
                      return Q(this).droppable("instance").options.scope === e;
                    })).length &&
                    ((t = Q(i[0]).droppable("instance")).greedyChild =
                      "isover" === n)),
                t &&
                  "isover" === n &&
                  ((t.isover = !1), (t.isout = !0), t._out.call(t, r)),
                (this[n] = !0),
                (this["isout" === n ? "isover" : "isout"] = !1),
                this["isover" === n ? "_over" : "_out"].call(this, r),
                t &&
                  "isout" === n &&
                  ((t.isout = !1), (t.isover = !0), t._over.call(t, r))));
          }));
      },
      dragStop: function (t, e) {
        (t.element.parentsUntil("body").off("scroll.droppable"),
          t.options.refreshPositions || Q.ui.ddmanager.prepareOffsets(t, e));
      },
    }) !== Q.uiBackCompat &&
      Q.widget("ui.droppable", Q.ui.droppable, {
        options: { hoverClass: !1, activeClass: !1 },
        _addActiveClass: function () {
          (this._super(),
            this.options.activeClass &&
              this.element.addClass(this.options.activeClass));
        },
        _removeActiveClass: function () {
          (this._super(),
            this.options.activeClass &&
              this.element.removeClass(this.options.activeClass));
        },
        _addHoverClass: function () {
          (this._super(),
            this.options.hoverClass &&
              this.element.addClass(this.options.hoverClass));
        },
        _removeHoverClass: function () {
          (this._super(),
            this.options.hoverClass &&
              this.element.removeClass(this.options.hoverClass));
        },
      }));
  (Q.ui.droppable,
    Q.widget("ui.progressbar", {
      version: "1.13.0",
      options: {
        classes: {
          "ui-progressbar": "ui-corner-all",
          "ui-progressbar-value": "ui-corner-left",
          "ui-progressbar-complete": "ui-corner-right",
        },
        max: 100,
        value: 0,
        change: null,
        complete: null,
      },
      min: 0,
      _create: function () {
        ((this.oldValue = this.options.value = this._constrainedValue()),
          this.element.attr({ role: "progressbar", "aria-valuemin": this.min }),
          this._addClass("ui-progressbar", "ui-widget ui-widget-content"),
          (this.valueDiv = Q("<div>").appendTo(this.element)),
          this._addClass(
            this.valueDiv,
            "ui-progressbar-value",
            "ui-widget-header",
          ),
          this._refreshValue());
      },
      _destroy: function () {
        (this.element.removeAttr(
          "role aria-valuemin aria-valuemax aria-valuenow",
        ),
          this.valueDiv.remove());
      },
      value: function (t) {
        if (void 0 === t) return this.options.value;
        ((this.options.value = this._constrainedValue(t)),
          this._refreshValue());
      },
      _constrainedValue: function (t) {
        return (
          void 0 === t && (t = this.options.value),
          (this.indeterminate = !1 === t),
          "number" != typeof t && (t = 0),
          !this.indeterminate &&
            Math.min(this.options.max, Math.max(this.min, t))
        );
      },
      _setOptions: function (t) {
        var e = t.value;
        (delete t.value,
          this._super(t),
          (this.options.value = this._constrainedValue(e)),
          this._refreshValue());
      },
      _setOption: function (t, e) {
        ("max" === t && (e = Math.max(this.min, e)), this._super(t, e));
      },
      _setOptionDisabled: function (t) {
        (this._super(t),
          this.element.attr("aria-disabled", t),
          this._toggleClass(null, "ui-state-disabled", !!t));
      },
      _percentage: function () {
        return this.indeterminate
          ? 100
          : (100 * (this.options.value - this.min)) /
              (this.options.max - this.min);
      },
      _refreshValue: function () {
        var t = this.options.value,
          e = this._percentage();
        (this.valueDiv
          .toggle(this.indeterminate || t > this.min)
          .width(e.toFixed(0) + "%"),
          this._toggleClass(
            this.valueDiv,
            "ui-progressbar-complete",
            null,
            t === this.options.max,
          )._toggleClass(
            "ui-progressbar-indeterminate",
            null,
            this.indeterminate,
          ),
          this.indeterminate
            ? (this.element.removeAttr("aria-valuenow"),
              this.overlayDiv ||
                ((this.overlayDiv = Q("<div>").appendTo(this.valueDiv)),
                this._addClass(this.overlayDiv, "ui-progressbar-overlay")))
            : (this.element.attr({
                "aria-valuemax": this.options.max,
                "aria-valuenow": t,
              }),
              this.overlayDiv &&
                (this.overlayDiv.remove(), (this.overlayDiv = null))),
          this.oldValue !== t && ((this.oldValue = t), this._trigger("change")),
          t === this.options.max && this._trigger("complete"));
      },
    }),
    Q.widget("ui.selectable", Q.ui.mouse, {
      version: "1.13.0",
      options: {
        appendTo: "body",
        autoRefresh: !0,
        distance: 0,
        filter: "*",
        tolerance: "touch",
        selected: null,
        selecting: null,
        start: null,
        stop: null,
        unselected: null,
        unselecting: null,
      },
      _create: function () {
        var i = this;
        (this._addClass("ui-selectable"),
          (this.dragged = !1),
          (this.refresh = function () {
            ((i.elementPos = Q(i.element[0]).offset()),
              (i.selectees = Q(i.options.filter, i.element[0])),
              i._addClass(i.selectees, "ui-selectee"),
              i.selectees.each(function () {
                var t = Q(this),
                  e = t.offset(),
                  e = {
                    left: e.left - i.elementPos.left,
                    top: e.top - i.elementPos.top,
                  };
                Q.data(this, "selectable-item", {
                  element: this,
                  $element: t,
                  left: e.left,
                  top: e.top,
                  right: e.left + t.outerWidth(),
                  bottom: e.top + t.outerHeight(),
                  startselected: !1,
                  selected: t.hasClass("ui-selected"),
                  selecting: t.hasClass("ui-selecting"),
                  unselecting: t.hasClass("ui-unselecting"),
                });
              }));
          }),
          this.refresh(),
          this._mouseInit(),
          (this.helper = Q("<div>")),
          this._addClass(this.helper, "ui-selectable-helper"));
      },
      _destroy: function () {
        (this.selectees.removeData("selectable-item"), this._mouseDestroy());
      },
      _mouseStart: function (i) {
        var n = this,
          t = this.options;
        ((this.opos = [i.pageX, i.pageY]),
          (this.elementPos = Q(this.element[0]).offset()),
          this.options.disabled ||
            ((this.selectees = Q(t.filter, this.element[0])),
            this._trigger("start", i),
            Q(t.appendTo).append(this.helper),
            this.helper.css({
              left: i.pageX,
              top: i.pageY,
              width: 0,
              height: 0,
            }),
            t.autoRefresh && this.refresh(),
            this.selectees.filter(".ui-selected").each(function () {
              var t = Q.data(this, "selectable-item");
              ((t.startselected = !0),
                i.metaKey ||
                  i.ctrlKey ||
                  (n._removeClass(t.$element, "ui-selected"),
                  (t.selected = !1),
                  n._addClass(t.$element, "ui-unselecting"),
                  (t.unselecting = !0),
                  n._trigger("unselecting", i, { unselecting: t.element })));
            }),
            Q(i.target)
              .parents()
              .addBack()
              .each(function () {
                var t,
                  e = Q.data(this, "selectable-item");
                if (e)
                  return (
                    (t =
                      (!i.metaKey && !i.ctrlKey) ||
                      !e.$element.hasClass("ui-selected")),
                    n
                      ._removeClass(
                        e.$element,
                        t ? "ui-unselecting" : "ui-selected",
                      )
                      ._addClass(
                        e.$element,
                        t ? "ui-selecting" : "ui-unselecting",
                      ),
                    (e.unselecting = !t),
                    (e.selecting = t),
                    (e.selected = t)
                      ? n._trigger("selecting", i, { selecting: e.element })
                      : n._trigger("unselecting", i, {
                          unselecting: e.element,
                        }),
                    !1
                  );
              })));
      },
      _mouseDrag: function (n) {
        if (((this.dragged = !0), !this.options.disabled)) {
          var t,
            o = this,
            r = this.options,
            s = this.opos[0],
            a = this.opos[1],
            l = n.pageX,
            c = n.pageY;
          return (
            l < s && ((t = l), (l = s), (s = t)),
            c < a && ((t = c), (c = a), (a = t)),
            this.helper.css({ left: s, top: a, width: l - s, height: c - a }),
            this.selectees.each(function () {
              var t = Q.data(this, "selectable-item"),
                e = !1,
                i = {};
              t &&
                t.element !== o.element[0] &&
                ((i.left = t.left + o.elementPos.left),
                (i.right = t.right + o.elementPos.left),
                (i.top = t.top + o.elementPos.top),
                (i.bottom = t.bottom + o.elementPos.top),
                "touch" === r.tolerance
                  ? (e = !(
                      i.left > l ||
                      i.right < s ||
                      i.top > c ||
                      i.bottom < a
                    ))
                  : "fit" === r.tolerance &&
                    (e =
                      i.left > s && i.right < l && i.top > a && i.bottom < c),
                e
                  ? (t.selected &&
                      (o._removeClass(t.$element, "ui-selected"),
                      (t.selected = !1)),
                    t.unselecting &&
                      (o._removeClass(t.$element, "ui-unselecting"),
                      (t.unselecting = !1)),
                    t.selecting ||
                      (o._addClass(t.$element, "ui-selecting"),
                      (t.selecting = !0),
                      o._trigger("selecting", n, { selecting: t.element })))
                  : (t.selecting &&
                      ((n.metaKey || n.ctrlKey) && t.startselected
                        ? (o._removeClass(t.$element, "ui-selecting"),
                          (t.selecting = !1),
                          o._addClass(t.$element, "ui-selected"),
                          (t.selected = !0))
                        : (o._removeClass(t.$element, "ui-selecting"),
                          (t.selecting = !1),
                          t.startselected &&
                            (o._addClass(t.$element, "ui-unselecting"),
                            (t.unselecting = !0)),
                          o._trigger("unselecting", n, {
                            unselecting: t.element,
                          }))),
                    t.selected &&
                      (n.metaKey ||
                        n.ctrlKey ||
                        t.startselected ||
                        (o._removeClass(t.$element, "ui-selected"),
                        (t.selected = !1),
                        o._addClass(t.$element, "ui-unselecting"),
                        (t.unselecting = !0),
                        o._trigger("unselecting", n, {
                          unselecting: t.element,
                        })))));
            }),
            !1
          );
        }
      },
      _mouseStop: function (e) {
        var i = this;
        return (
          (this.dragged = !1),
          Q(".ui-unselecting", this.element[0]).each(function () {
            var t = Q.data(this, "selectable-item");
            (i._removeClass(t.$element, "ui-unselecting"),
              (t.unselecting = !1),
              (t.startselected = !1),
              i._trigger("unselected", e, { unselected: t.element }));
          }),
          Q(".ui-selecting", this.element[0]).each(function () {
            var t = Q.data(this, "selectable-item");
            (i
              ._removeClass(t.$element, "ui-selecting")
              ._addClass(t.$element, "ui-selected"),
              (t.selecting = !1),
              (t.selected = !0),
              (t.startselected = !0),
              i._trigger("selected", e, { selected: t.element }));
          }),
          this._trigger("stop", e),
          this.helper.remove(),
          !1
        );
      },
    }),
    Q.widget("ui.selectmenu", [
      Q.ui.formResetMixin,
      {
        version: "1.13.0",
        defaultElement: "<select>",
        options: {
          appendTo: null,
          classes: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
          disabled: null,
          icons: { button: "ui-icon-triangle-1-s" },
          position: { my: "left top", at: "left bottom", collision: "none" },
          width: !1,
          change: null,
          close: null,
          focus: null,
          open: null,
          select: null,
        },
        _create: function () {
          var t = this.element.uniqueId().attr("id");
          ((this.ids = {
            element: t,
            button: t + "-button",
            menu: t + "-menu",
          }),
            this._drawButton(),
            this._drawMenu(),
            this._bindFormResetHandler(),
            (this._rendered = !1),
            (this.menuItems = Q()));
        },
        _drawButton: function () {
          var t,
            e = this,
            i = this._parseOption(
              this.element.find("option:selected"),
              this.element[0].selectedIndex,
            );
          ((this.labels = this.element.labels().attr("for", this.ids.button)),
            this._on(this.labels, {
              click: function (t) {
                (this.button.trigger("focus"), t.preventDefault());
              },
            }),
            this.element.hide(),
            (this.button = Q("<span>", {
              tabindex: this.options.disabled ? -1 : 0,
              id: this.ids.button,
              role: "combobox",
              "aria-expanded": "false",
              "aria-autocomplete": "list",
              "aria-owns": this.ids.menu,
              "aria-haspopup": "true",
              title: this.element.attr("title"),
            }).insertAfter(this.element)),
            this._addClass(
              this.button,
              "ui-selectmenu-button ui-selectmenu-button-closed",
              "ui-button ui-widget",
            ),
            (t = Q("<span>").appendTo(this.button)),
            this._addClass(
              t,
              "ui-selectmenu-icon",
              "ui-icon " + this.options.icons.button,
            ),
            (this.buttonItem = this._renderButtonItem(i).appendTo(this.button)),
            !1 !== this.options.width && this._resizeButton(),
            this._on(this.button, this._buttonEvents),
            this.button.one("focusin", function () {
              e._rendered || e._refreshMenu();
            }));
        },
        _drawMenu: function () {
          var i = this;
          ((this.menu = Q("<ul>", {
            "aria-hidden": "true",
            "aria-labelledby": this.ids.button,
            id: this.ids.menu,
          })),
            (this.menuWrap = Q("<div>").append(this.menu)),
            this._addClass(this.menuWrap, "ui-selectmenu-menu", "ui-front"),
            this.menuWrap.appendTo(this._appendTo()),
            (this.menuInstance = this.menu
              .menu({
                classes: { "ui-menu": "ui-corner-bottom" },
                role: "listbox",
                select: function (t, e) {
                  (t.preventDefault(),
                    i._setSelection(),
                    i._select(e.item.data("ui-selectmenu-item"), t));
                },
                focus: function (t, e) {
                  e = e.item.data("ui-selectmenu-item");
                  (null != i.focusIndex &&
                    e.index !== i.focusIndex &&
                    (i._trigger("focus", t, { item: e }),
                    i.isOpen || i._select(e, t)),
                    (i.focusIndex = e.index),
                    i.button.attr(
                      "aria-activedescendant",
                      i.menuItems.eq(e.index).attr("id"),
                    ));
                },
              })
              .menu("instance")),
            this.menuInstance._off(this.menu, "mouseleave"),
            (this.menuInstance._closeOnDocumentClick = function () {
              return !1;
            }),
            (this.menuInstance._isDivider = function () {
              return !1;
            }));
        },
        refresh: function () {
          (this._refreshMenu(),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(
                this._getSelectedItem().data("ui-selectmenu-item") || {},
              )),
            ),
            null === this.options.width && this._resizeButton());
        },
        _refreshMenu: function () {
          var t = this.element.find("option");
          (this.menu.empty(),
            this._parseOptions(t),
            this._renderMenu(this.menu, this.items),
            this.menuInstance.refresh(),
            (this.menuItems = this.menu
              .find("li")
              .not(".ui-selectmenu-optgroup")
              .find(".ui-menu-item-wrapper")),
            (this._rendered = !0),
            t.length &&
              ((t = this._getSelectedItem()),
              this.menuInstance.focus(null, t),
              this._setAria(t.data("ui-selectmenu-item")),
              this._setOption("disabled", this.element.prop("disabled"))));
        },
        open: function (t) {
          this.options.disabled ||
            (this._rendered
              ? (this._removeClass(
                  this.menu.find(".ui-state-active"),
                  null,
                  "ui-state-active",
                ),
                this.menuInstance.focus(null, this._getSelectedItem()))
              : this._refreshMenu(),
            this.menuItems.length &&
              ((this.isOpen = !0),
              this._toggleAttr(),
              this._resizeMenu(),
              this._position(),
              this._on(this.document, this._documentClick),
              this._trigger("open", t)));
        },
        _position: function () {
          this.menuWrap.position(
            Q.extend({ of: this.button }, this.options.position),
          );
        },
        close: function (t) {
          this.isOpen &&
            ((this.isOpen = !1),
            this._toggleAttr(),
            (this.range = null),
            this._off(this.document),
            this._trigger("close", t));
        },
        widget: function () {
          return this.button;
        },
        menuWidget: function () {
          return this.menu;
        },
        _renderButtonItem: function (t) {
          var e = Q("<span>");
          return (
            this._setText(e, t.label),
            this._addClass(e, "ui-selectmenu-text"),
            e
          );
        },
        _renderMenu: function (n, t) {
          var o = this,
            r = "";
          Q.each(t, function (t, e) {
            var i;
            (e.optgroup !== r &&
              ((i = Q("<li>", { text: e.optgroup })),
              o._addClass(
                i,
                "ui-selectmenu-optgroup",
                "ui-menu-divider" +
                  (e.element.parent("optgroup").prop("disabled")
                    ? " ui-state-disabled"
                    : ""),
              ),
              i.appendTo(n),
              (r = e.optgroup)),
              o._renderItemData(n, e));
          });
        },
        _renderItemData: function (t, e) {
          return this._renderItem(t, e).data("ui-selectmenu-item", e);
        },
        _renderItem: function (t, e) {
          var i = Q("<li>"),
            n = Q("<div>", { title: e.element.attr("title") });
          return (
            e.disabled && this._addClass(i, null, "ui-state-disabled"),
            this._setText(n, e.label),
            i.append(n).appendTo(t)
          );
        },
        _setText: function (t, e) {
          e ? t.text(e) : t.html("&#160;");
        },
        _move: function (t, e) {
          var i,
            n = ".ui-menu-item";
          (this.isOpen
            ? (i = this.menuItems.eq(this.focusIndex).parent("li"))
            : ((i = this.menuItems
                .eq(this.element[0].selectedIndex)
                .parent("li")),
              (n += ":not(.ui-state-disabled)")),
            (n =
              "first" === t || "last" === t
                ? i["first" === t ? "prevAll" : "nextAll"](n).eq(-1)
                : i[t + "All"](n).eq(0)).length &&
              this.menuInstance.focus(e, n));
        },
        _getSelectedItem: function () {
          return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
        },
        _toggle: function (t) {
          this[this.isOpen ? "close" : "open"](t);
        },
        _setSelection: function () {
          var t;
          this.range &&
            (window.getSelection
              ? ((t = window.getSelection()).removeAllRanges(),
                t.addRange(this.range))
              : this.range.select(),
            this.button.focus());
        },
        _documentClick: {
          mousedown: function (t) {
            this.isOpen &&
              (Q(t.target).closest(
                ".ui-selectmenu-menu, #" + Q.escapeSelector(this.ids.button),
              ).length ||
                this.close(t));
          },
        },
        _buttonEvents: {
          mousedown: function () {
            var t;
            window.getSelection
              ? (t = window.getSelection()).rangeCount &&
                (this.range = t.getRangeAt(0))
              : (this.range = document.selection.createRange());
          },
          click: function (t) {
            (this._setSelection(), this._toggle(t));
          },
          keydown: function (t) {
            var e = !0;
            switch (t.keyCode) {
              case Q.ui.keyCode.TAB:
              case Q.ui.keyCode.ESCAPE:
                (this.close(t), (e = !1));
                break;
              case Q.ui.keyCode.ENTER:
                this.isOpen && this._selectFocusedItem(t);
                break;
              case Q.ui.keyCode.UP:
                t.altKey ? this._toggle(t) : this._move("prev", t);
                break;
              case Q.ui.keyCode.DOWN:
                t.altKey ? this._toggle(t) : this._move("next", t);
                break;
              case Q.ui.keyCode.SPACE:
                this.isOpen ? this._selectFocusedItem(t) : this._toggle(t);
                break;
              case Q.ui.keyCode.LEFT:
                this._move("prev", t);
                break;
              case Q.ui.keyCode.RIGHT:
                this._move("next", t);
                break;
              case Q.ui.keyCode.HOME:
              case Q.ui.keyCode.PAGE_UP:
                this._move("first", t);
                break;
              case Q.ui.keyCode.END:
              case Q.ui.keyCode.PAGE_DOWN:
                this._move("last", t);
                break;
              default:
                (this.menu.trigger(t), (e = !1));
            }
            e && t.preventDefault();
          },
        },
        _selectFocusedItem: function (t) {
          var e = this.menuItems.eq(this.focusIndex).parent("li");
          e.hasClass("ui-state-disabled") ||
            this._select(e.data("ui-selectmenu-item"), t);
        },
        _select: function (t, e) {
          var i = this.element[0].selectedIndex;
          ((this.element[0].selectedIndex = t.index),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(t)),
            ),
            this._setAria(t),
            this._trigger("select", e, { item: t }),
            t.index !== i && this._trigger("change", e, { item: t }),
            this.close(e));
        },
        _setAria: function (t) {
          t = this.menuItems.eq(t.index).attr("id");
          (this.button.attr({
            "aria-labelledby": t,
            "aria-activedescendant": t,
          }),
            this.menu.attr("aria-activedescendant", t));
        },
        _setOption: function (t, e) {
          var i;
          ("icons" === t &&
            ((i = this.button.find("span.ui-icon")),
            this._removeClass(i, null, this.options.icons.button)._addClass(
              i,
              null,
              e.button,
            )),
            this._super(t, e),
            "appendTo" === t && this.menuWrap.appendTo(this._appendTo()),
            "width" === t && this._resizeButton());
        },
        _setOptionDisabled: function (t) {
          (this._super(t),
            this.menuInstance.option("disabled", t),
            this.button.attr("aria-disabled", t),
            this._toggleClass(this.button, null, "ui-state-disabled", t),
            this.element.prop("disabled", t),
            t
              ? (this.button.attr("tabindex", -1), this.close())
              : this.button.attr("tabindex", 0));
        },
        _appendTo: function () {
          var t = this.options.appendTo;
          return (t = !(t =
            !(t =
              t &&
              (t.jquery || t.nodeType ? Q(t) : this.document.find(t).eq(0))) ||
            !t[0]
              ? this.element.closest(".ui-front, dialog")
              : t).length
            ? this.document[0].body
            : t);
        },
        _toggleAttr: function () {
          (this.button.attr("aria-expanded", this.isOpen),
            this._removeClass(
              this.button,
              "ui-selectmenu-button-" + (this.isOpen ? "closed" : "open"),
            )
              ._addClass(
                this.button,
                "ui-selectmenu-button-" + (this.isOpen ? "open" : "closed"),
              )
              ._toggleClass(
                this.menuWrap,
                "ui-selectmenu-open",
                null,
                this.isOpen,
              ),
            this.menu.attr("aria-hidden", !this.isOpen));
        },
        _resizeButton: function () {
          var t = this.options.width;
          !1 !== t
            ? (null === t &&
                ((t = this.element.show().outerWidth()), this.element.hide()),
              this.button.outerWidth(t))
            : this.button.css("width", "");
        },
        _resizeMenu: function () {
          this.menu.outerWidth(
            Math.max(
              this.button.outerWidth(),
              this.menu.width("").outerWidth() + 1,
            ),
          );
        },
        _getCreateOptions: function () {
          var t = this._super();
          return ((t.disabled = this.element.prop("disabled")), t);
        },
        _parseOptions: function (t) {
          var i = this,
            n = [];
          (t.each(function (t, e) {
            e.hidden || n.push(i._parseOption(Q(e), t));
          }),
            (this.items = n));
        },
        _parseOption: function (t, e) {
          var i = t.parent("optgroup");
          return {
            element: t,
            index: e,
            value: t.val(),
            label: t.text(),
            optgroup: i.attr("label") || "",
            disabled: i.prop("disabled") || t.prop("disabled"),
          };
        },
        _destroy: function () {
          (this._unbindFormResetHandler(),
            this.menuWrap.remove(),
            this.button.remove(),
            this.element.show(),
            this.element.removeUniqueId(),
            this.labels.attr("for", this.ids.element));
        },
      },
    ]),
    Q.widget("ui.slider", Q.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "slide",
      options: {
        animate: !1,
        classes: {
          "ui-slider": "ui-corner-all",
          "ui-slider-handle": "ui-corner-all",
          "ui-slider-range": "ui-corner-all ui-widget-header",
        },
        distance: 0,
        max: 100,
        min: 0,
        orientation: "horizontal",
        range: !1,
        step: 1,
        value: 0,
        values: null,
        change: null,
        slide: null,
        start: null,
        stop: null,
      },
      numPages: 5,
      _create: function () {
        ((this._keySliding = !1),
          (this._mouseSliding = !1),
          (this._animateOff = !0),
          (this._handleIndex = null),
          this._detectOrientation(),
          this._mouseInit(),
          this._calculateNewMax(),
          this._addClass(
            "ui-slider ui-slider-" + this.orientation,
            "ui-widget ui-widget-content",
          ),
          this._refresh(),
          (this._animateOff = !1));
      },
      _refresh: function () {
        (this._createRange(),
          this._createHandles(),
          this._setupEvents(),
          this._refreshValue());
      },
      _createHandles: function () {
        var t,
          e = this.options,
          i = this.element.find(".ui-slider-handle"),
          n = [],
          o = (e.values && e.values.length) || 1;
        for (
          i.length > o && (i.slice(o).remove(), (i = i.slice(0, o))),
            t = i.length;
          t < o;
          t++
        )
          n.push("<span tabindex='0'></span>");
        ((this.handles = i.add(Q(n.join("")).appendTo(this.element))),
          this._addClass(this.handles, "ui-slider-handle", "ui-state-default"),
          (this.handle = this.handles.eq(0)),
          this.handles.each(function (t) {
            Q(this).data("ui-slider-handle-index", t).attr("tabIndex", 0);
          }));
      },
      _createRange: function () {
        var t = this.options;
        t.range
          ? (!0 === t.range &&
              (t.values
                ? t.values.length && 2 !== t.values.length
                  ? (t.values = [t.values[0], t.values[0]])
                  : Array.isArray(t.values) && (t.values = t.values.slice(0))
                : (t.values = [this._valueMin(), this._valueMin()])),
            this.range && this.range.length
              ? (this._removeClass(
                  this.range,
                  "ui-slider-range-min ui-slider-range-max",
                ),
                this.range.css({ left: "", bottom: "" }))
              : ((this.range = Q("<div>").appendTo(this.element)),
                this._addClass(this.range, "ui-slider-range")),
            ("min" !== t.range && "max" !== t.range) ||
              this._addClass(this.range, "ui-slider-range-" + t.range))
          : (this.range && this.range.remove(), (this.range = null));
      },
      _setupEvents: function () {
        (this._off(this.handles),
          this._on(this.handles, this._handleEvents),
          this._hoverable(this.handles),
          this._focusable(this.handles));
      },
      _destroy: function () {
        (this.handles.remove(),
          this.range && this.range.remove(),
          this._mouseDestroy());
      },
      _mouseCapture: function (t) {
        var i,
          n,
          o,
          r,
          e,
          s,
          a = this,
          l = this.options;
        return (
          !l.disabled &&
          ((this.elementSize = {
            width: this.element.outerWidth(),
            height: this.element.outerHeight(),
          }),
          (this.elementOffset = this.element.offset()),
          (s = { x: t.pageX, y: t.pageY }),
          (i = this._normValueFromMouse(s)),
          (n = this._valueMax() - this._valueMin() + 1),
          this.handles.each(function (t) {
            var e = Math.abs(i - a.values(t));
            (e < n ||
              (n === e &&
                (t === a._lastChangedValue || a.values(t) === l.min))) &&
              ((n = e), (o = Q(this)), (r = t));
          }),
          !1 !== this._start(t, r) &&
            ((this._mouseSliding = !0),
            (this._handleIndex = r),
            this._addClass(o, null, "ui-state-active"),
            o.trigger("focus"),
            (e = o.offset()),
            (s = !Q(t.target).parents().addBack().is(".ui-slider-handle")),
            (this._clickOffset = s
              ? { left: 0, top: 0 }
              : {
                  left: t.pageX - e.left - o.width() / 2,
                  top:
                    t.pageY -
                    e.top -
                    o.height() / 2 -
                    (parseInt(o.css("borderTopWidth"), 10) || 0) -
                    (parseInt(o.css("borderBottomWidth"), 10) || 0) +
                    (parseInt(o.css("marginTop"), 10) || 0),
                }),
            this.handles.hasClass("ui-state-hover") || this._slide(t, r, i),
            (this._animateOff = !0)))
        );
      },
      _mouseStart: function () {
        return !0;
      },
      _mouseDrag: function (t) {
        var e = { x: t.pageX, y: t.pageY },
          e = this._normValueFromMouse(e);
        return (this._slide(t, this._handleIndex, e), !1);
      },
      _mouseStop: function (t) {
        return (
          this._removeClass(this.handles, null, "ui-state-active"),
          (this._mouseSliding = !1),
          this._stop(t, this._handleIndex),
          this._change(t, this._handleIndex),
          (this._handleIndex = null),
          (this._clickOffset = null),
          (this._animateOff = !1)
        );
      },
      _detectOrientation: function () {
        this.orientation =
          "vertical" === this.options.orientation ? "vertical" : "horizontal";
      },
      _normValueFromMouse: function (t) {
        var e,
          t =
            "horizontal" === this.orientation
              ? ((e = this.elementSize.width),
                t.x -
                  this.elementOffset.left -
                  (this._clickOffset ? this._clickOffset.left : 0))
              : ((e = this.elementSize.height),
                t.y -
                  this.elementOffset.top -
                  (this._clickOffset ? this._clickOffset.top : 0)),
          t = t / e;
        return (
          (t = 1 < t ? 1 : t) < 0 && (t = 0),
          "vertical" === this.orientation && (t = 1 - t),
          (e = this._valueMax() - this._valueMin()),
          (e = this._valueMin() + t * e),
          this._trimAlignValue(e)
        );
      },
      _uiHash: function (t, e, i) {
        var n = {
          handle: this.handles[t],
          handleIndex: t,
          value: void 0 !== e ? e : this.value(),
        };
        return (
          this._hasMultipleValues() &&
            ((n.value = void 0 !== e ? e : this.values(t)),
            (n.values = i || this.values())),
          n
        );
      },
      _hasMultipleValues: function () {
        return this.options.values && this.options.values.length;
      },
      _start: function (t, e) {
        return this._trigger("start", t, this._uiHash(e));
      },
      _slide: function (t, e, i) {
        var n,
          o = this.value(),
          r = this.values();
        (this._hasMultipleValues() &&
          ((n = this.values(e ? 0 : 1)),
          (o = this.values(e)),
          2 === this.options.values.length &&
            !0 === this.options.range &&
            (i = 0 === e ? Math.min(n, i) : Math.max(n, i)),
          (r[e] = i)),
          i !== o &&
            !1 !== this._trigger("slide", t, this._uiHash(e, i, r)) &&
            (this._hasMultipleValues() ? this.values(e, i) : this.value(i)));
      },
      _stop: function (t, e) {
        this._trigger("stop", t, this._uiHash(e));
      },
      _change: function (t, e) {
        this._keySliding ||
          this._mouseSliding ||
          ((this._lastChangedValue = e),
          this._trigger("change", t, this._uiHash(e)));
      },
      value: function (t) {
        return arguments.length
          ? ((this.options.value = this._trimAlignValue(t)),
            this._refreshValue(),
            void this._change(null, 0))
          : this._value();
      },
      values: function (t, e) {
        var i, n, o;
        if (1 < arguments.length)
          return (
            (this.options.values[t] = this._trimAlignValue(e)),
            this._refreshValue(),
            void this._change(null, t)
          );
        if (!arguments.length) return this._values();
        if (!Array.isArray(t))
          return this._hasMultipleValues() ? this._values(t) : this.value();
        for (i = this.options.values, n = t, o = 0; o < i.length; o += 1)
          ((i[o] = this._trimAlignValue(n[o])), this._change(null, o));
        this._refreshValue();
      },
      _setOption: function (t, e) {
        var i,
          n = 0;
        switch (
          ("range" === t &&
            !0 === this.options.range &&
            ("min" === e
              ? ((this.options.value = this._values(0)),
                (this.options.values = null))
              : "max" === e &&
                ((this.options.value = this._values(
                  this.options.values.length - 1,
                )),
                (this.options.values = null))),
          Array.isArray(this.options.values) &&
            (n = this.options.values.length),
          this._super(t, e),
          t)
        ) {
          case "orientation":
            (this._detectOrientation(),
              this._removeClass(
                "ui-slider-horizontal ui-slider-vertical",
              )._addClass("ui-slider-" + this.orientation),
              this._refreshValue(),
              this.options.range && this._refreshRange(e),
              this.handles.css("horizontal" === e ? "bottom" : "left", ""));
            break;
          case "value":
            ((this._animateOff = !0),
              this._refreshValue(),
              this._change(null, 0),
              (this._animateOff = !1));
            break;
          case "values":
            for (
              this._animateOff = !0, this._refreshValue(), i = n - 1;
              0 <= i;
              i--
            )
              this._change(null, i);
            this._animateOff = !1;
            break;
          case "step":
          case "min":
          case "max":
            ((this._animateOff = !0),
              this._calculateNewMax(),
              this._refreshValue(),
              (this._animateOff = !1));
            break;
          case "range":
            ((this._animateOff = !0), this._refresh(), (this._animateOff = !1));
        }
      },
      _setOptionDisabled: function (t) {
        (this._super(t), this._toggleClass(null, "ui-state-disabled", !!t));
      },
      _value: function () {
        var t = this.options.value;
        return (t = this._trimAlignValue(t));
      },
      _values: function (t) {
        var e, i;
        if (arguments.length)
          return ((t = this.options.values[t]), this._trimAlignValue(t));
        if (this._hasMultipleValues()) {
          for (e = this.options.values.slice(), i = 0; i < e.length; i += 1)
            e[i] = this._trimAlignValue(e[i]);
          return e;
        }
        return [];
      },
      _trimAlignValue: function (t) {
        if (t <= this._valueMin()) return this._valueMin();
        if (t >= this._valueMax()) return this._valueMax();
        var e = 0 < this.options.step ? this.options.step : 1,
          i = (t - this._valueMin()) % e,
          t = t - i;
        return (
          2 * Math.abs(i) >= e && (t += 0 < i ? e : -e),
          parseFloat(t.toFixed(5))
        );
      },
      _calculateNewMax: function () {
        var t = this.options.max,
          e = this._valueMin(),
          i = this.options.step;
        ((t = Math.round((t - e) / i) * i + e) > this.options.max && (t -= i),
          (this.max = parseFloat(t.toFixed(this._precision()))));
      },
      _precision: function () {
        var t = this._precisionOf(this.options.step);
        return (t =
          null !== this.options.min
            ? Math.max(t, this._precisionOf(this.options.min))
            : t);
      },
      _precisionOf: function (t) {
        var e = t.toString(),
          t = e.indexOf(".");
        return -1 === t ? 0 : e.length - t - 1;
      },
      _valueMin: function () {
        return this.options.min;
      },
      _valueMax: function () {
        return this.max;
      },
      _refreshRange: function (t) {
        ("vertical" === t && this.range.css({ width: "", left: "" }),
          "horizontal" === t && this.range.css({ height: "", bottom: "" }));
      },
      _refreshValue: function () {
        var e,
          i,
          t,
          n,
          o,
          r = this.options.range,
          s = this.options,
          a = this,
          l = !this._animateOff && s.animate,
          c = {};
        this._hasMultipleValues()
          ? this.handles.each(function (t) {
              ((i =
                ((a.values(t) - a._valueMin()) /
                  (a._valueMax() - a._valueMin())) *
                100),
                (c["horizontal" === a.orientation ? "left" : "bottom"] =
                  i + "%"),
                Q(this).stop(1, 1)[l ? "animate" : "css"](c, s.animate),
                !0 === a.options.range &&
                  ("horizontal" === a.orientation
                    ? (0 === t &&
                        a.range
                          .stop(1, 1)
                          [l ? "animate" : "css"]({ left: i + "%" }, s.animate),
                      1 === t &&
                        a.range[l ? "animate" : "css"](
                          { width: i - e + "%" },
                          { queue: !1, duration: s.animate },
                        ))
                    : (0 === t &&
                        a.range
                          .stop(1, 1)
                          [
                            l ? "animate" : "css"
                          ]({ bottom: i + "%" }, s.animate),
                      1 === t &&
                        a.range[l ? "animate" : "css"](
                          { height: i - e + "%" },
                          { queue: !1, duration: s.animate },
                        ))),
                (e = i));
            })
          : ((t = this.value()),
            (n = this._valueMin()),
            (o = this._valueMax()),
            (i = o !== n ? ((t - n) / (o - n)) * 100 : 0),
            (c["horizontal" === this.orientation ? "left" : "bottom"] =
              i + "%"),
            this.handle.stop(1, 1)[l ? "animate" : "css"](c, s.animate),
            "min" === r &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: i + "%" }, s.animate),
            "max" === r &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: 100 - i + "%" }, s.animate),
            "min" === r &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: i + "%" }, s.animate),
            "max" === r &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: 100 - i + "%" }, s.animate));
      },
      _handleEvents: {
        keydown: function (t) {
          var e,
            i,
            n,
            o = Q(t.target).data("ui-slider-handle-index");
          switch (t.keyCode) {
            case Q.ui.keyCode.HOME:
            case Q.ui.keyCode.END:
            case Q.ui.keyCode.PAGE_UP:
            case Q.ui.keyCode.PAGE_DOWN:
            case Q.ui.keyCode.UP:
            case Q.ui.keyCode.RIGHT:
            case Q.ui.keyCode.DOWN:
            case Q.ui.keyCode.LEFT:
              if (
                (t.preventDefault(),
                !this._keySliding &&
                  ((this._keySliding = !0),
                  this._addClass(Q(t.target), null, "ui-state-active"),
                  !1 === this._start(t, o)))
              )
                return;
          }
          switch (
            ((n = this.options.step),
            (e = i = this._hasMultipleValues() ? this.values(o) : this.value()),
            t.keyCode)
          ) {
            case Q.ui.keyCode.HOME:
              i = this._valueMin();
              break;
            case Q.ui.keyCode.END:
              i = this._valueMax();
              break;
            case Q.ui.keyCode.PAGE_UP:
              i = this._trimAlignValue(
                e + (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Q.ui.keyCode.PAGE_DOWN:
              i = this._trimAlignValue(
                e - (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Q.ui.keyCode.UP:
            case Q.ui.keyCode.RIGHT:
              if (e === this._valueMax()) return;
              i = this._trimAlignValue(e + n);
              break;
            case Q.ui.keyCode.DOWN:
            case Q.ui.keyCode.LEFT:
              if (e === this._valueMin()) return;
              i = this._trimAlignValue(e - n);
          }
          this._slide(t, o, i);
        },
        keyup: function (t) {
          var e = Q(t.target).data("ui-slider-handle-index");
          this._keySliding &&
            ((this._keySliding = !1),
            this._stop(t, e),
            this._change(t, e),
            this._removeClass(Q(t.target), null, "ui-state-active"));
        },
      },
    }),
    Q.widget("ui.sortable", Q.ui.mouse, {
      version: "1.13.0",
      widgetEventPrefix: "sort",
      ready: !1,
      options: {
        appendTo: "parent",
        axis: !1,
        connectWith: !1,
        containment: !1,
        cursor: "auto",
        cursorAt: !1,
        dropOnEmpty: !0,
        forcePlaceholderSize: !1,
        forceHelperSize: !1,
        grid: !1,
        handle: !1,
        helper: "original",
        items: "> *",
        opacity: !1,
        placeholder: !1,
        revert: !1,
        scroll: !0,
        scrollSensitivity: 20,
        scrollSpeed: 20,
        scope: "default",
        tolerance: "intersect",
        zIndex: 1e3,
        activate: null,
        beforeStop: null,
        change: null,
        deactivate: null,
        out: null,
        over: null,
        receive: null,
        remove: null,
        sort: null,
        start: null,
        stop: null,
        update: null,
      },
      _isOverAxis: function (t, e, i) {
        return e <= t && t < e + i;
      },
      _isFloating: function (t) {
        return (
          /left|right/.test(t.css("float")) ||
          /inline|table-cell/.test(t.css("display"))
        );
      },
      _create: function () {
        ((this.containerCache = {}),
          this._addClass("ui-sortable"),
          this.refresh(),
          (this.offset = this.element.offset()),
          this._mouseInit(),
          this._setHandleClassName(),
          (this.ready = !0));
      },
      _setOption: function (t, e) {
        (this._super(t, e), "handle" === t && this._setHandleClassName());
      },
      _setHandleClassName: function () {
        var t = this;
        (this._removeClass(
          this.element.find(".ui-sortable-handle"),
          "ui-sortable-handle",
        ),
          Q.each(this.items, function () {
            t._addClass(
              this.instance.options.handle
                ? this.item.find(this.instance.options.handle)
                : this.item,
              "ui-sortable-handle",
            );
          }));
      },
      _destroy: function () {
        this._mouseDestroy();
        for (var t = this.items.length - 1; 0 <= t; t--)
          this.items[t].item.removeData(this.widgetName + "-item");
        return this;
      },
      _mouseCapture: function (t, e) {
        var i = null,
          n = !1,
          o = this;
        return (
          !this.reverting &&
          !this.options.disabled &&
          "static" !== this.options.type &&
          (this._refreshItems(t),
          Q(t.target)
            .parents()
            .each(function () {
              if (Q.data(this, o.widgetName + "-item") === o)
                return ((i = Q(this)), !1);
            }),
          !!(i =
            Q.data(t.target, o.widgetName + "-item") === o ? Q(t.target) : i) &&
            !(
              this.options.handle &&
              !e &&
              (Q(this.options.handle, i)
                .find("*")
                .addBack()
                .each(function () {
                  this === t.target && (n = !0);
                }),
              !n)
            ) &&
            ((this.currentItem = i), this._removeCurrentsFromItems(), !0))
        );
      },
      _mouseStart: function (t, e, i) {
        var n,
          o,
          r = this.options;
        if (
          ((this.currentContainer = this).refreshPositions(),
          (this.appendTo = Q(
            "parent" !== r.appendTo ? r.appendTo : this.currentItem.parent(),
          )),
          (this.helper = this._createHelper(t)),
          this._cacheHelperProportions(),
          this._cacheMargins(),
          (this.offset = this.currentItem.offset()),
          (this.offset = {
            top: this.offset.top - this.margins.top,
            left: this.offset.left - this.margins.left,
          }),
          Q.extend(this.offset, {
            click: {
              left: t.pageX - this.offset.left,
              top: t.pageY - this.offset.top,
            },
            relative: this._getRelativeOffset(),
          }),
          this.helper.css("position", "absolute"),
          (this.cssPosition = this.helper.css("position")),
          r.cursorAt && this._adjustOffsetFromHelper(r.cursorAt),
          (this.domPosition = {
            prev: this.currentItem.prev()[0],
            parent: this.currentItem.parent()[0],
          }),
          this.helper[0] !== this.currentItem[0] && this.currentItem.hide(),
          this._createPlaceholder(),
          (this.scrollParent = this.placeholder.scrollParent()),
          Q.extend(this.offset, { parent: this._getParentOffset() }),
          r.containment && this._setContainment(),
          r.cursor &&
            "auto" !== r.cursor &&
            ((o = this.document.find("body")),
            (this.storedCursor = o.css("cursor")),
            o.css("cursor", r.cursor),
            (this.storedStylesheet = Q(
              "<style>*{ cursor: " + r.cursor + " !important; }</style>",
            ).appendTo(o))),
          r.zIndex &&
            (this.helper.css("zIndex") &&
              (this._storedZIndex = this.helper.css("zIndex")),
            this.helper.css("zIndex", r.zIndex)),
          r.opacity &&
            (this.helper.css("opacity") &&
              (this._storedOpacity = this.helper.css("opacity")),
            this.helper.css("opacity", r.opacity)),
          this.scrollParent[0] !== this.document[0] &&
            "HTML" !== this.scrollParent[0].tagName &&
            (this.overflowOffset = this.scrollParent.offset()),
          this._trigger("start", t, this._uiHash()),
          this._preserveHelperProportions || this._cacheHelperProportions(),
          !i)
        )
          for (n = this.containers.length - 1; 0 <= n; n--)
            this.containers[n]._trigger("activate", t, this._uiHash(this));
        return (
          Q.ui.ddmanager && (Q.ui.ddmanager.current = this),
          Q.ui.ddmanager &&
            !r.dropBehaviour &&
            Q.ui.ddmanager.prepareOffsets(this, t),
          (this.dragging = !0),
          this._addClass(this.helper, "ui-sortable-helper"),
          this.helper.parent().is(this.appendTo) ||
            (this.helper.detach().appendTo(this.appendTo),
            (this.offset.parent = this._getParentOffset())),
          (this.position = this.originalPosition = this._generatePosition(t)),
          (this.originalPageX = t.pageX),
          (this.originalPageY = t.pageY),
          (this.lastPositionAbs = this.positionAbs =
            this._convertPositionTo("absolute")),
          this._mouseDrag(t),
          !0
        );
      },
      _scroll: function (t) {
        var e = this.options,
          i = !1;
        return (
          this.scrollParent[0] !== this.document[0] &&
          "HTML" !== this.scrollParent[0].tagName
            ? (this.overflowOffset.top +
                this.scrollParent[0].offsetHeight -
                t.pageY <
              e.scrollSensitivity
                ? (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop + e.scrollSpeed)
                : t.pageY - this.overflowOffset.top < e.scrollSensitivity &&
                  (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop - e.scrollSpeed),
              this.overflowOffset.left +
                this.scrollParent[0].offsetWidth -
                t.pageX <
              e.scrollSensitivity
                ? (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft + e.scrollSpeed)
                : t.pageX - this.overflowOffset.left < e.scrollSensitivity &&
                  (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft - e.scrollSpeed))
            : (t.pageY - this.document.scrollTop() < e.scrollSensitivity
                ? (i = this.document.scrollTop(
                    this.document.scrollTop() - e.scrollSpeed,
                  ))
                : this.window.height() - (t.pageY - this.document.scrollTop()) <
                    e.scrollSensitivity &&
                  (i = this.document.scrollTop(
                    this.document.scrollTop() + e.scrollSpeed,
                  )),
              t.pageX - this.document.scrollLeft() < e.scrollSensitivity
                ? (i = this.document.scrollLeft(
                    this.document.scrollLeft() - e.scrollSpeed,
                  ))
                : this.window.width() - (t.pageX - this.document.scrollLeft()) <
                    e.scrollSensitivity &&
                  (i = this.document.scrollLeft(
                    this.document.scrollLeft() + e.scrollSpeed,
                  ))),
          i
        );
      },
      _mouseDrag: function (t) {
        var e,
          i,
          n,
          o,
          r = this.options;
        if (
          ((this.position = this._generatePosition(t)),
          (this.positionAbs = this._convertPositionTo("absolute")),
          (this.options.axis && "y" === this.options.axis) ||
            (this.helper[0].style.left = this.position.left + "px"),
          (this.options.axis && "x" === this.options.axis) ||
            (this.helper[0].style.top = this.position.top + "px"),
          this._contactContainers(t),
          null !== this.innermostContainer)
        )
          for (
            r.scroll &&
              !1 !== this._scroll(t) &&
              (this._refreshItemPositions(!0),
              Q.ui.ddmanager &&
                !r.dropBehaviour &&
                Q.ui.ddmanager.prepareOffsets(this, t)),
              this.dragDirection = {
                vertical: this._getDragVerticalDirection(),
                horizontal: this._getDragHorizontalDirection(),
              },
              e = this.items.length - 1;
            0 <= e;
            e--
          )
            if (
              ((n = (i = this.items[e]).item[0]),
              (o = this._intersectsWithPointer(i)) &&
                i.instance === this.currentContainer &&
                !(
                  n === this.currentItem[0] ||
                  this.placeholder[1 === o ? "next" : "prev"]()[0] === n ||
                  Q.contains(this.placeholder[0], n) ||
                  ("semi-dynamic" === this.options.type &&
                    Q.contains(this.element[0], n))
                ))
            ) {
              if (
                ((this.direction = 1 === o ? "down" : "up"),
                "pointer" !== this.options.tolerance &&
                  !this._intersectsWithSides(i))
              )
                break;
              (this._rearrange(t, i),
                this._trigger("change", t, this._uiHash()));
              break;
            }
        return (
          Q.ui.ddmanager && Q.ui.ddmanager.drag(this, t),
          this._trigger("sort", t, this._uiHash()),
          (this.lastPositionAbs = this.positionAbs),
          !1
        );
      },
      _mouseStop: function (t, e) {
        var i, n, o, r;
        if (t)
          return (
            Q.ui.ddmanager &&
              !this.options.dropBehaviour &&
              Q.ui.ddmanager.drop(this, t),
            this.options.revert
              ? ((n = (i = this).placeholder.offset()),
                (r = {}),
                ((o = this.options.axis) && "x" !== o) ||
                  (r.left =
                    n.left -
                    this.offset.parent.left -
                    this.margins.left +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollLeft)),
                (o && "y" !== o) ||
                  (r.top =
                    n.top -
                    this.offset.parent.top -
                    this.margins.top +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollTop)),
                (this.reverting = !0),
                Q(this.helper).animate(
                  r,
                  parseInt(this.options.revert, 10) || 500,
                  function () {
                    i._clear(t);
                  },
                ))
              : this._clear(t, e),
            !1
          );
      },
      cancel: function () {
        if (this.dragging) {
          (this._mouseUp(new Q.Event("mouseup", { target: null })),
            "original" === this.options.helper
              ? (this.currentItem.css(this._storedCSS),
                this._removeClass(this.currentItem, "ui-sortable-helper"))
              : this.currentItem.show());
          for (var t = this.containers.length - 1; 0 <= t; t--)
            (this.containers[t]._trigger(
              "deactivate",
              null,
              this._uiHash(this),
            ),
              this.containers[t].containerCache.over &&
                (this.containers[t]._trigger("out", null, this._uiHash(this)),
                (this.containers[t].containerCache.over = 0)));
        }
        return (
          this.placeholder &&
            (this.placeholder[0].parentNode &&
              this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
            "original" !== this.options.helper &&
              this.helper &&
              this.helper[0].parentNode &&
              this.helper.remove(),
            Q.extend(this, {
              helper: null,
              dragging: !1,
              reverting: !1,
              _noFinalSort: null,
            }),
            this.domPosition.prev
              ? Q(this.domPosition.prev).after(this.currentItem)
              : Q(this.domPosition.parent).prepend(this.currentItem)),
          this
        );
      },
      serialize: function (e) {
        var t = this._getItemsAsjQuery(e && e.connected),
          i = [];
        return (
          (e = e || {}),
          Q(t).each(function () {
            var t = (Q(e.item || this).attr(e.attribute || "id") || "").match(
              e.expression || /(.+)[\-=_](.+)/,
            );
            t &&
              i.push(
                (e.key || t[1] + "[]") +
                  "=" +
                  (e.key && e.expression ? t[1] : t[2]),
              );
          }),
          !i.length && e.key && i.push(e.key + "="),
          i.join("&")
        );
      },
      toArray: function (t) {
        var e = this._getItemsAsjQuery(t && t.connected),
          i = [];
        return (
          (t = t || {}),
          e.each(function () {
            i.push(Q(t.item || this).attr(t.attribute || "id") || "");
          }),
          i
        );
      },
      _intersectsWith: function (t) {
        var e = this.positionAbs.left,
          i = e + this.helperProportions.width,
          n = this.positionAbs.top,
          o = n + this.helperProportions.height,
          r = t.left,
          s = r + t.width,
          a = t.top,
          l = a + t.height,
          c = this.offset.click.top,
          u = this.offset.click.left,
          c = "x" === this.options.axis || (a < n + c && n + c < l),
          u = "y" === this.options.axis || (r < e + u && e + u < s);
        return "pointer" === this.options.tolerance ||
          this.options.forcePointerForContainers ||
          ("pointer" !== this.options.tolerance &&
            this.helperProportions[this.floating ? "width" : "height"] >
              t[this.floating ? "width" : "height"])
          ? c && u
          : r < e + this.helperProportions.width / 2 &&
              i - this.helperProportions.width / 2 < s &&
              a < n + this.helperProportions.height / 2 &&
              o - this.helperProportions.height / 2 < l;
      },
      _intersectsWithPointer: function (t) {
        var e =
            "x" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.top + this.offset.click.top,
              t.top,
              t.height,
            ),
          t =
            "y" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.left + this.offset.click.left,
              t.left,
              t.width,
            );
        return (
          !(!e || !t) &&
          ((e = this.dragDirection.vertical),
          (t = this.dragDirection.horizontal),
          this.floating
            ? "right" === t || "down" === e
              ? 2
              : 1
            : e && ("down" === e ? 2 : 1))
        );
      },
      _intersectsWithSides: function (t) {
        var e = this._isOverAxis(
            this.positionAbs.top + this.offset.click.top,
            t.top + t.height / 2,
            t.height,
          ),
          i = this._isOverAxis(
            this.positionAbs.left + this.offset.click.left,
            t.left + t.width / 2,
            t.width,
          ),
          n = this.dragDirection.vertical,
          t = this.dragDirection.horizontal;
        return this.floating && t
          ? ("right" === t && i) || ("left" === t && !i)
          : n && (("down" === n && e) || ("up" === n && !e));
      },
      _getDragVerticalDirection: function () {
        var t = this.positionAbs.top - this.lastPositionAbs.top;
        return 0 != t && (0 < t ? "down" : "up");
      },
      _getDragHorizontalDirection: function () {
        var t = this.positionAbs.left - this.lastPositionAbs.left;
        return 0 != t && (0 < t ? "right" : "left");
      },
      refresh: function (t) {
        return (
          this._refreshItems(t),
          this._setHandleClassName(),
          this.refreshPositions(),
          this
        );
      },
      _connectWith: function () {
        var t = this.options;
        return t.connectWith.constructor === String
          ? [t.connectWith]
          : t.connectWith;
      },
      _getItemsAsjQuery: function (t) {
        var e,
          i,
          n,
          o,
          r = [],
          s = [],
          a = this._connectWith();
        if (a && t)
          for (e = a.length - 1; 0 <= e; e--)
            for (i = (n = Q(a[e], this.document[0])).length - 1; 0 <= i; i--)
              (o = Q.data(n[i], this.widgetFullName)) &&
                o !== this &&
                !o.options.disabled &&
                s.push([
                  "function" == typeof o.options.items
                    ? o.options.items.call(o.element)
                    : Q(o.options.items, o.element)
                        .not(".ui-sortable-helper")
                        .not(".ui-sortable-placeholder"),
                  o,
                ]);
        function l() {
          r.push(this);
        }
        for (
          s.push([
            "function" == typeof this.options.items
              ? this.options.items.call(this.element, null, {
                  options: this.options,
                  item: this.currentItem,
                })
              : Q(this.options.items, this.element)
                  .not(".ui-sortable-helper")
                  .not(".ui-sortable-placeholder"),
            this,
          ]),
            e = s.length - 1;
          0 <= e;
          e--
        )
          s[e][0].each(l);
        return Q(r);
      },
      _removeCurrentsFromItems: function () {
        var i = this.currentItem.find(":data(" + this.widgetName + "-item)");
        this.items = Q.grep(this.items, function (t) {
          for (var e = 0; e < i.length; e++) if (i[e] === t.item[0]) return !1;
          return !0;
        });
      },
      _refreshItems: function (t) {
        ((this.items = []), (this.containers = [this]));
        var e,
          i,
          n,
          o,
          r,
          s,
          a,
          l,
          c = this.items,
          u = [
            [
              "function" == typeof this.options.items
                ? this.options.items.call(this.element[0], t, {
                    item: this.currentItem,
                  })
                : Q(this.options.items, this.element),
              this,
            ],
          ],
          h = this._connectWith();
        if (h && this.ready)
          for (e = h.length - 1; 0 <= e; e--)
            for (i = (n = Q(h[e], this.document[0])).length - 1; 0 <= i; i--)
              (o = Q.data(n[i], this.widgetFullName)) &&
                o !== this &&
                !o.options.disabled &&
                (u.push([
                  "function" == typeof o.options.items
                    ? o.options.items.call(o.element[0], t, {
                        item: this.currentItem,
                      })
                    : Q(o.options.items, o.element),
                  o,
                ]),
                this.containers.push(o));
        for (e = u.length - 1; 0 <= e; e--)
          for (r = u[e][1], l = (s = u[e][(i = 0)]).length; i < l; i++)
            ((a = Q(s[i])).data(this.widgetName + "-item", r),
              c.push({
                item: a,
                instance: r,
                width: 0,
                height: 0,
                left: 0,
                top: 0,
              }));
      },
      _refreshItemPositions: function (t) {
        for (var e, i, n = this.items.length - 1; 0 <= n; n--)
          ((e = this.items[n]),
            (this.currentContainer &&
              e.instance !== this.currentContainer &&
              e.item[0] !== this.currentItem[0]) ||
              ((i = this.options.toleranceElement
                ? Q(this.options.toleranceElement, e.item)
                : e.item),
              t || ((e.width = i.outerWidth()), (e.height = i.outerHeight())),
              (i = i.offset()),
              (e.left = i.left),
              (e.top = i.top)));
      },
      refreshPositions: function (t) {
        var e, i;
        if (
          ((this.floating =
            !!this.items.length &&
            ("x" === this.options.axis ||
              this._isFloating(this.items[0].item))),
          null !== this.innermostContainer && this._refreshItemPositions(t),
          this.options.custom && this.options.custom.refreshContainers)
        )
          this.options.custom.refreshContainers.call(this);
        else
          for (e = this.containers.length - 1; 0 <= e; e--)
            ((i = this.containers[e].element.offset()),
              (this.containers[e].containerCache.left = i.left),
              (this.containers[e].containerCache.top = i.top),
              (this.containers[e].containerCache.width =
                this.containers[e].element.outerWidth()),
              (this.containers[e].containerCache.height =
                this.containers[e].element.outerHeight()));
        return this;
      },
      _createPlaceholder: function (i) {
        var n,
          o,
          r = (i = i || this).options;
        ((r.placeholder && r.placeholder.constructor !== String) ||
          ((n = r.placeholder),
          (o = i.currentItem[0].nodeName.toLowerCase()),
          (r.placeholder = {
            element: function () {
              var t = Q("<" + o + ">", i.document[0]);
              return (
                i
                  ._addClass(
                    t,
                    "ui-sortable-placeholder",
                    n || i.currentItem[0].className,
                  )
                  ._removeClass(t, "ui-sortable-helper"),
                "tbody" === o
                  ? i._createTrPlaceholder(
                      i.currentItem.find("tr").eq(0),
                      Q("<tr>", i.document[0]).appendTo(t),
                    )
                  : "tr" === o
                    ? i._createTrPlaceholder(i.currentItem, t)
                    : "img" === o && t.attr("src", i.currentItem.attr("src")),
                n || t.css("visibility", "hidden"),
                t
              );
            },
            update: function (t, e) {
              (n && !r.forcePlaceholderSize) ||
                ((e.height() &&
                  (!r.forcePlaceholderSize || ("tbody" !== o && "tr" !== o))) ||
                  e.height(
                    i.currentItem.innerHeight() -
                      parseInt(i.currentItem.css("paddingTop") || 0, 10) -
                      parseInt(i.currentItem.css("paddingBottom") || 0, 10),
                  ),
                e.width() ||
                  e.width(
                    i.currentItem.innerWidth() -
                      parseInt(i.currentItem.css("paddingLeft") || 0, 10) -
                      parseInt(i.currentItem.css("paddingRight") || 0, 10),
                  ));
            },
          })),
          (i.placeholder = Q(
            r.placeholder.element.call(i.element, i.currentItem),
          )),
          i.currentItem.after(i.placeholder),
          r.placeholder.update(i, i.placeholder));
      },
      _createTrPlaceholder: function (t, e) {
        var i = this;
        t.children().each(function () {
          Q("<td>&#160;</td>", i.document[0])
            .attr("colspan", Q(this).attr("colspan") || 1)
            .appendTo(e);
        });
      },
      _contactContainers: function (t) {
        for (
          var e,
            i,
            n,
            o,
            r,
            s,
            a,
            l,
            c,
            u = null,
            h = null,
            d = this.containers.length - 1;
          0 <= d;
          d--
        )
          Q.contains(this.currentItem[0], this.containers[d].element[0]) ||
            (this._intersectsWith(this.containers[d].containerCache)
              ? (u &&
                  Q.contains(this.containers[d].element[0], u.element[0])) ||
                ((u = this.containers[d]), (h = d))
              : this.containers[d].containerCache.over &&
                (this.containers[d]._trigger("out", t, this._uiHash(this)),
                (this.containers[d].containerCache.over = 0)));
        if ((this.innermostContainer = u))
          if (1 === this.containers.length)
            this.containers[h].containerCache.over ||
              (this.containers[h]._trigger("over", t, this._uiHash(this)),
              (this.containers[h].containerCache.over = 1));
          else {
            for (
              i = 1e4,
                n = null,
                o = (l = u.floating || this._isFloating(this.currentItem))
                  ? "left"
                  : "top",
                r = l ? "width" : "height",
                c = l ? "pageX" : "pageY",
                e = this.items.length - 1;
              0 <= e;
              e--
            )
              Q.contains(
                this.containers[h].element[0],
                this.items[e].item[0],
              ) &&
                this.items[e].item[0] !== this.currentItem[0] &&
                ((s = this.items[e].item.offset()[o]),
                (a = !1),
                t[c] - s > this.items[e][r] / 2 && (a = !0),
                Math.abs(t[c] - s) < i &&
                  ((i = Math.abs(t[c] - s)),
                  (n = this.items[e]),
                  (this.direction = a ? "up" : "down")));
            (n || this.options.dropOnEmpty) &&
              (this.currentContainer !== this.containers[h]
                ? (n
                    ? this._rearrange(t, n, null, !0)
                    : this._rearrange(t, null, this.containers[h].element, !0),
                  this._trigger("change", t, this._uiHash()),
                  this.containers[h]._trigger("change", t, this._uiHash(this)),
                  (this.currentContainer = this.containers[h]),
                  this.options.placeholder.update(
                    this.currentContainer,
                    this.placeholder,
                  ),
                  (this.scrollParent = this.placeholder.scrollParent()),
                  this.scrollParent[0] !== this.document[0] &&
                    "HTML" !== this.scrollParent[0].tagName &&
                    (this.overflowOffset = this.scrollParent.offset()),
                  this.containers[h]._trigger("over", t, this._uiHash(this)),
                  (this.containers[h].containerCache.over = 1))
                : this.currentContainer.containerCache.over ||
                  (this.containers[h]._trigger("over", t, this._uiHash()),
                  (this.currentContainer.containerCache.over = 1)));
          }
      },
      _createHelper: function (t) {
        var e = this.options,
          t =
            "function" == typeof e.helper
              ? Q(e.helper.apply(this.element[0], [t, this.currentItem]))
              : "clone" === e.helper
                ? this.currentItem.clone()
                : this.currentItem;
        return (
          t.parents("body").length || this.appendTo[0].appendChild(t[0]),
          t[0] === this.currentItem[0] &&
            (this._storedCSS = {
              width: this.currentItem[0].style.width,
              height: this.currentItem[0].style.height,
              position: this.currentItem.css("position"),
              top: this.currentItem.css("top"),
              left: this.currentItem.css("left"),
            }),
          (t[0].style.width && !e.forceHelperSize) ||
            t.width(this.currentItem.width()),
          (t[0].style.height && !e.forceHelperSize) ||
            t.height(this.currentItem.height()),
          t
        );
      },
      _adjustOffsetFromHelper: function (t) {
        ("string" == typeof t && (t = t.split(" ")),
          "left" in
            (t = Array.isArray(t) ? { left: +t[0], top: +t[1] || 0 } : t) &&
            (this.offset.click.left = t.left + this.margins.left),
          "right" in t &&
            (this.offset.click.left =
              this.helperProportions.width - t.right + this.margins.left),
          "top" in t && (this.offset.click.top = t.top + this.margins.top),
          "bottom" in t &&
            (this.offset.click.top =
              this.helperProportions.height - t.bottom + this.margins.top));
      },
      _getParentOffset: function () {
        this.offsetParent = this.helper.offsetParent();
        var t = this.offsetParent.offset();
        return (
          "absolute" === this.cssPosition &&
            this.scrollParent[0] !== this.document[0] &&
            Q.contains(this.scrollParent[0], this.offsetParent[0]) &&
            ((t.left += this.scrollParent.scrollLeft()),
            (t.top += this.scrollParent.scrollTop())),
          {
            top:
              (t =
                this.offsetParent[0] === this.document[0].body ||
                (this.offsetParent[0].tagName &&
                  "html" === this.offsetParent[0].tagName.toLowerCase() &&
                  Q.ui.ie)
                  ? { top: 0, left: 0 }
                  : t).top +
              (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
            left:
              t.left +
              (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
          }
        );
      },
      _getRelativeOffset: function () {
        if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
        var t = this.currentItem.position();
        return {
          top:
            t.top -
            (parseInt(this.helper.css("top"), 10) || 0) +
            this.scrollParent.scrollTop(),
          left:
            t.left -
            (parseInt(this.helper.css("left"), 10) || 0) +
            this.scrollParent.scrollLeft(),
        };
      },
      _cacheMargins: function () {
        this.margins = {
          left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
          top: parseInt(this.currentItem.css("marginTop"), 10) || 0,
        };
      },
      _cacheHelperProportions: function () {
        this.helperProportions = {
          width: this.helper.outerWidth(),
          height: this.helper.outerHeight(),
        };
      },
      _setContainment: function () {
        var t,
          e,
          i = this.options;
        ("parent" === i.containment &&
          (i.containment = this.helper[0].parentNode),
          ("document" !== i.containment && "window" !== i.containment) ||
            (this.containment = [
              0 - this.offset.relative.left - this.offset.parent.left,
              0 - this.offset.relative.top - this.offset.parent.top,
              "document" === i.containment
                ? this.document.width()
                : this.window.width() -
                  this.helperProportions.width -
                  this.margins.left,
              ("document" === i.containment
                ? this.document.height() ||
                  document.body.parentNode.scrollHeight
                : this.window.height() ||
                  this.document[0].body.parentNode.scrollHeight) -
                this.helperProportions.height -
                this.margins.top,
            ]),
          /^(document|window|parent)$/.test(i.containment) ||
            ((t = Q(i.containment)[0]),
            (e = Q(i.containment).offset()),
            (i = "hidden" !== Q(t).css("overflow")),
            (this.containment = [
              e.left +
                (parseInt(Q(t).css("borderLeftWidth"), 10) || 0) +
                (parseInt(Q(t).css("paddingLeft"), 10) || 0) -
                this.margins.left,
              e.top +
                (parseInt(Q(t).css("borderTopWidth"), 10) || 0) +
                (parseInt(Q(t).css("paddingTop"), 10) || 0) -
                this.margins.top,
              e.left +
                (i ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) -
                (parseInt(Q(t).css("borderLeftWidth"), 10) || 0) -
                (parseInt(Q(t).css("paddingRight"), 10) || 0) -
                this.helperProportions.width -
                this.margins.left,
              e.top +
                (i
                  ? Math.max(t.scrollHeight, t.offsetHeight)
                  : t.offsetHeight) -
                (parseInt(Q(t).css("borderTopWidth"), 10) || 0) -
                (parseInt(Q(t).css("paddingBottom"), 10) || 0) -
                this.helperProportions.height -
                this.margins.top,
            ])));
      },
      _convertPositionTo: function (t, e) {
        e = e || this.position;
        var i = "absolute" === t ? 1 : -1,
          n =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Q.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          t = /(html|body)/i.test(n[0].tagName);
        return {
          top:
            e.top +
            this.offset.relative.top * i +
            this.offset.parent.top * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollTop()
              : t
                ? 0
                : n.scrollTop()) *
              i,
          left:
            e.left +
            this.offset.relative.left * i +
            this.offset.parent.left * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollLeft()
              : t
                ? 0
                : n.scrollLeft()) *
              i,
        };
      },
      _generatePosition: function (t) {
        var e = this.options,
          i = t.pageX,
          n = t.pageY,
          o =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Q.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          r = /(html|body)/i.test(o[0].tagName);
        return (
          "relative" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              this.scrollParent[0] !== this.offsetParent[0]) ||
            (this.offset.relative = this._getRelativeOffset()),
          this.originalPosition &&
            (this.containment &&
              (t.pageX - this.offset.click.left < this.containment[0] &&
                (i = this.containment[0] + this.offset.click.left),
              t.pageY - this.offset.click.top < this.containment[1] &&
                (n = this.containment[1] + this.offset.click.top),
              t.pageX - this.offset.click.left > this.containment[2] &&
                (i = this.containment[2] + this.offset.click.left),
              t.pageY - this.offset.click.top > this.containment[3] &&
                (n = this.containment[3] + this.offset.click.top)),
            e.grid &&
              ((t =
                this.originalPageY +
                Math.round((n - this.originalPageY) / e.grid[1]) * e.grid[1]),
              (n =
                !this.containment ||
                (t - this.offset.click.top >= this.containment[1] &&
                  t - this.offset.click.top <= this.containment[3])
                  ? t
                  : t - this.offset.click.top >= this.containment[1]
                    ? t - e.grid[1]
                    : t + e.grid[1]),
              (t =
                this.originalPageX +
                Math.round((i - this.originalPageX) / e.grid[0]) * e.grid[0]),
              (i =
                !this.containment ||
                (t - this.offset.click.left >= this.containment[0] &&
                  t - this.offset.click.left <= this.containment[2])
                  ? t
                  : t - this.offset.click.left >= this.containment[0]
                    ? t - e.grid[0]
                    : t + e.grid[0]))),
          {
            top:
              n -
              this.offset.click.top -
              this.offset.relative.top -
              this.offset.parent.top +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollTop()
                : r
                  ? 0
                  : o.scrollTop()),
            left:
              i -
              this.offset.click.left -
              this.offset.relative.left -
              this.offset.parent.left +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollLeft()
                : r
                  ? 0
                  : o.scrollLeft()),
          }
        );
      },
      _rearrange: function (t, e, i, n) {
        (i
          ? i[0].appendChild(this.placeholder[0])
          : e.item[0].parentNode.insertBefore(
              this.placeholder[0],
              "down" === this.direction ? e.item[0] : e.item[0].nextSibling,
            ),
          (this.counter = this.counter ? ++this.counter : 1));
        var o = this.counter;
        this._delay(function () {
          o === this.counter && this.refreshPositions(!n);
        });
      },
      _clear: function (t, e) {
        this.reverting = !1;
        var i,
          n = [];
        if (
          (!this._noFinalSort &&
            this.currentItem.parent().length &&
            this.placeholder.before(this.currentItem),
          (this._noFinalSort = null),
          this.helper[0] === this.currentItem[0])
        ) {
          for (i in this._storedCSS)
            ("auto" !== this._storedCSS[i] &&
              "static" !== this._storedCSS[i]) ||
              (this._storedCSS[i] = "");
          (this.currentItem.css(this._storedCSS),
            this._removeClass(this.currentItem, "ui-sortable-helper"));
        } else this.currentItem.show();
        function o(e, i, n) {
          return function (t) {
            n._trigger(e, t, i._uiHash(i));
          };
        }
        for (
          this.fromOutside &&
            !e &&
            n.push(function (t) {
              this._trigger("receive", t, this._uiHash(this.fromOutside));
            }),
            (!this.fromOutside &&
              this.domPosition.prev ===
                this.currentItem.prev().not(".ui-sortable-helper")[0] &&
              this.domPosition.parent === this.currentItem.parent()[0]) ||
              e ||
              n.push(function (t) {
                this._trigger("update", t, this._uiHash());
              }),
            this !== this.currentContainer &&
              (e ||
                (n.push(function (t) {
                  this._trigger("remove", t, this._uiHash());
                }),
                n.push(
                  function (e) {
                    return function (t) {
                      e._trigger("receive", t, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ),
                n.push(
                  function (e) {
                    return function (t) {
                      e._trigger("update", t, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ))),
            i = this.containers.length - 1;
          0 <= i;
          i--
        )
          (e || n.push(o("deactivate", this, this.containers[i])),
            this.containers[i].containerCache.over &&
              (n.push(o("out", this, this.containers[i])),
              (this.containers[i].containerCache.over = 0)));
        if (
          (this.storedCursor &&
            (this.document.find("body").css("cursor", this.storedCursor),
            this.storedStylesheet.remove()),
          this._storedOpacity &&
            this.helper.css("opacity", this._storedOpacity),
          this._storedZIndex &&
            this.helper.css(
              "zIndex",
              "auto" === this._storedZIndex ? "" : this._storedZIndex,
            ),
          (this.dragging = !1),
          e || this._trigger("beforeStop", t, this._uiHash()),
          this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
          this.cancelHelperRemoval ||
            (this.helper[0] !== this.currentItem[0] && this.helper.remove(),
            (this.helper = null)),
          !e)
        ) {
          for (i = 0; i < n.length; i++) n[i].call(this, t);
          this._trigger("stop", t, this._uiHash());
        }
        return ((this.fromOutside = !1), !this.cancelHelperRemoval);
      },
      _trigger: function () {
        !1 === Q.Widget.prototype._trigger.apply(this, arguments) &&
          this.cancel();
      },
      _uiHash: function (t) {
        var e = t || this;
        return {
          helper: e.helper,
          placeholder: e.placeholder || Q([]),
          position: e.position,
          originalPosition: e.originalPosition,
          offset: e.positionAbs,
          item: e.currentItem,
          sender: t ? t.element : null,
        };
      },
    }));
  function ct(e) {
    return function () {
      var t = this.element.val();
      (e.apply(this, arguments),
        this._refresh(),
        t !== this.element.val() && this._trigger("change"));
    };
  }
  (Q.widget("ui.spinner", {
    version: "1.13.0",
    defaultElement: "<input>",
    widgetEventPrefix: "spin",
    options: {
      classes: {
        "ui-spinner": "ui-corner-all",
        "ui-spinner-down": "ui-corner-br",
        "ui-spinner-up": "ui-corner-tr",
      },
      culture: null,
      icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" },
      incremental: !0,
      max: null,
      min: null,
      numberFormat: null,
      page: 10,
      step: 1,
      change: null,
      spin: null,
      start: null,
      stop: null,
    },
    _create: function () {
      (this._setOption("max", this.options.max),
        this._setOption("min", this.options.min),
        this._setOption("step", this.options.step),
        "" !== this.value() && this._value(this.element.val(), !0),
        this._draw(),
        this._on(this._events),
        this._refresh(),
        this._on(this.window, {
          beforeunload: function () {
            this.element.removeAttr("autocomplete");
          },
        }));
    },
    _getCreateOptions: function () {
      var n = this._super(),
        o = this.element;
      return (
        Q.each(["min", "max", "step"], function (t, e) {
          var i = o.attr(e);
          null != i && i.length && (n[e] = i);
        }),
        n
      );
    },
    _events: {
      keydown: function (t) {
        this._start(t) && this._keydown(t) && t.preventDefault();
      },
      keyup: "_stop",
      focus: function () {
        this.previous = this.element.val();
      },
      blur: function (t) {
        this.cancelBlur
          ? delete this.cancelBlur
          : (this._stop(),
            this._refresh(),
            this.previous !== this.element.val() && this._trigger("change", t));
      },
      mousewheel: function (t, e) {
        var i = Q.ui.safeActiveElement(this.document[0]);
        if (this.element[0] === i && e) {
          if (!this.spinning && !this._start(t)) return !1;
          (this._spin((0 < e ? 1 : -1) * this.options.step, t),
            clearTimeout(this.mousewheelTimer),
            (this.mousewheelTimer = this._delay(function () {
              this.spinning && this._stop(t);
            }, 100)),
            t.preventDefault());
        }
      },
      "mousedown .ui-spinner-button": function (t) {
        var e;
        function i() {
          this.element[0] === Q.ui.safeActiveElement(this.document[0]) ||
            (this.element.trigger("focus"),
            (this.previous = e),
            this._delay(function () {
              this.previous = e;
            }));
        }
        ((e =
          this.element[0] === Q.ui.safeActiveElement(this.document[0])
            ? this.previous
            : this.element.val()),
          t.preventDefault(),
          i.call(this),
          (this.cancelBlur = !0),
          this._delay(function () {
            (delete this.cancelBlur, i.call(this));
          }),
          !1 !== this._start(t) &&
            this._repeat(
              null,
              Q(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              t,
            ));
      },
      "mouseup .ui-spinner-button": "_stop",
      "mouseenter .ui-spinner-button": function (t) {
        if (Q(t.currentTarget).hasClass("ui-state-active"))
          return (
            !1 !== this._start(t) &&
            void this._repeat(
              null,
              Q(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              t,
            )
          );
      },
      "mouseleave .ui-spinner-button": "_stop",
    },
    _enhance: function () {
      this.uiSpinner = this.element
        .attr("autocomplete", "off")
        .wrap("<span>")
        .parent()
        .append("<a></a><a></a>");
    },
    _draw: function () {
      (this._enhance(),
        this._addClass(
          this.uiSpinner,
          "ui-spinner",
          "ui-widget ui-widget-content",
        ),
        this._addClass("ui-spinner-input"),
        this.element.attr("role", "spinbutton"),
        (this.buttons = this.uiSpinner
          .children("a")
          .attr("tabIndex", -1)
          .attr("aria-hidden", !0)
          .button({ classes: { "ui-button": "" } })),
        this._removeClass(this.buttons, "ui-corner-all"),
        this._addClass(this.buttons.first(), "ui-spinner-button ui-spinner-up"),
        this._addClass(
          this.buttons.last(),
          "ui-spinner-button ui-spinner-down",
        ),
        this.buttons
          .first()
          .button({ icon: this.options.icons.up, showLabel: !1 }),
        this.buttons
          .last()
          .button({ icon: this.options.icons.down, showLabel: !1 }),
        this.buttons.height() > Math.ceil(0.5 * this.uiSpinner.height()) &&
          0 < this.uiSpinner.height() &&
          this.uiSpinner.height(this.uiSpinner.height()));
    },
    _keydown: function (t) {
      var e = this.options,
        i = Q.ui.keyCode;
      switch (t.keyCode) {
        case i.UP:
          return (this._repeat(null, 1, t), !0);
        case i.DOWN:
          return (this._repeat(null, -1, t), !0);
        case i.PAGE_UP:
          return (this._repeat(null, e.page, t), !0);
        case i.PAGE_DOWN:
          return (this._repeat(null, -e.page, t), !0);
      }
      return !1;
    },
    _start: function (t) {
      return (
        !(!this.spinning && !1 === this._trigger("start", t)) &&
        (this.counter || (this.counter = 1), (this.spinning = !0))
      );
    },
    _repeat: function (t, e, i) {
      ((t = t || 500),
        clearTimeout(this.timer),
        (this.timer = this._delay(function () {
          this._repeat(40, e, i);
        }, t)),
        this._spin(e * this.options.step, i));
    },
    _spin: function (t, e) {
      var i = this.value() || 0;
      (this.counter || (this.counter = 1),
        (i = this._adjustValue(i + t * this._increment(this.counter))),
        (this.spinning && !1 === this._trigger("spin", e, { value: i })) ||
          (this._value(i), this.counter++));
    },
    _increment: function (t) {
      var e = this.options.incremental;
      return e
        ? "function" == typeof e
          ? e(t)
          : Math.floor((t * t * t) / 5e4 - (t * t) / 500 + (17 * t) / 200 + 1)
        : 1;
    },
    _precision: function () {
      var t = this._precisionOf(this.options.step);
      return (t =
        null !== this.options.min
          ? Math.max(t, this._precisionOf(this.options.min))
          : t);
    },
    _precisionOf: function (t) {
      var e = t.toString(),
        t = e.indexOf(".");
      return -1 === t ? 0 : e.length - t - 1;
    },
    _adjustValue: function (t) {
      var e = this.options,
        i = null !== e.min ? e.min : 0,
        n = t - i;
      return (
        (t = i + Math.round(n / e.step) * e.step),
        (t = parseFloat(t.toFixed(this._precision()))),
        null !== e.max && t > e.max
          ? e.max
          : null !== e.min && t < e.min
            ? e.min
            : t
      );
    },
    _stop: function (t) {
      this.spinning &&
        (clearTimeout(this.timer),
        clearTimeout(this.mousewheelTimer),
        (this.counter = 0),
        (this.spinning = !1),
        this._trigger("stop", t));
    },
    _setOption: function (t, e) {
      var i;
      if ("culture" === t || "numberFormat" === t)
        return (
          (i = this._parse(this.element.val())),
          (this.options[t] = e),
          void this.element.val(this._format(i))
        );
      (("max" !== t && "min" !== t && "step" !== t) ||
        ("string" == typeof e && (e = this._parse(e))),
        "icons" === t &&
          ((i = this.buttons.first().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.up),
          this._addClass(i, null, e.up),
          (i = this.buttons.last().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.down),
          this._addClass(i, null, e.down)),
        this._super(t, e));
    },
    _setOptionDisabled: function (t) {
      (this._super(t),
        this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!t),
        this.element.prop("disabled", !!t),
        this.buttons.button(t ? "disable" : "enable"));
    },
    _setOptions: ct(function (t) {
      this._super(t);
    }),
    _parse: function (t) {
      return "" ===
        (t =
          "string" == typeof t && "" !== t
            ? window.Globalize && this.options.numberFormat
              ? Globalize.parseFloat(t, 10, this.options.culture)
              : +t
            : t) || isNaN(t)
        ? null
        : t;
    },
    _format: function (t) {
      return "" === t
        ? ""
        : window.Globalize && this.options.numberFormat
          ? Globalize.format(t, this.options.numberFormat, this.options.culture)
          : t;
    },
    _refresh: function () {
      this.element.attr({
        "aria-valuemin": this.options.min,
        "aria-valuemax": this.options.max,
        "aria-valuenow": this._parse(this.element.val()),
      });
    },
    isValid: function () {
      var t = this.value();
      return null !== t && t === this._adjustValue(t);
    },
    _value: function (t, e) {
      var i;
      ("" !== t &&
        null !== (i = this._parse(t)) &&
        (e || (i = this._adjustValue(i)), (t = this._format(i))),
        this.element.val(t),
        this._refresh());
    },
    _destroy: function () {
      (this.element
        .prop("disabled", !1)
        .removeAttr(
          "autocomplete role aria-valuemin aria-valuemax aria-valuenow",
        ),
        this.uiSpinner.replaceWith(this.element));
    },
    stepUp: ct(function (t) {
      this._stepUp(t);
    }),
    _stepUp: function (t) {
      this._start() && (this._spin((t || 1) * this.options.step), this._stop());
    },
    stepDown: ct(function (t) {
      this._stepDown(t);
    }),
    _stepDown: function (t) {
      this._start() &&
        (this._spin((t || 1) * -this.options.step), this._stop());
    },
    pageUp: ct(function (t) {
      this._stepUp((t || 1) * this.options.page);
    }),
    pageDown: ct(function (t) {
      this._stepDown((t || 1) * this.options.page);
    }),
    value: function (t) {
      if (!arguments.length) return this._parse(this.element.val());
      ct(this._value).call(this, t);
    },
    widget: function () {
      return this.uiSpinner;
    },
  }),
    !1 !== Q.uiBackCompat &&
      Q.widget("ui.spinner", Q.ui.spinner, {
        _enhance: function () {
          this.uiSpinner = this.element
            .attr("autocomplete", "off")
            .wrap(this._uiSpinnerHtml())
            .parent()
            .append(this._buttonHtml());
        },
        _uiSpinnerHtml: function () {
          return "<span>";
        },
        _buttonHtml: function () {
          return "<a></a><a></a>";
        },
      }));
  var ut;
  Q.ui.spinner;
  (Q.widget("ui.tabs", {
    version: "1.13.0",
    delay: 300,
    options: {
      active: null,
      classes: {
        "ui-tabs": "ui-corner-all",
        "ui-tabs-nav": "ui-corner-all",
        "ui-tabs-panel": "ui-corner-bottom",
        "ui-tabs-tab": "ui-corner-top",
      },
      collapsible: !1,
      event: "click",
      heightStyle: "content",
      hide: null,
      show: null,
      activate: null,
      beforeActivate: null,
      beforeLoad: null,
      load: null,
    },
    _isLocal:
      ((ut = /#.*$/),
      function (t) {
        var e = t.href.replace(ut, ""),
          i = location.href.replace(ut, "");
        try {
          e = decodeURIComponent(e);
        } catch (t) {}
        try {
          i = decodeURIComponent(i);
        } catch (t) {}
        return 1 < t.hash.length && e === i;
      }),
    _create: function () {
      var e = this,
        t = this.options;
      ((this.running = !1),
        this._addClass("ui-tabs", "ui-widget ui-widget-content"),
        this._toggleClass("ui-tabs-collapsible", null, t.collapsible),
        this._processTabs(),
        (t.active = this._initialActive()),
        Array.isArray(t.disabled) &&
          (t.disabled = Q.uniqueSort(
            t.disabled.concat(
              Q.map(this.tabs.filter(".ui-state-disabled"), function (t) {
                return e.tabs.index(t);
              }),
            ),
          ).sort()),
        !1 !== this.options.active && this.anchors.length
          ? (this.active = this._findActive(t.active))
          : (this.active = Q()),
        this._refresh(),
        this.active.length && this.load(t.active));
    },
    _initialActive: function () {
      var i = this.options.active,
        t = this.options.collapsible,
        n = location.hash.substring(1);
      return (
        null === i &&
          (n &&
            this.tabs.each(function (t, e) {
              if (Q(e).attr("aria-controls") === n) return ((i = t), !1);
            }),
          (null !==
            (i =
              null === i
                ? this.tabs.index(this.tabs.filter(".ui-tabs-active"))
                : i) &&
            -1 !== i) ||
            (i = !!this.tabs.length && 0)),
        !1 !== i &&
          -1 === (i = this.tabs.index(this.tabs.eq(i))) &&
          (i = !t && 0),
        (i = !t && !1 === i && this.anchors.length ? 0 : i)
      );
    },
    _getCreateEventData: function () {
      return {
        tab: this.active,
        panel: this.active.length ? this._getPanelForTab(this.active) : Q(),
      };
    },
    _tabKeydown: function (t) {
      var e = Q(Q.ui.safeActiveElement(this.document[0])).closest("li"),
        i = this.tabs.index(e),
        n = !0;
      if (!this._handlePageNav(t)) {
        switch (t.keyCode) {
          case Q.ui.keyCode.RIGHT:
          case Q.ui.keyCode.DOWN:
            i++;
            break;
          case Q.ui.keyCode.UP:
          case Q.ui.keyCode.LEFT:
            ((n = !1), i--);
            break;
          case Q.ui.keyCode.END:
            i = this.anchors.length - 1;
            break;
          case Q.ui.keyCode.HOME:
            i = 0;
            break;
          case Q.ui.keyCode.SPACE:
            return (
              t.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i)
            );
          case Q.ui.keyCode.ENTER:
            return (
              t.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i !== this.options.active && i)
            );
          default:
            return;
        }
        (t.preventDefault(),
          clearTimeout(this.activating),
          (i = this._focusNextTab(i, n)),
          t.ctrlKey ||
            t.metaKey ||
            (e.attr("aria-selected", "false"),
            this.tabs.eq(i).attr("aria-selected", "true"),
            (this.activating = this._delay(function () {
              this.option("active", i);
            }, this.delay))));
      }
    },
    _panelKeydown: function (t) {
      this._handlePageNav(t) ||
        (t.ctrlKey &&
          t.keyCode === Q.ui.keyCode.UP &&
          (t.preventDefault(), this.active.trigger("focus")));
    },
    _handlePageNav: function (t) {
      return t.altKey && t.keyCode === Q.ui.keyCode.PAGE_UP
        ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0)
        : t.altKey && t.keyCode === Q.ui.keyCode.PAGE_DOWN
          ? (this._activate(this._focusNextTab(this.options.active + 1, !0)),
            !0)
          : void 0;
    },
    _findNextTab: function (t, e) {
      var i = this.tabs.length - 1;
      for (
        ;
        -1 !==
        Q.inArray((t = (t = i < t ? 0 : t) < 0 ? i : t), this.options.disabled);
      )
        t = e ? t + 1 : t - 1;
      return t;
    },
    _focusNextTab: function (t, e) {
      return (
        (t = this._findNextTab(t, e)),
        this.tabs.eq(t).trigger("focus"),
        t
      );
    },
    _setOption: function (t, e) {
      "active" !== t
        ? (this._super(t, e),
          "collapsible" === t &&
            (this._toggleClass("ui-tabs-collapsible", null, e),
            e || !1 !== this.options.active || this._activate(0)),
          "event" === t && this._setupEvents(e),
          "heightStyle" === t && this._setupHeightStyle(e))
        : this._activate(e);
    },
    _sanitizeSelector: function (t) {
      return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "";
    },
    refresh: function () {
      var t = this.options,
        e = this.tablist.children(":has(a[href])");
      ((t.disabled = Q.map(e.filter(".ui-state-disabled"), function (t) {
        return e.index(t);
      })),
        this._processTabs(),
        !1 !== t.active && this.anchors.length
          ? this.active.length && !Q.contains(this.tablist[0], this.active[0])
            ? this.tabs.length === t.disabled.length
              ? ((t.active = !1), (this.active = Q()))
              : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1))
            : (t.active = this.tabs.index(this.active))
          : ((t.active = !1), (this.active = Q())),
        this._refresh());
    },
    _refresh: function () {
      (this._setOptionDisabled(this.options.disabled),
        this._setupEvents(this.options.event),
        this._setupHeightStyle(this.options.heightStyle),
        this.tabs
          .not(this.active)
          .attr({
            "aria-selected": "false",
            "aria-expanded": "false",
            tabIndex: -1,
          }),
        this.panels
          .not(this._getPanelForTab(this.active))
          .hide()
          .attr({ "aria-hidden": "true" }),
        this.active.length
          ? (this.active.attr({
              "aria-selected": "true",
              "aria-expanded": "true",
              tabIndex: 0,
            }),
            this._addClass(this.active, "ui-tabs-active", "ui-state-active"),
            this._getPanelForTab(this.active)
              .show()
              .attr({ "aria-hidden": "false" }))
          : this.tabs.eq(0).attr("tabIndex", 0));
    },
    _processTabs: function () {
      var l = this,
        t = this.tabs,
        e = this.anchors,
        i = this.panels;
      ((this.tablist = this._getList().attr("role", "tablist")),
        this._addClass(
          this.tablist,
          "ui-tabs-nav",
          "ui-helper-reset ui-helper-clearfix ui-widget-header",
        ),
        this.tablist
          .on("mousedown" + this.eventNamespace, "> li", function (t) {
            Q(this).is(".ui-state-disabled") && t.preventDefault();
          })
          .on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () {
            Q(this).closest("li").is(".ui-state-disabled") && this.blur();
          }),
        (this.tabs = this.tablist
          .find("> li:has(a[href])")
          .attr({ role: "tab", tabIndex: -1 })),
        this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"),
        (this.anchors = this.tabs
          .map(function () {
            return Q("a", this)[0];
          })
          .attr({ tabIndex: -1 })),
        this._addClass(this.anchors, "ui-tabs-anchor"),
        (this.panels = Q()),
        this.anchors.each(function (t, e) {
          var i,
            n,
            o,
            r = Q(e).uniqueId().attr("id"),
            s = Q(e).closest("li"),
            a = s.attr("aria-controls");
          (l._isLocal(e)
            ? ((o = (i = e.hash).substring(1)),
              (n = l.element.find(l._sanitizeSelector(i))))
            : ((o = s.attr("aria-controls") || Q({}).uniqueId()[0].id),
              (n = l.element.find((i = "#" + o))).length ||
                (n = l._createPanel(o)).insertAfter(
                  l.panels[t - 1] || l.tablist,
                ),
              n.attr("aria-live", "polite")),
            n.length && (l.panels = l.panels.add(n)),
            a && s.data("ui-tabs-aria-controls", a),
            s.attr({ "aria-controls": o, "aria-labelledby": r }),
            n.attr("aria-labelledby", r));
        }),
        this.panels.attr("role", "tabpanel"),
        this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"),
        t &&
          (this._off(t.not(this.tabs)),
          this._off(e.not(this.anchors)),
          this._off(i.not(this.panels))));
    },
    _getList: function () {
      return this.tablist || this.element.find("ol, ul").eq(0);
    },
    _createPanel: function (t) {
      return Q("<div>").attr("id", t).data("ui-tabs-destroy", !0);
    },
    _setOptionDisabled: function (t) {
      var e, i;
      for (
        Array.isArray(t) &&
          (t.length ? t.length === this.anchors.length && (t = !0) : (t = !1)),
          i = 0;
        (e = this.tabs[i]);
        i++
      )
        ((e = Q(e)),
          !0 === t || -1 !== Q.inArray(i, t)
            ? (e.attr("aria-disabled", "true"),
              this._addClass(e, null, "ui-state-disabled"))
            : (e.removeAttr("aria-disabled"),
              this._removeClass(e, null, "ui-state-disabled")));
      ((this.options.disabled = t),
        this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !0 === t,
        ));
    },
    _setupEvents: function (t) {
      var i = {};
      (t &&
        Q.each(t.split(" "), function (t, e) {
          i[e] = "_eventHandler";
        }),
        this._off(this.anchors.add(this.tabs).add(this.panels)),
        this._on(!0, this.anchors, {
          click: function (t) {
            t.preventDefault();
          },
        }),
        this._on(this.anchors, i),
        this._on(this.tabs, { keydown: "_tabKeydown" }),
        this._on(this.panels, { keydown: "_panelKeydown" }),
        this._focusable(this.tabs),
        this._hoverable(this.tabs));
    },
    _setupHeightStyle: function (t) {
      var i,
        e = this.element.parent();
      "fill" === t
        ? ((i = e.height()),
          (i -= this.element.outerHeight() - this.element.height()),
          this.element.siblings(":visible").each(function () {
            var t = Q(this),
              e = t.css("position");
            "absolute" !== e && "fixed" !== e && (i -= t.outerHeight(!0));
          }),
          this.element
            .children()
            .not(this.panels)
            .each(function () {
              i -= Q(this).outerHeight(!0);
            }),
          this.panels
            .each(function () {
              Q(this).height(
                Math.max(0, i - Q(this).innerHeight() + Q(this).height()),
              );
            })
            .css("overflow", "auto"))
        : "auto" === t &&
          ((i = 0),
          this.panels
            .each(function () {
              i = Math.max(i, Q(this).height("").height());
            })
            .height(i));
    },
    _eventHandler: function (t) {
      var e = this.options,
        i = this.active,
        n = Q(t.currentTarget).closest("li"),
        o = n[0] === i[0],
        r = o && e.collapsible,
        s = r ? Q() : this._getPanelForTab(n),
        a = i.length ? this._getPanelForTab(i) : Q(),
        i = { oldTab: i, oldPanel: a, newTab: r ? Q() : n, newPanel: s };
      (t.preventDefault(),
        n.hasClass("ui-state-disabled") ||
          n.hasClass("ui-tabs-loading") ||
          this.running ||
          (o && !e.collapsible) ||
          !1 === this._trigger("beforeActivate", t, i) ||
          ((e.active = !r && this.tabs.index(n)),
          (this.active = o ? Q() : n),
          this.xhr && this.xhr.abort(),
          a.length ||
            s.length ||
            Q.error("jQuery UI Tabs: Mismatching fragment identifier."),
          s.length && this.load(this.tabs.index(n), t),
          this._toggle(t, i)));
    },
    _toggle: function (t, e) {
      var i = this,
        n = e.newPanel,
        o = e.oldPanel;
      function r() {
        ((i.running = !1), i._trigger("activate", t, e));
      }
      function s() {
        (i._addClass(
          e.newTab.closest("li"),
          "ui-tabs-active",
          "ui-state-active",
        ),
          n.length && i.options.show
            ? i._show(n, i.options.show, r)
            : (n.show(), r()));
      }
      ((this.running = !0),
        o.length && this.options.hide
          ? this._hide(o, this.options.hide, function () {
              (i._removeClass(
                e.oldTab.closest("li"),
                "ui-tabs-active",
                "ui-state-active",
              ),
                s());
            })
          : (this._removeClass(
              e.oldTab.closest("li"),
              "ui-tabs-active",
              "ui-state-active",
            ),
            o.hide(),
            s()),
        o.attr("aria-hidden", "true"),
        e.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }),
        n.length && o.length
          ? e.oldTab.attr("tabIndex", -1)
          : n.length &&
            this.tabs
              .filter(function () {
                return 0 === Q(this).attr("tabIndex");
              })
              .attr("tabIndex", -1),
        n.attr("aria-hidden", "false"),
        e.newTab.attr({
          "aria-selected": "true",
          "aria-expanded": "true",
          tabIndex: 0,
        }));
    },
    _activate: function (t) {
      var t = this._findActive(t);
      t[0] !== this.active[0] &&
        ((t = (t = !t.length ? this.active : t).find(".ui-tabs-anchor")[0]),
        this._eventHandler({
          target: t,
          currentTarget: t,
          preventDefault: Q.noop,
        }));
    },
    _findActive: function (t) {
      return !1 === t ? Q() : this.tabs.eq(t);
    },
    _getIndex: function (t) {
      return (t =
        "string" == typeof t
          ? this.anchors.index(
              this.anchors.filter("[href$='" + Q.escapeSelector(t) + "']"),
            )
          : t);
    },
    _destroy: function () {
      (this.xhr && this.xhr.abort(),
        this.tablist.removeAttr("role").off(this.eventNamespace),
        this.anchors.removeAttr("role tabIndex").removeUniqueId(),
        this.tabs.add(this.panels).each(function () {
          Q.data(this, "ui-tabs-destroy")
            ? Q(this).remove()
            : Q(this).removeAttr(
                "role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded",
              );
        }),
        this.tabs.each(function () {
          var t = Q(this),
            e = t.data("ui-tabs-aria-controls");
          e
            ? t.attr("aria-controls", e).removeData("ui-tabs-aria-controls")
            : t.removeAttr("aria-controls");
        }),
        this.panels.show(),
        "content" !== this.options.heightStyle &&
          this.panels.css("height", ""));
    },
    enable: function (i) {
      var t = this.options.disabled;
      !1 !== t &&
        ((t =
          void 0 !== i &&
          ((i = this._getIndex(i)),
          Array.isArray(t)
            ? Q.map(t, function (t) {
                return t !== i ? t : null;
              })
            : Q.map(this.tabs, function (t, e) {
                return e !== i ? e : null;
              }))),
        this._setOptionDisabled(t));
    },
    disable: function (t) {
      var e = this.options.disabled;
      if (!0 !== e) {
        if (void 0 === t) e = !0;
        else {
          if (((t = this._getIndex(t)), -1 !== Q.inArray(t, e))) return;
          e = Array.isArray(e) ? Q.merge([t], e).sort() : [t];
        }
        this._setOptionDisabled(e);
      }
    },
    load: function (t, n) {
      t = this._getIndex(t);
      function o(t, e) {
        ("abort" === e && r.panels.stop(!1, !0),
          r._removeClass(i, "ui-tabs-loading"),
          s.removeAttr("aria-busy"),
          t === r.xhr && delete r.xhr);
      }
      var r = this,
        i = this.tabs.eq(t),
        t = i.find(".ui-tabs-anchor"),
        s = this._getPanelForTab(i),
        a = { tab: i, panel: s };
      this._isLocal(t[0]) ||
        ((this.xhr = Q.ajax(this._ajaxSettings(t, n, a))),
        this.xhr &&
          "canceled" !== this.xhr.statusText &&
          (this._addClass(i, "ui-tabs-loading"),
          s.attr("aria-busy", "true"),
          this.xhr
            .done(function (t, e, i) {
              setTimeout(function () {
                (s.html(t), r._trigger("load", n, a), o(i, e));
              }, 1);
            })
            .fail(function (t, e) {
              setTimeout(function () {
                o(t, e);
              }, 1);
            })));
    },
    _ajaxSettings: function (t, i, n) {
      var o = this;
      return {
        url: t.attr("href").replace(/#.*$/, ""),
        beforeSend: function (t, e) {
          return o._trigger(
            "beforeLoad",
            i,
            Q.extend({ jqXHR: t, ajaxSettings: e }, n),
          );
        },
      };
    },
    _getPanelForTab: function (t) {
      t = Q(t).attr("aria-controls");
      return this.element.find(this._sanitizeSelector("#" + t));
    },
  }),
    !1 !== Q.uiBackCompat &&
      Q.widget("ui.tabs", Q.ui.tabs, {
        _processTabs: function () {
          (this._superApply(arguments), this._addClass(this.tabs, "ui-tab"));
        },
      }));
  Q.ui.tabs;
  (Q.widget("ui.tooltip", {
    version: "1.13.0",
    options: {
      classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" },
      content: function () {
        var t = Q(this).attr("title");
        return Q("<a>").text(t).html();
      },
      hide: !0,
      items: "[title]:not([disabled])",
      position: {
        my: "left top+15",
        at: "left bottom",
        collision: "flipfit flip",
      },
      show: !0,
      track: !1,
      close: null,
      open: null,
    },
    _addDescribedBy: function (t, e) {
      var i = (t.attr("aria-describedby") || "").split(/\s+/);
      (i.push(e),
        t
          .data("ui-tooltip-id", e)
          .attr("aria-describedby", String.prototype.trim.call(i.join(" "))));
    },
    _removeDescribedBy: function (t) {
      var e = t.data("ui-tooltip-id"),
        i = (t.attr("aria-describedby") || "").split(/\s+/),
        e = Q.inArray(e, i);
      (-1 !== e && i.splice(e, 1),
        t.removeData("ui-tooltip-id"),
        (i = String.prototype.trim.call(i.join(" ")))
          ? t.attr("aria-describedby", i)
          : t.removeAttr("aria-describedby"));
    },
    _create: function () {
      (this._on({ mouseover: "open", focusin: "open" }),
        (this.tooltips = {}),
        (this.parents = {}),
        (this.liveRegion = Q("<div>")
          .attr({
            role: "log",
            "aria-live": "assertive",
            "aria-relevant": "additions",
          })
          .appendTo(this.document[0].body)),
        this._addClass(this.liveRegion, null, "ui-helper-hidden-accessible"),
        (this.disabledTitles = Q([])));
    },
    _setOption: function (t, e) {
      var i = this;
      (this._super(t, e),
        "content" === t &&
          Q.each(this.tooltips, function (t, e) {
            i._updateContent(e.element);
          }));
    },
    _setOptionDisabled: function (t) {
      this[t ? "_disable" : "_enable"]();
    },
    _disable: function () {
      var n = this;
      (Q.each(this.tooltips, function (t, e) {
        var i = Q.Event("blur");
        ((i.target = i.currentTarget = e.element[0]), n.close(i, !0));
      }),
        (this.disabledTitles = this.disabledTitles.add(
          this.element
            .find(this.options.items)
            .addBack()
            .filter(function () {
              var t = Q(this);
              if (t.is("[title]"))
                return t
                  .data("ui-tooltip-title", t.attr("title"))
                  .removeAttr("title");
            }),
        )));
    },
    _enable: function () {
      (this.disabledTitles.each(function () {
        var t = Q(this);
        t.data("ui-tooltip-title") &&
          t.attr("title", t.data("ui-tooltip-title"));
      }),
        (this.disabledTitles = Q([])));
    },
    open: function (t) {
      var i = this,
        e = Q(t ? t.target : this.element).closest(this.options.items);
      e.length &&
        !e.data("ui-tooltip-id") &&
        (e.attr("title") && e.data("ui-tooltip-title", e.attr("title")),
        e.data("ui-tooltip-open", !0),
        t &&
          "mouseover" === t.type &&
          e.parents().each(function () {
            var t,
              e = Q(this);
            (e.data("ui-tooltip-open") &&
              (((t = Q.Event("blur")).target = t.currentTarget = this),
              i.close(t, !0)),
              e.attr("title") &&
                (e.uniqueId(),
                (i.parents[this.id] = {
                  element: this,
                  title: e.attr("title"),
                }),
                e.attr("title", "")));
          }),
        this._registerCloseHandlers(t, e),
        this._updateContent(e, t));
    },
    _updateContent: function (e, i) {
      var t = this.options.content,
        n = this,
        o = i ? i.type : null;
      if ("string" == typeof t || t.nodeType || t.jquery)
        return this._open(i, e, t);
      (t = t.call(e[0], function (t) {
        n._delay(function () {
          e.data("ui-tooltip-open") && (i && (i.type = o), this._open(i, e, t));
        });
      })) && this._open(i, e, t);
    },
    _open: function (t, e, i) {
      var n,
        o,
        r,
        s = Q.extend({}, this.options.position);
      function a(t) {
        ((s.of = t), o.is(":hidden") || o.position(s));
      }
      i &&
        ((n = this._find(e))
          ? n.tooltip.find(".ui-tooltip-content").html(i)
          : (e.is("[title]") &&
              (t && "mouseover" === t.type
                ? e.attr("title", "")
                : e.removeAttr("title")),
            (n = this._tooltip(e)),
            (o = n.tooltip),
            this._addDescribedBy(e, o.attr("id")),
            o.find(".ui-tooltip-content").html(i),
            this.liveRegion.children().hide(),
            (i = Q("<div>").html(o.find(".ui-tooltip-content").html()))
              .removeAttr("name")
              .find("[name]")
              .removeAttr("name"),
            i.removeAttr("id").find("[id]").removeAttr("id"),
            i.appendTo(this.liveRegion),
            this.options.track && t && /^mouse/.test(t.type)
              ? (this._on(this.document, { mousemove: a }), a(t))
              : o.position(Q.extend({ of: e }, this.options.position)),
            o.hide(),
            this._show(o, this.options.show),
            this.options.track &&
              this.options.show &&
              this.options.show.delay &&
              (r = this.delayedShow =
                setInterval(function () {
                  o.is(":visible") && (a(s.of), clearInterval(r));
                }, 13)),
            this._trigger("open", t, { tooltip: o })));
    },
    _registerCloseHandlers: function (t, e) {
      var i = {
        keyup: function (t) {
          t.keyCode === Q.ui.keyCode.ESCAPE &&
            (((t = Q.Event(t)).currentTarget = e[0]), this.close(t, !0));
        },
      };
      (e[0] !== this.element[0] &&
        (i.remove = function () {
          this._removeTooltip(this._find(e).tooltip);
        }),
        (t && "mouseover" !== t.type) || (i.mouseleave = "close"),
        (t && "focusin" !== t.type) || (i.focusout = "close"),
        this._on(!0, e, i));
    },
    close: function (t) {
      var e,
        i = this,
        n = Q(t ? t.currentTarget : this.element),
        o = this._find(n);
      o
        ? ((e = o.tooltip),
          o.closing ||
            (clearInterval(this.delayedShow),
            n.data("ui-tooltip-title") &&
              !n.attr("title") &&
              n.attr("title", n.data("ui-tooltip-title")),
            this._removeDescribedBy(n),
            (o.hiding = !0),
            e.stop(!0),
            this._hide(e, this.options.hide, function () {
              i._removeTooltip(Q(this));
            }),
            n.removeData("ui-tooltip-open"),
            this._off(n, "mouseleave focusout keyup"),
            n[0] !== this.element[0] && this._off(n, "remove"),
            this._off(this.document, "mousemove"),
            t &&
              "mouseleave" === t.type &&
              Q.each(this.parents, function (t, e) {
                (Q(e.element).attr("title", e.title), delete i.parents[t]);
              }),
            (o.closing = !0),
            this._trigger("close", t, { tooltip: e }),
            o.hiding || (o.closing = !1)))
        : n.removeData("ui-tooltip-open");
    },
    _tooltip: function (t) {
      var e = Q("<div>").attr("role", "tooltip"),
        i = Q("<div>").appendTo(e),
        n = e.uniqueId().attr("id");
      return (
        this._addClass(i, "ui-tooltip-content"),
        this._addClass(e, "ui-tooltip", "ui-widget ui-widget-content"),
        e.appendTo(this._appendTo(t)),
        (this.tooltips[n] = { element: t, tooltip: e })
      );
    },
    _find: function (t) {
      t = t.data("ui-tooltip-id");
      return t ? this.tooltips[t] : null;
    },
    _removeTooltip: function (t) {
      (clearInterval(this.delayedShow),
        t.remove(),
        delete this.tooltips[t.attr("id")]);
    },
    _appendTo: function (t) {
      t = t.closest(".ui-front, dialog");
      return (t = !t.length ? this.document[0].body : t);
    },
    _destroy: function () {
      var n = this;
      (Q.each(this.tooltips, function (t, e) {
        var i = Q.Event("blur"),
          e = e.element;
        ((i.target = i.currentTarget = e[0]),
          n.close(i, !0),
          Q("#" + t).remove(),
          e.data("ui-tooltip-title") &&
            (e.attr("title") || e.attr("title", e.data("ui-tooltip-title")),
            e.removeData("ui-tooltip-title")));
      }),
        this.liveRegion.remove());
    },
  }),
    !1 !== Q.uiBackCompat &&
      Q.widget("ui.tooltip", Q.ui.tooltip, {
        options: { tooltipClass: null },
        _tooltip: function () {
          var t = this._superApply(arguments);
          return (
            this.options.tooltipClass &&
              t.tooltip.addClass(this.options.tooltipClass),
            t
          );
        },
      }));
  Q.ui.tooltip;
}),
  (function (t) {
    var e, i, n;
    function o(t, e) {
      var i, n;
      1 < t.originalEvent.touches.length ||
        (t.preventDefault(),
        (i = t.originalEvent.changedTouches[0]),
        (n = document.createEvent("MouseEvents")).initMouseEvent(
          e,
          !0,
          !0,
          window,
          1,
          i.screenX,
          i.screenY,
          i.clientX,
          i.clientY,
          !1,
          !1,
          !1,
          !1,
          0,
          null,
        ),
        t.target.dispatchEvent(n));
    }
    ((t.support.touch =
      "ontouchend" in document || 0 < navigator.maxTouchPoints),
      t.support.touch &&
        ((e = t.ui.mouse.prototype),
        (i = e._mouseInit),
        (e._touchStart = function (t) {
          !n &&
            this._mouseCapture(t.originalEvent.changedTouches[0]) &&
            ((n = !0),
            (this._touchMoved = !1),
            o(t, "mouseover"),
            o(t, "mousemove"),
            o(t, "mousedown"));
        }),
        (e._touchMove = function (t) {
          n && ((this._touchMoved = !0), o(t, "mousemove"));
        }),
        (e._touchEnd = function (t) {
          n &&
            (o(t, "mouseup"),
            o(t, "mouseout"),
            this._touchMoved || o(t, "click"),
            (n = !1));
        }),
        (e._mouseInit = function () {
          (this.element
            .bind("touchstart", t.proxy(this, "_touchStart"))
            .bind("touchmove", t.proxy(this, "_touchMove"))
            .bind("touchend", t.proxy(this, "_touchEnd")),
            i.call(this));
        })));
  })(jQuery),
  (function (t) {
    (t.widget("ui.dialog", t.ui.dialog, {
      _allowInteraction: function (t) {
        return !0;
      },
    }),
      (t.ui.dialog.prototype._focusTabbable = function () {}));
  })(jQuery));
/*!@license H5P.DragNDrop-1.1/drag-n-drop.js by Frode Petterson licensed under unknown license*/ jQuery =
  oldJQuery;
(((H5P = H5P || {}).DragNDrop = function (t, e) {
  (H5P.EventDispatcher.call(this),
    (this.dnb = t),
    (this.$container = e),
    (this.scrollLeft = 0),
    (this.scrollTop = 0));
}),
  (H5P.DragNDrop.prototype = Object.create(H5P.EventDispatcher.prototype)),
  (H5P.DragNDrop.prototype.constructor = H5P.DragNDrop),
  (H5P.DragNDrop.prototype.setElement = function (t) {
    this.$element = t;
  }),
  (H5P.DragNDrop.prototype.press = function (t, e, i) {
    var n = { instance: this };
    (H5P.$window
      .mousemove(n, H5P.DragNDrop.moveHandler)
      .bind("mouseup", n, H5P.DragNDrop.release),
      (H5P.$body
        .css({ "-moz-user-select": "none", "-webkit-user-select": "none" })
        .attr("unselectable", "on")[0].onselectstart =
        H5P.$body[0].ondragstart =
          function () {
            return !1;
          }),
      (this.containerOffset = t.offsetParent().offset()),
      (this.$element = t),
      (this.moving = !1),
      (this.startX = e),
      (this.startY = i),
      (this.containerWidth = this.$container[0].getBoundingClientRect().width),
      (this.containerHeight =
        this.$container[0].getBoundingClientRect().height),
      (this.marginX =
        parseInt(t.css("marginLeft")) + parseInt(t.css("marginRight"))),
      (this.marginY =
        parseInt(t.css("marginTop")) + parseInt(t.css("marginBottom"))));
    t = t.offset();
    ((this.adjust = {
      x: e - t.left + this.marginX,
      y: i - t.top - this.marginY,
    }),
      this.dnb && this.dnb.newElement && this.move(e, i));
  }),
  (H5P.DragNDrop.moveHandler = function (t) {
    (t.stopPropagation(), t.data.instance.move(t.pageX, t.pageY));
  }),
  (H5P.DragNDrop.prototype.move = function (t, e) {
    if (!this.moving) {
      if (
        void 0 !== this.startMovingCallback &&
        !this.startMovingCallback(t, e)
      )
        return;
      ((this.moving = !0), this.$element.addClass("h5p-moving"));
    }
    let i = 0;
    {
      const b = window.getComputedStyle(this.$element[0]),
        y = b.getPropertyValue("transform");
      "none" !== y &&
        ((v = (m = y.split("(")[1].split(")")[0].split(","))[0]),
        (g = m[1]),
        (i = Math.round(Math.atan2(g, v) * (180 / Math.PI))));
    }
    const n = this.$element[0];
    let o, r, s, a;
    const l = n.style.transform.split("px");
    let c = 0,
      u = 0;
    ("" != l[0] &&
      ((c = parseInt(l[0].match(/-?\d+/g))),
      (u = parseInt(l[1].match(/-?\d+/g)))),
      (o = n.style.left.includes("%")
        ? (this.containerWidth * parseInt(n.style.left)) / 100 + c
        : parseInt(n.style.left) + c),
      (r = n.style.top.includes("%")
        ? (this.containerHeight * parseInt(n.style.top)) / 100 + u
        : parseInt(n.style.top) + u),
      (s = n.style.width.includes("%")
        ? (this.containerWidth * parseInt(n.style.width)) / 100
        : n.style.width.includes("em")
          ? 16 * parseFloat(n.style.width)
          : parseInt(n.style.width)),
      (a = n.style.height.includes("%")
        ? (this.containerHeight * parseInt(n.style.height)) / 100
        : n.style.width.includes("em")
          ? 16 * parseFloat(n.style.height)
          : parseInt(n.style.height)));
    var h = [o + 0.5 * s, r + 0.5 * a],
      d = [h[0] + 0.5 * s, h[1] - 0.5 * a],
      p = [h[0] - 0.5 * s, h[1] - 0.5 * a],
      f = (180 * Math.atan2(h[1] - d[1], d[0] - h[0])) / Math.PI,
      m = (180 * Math.atan2(h[1] - p[1], p[0] - h[0])) / Math.PI,
      g = -f,
      v = -m,
      d = Math.sqrt(Math.pow(s / 2, 2) + Math.pow(a / 2, 2)),
      p = this.findNewPoint(h[0], h[1], f - i, d),
      f = this.findNewPoint(h[0], h[1], m - i, d),
      m = this.findNewPoint(h[0], h[1], g - i, d),
      g = this.findNewPoint(h[0], h[1], v - i, d),
      h = Math.max(p[0], f[0], g[0], m[0]) - (o + s),
      v = Math.min(p[0], f[0], g[0], m[0]),
      d = o - v,
      v = Math.min(p[1], f[1], g[1], m[1]),
      v = r - v,
      f = Math.max(p[1], f[1], g[1], m[1]) - (r + a);
    ((t -= this.adjust.x), (e -= this.adjust.y));
    ((g = t - this.containerOffset.left + this.scrollLeft + d),
      (m = e - this.containerOffset.top + this.scrollTop + v));
    (void 0 !== this.snap &&
      ((g = Math.round(g / this.snap) * this.snap),
      (m = Math.round(m / this.snap) * this.snap)),
      void 0 !== this.min &&
        (g - d < this.min.x &&
          ((g = this.min.x + d),
          (t = this.min.x + this.containerOffset.left - this.scrollLeft)),
        m - v < this.min.y &&
          ((m = this.min.y + v),
          (e = this.min.y + this.containerOffset.top - this.scrollTop))),
      this.dnb && this.dnb.newElement && 0 <= m && (this.min.y = 0),
      void 0 !== this.max &&
        (g + s + h > this.max.x + s &&
          ((g = this.max.x - h),
          (t = this.max.x + this.containerOffset.left - this.scrollLeft)),
        m + a + f > this.max.y + a &&
          ((m = this.max.y - f),
          (e = this.max.y + this.containerOffset.top - this.scrollTop))));
    ((h =
      this.startX -
      this.adjust.x -
      this.containerOffset.left +
      this.scrollLeft),
      (f =
        this.startY -
        this.adjust.y -
        this.containerOffset.top +
        this.scrollTop));
    (this.snap || (g === h && m === f)
      ? this.snap &&
        ((h =
          Math.round(g / this.snap) * this.snap !=
          Math.round(h / this.snap) * this.snap),
        (f =
          Math.round(m / this.snap) * this.snap !=
          Math.round(f / this.snap) * this.snap),
        (h || f) && this.trigger("showTransformPanel"))
      : this.trigger("showTransformPanel"),
      this.$element.css({ left: g - c, top: m - u }),
      this.dnb && this.dnb.updateCoordinates(),
      this.moveCallback && this.moveCallback(t, e, this.$element));
  }),
  (H5P.DragNDrop.prototype.findNewPoint = function (t, e, i, n) {
    let o = [];
    return (
      o.push(Math.cos((i * Math.PI) / 180) * n + t),
      o.push(-Math.sin((i * Math.PI) / 180) * n + e),
      o
    );
  }),
  (H5P.DragNDrop.release = function (t) {
    var e = t.data.instance;
    (H5P.$window
      .unbind("mousemove", H5P.DragNDrop.moveHandler)
      .unbind("mouseup", H5P.DragNDrop.release),
      (H5P.$body
        .css({ "-moz-user-select": "", "-webkit-user-select": "" })
        .removeAttr("unselectable")[0].onselectstart =
        H5P.$body[0].ondragstart =
          null),
      void 0 !== e.releaseCallback && e.releaseCallback(),
      e.moving &&
        (e.$element.removeClass("h5p-moving"),
        void 0 !== e.stopMovingCallback && e.stopMovingCallback(t)),
      e.trigger("hideTransformPanel"));
  }) /*!@license H5P.DragNResize-1.2/H5P.DragNResize.js by Frode Petterson licensed under unknown license*/,
  (H5P.DragNResize = (function (t, i) {
    function o(t) {
      var e = this;
      ((this.$container = t),
        (e.disabledModifiers = !1),
        (this.minSize = H5P.DragNResize.MIN_SIZE),
        i.call(this),
        H5P.$body
          .keydown(function (t) {
            e.disabledModifiers ||
              (17 === t.keyCode
                ? (e.revertSnap = !0)
                : 16 === t.keyCode && (e.revertLock = !0));
          })
          .keyup(function (t) {
            e.disabledModifiers ||
              (17 === t.keyCode
                ? (e.revertSnap = !1)
                : 16 === t.keyCode && (e.revertLock = !1));
          }));
    }
    return (
      (((o.prototype = Object.create(i.prototype)).constructor =
        o).prototype.add = function (n, o) {
        function e(e, i) {
          t("<div>", { class: "h5p-dragnresize-handle " + e })
            .mousedown(function (t) {
              ((r.lock = o && (o.lock || (i && o.cornerLock))),
                o.cornerLock && (r.isImage = !0),
                (r.$element = n),
                r.press(t.clientX, t.clientY, e, o.minSize));
            })
            .data("position", e)
            .appendTo(n);
        }
        var r = this;
        (o.directionLock ||
          ["nw", "ne", "sw", "se"].forEach(function (t) {
            e(t, !0);
          }),
          (o && o.lock) ||
            ("vertical" != o.directionLock &&
              ["w", "e"].forEach(function (t) {
                e(t);
              }),
            "horizontal" != o.directionLock &&
              ["n", "s"].forEach(function (t) {
                e(t);
              })),
          o.minSize
            ? (this.minSize = o.minSize)
            : (this.minSize = H5P.DragNResize.MIN_SIZE));
      }),
      (o.prototype.getElementPaddings = function () {
        return {
          horizontal:
            Number(this.$element.css("padding-left").replace("px", "")) +
            Number(this.$element.css("padding-right").replace("px", "")),
          vertical:
            Number(this.$element.css("padding-top").replace("px", "")) +
            Number(this.$element.css("padding-bottom").replace("px", "")),
        };
      }),
      (o.prototype.getElementBorders = function () {
        return {
          horizontal:
            Number(this.$element.css("border-left-width").replace("px", "")) +
            Number(this.$element.css("border-right-width").replace("px", "")),
          vertical:
            Number(this.$element.css("border-top-width").replace("px", "")) +
            Number(this.$element.css("border-bottom-width").replace("px", "")),
        };
      }),
      (o.prototype.setContainerEm = function (t) {
        this.containerEm = t;
      }),
      (o.prototype.press = function (t, e, i, n) {
        this.active = !0;
        i = { instance: this, direction: i };
        ((this.minSize = n || H5P.DragNResize.MIN_SIZE),
          H5P.$window.bind("mouseup", i, o.release).mousemove(i, o.move),
          (H5P.$body
            .css({
              "-moz-user-select": "none",
              "-webkit-user-select": "none",
              "user-select": "none",
              "-ms-user-select": "none",
            })
            .attr("unselectable", "on")[0].onselectstart =
            H5P.$body[0].ondragstart =
              function () {
                return !1;
              }),
          (this.startX = t),
          (this.startY = e),
          (this.padding = this.getElementPaddings()),
          (this.borders = this.getElementBorders()),
          (this.startWidth = this.$element.outerWidth()),
          (this.startHeight = this.$element.outerHeight()),
          (this.ratio = this.startWidth / this.startHeight));
        e = this.$element.position();
        ((this.left = e.left),
          (this.top = e.top),
          (this.containerWidth = this.$container.width()),
          (this.containerHeight = this.$container.height()),
          (this.newLeft = this.left),
          (this.newTop = this.top),
          (this.newWidth = this.startWidth),
          (this.newHeight = this.startHeight),
          this.trigger("startResizing", i),
          this.trigger("showTransformPanel"));
      }),
      (o.move = function (t) {
        var e = t.data.direction || "se",
          i = t.data.instance,
          n = "nw" === e || "sw" === e || "w" === e,
          o = "nw" === e || "ne" === e || "n" === e,
          r = "nw" === e || "ne" === e || "sw" === e || "se" === e,
          s = "w" === e || "e" === e,
          a = "n" === e || "s" === e,
          e = i.startX - t.clientX,
          t = i.startY - t.clientY;
        ((i.minLeft = i.left + i.startWidth - i.minSize),
          (i.minTop = i.top + i.startHeight - i.minSize),
          n
            ? ((i.newLeft = i.left - e),
              (i.newWidth = i.startWidth + e),
              i.newLeft < 0
                ? ((i.newLeft = 0), (i.newWidth = i.left + i.startWidth))
                : i.newLeft > i.minLeft &&
                  ((i.newLeft = i.minLeft),
                  (i.newWidth = i.left - i.minLeft + i.startWidth)),
              i.snap &&
                !i.revertSnap &&
                ((i.newLeft = Math.round(i.newLeft / i.snap) * i.snap),
                i.newLeft > i.minLeft &&
                  (i.newLeft = Math.floor(i.minLeft / i.snap) * i.snap),
                (i.newWidth = i.left - i.newLeft + i.startWidth)))
            : a ||
              ((i.newWidth = i.startWidth - e),
              i.snap &&
                !i.revertSnap &&
                (i.newWidth = Math.round(i.newWidth / i.snap) * i.snap),
              i.left + i.newWidth > i.containerWidth &&
                (i.newWidth = i.containerWidth - i.left)),
          o
            ? ((i.newTop = i.top - t),
              (i.newHeight = i.startHeight + t),
              i.newTop < 0
                ? ((i.newTop = 0), (i.newHeight = i.top + i.startHeight))
                : i.newTop > i.minTop &&
                  ((i.newTop = i.minTop),
                  (i.newHeight = i.top - i.minTop + i.startHeight)),
              i.snap &&
                !i.revertSnap &&
                ((i.newTop = Math.round(i.newTop / i.snap) * i.snap),
                i.newTop > i.minTop &&
                  (i.newTop = Math.floor(i.minTop / i.snap) * i.snap),
                (i.newHeight = i.top - i.newTop + i.startHeight)))
            : s ||
              ((i.newHeight = i.startHeight - t),
              i.snap &&
                !i.revertSnap &&
                (i.newHeight = Math.round(i.newHeight / i.snap) * i.snap),
              i.top + i.newHeight > i.containerHeight &&
                (i.newHeight = i.containerHeight - i.top)),
          i.newWidth <= i.minSize && (i.newWidth = i.minSize),
          i.newHeight <= i.minSize && (i.newHeight = i.minSize),
          !(i.revertLock ? !i.lock : i.lock) ||
            (!r && i.isImage) ||
            i.lockDimensions(n, o, a, s),
          (i.finalWidth = i.newWidth),
          (i.finalHeight = i.newHeight),
          "border-box" !== i.$element.css("boxSizing") &&
            ((i.finalWidth -= i.padding.horizontal + i.borders.horizontal),
            (i.finalHeight -= i.padding.vertical + i.borders.vertical)),
          i.$element.css({
            width: i.finalWidth / i.containerEm + "em",
            height: i.finalHeight / i.containerEm + "em",
            left: (i.newLeft / i.containerWidth) * 100 + "%",
            top: (i.newTop / i.containerHeight) * 100 + "%",
          }),
          i.trigger("moveResizing"));
      }),
      (o.prototype.lockDimensions = function (t, e, i, n) {
        function o(t) {
          t &&
            ((r.newTop = r.top - (r.newHeight - r.startHeight)),
            r.newTop <= 0 && (r.newTop = 0));
        }
        var r = this;
        (i
          ? ((this.newWidth = this.newHeight * this.ratio),
            this.newWidth < this.minSize &&
              ((this.newWidth = this.minSize),
              (this.newHeight = this.minSize / this.ratio)))
          : n
            ? ((this.newHeight = this.newWidth / this.ratio),
              this.newHeight < this.minSize &&
                ((this.newHeight = this.minSize),
                (this.newWidth = this.minSize * this.ratio)))
            : this.newWidth / this.startWidth >
                this.newHeight / this.startHeight
              ? (this.newHeight = this.newWidth / this.ratio)
              : (this.newWidth = this.newHeight * this.ratio),
          e
            ? (o(e),
              r.newTop <= 0 &&
                ((r.newHeight = r.top + r.startHeight),
                (r.newWidth = r.newHeight * r.ratio)))
            : this.top + this.newHeight > this.containerHeight &&
              ((this.newHeight = this.containerHeight - this.top),
              (this.newWidth = this.newHeight * this.ratio)),
          t
            ? ((this.newLeft = this.left - (this.newWidth - this.startWidth)),
              this.newLeft <= 0 &&
                ((this.newLeft = 0),
                (this.newWidth = this.left + this.startWidth),
                (this.newHeight = this.newWidth / this.ratio)))
            : this.left + this.newWidth > this.containerWidth &&
              ((this.newWidth = this.containerWidth - this.left),
              (this.newHeight = this.newWidth / this.ratio)),
          o(e));
      }),
      (o.release = function (t) {
        var e = t.data.instance;
        ((e.active = !1),
          H5P.$window.unbind("mouseup", o.release).unbind("mousemove", o.move),
          (H5P.$body
            .css({
              "-moz-user-select": "",
              "-webkit-user-select": "",
              "user-select": "",
              "-ms-user-select": "",
            })
            .removeAttr("unselectable")[0].onselectstart =
            H5P.$body[0].ondragstart =
              null),
          (e.newWidth === e.startWidth && e.newHeight === e.startHeight) ||
            e.trigger("stoppedResizing", {
              left: e.newLeft,
              top: e.newTop,
              width: e.finalWidth / e.containerEm,
              height: e.finalHeight / e.containerEm,
            }),
          setTimeout(function () {
            e.$element.focus();
          }, 0),
          e.trigger("hideTransformPanel"));
      }),
      (o.prototype.toggleModifiers = function (t) {
        this.disabledModifiers = void 0 === t ? !this.disabledModifiers : !t;
      }),
      (o.MIN_SIZE = 24),
      o
    );
  })(
    H5P.jQuery,
    H5P.EventDispatcher,
  )) /*!@license H5P.DragNBar-1.5/scripts/drag-n-bar.js by Joubel licensed under unknown license*/,
  (H5P.DragNBar = (function (o) {
    var s = 0;
    function t(t, e, i, n) {
      var r = this;
      (o.call(this),
        (this.overflowThreshold = 13),
        (this.buttons = t),
        (this.$container = e),
        (this.$dialogContainer = i),
        (this.dnd = new H5P.DragNDrop(this, e)),
        (this.dnd.snap = 10),
        (this.newElement = !1),
        (this.enabled = !0));
      ((n = H5P.jQuery.extend({ disableEditor: !1, enableCopyPaste: !0 }, n)),
        (this.enableCopyPaste = n.enableCopyPaste),
        (this.isEditor = !n.disableEditor),
        (this.$blurHandlers = n.$blurHandlers || void 0),
        (this.libraries = n.libraries),
        (this.instanceIndex = s++),
        (this.elements = []),
        (this.dialog = new H5P.DragNBarDialog(i, e)),
        this.$container.addClass("hardware-accelerated"),
        this.isEditor &&
          ((this.transformButtonActive = !1),
          this.initEditor(),
          this.initClickListeners(),
          H5P.$window.resize(function () {
            r.resize();
          })),
        (this.addButtonGroup = function (t, e, i) {
          const n = H5P.jQuery(
            '<li class="h5p-dragnbar-li h5p-dragnbar-button-group" data-label="Image"></li>',
          );
          i &&
            i.title &&
            "" !== i.title &&
            H5P.jQuery(
              '<div class="h5p-dragnbar-button-title">' + i.title + "</div>",
            ).appendTo(n);
          const o = H5P.jQuery(
            '<ul class="h5p-dragnbar-button-buttons h5p-dragnbar-ul"></ul>',
          ).appendTo(n);
          return (
            t.forEach(function (t) {
              r.addButton(t, o);
            }),
            n.insertAfter(e.parent()),
            n
          );
        }));
    }
    return ((t.prototype = Object.create(o.prototype)).constructor = t);
  })(H5P.EventDispatcher)),
  (H5P.DragNBar.prototype.initEditor = function () {
    var i = this;
    function t(t) {
      i.focusedElement &&
        i.focusedElement.contextMenu.trigger("contextMenuTransform", {
          showTransformPanel: t,
        });
    }
    ((this.dnr = new H5P.DragNResize(this.$container)),
      (this.dnr.snap = 10),
      this.dnr.on("moveResizing", function () {
        var t = i.$element.offset(),
          e = i.$element.position();
        i.updateCoordinates(t.left, t.top, e.left, e.top);
      }),
      this.dnr.on("stoppedResizing", function () {
        ((i.pressed = !0),
          setTimeout(function () {
            delete i.pressed;
          }, 10));
      }),
      this.dnr.on("showTransformPanel", function () {
        t(!0);
      }),
      this.dnd.on("showTransformPanel", function () {
        t(!0);
      }),
      this.dnr.on("hideTransformPanel", function () {
        i.transformButtonActive || t(!1);
      }),
      this.dnd.on("hideTransformPanel", function () {
        i.transformButtonActive || t(!1);
      }),
      (this.dnd.startMovingCallback = function () {
        return (
          (i.dnd.min = { x: 0, y: 0 }),
          (i.dnd.max = {
            x: i.$container.width() - i.$element.outerWidth(),
            y: i.$container.height() - i.$element.outerHeight(),
          }),
          i.newElement &&
            ((i.dnd.adjust.x = 10),
            (i.dnd.adjust.y = 10),
            (i.dnd.min.y -= i.$list.height())),
          !0
        );
      }),
      (this.dnd.stopMovingCallback = function () {
        var t = {};
        (i.newElement &&
          (i.$container.css("overflow", ""),
          Math.round(parseFloat(i.$element.css("top"))) < 0 &&
            ((t.x = i.dnd.max.x / 2),
            (t.y = i.dnd.max.y / 2),
            i.avoidOverlapping(t, i.$element))),
          (void 0 !== t.x && void 0 !== t.y) ||
            ((t.x = Math.round(parseFloat(i.$element.css("left")))),
            (t.y = Math.round(parseFloat(i.$element.css("top"))))),
          i.stopMoving(t.x, t.y),
          (i.newElement = !1),
          delete i.dnd.min,
          delete i.dnd.max);
      }));
  }),
  (H5P.DragNBar.prototype.avoidOverlapping = function (t, e) {
    var i = e;
    i instanceof H5P.jQuery
      ? ((i = window.getComputedStyle(i[0])),
        (i = { width: parseFloat(i.width), height: parseFloat(i.height) }))
      : (e = void 0);
    for (
      var n = window.getComputedStyle(this.$container[0]),
        o = parseFloat(n.width) - i.width,
        r = parseFloat(n.height) - i.height,
        s = 0;
      s < 16 && this.elementOverlaps(t.x, t.y, e);
    )
      (0 < o && (t.x = Math.floor(Math.random() * o)),
        0 < r && (t.y = Math.floor(Math.random() * r)),
        s++);
  }),
  (H5P.DragNBar.prototype.elementOverlaps = function (t, e, i) {
    ((t = Math.round(t / 10)), (e = Math.round(e / 10)));
    for (var n = 0; n < this.elements.length; n++) {
      var o = this.elements[n];
      if (
        (void 0 === i || o.$element !== i) &&
        t === Math.round(parseFloat(o.$element.css("left")) / 10) &&
        e === Math.round(parseFloat(o.$element.css("top")) / 10)
      )
        return !0;
    }
    return !1;
  }));
var SHIFT = 16,
  CTRL = 17,
  DELETE = 46,
  BACKSPACE = 8,
  C = 67,
  V = 86,
  LEFT = 37,
  UP = 38,
  RIGHT = 39,
  DOWN = 40,
  ctrlDown = !1,
  snapAmount = 1;
((H5P.DragNBar.keydownHandler = function (t) {
  var e = t.data.instance,
    i = document.activeElement;
  (0 === e.$dialogContainer.find(i).length &&
    e.$dialogContainer.get(0) !== i) ||
    (t.which === CTRL &&
      ((ctrlDown = !0), void 0 !== e.dnd.snap && delete e.dnd.snap),
    t.which === SHIFT && (snapAmount = e.dnd.snap),
    t.which === LEFT && e.focusedElement
      ? "true" !== i.contentEditable &&
        void 0 === i.value &&
        (t.preventDefault(), e.moveWithKeys(-snapAmount, 0))
      : t.which === UP && e.focusedElement
        ? "true" !== i.contentEditable &&
          void 0 === i.value &&
          (t.preventDefault(), e.moveWithKeys(0, -snapAmount))
        : t.which === RIGHT && e.focusedElement
          ? "true" !== i.contentEditable &&
            void 0 === i.value &&
            (t.preventDefault(), e.moveWithKeys(snapAmount, 0))
          : t.which === DOWN && e.focusedElement
            ? "true" !== i.contentEditable &&
              void 0 === i.value &&
              (t.preventDefault(), e.moveWithKeys(0, snapAmount))
            : t.which === C &&
                ctrlDown &&
                e.focusedElement &&
                e.$container.is(":visible")
              ? e.copyHandler(t)
              : t.which === V &&
                  ctrlDown &&
                  window.localStorage &&
                  e.$container.is(":visible")
                ? e.pasteHandler(t)
                : (t.which === DELETE || t.which === BACKSPACE) &&
                  e.focusedElement &&
                  e.$container.is(":visible") &&
                  "input" !== i.tagName.toLowerCase() &&
                  void 0 === e.pressed &&
                  (e.focusedElement.contextMenu.trigger("contextMenuRemove"),
                  t.preventDefault()));
}),
  (H5P.DragNBar.prototype.copyHandler = function (t) {
    var e, i;
    this.enableCopyPaste &&
      ((e = void 0 === t ? this : t.data.instance),
      (i = window.getComputedStyle(e.focusedElement.$element[0])),
      (t = parseFloat(i.width)),
      (i = parseFloat(i.height) / t),
      (t /= parseFloat(window.getComputedStyle(e.$container[0]).width) / 100),
      e.focusedElement.toClipboard(t, (i *= t)),
      H5P.externalDispatcher.trigger("datainclipboard", { reset: !1 }));
  }),
  (H5P.DragNBar.prototype.pasteHandler = function (t) {
    var e = void 0 === t ? this : t.data.instance,
      t = document.activeElement;
    if (
      this.enableCopyPaste &&
      !e.preventPaste &&
      !e.dialog.isOpen() &&
      "true" !== t.contentEditable &&
      void 0 === t.value
    ) {
      if (e.$pasteButton.hasClass("disabled")) {
        t = H5PEditor.canPastePlus(H5P.getClipboard(), this.libraries);
        if (!0 !== t.canPaste)
          return void ("pasteTooOld" === t.reason || "pasteTooNew" === t.reason
            ? e.confirmPasteError(t.description, 0, function () {})
            : H5PEditor.attachToastTo(e.$pasteButton.get(0), t.description, {
                position: {
                  horizontal: "center",
                  vertical: "above",
                  noOverflowX: !0,
                },
              }));
      }
      var i = localStorage.getItem("h5pClipboard");
      if (i) {
        try {
          i = JSON.parse(i);
        } catch (t) {
          return void console.error("Unable to parse JSON from clipboard.", t);
        }
        (H5P.DragNBar.updateFileUrls(i.specific, function (e) {
          if ("#tmp" === e.substr(-4, 4) || !i.contentId) return e;
          {
            let t;
            return (
              (t = H5PEditor.contentId
                ? "../" + i.contentId + "/"
                : (H5PEditor.contentRelUrl || "../content/") +
                  i.contentId +
                  "/"),
              e.substr(0, t.length) === t ? e : t + e
            );
          }
        }),
          i.generic &&
            ((i.generic = i.specific[i.generic]),
            delete i.generic.subContentId),
          e.trigger("paste", i));
      }
    }
  }),
  (H5P.DragNBar.prototype.setCanPaste = function (t) {
    ((t = t || !1),
      this.$pasteButton && this.$pasteButton.toggleClass("disabled", !t));
  }),
  (H5P.DragNBar.prototype.confirmPasteError = function (t, e, i) {
    t = new H5P.ConfirmationDialog({
      headerText: H5PEditor.t("core", "pasteError"),
      dialogText: t,
      cancelText: " ",
      confirmText: H5PEditor.t("core", "ok"),
    }).appendTo(document.body);
    (t.on("confirmed", i), t.show(e));
  }),
  (H5P.DragNBar.keypressHandler = function (t) {
    var e = t.data.instance;
    t.which === BACKSPACE &&
      e.focusedElement &&
      e.$container.is(":visible") &&
      "input" !== document.activeElement.tagName.toLowerCase() &&
      t.preventDefault();
  }),
  (H5P.DragNBar.keyupHandler = function (t) {
    var e = t.data.instance;
    (t.which === CTRL && ((ctrlDown = !1), (e.dnd.snap = 10)),
      t.which === SHIFT && (snapAmount = 1),
      !e.focusedElement ||
        (t.which !== LEFT &&
          t.which !== UP &&
          t.which !== RIGHT &&
          t.which !== DOWN) ||
        ((t = e.getElementSizeNPosition()),
        e.stopMoving(Math.round(t.left), Math.round(t.top))));
  }),
  (H5P.DragNBar.clickHandler = function (t) {
    delete t.data.instance.pressed;
  }),
  (H5P.DragNBar.prototype.initClickListeners = function () {
    var t = this,
      e = t.instanceIndex,
      i = { instance: t };
    H5P.$body
      .on("keydown.dnb" + e, i, H5P.DragNBar.keydownHandler)
      .on("keypress.dnb" + e, i, H5P.DragNBar.keypressHandler)
      .on("keyup.dnb" + e, i, H5P.DragNBar.keyupHandler)
      .on("click.dnb" + e, i, H5P.DragNBar.clickHandler);
    i = this.$container;
    function n() {
      void 0 !== t.pressed
        ? delete t.pressed
        : (t.blurAll(), void 0 !== t.focusedElement && delete t.focusedElement);
    }
    (i = this.$blurHandlers ? this.$blurHandlers : i)
      .keydown(function (t) {
        9 === t.which && n();
      })
      .click(n);
  }),
  (H5P.DragNBar.updateFileUrls = function (t, e) {
    for (var i in t)
      t.hasOwnProperty(i) &&
        t[i] instanceof Object &&
        (void 0 !== (i = t[i]).path && void 0 !== i.mime
          ? (i.path = e(i.path))
          : H5P.DragNBar.updateFileUrls(i, e));
  }),
  (H5P.DragNBar.prototype.attach = function (t) {
    var e = this;
    (t.html(""), t.addClass("h5peditor-dragnbar"));
    var i = H5P.jQuery('<ul class="h5p-dragnbar-ul"></ul>').appendTo(t);
    this.$list = i;
    for (var n = 0; n < this.buttons.length; n++) {
      var o = this.buttons[n];
      if (n === this.overflowThreshold) {
        const r = H5P.jQuery(
          '<li class="h5p-dragnbar-li"><a href="#" title="' +
            H5PEditor.t("H5P.DragNBar", "moreElements") +
            '" class="h5p-dragnbar-a h5p-dragnbar-more-button"></a><ul class="h5p-dragnbar-li-ul"></ul></li>',
        );
        ((i = r
          .appendTo(i)
          .click(function (t) {
            (i.stop().slideToggle(300), t.preventDefault());
          })
          .children(":first")
          .next()),
          H5P.jQuery(document).click(function (t) {
            H5P.jQuery(t.target).is(r.find(".h5p-dragnbar-more-button")) ||
              "none" === i.css("display") ||
              i.stop().slideToggle(300);
          }));
      }
      this.addButton(o, i);
    }
    (this.enableCopyPaste &&
      ((this.$pasteButton = H5P.jQuery(
        '<li class="h5p-dragnbar-li paste-button disabled"><a href="#" class="h5p-dragnbar-a h5p-dragnbar-paste-button" /></li>',
      )),
      H5P.jQuery("<span>", {
        class: "h5p-dragnbar-tooltip",
        text: H5PEditor.t("H5P.DragNBar", "paste"),
      }).appendTo(this.$pasteButton),
      this.$pasteButton.find(".h5p-dragnbar-paste-button").click(function (t) {
        (t.preventDefault(), e.pasteHandler());
      }),
      this.buttons.length > this.overflowThreshold
        ? this.$pasteButton.insertAfter(i.parent())
        : this.$pasteButton.appendTo(i)),
      this.containTooltips());
  }),
  (H5P.DragNBar.prototype.addButton = function (i, t) {
    var n = this,
      e = i.title && "" !== i.title,
      o = e ? ' aria-label="' + i.title + '"' : "",
      r = H5P.jQuery(
        '<li class="h5p-dragnbar-li" data-label="Image"><a href="#" class="h5p-dragnbar-a h5p-dragnbar-' +
          i.id +
          '-button"' +
          o +
          "></a></li>",
      ).appendTo(t);
    e &&
      H5P.jQuery("<span/>", {
        class: "h5p-dragnbar-tooltip",
        text: i.title,
      }).appendTo(r);
    let s;
    ("group" === i.type &&
      ((s = this.addButtonGroup(i.buttons, r, { title: i.titleGroup })),
      s.addClass("h5peditor-dragnbar-gone"),
      H5P.jQuery(document).click(function (t) {
        var e = H5P.jQuery(t.target).is(r),
          t =
            1 ===
            H5P.jQuery(t.target).closest(".h5p-dragnbar-button-group").length;
        e ||
          t ||
          (s.toggleClass("h5peditor-dragnbar-gone", !0),
          r
            .find(".h5p-dragnbar-tooltip")
            .toggleClass("h5peditor-dragnbar-gone", !1));
      })),
      r
        .hover(function () {
          n.containTooltips();
        })
        .children()
        .click(function () {
          return !1;
        })
        .mousedown(function (t) {
          var e;
          1 === t.which &&
            n.enabled &&
            ("group" === i.type
              ? void 0 !== s &&
                ((e = parseFloat(
                  r.closest(".h5p-dragnbar").css("padding-left"),
                )),
                0 < (e = r.position().left - s.position().left - e) &&
                  s.css("left", e),
                s.toggleClass("h5peditor-dragnbar-gone"),
                r
                  .find(".h5p-dragnbar-tooltip")
                  .toggleClass("h5peditor-dragnbar-gone"))
              : ((n.newElement = !0),
                (n.pressed = !0),
                (e = i.createElement()),
                (n.$element = e),
                n.$container.css("overflow", "visible"),
                n.dnd.press(n.$element, t.pageX, 0),
                n.focus(n.$element)));
        }));
  }),
  (H5P.DragNBar.prototype.containTooltips = function () {
    var n = this.$container.outerWidth();
    this.$list.find(".h5p-dragnbar-tooltip").each(function () {
      var t = H5P.jQuery(this).outerWidth(),
        e = H5P.jQuery(this).parents(".h5p-dragnbar-li").last().outerWidth();
      H5P.jQuery(this).css("left", -t / 2 + e / 2 + "px");
      var i = (H5P.jQuery(this).position().left += H5P.jQuery(this)
        .parents(".h5p-dragnbar-li")
        .last()
        .position().left);
      (i <= 0 && H5P.jQuery(this).css("left", 0),
        n < i + t && H5P.jQuery(this).css("left", -(t - e)));
    });
  }),
  (H5P.DragNBar.prototype.setContainer = function (t) {
    ((this.$container = t),
      this.dnd && (this.dnd.$container = t),
      this.dnr && (this.dnr.$container = t));
  }),
  (H5P.DragNBar.prototype.stopMoving = function (t, e) {
    ((e /= this.$container.height() / 100),
      (t /= this.$container.width() / 100),
      this.$element.css({ top: e + "%", left: t + "%" }),
      void 0 !== this.stopMovingCallback && this.stopMovingCallback(t, e));
  }),
  (H5P.DragNBar.prototype.getElementSizeNPosition = function (t) {
    if (!(t = t || this.focusedElement.$element) || !t.length)
      throw "No element given";
    var e = t[0].getBoundingClientRect(),
      i = window.getComputedStyle(t[0]),
      t = window.getComputedStyle(this.$container[0]),
      t = {
        width: parseFloat(e.width),
        height: parseFloat(e.height),
        left: parseFloat(i.left),
        top: parseFloat(i.top),
        containerWidth: parseFloat(t.width),
        containerHeight: parseFloat(t.height),
      };
    return (
      ("%" !== i.left.substr(-1, 1) && "%" !== i.top.substr(-1, 1)) ||
        ((t.left *= t.containerWidth / 100),
        (t.top *= t.containerHeight / 100)),
      t
    );
  }),
  (H5P.DragNBar.prototype.moveWithKeys = function (t, e) {
    function i(t, e, i) {
      return (t = i < (t = t < e ? e : t) ? i : t);
    }
    var n = this.getElementSizeNPosition();
    ((n.left += t),
      (n.top += e),
      (n.left = i(n.left, 0, n.containerWidth - n.width)),
      (n.top = i(n.top, 0, n.containerHeight - n.height)),
      this.$element.css({ left: n.left + "px", top: n.top + "px" }),
      this.dnd.trigger("showTransformPanel"),
      this.updateCoordinates(n.left, n.top, n.left, n.top));
  }),
  (H5P.DragNBar.prototype.add = function (e, t, i) {
    var n = this;
    ((i = i || {}), this.isEditor && !i.disableResize && this.dnr.add(e, i));
    var o = null;
    return (
      i.dnbElement
        ? (i.dnbElement.setElement(e), (o = i.dnbElement))
        : ((i.element = e),
          (i.disableCopy = !this.enableCopyPaste),
          (o = new H5P.DragNBarElement(this, t, i)),
          this.elements.push(o)),
      e.addClass("h5p-dragnbar-element"),
      this.isEditor &&
        (o.contextMenu &&
          o.contextMenu.on("contextMenuCopy", function () {
            n.copyHandler();
          }),
        void 0 === e.attr("tabindex") && e.attr("tabindex", "0"),
        e.mousedown(function (t) {
          1 === t.which &&
            ((n.pressed = !0),
            n.focus(e),
            !0 !== n.dnr.active && n.dnd.press(e, t.pageX, t.pageY));
        })),
      e.focus(function () {
        n.focus(e);
      }),
      o
    );
  }),
  (H5P.DragNBar.prototype.removeElement = function (t) {
    t.removeElement();
  }),
  (H5P.DragNBar.prototype.focus = function (t) {
    var e = this;
    (this.focusedElement &&
      this.focusedElement.$element !== t &&
      (this.focusedElement.blur(), this.focusedElement.hideContextMenu()),
      t.is(":visible") &&
        ((e.$element = t),
        this.dnd.setElement(t),
        (this.focusedElement = this.getDragNBarElement(t)),
        this.focusedElement &&
          (this.focusedElement.showContextMenu(),
          this.focusedElement.focus(),
          e.updateCoordinates()),
        setTimeout(function () {
          (e.updateCoordinates(),
            e.focusedElement &&
              e.focusedElement.contextMenu &&
              e.focusedElement.contextMenu.canResize &&
              e.focusedElement.contextMenu.updateDimensions());
        }, 0)));
  }),
  (H5P.DragNBar.prototype.getDragNBarElement = function (e) {
    var i;
    return (
      this.elements.forEach(function (t) {
        t.getElement().is(e) && (i = t);
      }),
      i
    );
  }),
  (H5P.DragNBar.prototype.blurAll = function () {
    (this.elements.forEach(function (t) {
      t.blur();
    }),
      delete this.focusedElement);
  }),
  (H5P.DragNBar.prototype.resize = function () {
    (this.updateCoordinates(),
      this.focusedElement &&
        this.focusedElement.resizeContextMenu(
          this.$element.offset().left - this.$element.parent().offset().left,
        ));
  }),
  (H5P.DragNBar.prototype.updateCoordinates = function (t, e, i, n) {
    var o;
    this.focusedElement &&
      ((o = this.$container.position()),
      t && e && i && n
        ? ((t = i + o.left),
          (e = n + o.top),
          this.focusedElement.updateCoordinates(t, e, i, n))
        : ((n = this.$element.position()),
          this.focusedElement.updateCoordinates(
            n.left + o.left,
            n.top + o.top,
            n.left,
            n.top,
          )));
  }),
  (H5P.DragNBar.clipboardify = function (t, e, i) {
    t = { from: t, specific: e };
    return (
      H5PEditor.contentId && (t.contentId = H5PEditor.contentId),
      e[i] && (t.generic = i),
      t
    );
  }),
  (H5P.DragNBar.fitElementInside = function (t) {
    var e = {};
    return (
      t.left < 0 && (e.left = t.left = 0),
      t.width + t.left > t.containerWidth &&
        ((e.left = t.containerWidth - t.width),
        e.left < 0 && ((e.left = 0), (e.width = t.containerWidth))),
      t.top < 0 && (e.top = t.top = 0),
      t.height + t.top > t.containerHeight &&
        ((e.top = t.containerHeight - t.height),
        e.top < 0 && ((e.top = 0), (e.height = t.containerHeight))),
      e
    );
  }),
  (H5P.DragNBar.prototype.remove = function () {
    var t = this.instanceIndex;
    H5P.$body
      .off("keydown.dnb" + t, H5P.DragNBar.keydownHandler)
      .off("keypress.dnb" + t, H5P.DragNBar.keypressHandler)
      .off("keyup.dnb" + t, H5P.DragNBar.keyupHandler)
      .off("click.dnb" + t, H5P.DragNBar.clickHandler);
  }),
  (H5P.DragNBar.prototype.toggleDrag = function (t = !0) {
    this.enabled = void 0 === t ? !this.enabled : t;
  }) /*!@license H5P.DragNBar-1.5/scripts/context-menu.js by Joubel licensed under unknown license*/,
  (H5P.DragNBarContextMenu = (function (l, a) {
    function t(t, e, i, n, o, r) {
      var s = this;
      (a.call(this),
        (this.dnb = e.dnb),
        (this.directionLock = r),
        (this.dnbElement = e),
        (this.$contextMenu = l("<div>", {
          class: "h5p-dragnbar-context-menu",
        })),
        (this.$buttons = l("<div>", { class: "h5p-context-menu-buttons" })),
        (this.$transformPanel = l("<div>", {
          class: "h5p-transform-panel hide",
        })),
        (this.$parent = t),
        (this.hasCoordinates = void 0 === i || i),
        (this.canResize = !n),
        (this.showingTransformPanel = !1),
        (this.buttons = [
          { name: "Edit", label: H5PEditor.t("H5P.DragNBar", "editLabel") },
          {
            name: "BringToFront",
            label: H5PEditor.t("H5P.DragNBar", "bringToFrontLabel"),
          },
          {
            name: "SendToBack",
            label: H5PEditor.t("H5P.DragNBar", "sendToBackLabel"),
          },
          { name: "Remove", label: H5PEditor.t("H5P.DragNBar", "removeLabel") },
        ]),
        o ||
          this.buttons.splice(1, 0, {
            name: "Copy",
            label: H5PEditor.t("H5P.DragNBar", "copyLabel"),
          }),
        s.on("contextMenuTransform", function (t) {
          (t && void 0 !== t.data.showTransformPanel
            ? (s.showingTransformPanel = t.data.showTransformPanel)
            : (s.showingTransformPanel = !s.showingTransformPanel),
            "Transform" === t.data.button &&
              (s.dnb.transformButtonActive
                ? (s.dnb.transformButtonActive = !1)
                : (s.dnb.transformButtonActive = !0)),
            0 == t.data.showTransformPanel &&
              (s.dnb.transformButtonActive = !1),
            s.toggleButtonsBar(!s.showingTransformPanel),
            s.toggleTransformPanel(s.showingTransformPanel),
            s.$transformButtonWrapper.toggleClass(
              "active",
              s.showingTransformPanel,
            ),
            s.dnb.updateCoordinates());
        }),
        this.updateContextMenu());
    }
    return (
      (((t.prototype = Object.create(a.prototype)).constructor =
        t).prototype.addCoordinates = function () {
        var s;
        this.hasCoordinates &&
          !this.$coordinates &&
          (((s = this).$coordinates = l(
            '<div class="h5p-dragnbar-coordinates"><div class="h5p-dragnbar-label">' +
              H5PEditor.t("H5P.DragNBar", "positionLabel") +
              '</div><div class="h5p-dragnbar-x-container" aria-label="X position"><input class="h5p-dragnbar-x" type="text" value="0"></div><span class="h5p-dragnbar-coordinates-separater">,</span><div class="h5p-dragnbar-y-container" aria-label="Y position"><input class="h5p-dragnbar-y" type="text" value="0"></div></div>',
          )
            .mousedown(function () {
              s.dnb.pressed = !0;
            })
            .appendTo(this.$transformPanel)),
          (this.$x = this.$coordinates.find(".h5p-dragnbar-x")),
          (this.$y = this.$coordinates.find(".h5p-dragnbar-y")),
          this.$x
            .add(this.$y)
            .on("change keydown", function (t) {
              var e, i, n, o, r;
              ("change" !== t.type && 13 !== t.which) ||
                ((e = Number(s.$x.val())),
                (i = Number(s.$y.val())),
                isNaN(e) ||
                  isNaN(i) ||
                  ((o = n = 0),
                  (r = {
                    x:
                      s.dnb.$container.width() -
                      s.dnbElement.getElement().outerWidth(),
                    y:
                      s.dnb.$container.height() -
                      s.dnbElement.getElement().outerHeight(),
                  }),
                  e < 0 && (e = n),
                  i < 0 && (i = o),
                  s.dnb.stopMoving(
                    (e = r.x < e ? r.x : e),
                    (i = r.y < i ? r.y : i),
                  ),
                  13 === t.which &&
                    setTimeout(function () {
                      (t.target.focus(),
                        t.target.setSelectionRange(0, t.target.value.length));
                    }, 0),
                  s.dnb.updateCoordinates()));
            })
            .click(function (t) {
              (t.target.focus(),
                t.target.setSelectionRange(0, t.target.value.length));
            }));
      }),
      (t.prototype.updateCoordinates = function (t, e, i, n) {
        (this.$contextMenu.css({ left: t, top: e }),
          this.hasCoordinates &&
            (this.$x.val(Math.round(i)), this.$y.val(Math.round(n))));
      }),
      (t.prototype.addDimensions = function () {
        var a = this;
        ((a.$dimensions = l("<div/>", { class: "h5p-dragnbar-dimensions" })),
          l("<div/>", {
            class: "h5p-dragnbar-label",
            appendTo: a.$dimensions,
            text: H5PEditor.t("H5P.DragNBar", "sizeLabel"),
          }));
        function t(t) {
          var e,
            i,
            n,
            o,
            r,
            s = parseFloat(this.value);
          isNaN(s) ||
            ((e = a.dnbElement.getElement()),
            (i = H5P.DragNResize.MIN_SIZE),
            (r = parseFloat(window.getComputedStyle(a.dnb.$container[0])[t])),
            (o = window.getComputedStyle(e[0])),
            (n = r - parseFloat(o["width" === t ? "left" : "top"])) <
              (s = s < i ? i : s) && (s = n),
            a["$" + t].val(Math.round(s)),
            (o = e[0].getBoundingClientRect()[t] - parseFloat(o[t])),
            e.css(t, (s -= o) / (r / 100) + "%"),
            ((r = {})[t] = s / a.dnb.dnr.containerEm),
            a.dnb.dnr.trigger("stoppedResizing", r));
        }
        ((a.$width = a.getNewInput(
          "width",
          H5PEditor.t("H5P.DragNBar", "widthLabel"),
          a.$dimensions,
          t,
          "vertical" === a.directionLock,
        )),
          l("<span/>", {
            class: "h5p-dragnbar-dimensions-separator",
            text: "×",
            appendTo: a.$dimensions,
          }),
          (a.$height = a.getNewInput(
            "height",
            H5PEditor.t("H5P.DragNBar", "heightLabel"),
            a.$dimensions,
            t,
            "horizontal" === a.directionLock,
          )),
          a.dnb.dnr.on("moveResizing", function () {
            a.updateDimensions();
          }),
          a.$dimensions.appendTo(a.$transformPanel));
      }),
      (t.prototype.addTransform = function (t) {
        var e = {
            name: "Transform",
            label: H5PEditor.t("H5P.DragNBar", "transformLabel"),
          },
          i = l("<div>", { class: "h5p-transform-button-wrapper" });
        return (
          t && this.createButton(e).appendTo(i),
          (this.$transformButtonWrapper = i)
        );
      }),
      (t.prototype.updateDimensions = function () {
        var t = this.dnbElement.getElement(),
          e = window.getComputedStyle(t[0]),
          i = t[0].getBoundingClientRect().width - parseFloat(e.width),
          t = t[0].getBoundingClientRect().height - parseFloat(e.height);
        (this.$width.val(Math.round(parseFloat(e.width) + i)),
          this.$height.val(Math.round(parseFloat(e.height) + t)));
      }),
      (t.prototype.getNewInput = function (i, t, e, n, o) {
        var e = l("<div/>", {
            class: "h5p-dragnbar-input h5p-dragnbar-" + i,
            "aria-label": t,
            appendTo: e,
          }),
          r = l("<input/>", {
            maxLength: 5,
            disabled: !0 === o,
            on: {
              change: function () {
                n.call(this, i);
              },
              keydown: function (t) {
                var e;
                13 === t.which
                  ? (n.call(this, i), r.focus().select())
                  : (38 !== t.which && 40 !== t.which) ||
                    ((e = parseFloat(r.val())),
                    isNaN(e) ||
                      (r.val(e + (38 === t.which ? 1 : -1)), n.call(this, i)));
              },
              keyup: function (t) {
                (38 !== t.which && 40 !== t.which) || r.select();
              },
              click: function () {
                r.select();
              },
            },
            appendTo: e,
          });
        return r;
      }),
      (t.prototype.addToMenu = function (t) {
        this.createButton(t).appendTo(this.$buttons);
      }),
      (t.prototype.createButton = function (t) {
        var e = this;
        return l("<div>", {
          class: "h5p-dragnbar-context-menu-button " + t.name.toLowerCase(),
          role: "button",
          tabindex: 0,
          "aria-label": t.label,
        })
          .click(function () {
            ((e.dnb.pressed = !0),
              e.trigger("contextMenu" + t.name, { button: t.name }));
          })
          .keydown(function (t) {
            32 === t.which && l(this).click();
          });
      }),
      (t.prototype.removeFromMenu = function (t) {
        this.$buttons.children(".h5p-context-menu-button-" + t).remove();
      }),
      (t.prototype.updateContextMenu = function () {
        var e = this;
        this.$buttons.children().remove();
        var t = !1;
        (this.hasCoordinates && (this.addCoordinates(), (t = !0)),
          this.canResize && (this.addDimensions(), (t = !0)),
          this.buttons.forEach(function (t) {
            e.addToMenu(t);
          }),
          this.addTransform(t).appendTo(this.$contextMenu),
          this.$buttons.appendTo(this.$contextMenu),
          this.$transformPanel.appendTo(this.$contextMenu));
      }),
      (t.prototype.addButton = function (t, e) {
        (this.buttons.push({ name: t, label: e }), this.updateContextMenu());
      }),
      (t.prototype.removeButton = function (i) {
        var n = this;
        (n.buttons.forEach(function (t, e) {
          t.name === i && n.buttons.splice(e, 1);
        }),
          this.updateContextMenu());
      }),
      (t.prototype.toggleButtonsBar = function (t) {
        void 0 !== t
          ? this.$buttons.toggleClass("hide", !t)
          : this.$buttons.toggleClass("hide");
      }),
      (t.prototype.toggleTransformPanel = function (t) {
        void 0 !== t
          ? this.$transformPanel.toggleClass("hide", !t)
          : this.$transformPanel.toggleClass("hide");
      }),
      (t.prototype.toggleCoordinates = function (t) {
        ((this.hasCoordinates = void 0 === t ? !this.hasCoordinates : !!t),
          this.updateContextMenu());
      }),
      (t.prototype.attach = function () {
        this.$contextMenu.appendTo(this.$parent);
      }),
      (t.prototype.detach = function () {
        this.$contextMenu.detach();
      }),
      t
    );
  })(
    H5P.jQuery,
    H5P.EventDispatcher,
  )) /*!@license H5P.DragNBar-1.5/scripts/dialog.js by Joubel licensed under unknown license*/,
  (H5P.DragNBarDialog = (function (n, m) {
    function t(a, l) {
      var o = this,
        t = "dialog-title-" + H5P.createUUID();
      m.call(o);
      function e(t) {
        75 === t.which && t.stopPropagation();
      }
      var r,
        i = n("<div/>", {
          class: "h5p-dialog-wrapper h5p-ie-transparent-background h5p-hidden",
          on: {
            click: function () {
              o.disableOverlay || o.close();
            },
            keyup: e,
            keydown: e,
          },
        }),
        c = n("<div/>", {
          class: "h5p-dialog h5p-big",
          "aria-labelledby": t,
          on: {
            click: function (t) {
              t.stopPropagation();
            },
            keydown: function (t) {
              var e = h.is(":visible");
              27 === t.which && e && o.close();
            },
          },
        }).appendTo(i),
        u = n("<div/>", { class: "h5p-dialog-titlebar", appendTo: c }),
        s = n("<div/>", { class: "h5p-dialog-title", id: t, appendTo: u }),
        h = n("<div/>", {
          role: "button",
          class: "h5p-dialog-close",
          tabindex: "0",
          title: H5P.t("close"),
          "aria-label": H5P.t("close"),
          on: {
            click: function (t) {
              1 === t.which && o.close();
            },
            keypress: function (t) {
              (32 !== t.which && 13 !== t.which) ||
                (o.close(), t.preventDefault());
            },
          },
          appendTo: u,
        }),
        d = n("<div/>", { class: "h5p-dialog-inner" }).appendTo(c);
      i.appendTo(a);
      function p() {
        (c.css({
          left: "",
          top: "",
          height: "",
          width: "",
          fontSize: "",
          bottom: "",
        }),
          d.css({ width: "", height: "", overflow: "" }));
      }
      function f(t) {
        (i.show(),
          setTimeout(function () {
            (i.removeClass("h5p-hidden"), t && t());
          }, 0));
      }
      ((o.open = function (t, e, i, n) {
        (f(),
          d.children().detach().end().append(t),
          p(),
          c.addClass("h5p-big"),
          s.attr("class", "h5p-dialog-title" + (i ? " " + i : "")),
          s.html((e = e || "")),
          r && (r.remove(), h.show()),
          n && ((r = n), h.hide(), n.appendTo(u)),
          o.resize(),
          o.trigger("open"),
          c.one("transitionend", function () {
            var t = d.find("input:visible:not(:disabled)"),
              e = d.find("[tabindex]");
            t.length ? t.get(0).focus() : e.length && e.get(0).focus();
          }));
      }),
        (o.resize = function () {
          var t, e, i;
          c.hasClass("h5p-big") &&
            ((t = g(d.css("fontSize"))),
            (e = u.outerHeight() / t),
            (i = a.height()),
            (i -= 2 * Number(c.css("top").replace("px", ""))),
            d.css({
              width: "100%",
              maxHeight: i / t - e + "em",
              marginTop: e + "em",
            }),
            c.css({ bottom: "auto", maxHeight: "" }));
        }),
        (o.addLibraryClass = function (t) {
          c.attr("data-lib", t);
        }),
        (o.toggleClass = function (t, e) {
          c.toggleClass(t, e);
        }),
        (o.isOpen = function () {
          return i.is(":visible");
        }),
        (o.position = function (t, e, i) {
          (!0 === i && (i = "medium"),
            p(),
            c.removeClass("h5p-big h5p-medium"));
          var n = Number(d[0].style.marginTop.replace("em", ""));
          (e &&
            ((s = 16 / g(a.css("fontSize"))),
            e.width &&
              ((e.width = e.width * s), c.css("width", e.width + "em")),
            e.height &&
              ((e.height = e.height * s + n),
              c.css("height", e.height + "em"),
              d.css({ width: "auto", overflow: "hidden" }))),
            "medium" === i && c.addClass("h5p-medium"),
            "big" === i && (c.addClass("h5p-big"), c.addClass("h5p-stretch")));
          var o = t.outerWidth(!0),
            r = t.position(),
            s = a.width(),
            n = a.height(),
            e = r.left,
            t = c.outerWidth(!0);
          "medium" === i && s < t
            ? c.addClass("h5p-big")
            : (r.left > s / 2 - o / 2 && (e -= t - o),
              s < e + t && (e = s - t),
              (t = parseInt(l.css("marginLeft"))),
              e < (t = isNaN(t) ? 0 : t) && (e = t),
              (t = parseInt(l.css("marginTop"))),
              isNaN(t) && (t = 0),
              "big" !== i &&
                (n <
                  (r =
                    (i = "medium" === i ? 0 : r.top + t) + c.outerHeight(!0)) &&
                  (i -= r - n),
                (t = a.height() - i + c.height() - c.outerHeight(!0)),
                (r = g(a.css("fontSize"))),
                c.css({
                  top: i / (n / 100) + "%",
                  left: e / (s / 100) + "%",
                  width: window.getComputedStyle(c[0]).width / r + "em",
                  maxHeight: t / r + "em",
                }),
                d.css("maxHeight", (t - u.outerHeight(!0)) / r + "em")));
        }),
        (o.getMaxSize = function (t, e) {
          var i = t.outerWidth(!0),
            n = t.position(),
            o = a.width(),
            t = {};
          ((t.height = Number(d.css("maxHeight").replace("px", ""))),
            (t.height -= 2 * Number(d.css("border-width").replace("px", ""))),
            e
              ? (t.width = o)
              : n.left > o / 2 - i / 2
                ? (t.width = n.left)
                : (t.width = o - n.left - i));
          i = g(a.css("fontSize"));
          return (
            (t.width = (t.width / i) * (i / 16)),
            (t.height = (t.height / i) * (i / 16)),
            t
          );
        }),
        (o.scroll = function (t, e) {
          d.stop().animate({ scrollTop: t }, e);
        }),
        (o.close = function (t) {
          (i.addClass("h5p-hidden"),
            t
              ? (i.hide(), (o.disableOverlay = !1), h.show())
              : setTimeout(function () {
                  (i.hide(), (o.disableOverlay = !1), h.show());
                }, 201),
            o.trigger("close"),
            o.trigger(
              "domHidden",
              { $dom: i, key: "dialogClosed" },
              { bubbles: !0, external: !0 },
            ));
        }),
        (o.openOverlay = function () {
          ((o.disableOverlay = !0), c.hide(), f());
        }),
        (o.closeOverlay = function () {
          var t;
          (i.addClass("h5p-hidden"),
            (t = function () {
              (c.show(), (o.disableOverlay = !1));
            }),
            i.addClass("h5p-hidden"),
            setTimeout(function () {
              (i.hide(), t && t());
            }, 200));
        }),
        (o.hideCloseButton = function () {
          h.hide();
        }),
        (o.getDialogWidth = function () {
          return c.width();
        }),
        (o.removeStaticWidth = function () {
          c.css("width", "");
        }));
    }
    t.prototype = Object.create(m.prototype);
    var g = function (t) {
      return Number(t.replace("px", ""));
    };
    return (t.prototype.constructor = t);
  })(
    H5P.jQuery,
    H5P.EventDispatcher,
  )) /*!@license H5P.DragNBar-1.5/scripts/drag-n-bar-element.js by Joubel licensed under unknown license*/,
  (H5P.DragNBarElement = (function (o, r) {
    function t(t, i, e) {
      var n = this;
      (r.call(this),
        (this.dnb = t),
        (this.options = e || {}),
        this.options.disableContextMenu ||
          (this.contextMenu = new o(
            this.dnb.$dialogContainer,
            this,
            this.options.hasCoordinates,
            this.options.disableResize,
            this.options.disableCopy,
            this.options.directionLock,
          )),
        (this.focused = !1),
        this.options.createElement
          ? ((this.$element = this.options
              .createElement()
              .appendTo(t.$container)),
            this.focus())
          : (this.$element = this.options.element),
        this.$element &&
          (this.dnb.isEditor &&
            this.$element.mousedown(function () {
              n.dnb.pressed = !0;
            }),
          this.$element.focus(function () {
            n.focus();
          })),
        (n.toClipboard = function (t, e) {
          i &&
            localStorage &&
            ((i.width = t), (i.height = e), H5P.setClipboard(i));
        }));
    }
    return (
      (((t.prototype = Object.create(r.prototype)).constructor =
        t).prototype.addButton = function (t, e) {
        this.contextMenu.addToMenu({ name: t, label: e });
      }),
      (t.prototype.getElement = function () {
        return this.$element;
      }),
      (t.prototype.setElement = function (t) {
        var e = this;
        ((this.$element = t),
          this.$element.focus(function () {
            e.focus();
          }));
      }),
      (t.prototype.showContextMenu = function () {
        this.contextMenu && this.contextMenu.attach();
      }),
      (t.prototype.hideContextMenu = function () {
        this.contextMenu && this.contextMenu.detach();
      }),
      (t.prototype.updateCoordinates = function (t, e, i, n) {
        this.contextMenu &&
          (this.contextMenu.updateCoordinates(t, e, i, n),
          this.resizeContextMenu(i));
      }),
      (t.prototype.resizeContextMenu = function (t) {
        var e, i, n;
        this.options.disableContextMenu ||
          ((n = Number(
            this.contextMenu.$parent.css("padding-left").replace("px", ""),
          )),
          (t = (t || this.$element.position().left) + n),
          (e = this.dnb.$container.width()),
          (i = this.contextMenu.$contextMenu).css({
            position: "absolute",
            left: 0,
          }),
          (n = i.outerWidth(!0)),
          i.css({ position: "", left: t }),
          e <= t + n
            ? (this.contextMenu.$contextMenu.css("left", t - n + "px"),
              this.contextMenu.$contextMenu.addClass("left-aligned"))
            : this.contextMenu.$contextMenu.removeClass("left-aligned"));
      }),
      (t.prototype.blur = function () {
        (this.$element &&
          (this.$element.removeClass("focused"),
          (this.focused = !1),
          this.options.disableContextMenu ||
            this.contextMenu.trigger("contextMenuTransform", {
              showTransformPanel: !1,
            })),
          this.hideContextMenu());
      }),
      (t.prototype.focus = function () {
        (this.$element.addClass("focused"),
          (this.focused = !0),
          this.contextMenu &&
            this.resizeContextMenu(this.$element.position().left));
      }),
      (t.prototype.removeElement = function () {
        (this.$element.detach(), this.hideContextMenu());
      }),
      t
    );
  })((H5P.jQuery, H5P.DragNBarContextMenu), H5P.EventDispatcher)),
  /*!@license H5P.DragNBar-1.5/scripts/drag-n-bar-form-manager.js by Joubel licensed under unknown license*/ (function (
    i,
    t,
  ) {
    ((i.FormManager = function (n, o, p) {
      var s = this;
      t.call(s);
      const r = [s];
      let a, l, c, u, h, d, f, m;
      const g = function (t, e, i) {
          const n = document.createElement("button");
          (n.setAttribute("type", "button"),
            n.classList.add("form-manager-button"),
            n.classList.add("form-manager-" + t),
            n.setAttribute("aria-label", e),
            n.addEventListener("click", i));
          const o = document.createElement("span");
          return (
            o.classList.add("form-manager-button-inner"),
            (o.innerText = e),
            (o.tabIndex = -1),
            n.appendChild(o),
            n
          );
        },
        v = function (t, e, i) {
          const n =
              t.params && t.params.library
                ? t.params.library
                : t.currentLibrary || void 0,
            o = document.createElement("div");
          o.classList.add("form-manager-title");
          const r = document.createElement("div");
          (r.classList.add("form-manager-menutitle"),
            (r.tabIndex = "0"),
            r.addEventListener("click", function () {
              k.call(o);
            }),
            r.addEventListener("keypress", function (t) {
              C.call(o, t);
            }));
          const s = document.createElement("span");
          (s.classList.add("form-manager-menutitle-text"), r.appendChild(s));
          const a = document.createElement("span");
          (a.classList.add("form-manager-tooltip"), r.appendChild(a));
          const l = document.createElement("span");
          (l.classList.add("truncatable-text"),
            (l.tabIndex = -1),
            o.appendChild(l));
          const c = document.createElement("span");
          (c.classList.add("form-manager-tooltip"), o.appendChild(c));
          function u(t) {
            l.innerText = s.innerText = c.innerText = a.innerText = t;
          }
          function h() {
            return (
              e ||
              ((t.params &&
                t.params.metadata &&
                t.params.metadata.title &&
                "Untitled" !== t.params.metadata.title.substr(0, 8)) ||
              (t.metadata &&
                t.metadata.title &&
                "Untitled" !== t.metadata.title.substr(0, 8))
                ? _((t.metadata ? t : t.params).metadata.title)
                : void 0 !== t.$select &&
                    "-" !== t.$select.children(":selected").text()
                  ? t.$select.children(":selected").text()
                  : H5PEditor.libraryCache[n].title)
            );
          }
          u(h());
          function d() {
            (t.metadataForm &&
              t.metadataForm.on("titlechange", function (t) {
                (u(h()), P.updateFormResponsiveness());
              }),
              "Loading..." === l.innerText &&
                (u(h()), P.updateFormResponsiveness()));
          }
          void 0 === t.metadataForm && t.change ? t.change(d) : d();
          i = i || n.split(" ")[0].split(".")[1].toLowerCase();
          return (
            o.classList.add("form-manager-icon-" + i),
            r.classList.add("form-manager-icon-" + i),
            p &&
              (o.classList.add("form-manager-" + p),
              r.classList.add("form-manager-" + p)),
            { breadcrumb: o, menu: r }
          );
        },
        e = function (t) {
          return t instanceof i.FormManager
            ? t.getFormManager()
            : t.parent
              ? e(t.parent)
              : s;
        },
        b = function (t) {
          (t.classList.add("form-manager-hidden"),
            t.setAttribute("aria-hidden", !0));
        },
        y = function (t) {
          (t.classList.remove("form-manager-hidden"),
            t.removeAttribute("aria-hidden"));
        },
        w = function (t, e) {
          e
            ? (t.setAttribute(
                "aria-label",
                H5PEditor.t("core", "exitFullscreenButtonLabel"),
              ),
              t.classList.add("form-manager-exit"))
            : (t.setAttribute(
                "aria-label",
                H5PEditor.t("core", "enterFullscreenButtonLabel"),
              ),
              t.classList.remove("form-manager-exit"));
        },
        x = function () {
          const t = r.pop();
          (H5PEditor.Html && H5PEditor.Html.removeWysiwyg(),
            t.trigger("formclose"));
          const e = t.popForm();
          h && (e.removeEventListener("transitionend", h), (h = null));
          const i = t.popTitles();
          P.formBreadcrumbMenu.removeChild(i.menu);
          const n = i.breadcrumb.previousSibling;
          (n.removeEventListener("click", k),
            n.removeEventListener("keypress", C),
            n.classList.remove("clickable"),
            n.removeAttribute("tabindex"));
          var o = P.getFormHeadHeight();
          if (
            ((P.formContainer.style.height =
              e.getBoundingClientRect().height + o + "px"),
            e.previousSibling.classList.contains("form-manager-form"))
          )
            y(e.previousSibling);
          else {
            for (let t = 1; t < P.formContainer.children.length - 1; t++)
              y(P.formContainer.children[t]);
            (m ||
              (b(P.formButtons),
              P.formButtons.classList.remove("form-manager-comein"),
              P.footerFormButtons.classList.remove("form-manager-comein"),
              b(P.footerFormButtons),
              b(P.footer)),
              P.formContainer.classList.add("root-form"));
          }
          ((e.style.marginLeft = window.getComputedStyle(e).marginLeft),
            e.classList.add("form-manager-movable"),
            (P.formContainer.style.height = ""),
            (e.style.height =
              P.formContainer.getBoundingClientRect().height - o + "px"),
            S(e, "transitionend", function () {
              P.formContainer.removeChild(e);
            }),
            e.classList.remove("form-manager-slidein"),
            0 === i.breadcrumb.offsetWidth
              ? P.formBreadcrumb.removeChild(i.breadcrumb)
              : (S(i.breadcrumb, "transitionend", function () {
                  P.formBreadcrumb.removeChild(i.breadcrumb);
                }),
                i.breadcrumb.classList.remove("form-manager-comein")),
            c ||
              (d && P.exitSemiFullscreen && y(d),
              f && f.classList.add("form-manager-disabled")),
            s.formContainer.classList.contains("mobile-menu-open") &&
              s.toggleBreadcrumbMenu(),
            P.formButtons.scrollIntoView());
        },
        k = function () {
          for (let t = 0; t < P.formBreadcrumb.children.length; t++)
            if (P.formBreadcrumb.children[t] === this) {
              P.closeFormUntil(t);
              break;
            }
        },
        C = function (t) {
          (13 !== t.which && 32 !== t.which) || k.call(this);
        };
      ((s.closeFormUntil = function (t) {
        for (; r.length - 1 !== t; ) (r[r.length - 1].trigger("formdone"), x());
      }),
        (s.popForm = function () {
          var t = c;
          return ((c = null), t);
        }),
        (s.popTitles = function () {
          var t = u;
          return ((u = null), t);
        }),
        (s.getFormManager = function () {
          return P;
        }),
        (s.addFormTarget = function (t) {
          r.push(t);
        }),
        (s.openForm = function (t, e, i, n, o) {
          if (!c) {
            (P.formContainer.classList.remove("root-form"),
              P.addFormTarget(s),
              (c = document.createElement("div")),
              c.classList.add("form-manager-form"),
              c.classList.add("form-manager-movable"),
              i && c.classList.add(i),
              c.appendChild(e),
              (c.style.height =
                P.formContainer.getBoundingClientRect().height -
                P.getFormHeadHeight() +
                "px"),
              P.formContainer.appendChild(c));
            const r = P.formBreadcrumb.lastChild;
            (r.addEventListener("click", k),
              r.addEventListener("keypress", C),
              r.classList.add("clickable"),
              (r.tabIndex = "0"),
              (u = v(t, n, o)),
              P.formBreadcrumb.appendChild(u.breadcrumb),
              P.formBreadcrumbMenu.insertBefore(
                u.menu,
                P.formBreadcrumbMenu.firstChild,
              ),
              y(P.formButtons),
              y(P.footerFormButtons),
              y(P.footer),
              P.formContainer.appendChild(P.footer),
              (h = S(c, "transitionend", function () {
                h = null;
                for (let t = 2; t < P.formContainer.children.length - 1; t++) {
                  const e = P.formContainer.children[t];
                  e === c ||
                    e.classList.contains("sp-container") ||
                    e.classList.contains("form-manager-footer") ||
                    b(P.formContainer.children[t]);
                }
                ((c.style.height = ""),
                  (c.style.marginLeft = ""),
                  c.classList.remove("form-manager-movable"),
                  s.trigger("formopened"));
              })),
              setTimeout(function () {
                ((c.style.marginLeft =
                  parseFloat(
                    window.getComputedStyle(
                      P.formContainer.children[
                        P.formContainer.children.length - 2
                      ],
                    ).marginLeft,
                  ) -
                  20 +
                  "px"),
                  c.classList.add("form-manager-slidein"),
                  u.breadcrumb.classList.add("form-manager-comein"),
                  P.formButtons.classList.add("form-manager-comein"),
                  P.footerFormButtons.classList.add("form-manager-comein"),
                  P.updateFormResponsiveness());
              }, 0),
              d && P.exitSemiFullscreen && b(d),
              f && f.classList.remove("form-manager-disabled"));
          }
        }),
        (s.isFormOpen = function () {
          return c && !h;
        }),
        (s.getFormHeadHeight = function () {
          return m ? 0 : a.getBoundingClientRect().height;
        }),
        (s.toggleBreadcrumbMenu = function () {
          s.formContainer.classList.contains("mobile-menu-open")
            ? (s.formContainer.classList.remove("mobile-menu-open"),
              (f.children[0].innerText = o.expandBreadcrumbButtonLabel),
              f.setAttribute("aria-label", o.expandBreadcrumbButtonLabel),
              s.formBreadcrumbMenu.classList.remove("form-manager-comein"))
            : (s.formContainer.classList.add("mobile-menu-open"),
              (f.children[0].innerText = o.collapseBreadcrumbButtonLabel),
              f.setAttribute("aria-label", o.collapseBreadcrumbButtonLabel),
              s.formBreadcrumbMenu.classList.add("form-manager-comein"));
        }),
        (s.updateFormResponsiveness = function () {
          (a.classList.contains("mobile-view-large") &&
            a.classList.remove("mobile-view-large"),
            s.formContainer.classList.contains("mobile-view-small") &&
              s.formContainer.classList.remove("mobile-view-small"),
            a.offsetWidth < 481 &&
              s.formContainer.classList.add("mobile-view-small"));
          function t(e) {
            let i;
            for (let t = 0; t < e.children.length; t++) {
              const n = e.children[t];
              n.firstChild.offsetWidth &&
              n.firstChild.scrollWidth > n.firstChild.offsetWidth + 1
                ? (n.classList.add("form-mananger-tooltip-active"), (i = !0))
                : n.classList.remove("form-mananger-tooltip-active");
            }
            return i;
          }
          (t(s.formBreadcrumb) &&
            (a.classList.add("mobile-view-large"), t(s.formBreadcrumb)),
            t(s.formBreadcrumbMenu));
        }),
        (s.setAlwaysShowButtons = function (t) {
          ((m = t),
            m &&
              (y(P.formButtons),
              P.formButtons.classList.add("form-manager-comein")));
        }));
      const P = e(n);
      P === s &&
        (function () {
          ((s.isMainLibrary = !(n instanceof H5PEditor.Library)),
            (s.formContainer = (
              s.isMainLibrary ? n.$form : n.$libraryWrapper
            )[0]),
            s.formContainer.classList.add("form-manager"),
            s.formContainer.classList.add("root-form"),
            (a = document.createElement("div")),
            a.classList.add("form-manager-head"),
            (l = document.createElement("div")),
            l.classList.add("form-manager-head"),
            l.classList.add("form-manager-footer"),
            (s.footer = l),
            (f = g(
              "breadcrumb-menu",
              o.expandBreadcrumbButtonLabel,
              s.toggleBreadcrumbMenu,
            )),
            f.classList.add("form-manager-disabled"),
            a.appendChild(f),
            (s.formBreadcrumbMenu = document.createElement("div")),
            s.formBreadcrumbMenu.classList.add(
              "form-manager-breadcrumb-menulist",
            ),
            a.appendChild(s.formBreadcrumbMenu),
            (s.formBreadcrumb = document.createElement("div")),
            s.formBreadcrumb.classList.add("form-manager-breadcrumb"),
            a.appendChild(s.formBreadcrumb));
          const t = v(n);
          if (
            (t.breadcrumb.classList.add("form-manager-comein"),
            s.formBreadcrumb.appendChild(t.breadcrumb),
            s.formBreadcrumbMenu.appendChild(t.menu),
            (d = g(
              "proceed",
              H5PEditor.t("core", "proceedButtonLabel"),
              function () {
                P.exitSemiFullscreen &&
                  (P.exitSemiFullscreen(), (P.exitSemiFullscreen = null));
              },
            )),
            b(d),
            a.appendChild(d),
            (s.formButtons = document.createElement("div")),
            s.formButtons.classList.add("form-manager-buttons"),
            (s.footerFormButtons = document.createElement("div")),
            s.footerFormButtons.classList.add("form-manager-buttons"),
            b(s.footerFormButtons),
            b(s.formButtons),
            l.appendChild(s.footerFormButtons),
            a.appendChild(s.formButtons),
            s.formButtons.appendChild(
              g("delete", o.deleteButtonLabel, function () {
                const t = new H5P.Event("formremove");
                ((t.data = r.length),
                  r[r.length - 1].trigger(t),
                  !t.preventRemove && 1 < r.length && x());
              }),
            ),
            s.formButtons.appendChild(
              g("done", o.doneButtonLabel, function () {
                (r[r.length - 1].trigger("formdone", r.length),
                  1 < r.length && x());
              }),
            ),
            s.footerFormButtons.appendChild(
              g("done", o.doneButtonLabel, function () {
                (r[r.length - 1].trigger("formdone", r.length),
                  1 < r.length && x());
              }),
            ),
            s.footerFormButtons.appendChild(
              g("delete", o.deleteButtonLabel, function () {
                const t = new H5P.Event("formremove");
                ((t.data = r.length),
                  r[r.length - 1].trigger(t),
                  !t.preventRemove && 1 < r.length && x());
              }),
            ),
            s.isMainLibrary && void 0 !== H5PEditor.semiFullscreen)
          ) {
            const i = g("fullscreen", "", function () {
              P.exitSemiFullscreen
                ? P.exitSemiFullscreen()
                : (P.exitSemiFullscreen = H5PEditor.semiFullscreen(
                    [P.formContainer],
                    function () {
                      (c || y(d),
                        w(i, !0),
                        s.trigger("formentersemifullscreen"));
                    },
                    function () {
                      ((P.exitSemiFullscreen = null),
                        c || b(d),
                        w(i),
                        s.trigger("formexitsemifullscreen"));
                    },
                  ));
            });
            (w(i), a.appendChild(i));
          }
          (window.addEventListener("resize", s.updateFormResponsiveness),
            s.on("remove", function () {
              window.removeEventListener("resize", s.updateFormResponsiveness);
            }));
          const e = document.createElement("div");
          (e.classList.add("form-mananger-overlay"),
            s.formContainer.insertBefore(e, s.formContainer.firstChild),
            s.formContainer.insertBefore(a, s.formContainer.firstChild),
            b(l),
            s.formContainer.appendChild(P.footer),
            s.on("validate", function () {
              !n.metadata ||
                (n.metadata.title && H5P.trim(n.metadata.title)) ||
                s.closeFormUntil(0);
            }));
        })();
    }),
      (i.FormManager.prototype = Object.create(t.prototype)),
      (i.FormManager.prototype.constructor = i.FormManager));
    const _ = function (t) {
        var e = H5PEditor.$.parseHTML(t);
        return null !== e ? e[0].nodeValue : t;
      },
      S = function (t, e, i) {
        function n() {
          (t.removeEventListener(e, n), i.apply(this, arguments));
        }
        return (t.addEventListener(e, n), n);
      };
  })(H5P.DragNBar, H5P.EventDispatcher),
  /*!@license H5P.InteractiveVideo-1.26/dist/h5p-interactive-video.js by Joubel licensed under MIT*/ (() => {
    "use strict";
    function t(t) {
      const n = t.length;
      return function e() {
        const i = Array.prototype.slice.call(arguments, 0);
        return i.length >= n
          ? t.apply(null, i)
          : function () {
              var t = Array.prototype.slice.call(arguments, 0);
              return e.apply(null, i.concat(t));
            };
      };
    }
    const e = t(function (t, e) {
        e.forEach(t);
      }),
      i =
        (t(function (t, e) {
          return e.map(t);
        }),
        t(function (t, e) {
          return e.filter(t);
        })),
      n =
        (t(function (t, e) {
          return e.some(t);
        }),
        t(function (t, e) {
          return -1 != e.indexOf(t);
        })),
      o = t(function (e, t) {
        return i((t) => !n(t, e), t);
      }),
      r = t((t, e) => e.getAttribute(t)),
      s = t((t, e, i) => i.setAttribute(t, e)),
      a = t((t, e) => e.removeAttribute(t)),
      l = t((t, e) => e.hasAttribute(t)),
      c =
        (t((t, e, i) => i.getAttribute(t) === e),
        t((t, e) => {
          var i = r(t, e);
          s(t, ("true" !== i).toString(), e);
        }),
        t((t, e) => t.appendChild(e)),
        t((t, e) => e.querySelector(t)),
        t((t, e) => {
          return ((t = e.querySelectorAll(t)), Array.prototype.slice.call(t));
        }),
        t((t, e) => t.removeChild(e)),
        t((t, e) => e.classList.contains(t)),
        t((t, e) => e.classList.add(t))),
      u = t((t, e) => e.classList.remove(t)),
      h = c("hidden"),
      d = u("hidden"),
      p =
        (t((t, e) => (t ? d : h)(e)),
        t((t, e, i) => {
          i.classList[e ? "add" : "remove"](t);
        }),
        a("tabindex")),
      f = (e(p), s("tabindex", "0")),
      m = s("tabindex", "-1"),
      g = l("tabindex");
    class v {
      constructor(t) {
        (Object.assign(this, {
          listeners: {},
          on: function (t, e, i) {
            i = { listener: e, scope: i };
            return (
              (this.listeners[t] = this.listeners[t] || []),
              this.listeners[t].push(i),
              this
            );
          },
          fire: function (t, e) {
            return (this.listeners[t] || []).every(function (t) {
              return !1 !== t.listener.call(t.scope || this, e);
            });
          },
          propagate: function (t, i) {
            let n = this;
            t.forEach((e) => i.on(e, (t) => n.fire(e, t)));
          },
        }),
          (this.plugins = t || []),
          (this.elements = []),
          (this.negativeTabIndexAllowed = !1),
          this.on("nextElement", this.nextElement, this),
          this.on("previousElement", this.previousElement, this),
          this.on("firstElement", this.firstElement, this),
          this.on("lastElement", this.lastElement, this),
          this.initPlugins());
      }
      addElement(t) {
        (this.elements.push(t),
          this.firesEvent("addElement", t),
          1 === this.elements.length && this.setTabbable(t));
      }
      insertElementAt(t, e) {
        (this.elements.splice(e, 0, t),
          this.firesEvent("addElement", t),
          1 === this.elements.length && this.setTabbable(t));
      }
      removeElement(t) {
        ((this.elements = o([t], this.elements)),
          g(t) &&
            (this.setUntabbable(t),
            this.elements[0] && this.setTabbable(this.elements[0])),
          this.firesEvent("removeElement", t));
      }
      count() {
        return this.elements.length;
      }
      firesEvent(t, e) {
        var i = this.elements.indexOf(e);
        return this.fire(t, {
          element: e,
          index: i,
          elements: this.elements,
          oldElement: this.tabbableElement,
        });
      }
      nextElement({ index: t }) {
        const e = t === this.elements.length - 1,
          i = this.elements[e ? 0 : t + 1];
        (this.setTabbable(i), i.focus());
      }
      firstElement() {
        const t = this.elements[0];
        (this.setTabbable(t), t.focus());
      }
      lastElement() {
        const t = this.elements[this.elements.length - 1];
        (this.setTabbable(t), t.focus());
      }
      setTabbableByIndex(t) {
        t = this.elements[t];
        t && this.setTabbable(t);
      }
      setTabbable(t) {
        (e(this.setUntabbable.bind(this), this.elements),
          f(t),
          (this.tabbableElement = t));
      }
      setUntabbable(t) {
        t !== document.activeElement &&
          (this.negativeTabIndexAllowed ? m : p)(t);
      }
      previousElement({ index: t }) {
        const e = 0 === t,
          i = this.elements[e ? this.elements.length - 1 : t - 1];
        (this.setTabbable(i), i.focus());
      }
      useNegativeTabIndex() {
        ((this.negativeTabIndexAllowed = !0),
          this.elements.forEach((t) => {
            t.hasAttribute("tabindex") || m(t);
          }));
      }
      initPlugins() {
        this.plugins.forEach(function (t) {
          void 0 !== t.init && t.init(this);
        }, this);
      }
    }
    class b {
      constructor() {
        this.selectability = !0;
      }
      init(t) {
        ((this.boundHandleKeyDown = this.handleKeyDown.bind(this)),
          (this.controls = t),
          this.controls.on("addElement", this.listenForKeyDown, this),
          this.controls.on("removeElement", this.removeKeyDownListener, this));
      }
      listenForKeyDown({ element: t }) {
        t.addEventListener("keydown", this.boundHandleKeyDown);
      }
      removeKeyDownListener({ element: t }) {
        t.removeEventListener("keydown", this.boundHandleKeyDown);
      }
      handleKeyDown(t) {
        switch (t.which) {
          case 27:
            (this.close(t.target), t.preventDefault(), t.stopPropagation());
            break;
          case 35:
            (this.lastElement(t.target),
              t.preventDefault(),
              t.stopPropagation());
            break;
          case 36:
            (this.firstElement(t.target),
              t.preventDefault(),
              t.stopPropagation());
            break;
          case 13:
          case 32:
            (this.select(t.target), t.preventDefault(), t.stopPropagation());
            break;
          case 37:
          case 38:
            this.hasChromevoxModifiers(t) ||
              (this.previousElement(t.target),
              t.preventDefault(),
              t.stopPropagation());
            break;
          case 39:
          case 40:
            this.hasChromevoxModifiers(t) ||
              (this.nextElement(t.target),
              t.preventDefault(),
              t.stopPropagation());
        }
      }
      hasChromevoxModifiers(t) {
        return t.shiftKey || t.ctrlKey;
      }
      previousElement(t) {
        !1 !== this.controls.firesEvent("beforePreviousElement", t) &&
          (this.controls.firesEvent("previousElement", t),
          this.controls.firesEvent("afterPreviousElement", t));
      }
      nextElement(t) {
        !1 !== this.controls.firesEvent("beforeNextElement", t) &&
          (this.controls.firesEvent("nextElement", t),
          this.controls.firesEvent("afterNextElement", t));
      }
      select(t) {
        this.selectability &&
          !1 !== this.controls.firesEvent("before-select", t) &&
          (this.controls.firesEvent("select", t),
          this.controls.firesEvent("after-select", t));
      }
      firstElement(t) {
        !1 !== this.controls.firesEvent("beforeFirstElement", t) &&
          (this.controls.firesEvent("firstElement", t),
          this.controls.firesEvent("afterFirstElement", t));
      }
      lastElement(t) {
        !1 !== this.controls.firesEvent("beforeLastElement", t) &&
          (this.controls.firesEvent("lastElement", t),
          this.controls.firesEvent("afterLastElement", t));
      }
      disableSelectability() {
        this.selectability = !1;
      }
      enableSelectability() {
        this.selectability = !0;
      }
      close(t) {
        !1 !== this.controls.firesEvent("before-close", t) &&
          (this.controls.firesEvent("close", t),
          this.controls.firesEvent("after-close", t));
      }
    }
    function y(t, e, n, o, i, r) {
      var s = this,
        a = "interactive-video-".concat(r, "-menu-").concat(t),
        l = new v([new b()]);
      l.on("close", function () {
        return p();
      });
      var c,
        u = [];
      function h() {
        "true" === s.control.getAttribute("aria-expanded")
          ? p()
          : (s.control.setAttribute("aria-expanded", "true"),
            s.popup.classList.add("h5p-show"),
            s.trigger("open"),
            s.popup.querySelector('li[tabindex="0"]').focus());
      }
      function d(t) {
        var e = t.value === n.value,
          i = x(
            null,
            1,
            t.label,
            function () {
              !(function (t, e) {
                ((n = e),
                  (function (t, e, i) {
                    for (var n = 0; n < t.length; n++) e.call(i, t[n], n);
                  })(
                    c.querySelectorAll('[aria-checked="true"]'),
                    function (t) {
                      return t.setAttribute("aria-checked", "false");
                    },
                    this,
                  ),
                  t.setAttribute("aria-checked", "true"),
                  p(),
                  s.trigger("select", e));
              })(this, t);
            },
            "li",
            o,
          );
        return (
          u.push({ option: t, element: i }),
          i.setAttribute("aria-checked", e.toString()),
          i.setAttribute("aria-describedby", a),
          l.addElement(i),
          e ? i.setAttribute("tabindex", "0") : i.removeAttribute("tabindex"),
          i
        );
      }
      H5P.EventDispatcher.call(s);
      var p = function () {
        (s.control.setAttribute("aria-expanded", "false"),
          s.control.focus(),
          s.popup.classList.remove("h5p-show"),
          s.trigger("close"));
      };
      ((s.updateOptions = function (t) {
        (c && c.parentNode.removeChild(c),
          (c = w(null, null, "ol")).setAttribute("role", "menu"));
        for (var e = 0; e < t.length; e++) c.appendChild(d(t[e]));
        s.popup.appendChild(c);
      }),
        (s.popup = w(
          "h5p-chooser h5p-" + t,
          '<h2 id="'.concat(a, '">').concat(i[t], "</h2>"),
        )),
        s.popup.setAttribute("role", "dialog"),
        (r = x("h5p-chooser-close-button", 0, i.close, h, "div", "button")),
        s.popup.appendChild(r),
        (s.control = x("h5p-control h5p-" + t, 0, i[t], h, "div", "button")),
        s.control.setAttribute("aria-haspopup", "true"),
        (s.overlayControl = x(
          "h5p-minimal-button h5p-" + t,
          1,
          i[t],
          h,
          "div",
          "menuitem",
        )),
        (s.overlayControl.tabIndex = "-1"),
        s.updateOptions(e));
    }
    (y.prototype = Object.create(H5P.EventDispatcher.prototype)).constructor =
      y;
    var w = function (t, e, i) {
        i = document.createElement(i || "div");
        return (t && (i.className = t), e && (i.innerHTML = e), i);
      },
      x = function (t, e, i, n, o, r) {
        var s = w(t, 1 === e ? i : "", o);
        return (
          (s.tabIndex = 0),
          s.setAttribute("role", r),
          0 === e && (s.title = i),
          s.addEventListener(
            "click",
            function (t) {
              n.call(s, t);
            },
            !1,
          ),
          s.addEventListener(
            "keydown",
            function (t) {
              (32 !== t.which && 13 !== t.which) ||
                (t.preventDefault(), n.call(s, t));
            },
            !1,
          ),
          s
        );
      };
    const k = y,
      C = {
        ENTER: 13,
        SPACE: 32,
        ARROW_LEFT: 37,
        ARROW_UP: 38,
        ARROW_RIGHT: 39,
        ARROW_DOWN: 40,
        A: 65,
        B: 66,
        C: 67,
        D: 68,
        E: 69,
        F: 70,
        G: 71,
        H: 72,
        I: 73,
        J: 74,
        K: 75,
        L: 76,
        M: 77,
        N: 78,
        O: 79,
        P: 80,
        Q: 81,
        R: 82,
        S: 83,
        T: 84,
        U: 85,
        V: 86,
        W: 87,
        X: 88,
        Y: 89,
        Z: 90,
      },
      P = (t, e, i = { ctrl: !1, shift: !1 }) =>
        !(
          -1 === e.indexOf(t.which) ||
          (i.ctrl && !t.ctrlKey) ||
          (i.shift && !t.shiftKey)
        ),
      _ = (t) => -1 !== [C.ENTER, C.SPACE].indexOf(t.which),
      S = (t, n, o) => {
        t.on("keydown", (e) => {
          for (let t = 0; t < n.length; t++) {
            var i = n[t];
            if (P(e, [i.key], { ctrl: i.ctrl, shift: i.shift }))
              return (i.preventDefault && e.preventDefault(), o(e));
          }
        });
      };
    function $(t) {
      return ($ =
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
          ? function (t) {
              return typeof t;
            }
          : function (t) {
              return t &&
                "function" == typeof Symbol &&
                t.constructor === Symbol &&
                t !== Symbol.prototype
                ? "symbol"
                : typeof t;
            })(t);
    }
    function N(t) {
      return z(t) ? j("<div>".concat(t, "</div>")).text() : void 0;
    }
    function R(t, e) {
      return void 0 !== t.goto && t.goto.type === e;
    }
    function F(t) {
      return -1 !== T.indexOf(t);
    }
    var j = H5P.jQuery,
      z = function (t) {
        return void 0 !== t && "string" == typeof t && 0 < t.length;
      },
      W = [
        "H5P.Image",
        "H5P.Nil",
        "H5P.Table",
        "H5P.Link",
        "H5P.GoToQuestion",
        "H5P.IVHotspot",
        "H5P.Text",
      ],
      T = ["H5P.Text", "H5P.Table"];
    function H(u, h, t) {
      var d,
        e,
        n,
        p = this;
      H5P.EventDispatcher.call(p);
      var f = u.action;
      t && (f.userDatas = { state: t });
      var o,
        m,
        i,
        r,
        s,
        g = f.library.split(" ")[0],
        a =
          h.l10n[
            ((s = g),
            (t = u),
            -1 !== W.indexOf(s) || R(t, "timecode") ? "content" : "interaction")
          ],
        t = "H5P.Nil" !== g && "button" === u.displayType,
        l = [
          f.params.contentName,
          t ? N(u.label) : "",
          "H5P.Link" === g && void 0 !== f.params.title
            ? f.params.title
            : u.libraryTitle,
        ].filter(z)[0],
        c = !1,
        v = !1,
        b = !1,
        y = u.action.metadata;
      (this.on("open-dialog", function () {
        H();
      }),
        this.on("show-mask", function () {
          A(this.getElement());
        }));
      function w(t) {
        ((d = j("<div/>", {
          tabindex: 0,
          role: "button",
          class: "h5p-interaction " + o + (t ? "" : " h5p-hidden"),
          "aria-popup": "true",
          "aria-expanded": "false",
          "aria-label": l,
          css: { left: u.x + "%", top: u.y + "%", width: "", height: "" },
          on: {
            click: function () {
              p.dialogDisabled || (H(), d.attr("aria-expanded", "true"));
            },
            keydown: function (t) {
              (13 !== t.which && 32 !== t.which) ||
                p.dialogDisabled ||
                (H(), d.attr("aria-expanded", "true"), t.preventDefault());
            },
          },
        })),
          p.getRequiresCompletion() &&
            void 0 === h.editor &&
            h.currentState !== H5P.InteractiveVideo.SEEKING &&
            H(!0),
          j("<div/>", { class: "h5p-touch-area" }).appendTo(d),
          j("<div/>", { class: "h5p-interaction-button" }).appendTo(d),
          h.editor &&
            d
              .hover(
                function () {
                  c =
                    d.is(".focused") ||
                    d.is(":focus") ||
                    (h.dnb && (!h.dnb || h.dnb.newElement))
                      ? (h.editor.hideInteractionTitle(), !1)
                      : (h.editor.showInteractionTitle(l, d), !0);
                },
                function () {
                  (h.editor.hideInteractionTitle(), (c = !1));
                },
              )
              .focus(function () {
                (h.editor.hideInteractionTitle(), (c = !1));
              })
              .click(function () {
                h.editor.hideInteractionTitle();
              }),
          (t = z(N(u.label))),
          u.label && t && (e = P(u.label, "h5p-interaction").appendTo(d)),
          p.trigger("display", d),
          setTimeout(function () {
            d && d.removeClass("h5p-hidden");
          }, 0));
      }
      function x() {
        return (
          (d = P(
            u.label,
            "h5p-interaction h5p-interaction-label-standalone",
          )).css({
            left: "".concat(u.x, "%"),
            top: "".concat(u.y, "%"),
            width: "",
            height: "initial",
          }),
          p.trigger("display", d),
          setTimeout(function () {
            d && d.removeClass("h5p-hidden");
          }, 0),
          d
        );
      }
      function k() {
        var t = p.isGotoClickable(),
          e = D(),
          i = j.extend(
            {},
            { backgroundColor: "rgb(255,255,255)", boxShadow: !0 },
            u.visuals,
          );
        ((d = j("<div/>", {
          "aria-label": h.l10n.interaction,
          tabindex: "-1",
          class:
            "h5p-interaction h5p-poster " +
            o +
            (t && u.goto.visualize ? " goto-clickable-visualize" : ""),
          css: {
            left: u.x + "%",
            top: u.y + "%",
            width: e.width,
            height: e.height,
          },
        })),
          "H5P.IVHotspot" !== g &&
            (d.css("background", i.backgroundColor),
            (e = i.backgroundColor.split(","))[3] &&
              0 === parseFloat(e[3].replace(")", "")) &&
              d.addClass("h5p-transparent-interaction")),
          !1 === i.boxShadow && d.addClass("h5p-box-shadow-disabled"),
          "H5P.Link" === g &&
            (d.css("height", "auto"),
            d.css("width", "auto"),
            void 0 === h.editor &&
              d.click(function () {
                return (window.open(m.getUrl()), h.pause(), !1);
              })),
          (n = j("<div>", { class: "h5p-interaction-outer" }).appendTo(d)),
          (n = j(t ? "<a>" : "<div>", {
            class: "h5p-interaction-inner h5p-frame",
          }).appendTo(n)),
          !t && F(g) && n.attr("tabindex", "0"),
          void 0 !== h.editor && m.disableAutoPlay && m.disableAutoPlay(),
          (t = t ? _(n) : n),
          m.attach(t),
          T(t),
          p.trigger("display", d),
          p.getRequiresCompletion() &&
            h.currentState !== H5P.InteractiveVideo.SEEKING &&
            void 0 === h.editor &&
            !p.hasFullScore() &&
            (A(d), d.focus()),
          setTimeout(function () {
            H5P.trigger(m, "resize");
          }, 0),
          "function" == typeof m.setActivityStarted &&
            "function" == typeof m.getScore &&
            m.setActivityStarted());
      }
      function C() {
        var e,
          t,
          i,
          n,
          o = !0;
        (u.adaptivity &&
          ((t = p.hasFullScore()),
          (o = !p.getRequiresCompletion() || t),
          (e = t ? u.adaptivity.correct : u.adaptivity.wrong)),
          e && void 0 !== e.seekTo
            ? (h.pause(),
              !e.allowOptOut &&
                d &&
                (p.isButton()
                  ? ((h.dnb.dialog.disableOverlay = !0),
                    h.dnb.dialog.hideCloseButton())
                  : A(d)),
              (i = t ? "correct" : "wrong"),
              (n = e.seekLabel || h.l10n.defaultAdaptivitySeekLabel),
              m
                .hideButton("iv-continue")
                .addButton("iv-adaptivity-" + i, n, function () {
                  (S(e.seekTo),
                    !t &&
                      m.resetTask &&
                      (m.resetTask(), m.hideButton("iv-adaptivity-" + i)),
                    p.remove(),
                    L(e.seekTo));
                })
                .showButton("iv-adaptivity-" + i, 1)
                .hideButton("iv-adaptivity-" + (t ? "wrong" : "correct"), 1)
                .hideButton("check-answer", 1)
                .hideButton("show-solution", 1)
                .hideButton("try-again", 1),
              void 0 !== m.disableInput &&
                (m.disableInput instanceof Function ||
                  "function" == typeof m.disableInput) &&
                m.disableInput(),
              setTimeout(function () {
                var t = e.message.replace("<p>", "").replace("</p>", "");
                (m.updateFeedbackContent(t, !0), m.read(t));
              }, 0))
            : void 0 !== m.hasButton &&
              (m.hasButton("iv-continue") ||
                m.addButton(
                  "iv-continue",
                  h.l10n.defaultAdaptivitySeekLabel,
                  function () {
                    (S(), L());
                  },
                ),
              m[o ? "showButton" : "hideButton"]("iv-continue")));
      }
      var P = function (t) {
          return j("<div/>", {
            class: "h5p-interaction-label ".concat(
              1 < arguments.length && void 0 !== arguments[1]
                ? arguments[1]
                : "",
            ),
            html: '<div class="h5p-interaction-label-text">'.concat(
              t,
              "</div>",
            ),
          });
        },
        _ = function (t) {
          var e;
          return (
            "timecode" === u.goto.type
              ? t
                  .click(function (t) {
                    1 === t.which && E({ data: u.goto.time });
                  })
                  .keypress(function (t) {
                    32 === t.which && E({ data: u.goto.time });
                  })
                  .attr("href", "#")
                  .attr("tabindex", "0")
              : ((e = u.goto.url),
                t
                  .keypress(function (t) {
                    32 === t.which && this.click();
                  })
                  .attr({
                    href: ("other" !== e.protocol ? e.protocol : "") + e.url,
                    target: "_blank",
                  })),
            t.addClass("goto-clickable")
          );
        },
        S = function (t) {
          t = !h.hasUncompletedRequiredInteractions(t);
          (m && m.trigger("hide"),
            d && p.trigger("hide", d),
            p.isButton()
              ? t && h.dnb.dialog.close()
              : (h.isMobileView && t && h.dnb.dialog.close(), d && d.detach()),
            p.trigger("remove", d),
            t && M(d));
        },
        T = function (t) {
          if ("H5P.Questionnaire" === g) {
            if (t.find(".h5p-interaction-continue-button").length) return;
            ((e =
              (((e = document.createElement("button")).innerHTML =
                h.l10n.continueWithVideo),
              (e.className = "h5p-interaction-continue-button"),
              e.addEventListener("click", function () {
                (S(), h.play());
              }),
              e)),
              (t = t.find(".h5p-questionnaire-success-center")));
            (t.length && t.get(0).appendChild(e),
              m.on("noSuccessScreen", function () {
                (S(), h.play());
              }));
          }
          var e;
          "H5P.FreeTextQuestion" === g &&
            m.on("continue", function () {
              (S(), h.play());
            });
        },
        H = function (t) {
          var r = h.$container.find(".h5p-dialog-wrapper"),
            e = r.find(".h5p-dialog-titlebar");
          "function" == typeof m.setActivityStarted &&
            "function" == typeof m.getScore &&
            m.setActivityStarted();
          var i = p.isGotoClickable(),
            n = r.find("[tabindex]"),
            o = j(i ? "<a>" : "<div>", {
              class: "h5p-dialog-interaction h5p-frame",
            });
          (!i && F(g) && o.attr("tabindex", "0"),
            void 0 !== h.editor
              ? o.attr("tabindex", -1)
              : 0 === n.length && o.attr("tabindex", 0),
            p.getRequiresCompletion() &&
              r.keydown(function (t) {
                function e(t) {
                  return n.target === t.get(0);
                }
                var i, n, o;
                ((i = r
                  .find('[tabindex="0"], button, input')
                  .filter(":visible")),
                  (o = 9 === (n = t).which),
                  (t = i.first()),
                  (i = i.last()),
                  o && n.shiftKey && e(t)
                    ? (i.focus(), n.preventDefault())
                    : o && e(i) && (t.focus(), n.preventDefault()));
              }));
          var s,
            a,
            l,
            c,
            n = i ? _(o) : o;
          if (
            (m.attach(n),
            T(n),
            B(m) && ((p.score = m.getScore()), (p.maxScore = m.getMaxScore())),
            p.hasFullScore() && t)
          ) {
            if (r.hasClass("h5p-hidden")) return;
          } else
            p.getRequiresCompletion() &&
              !p.hasFullScore() &&
              (h.dnb.dialog.hideCloseButton(),
              (h.dnb.dialog.disableOverlay = !0),
              r.click(function () {
                p.hasFullScore() ||
                  h
                    .showWarningMask()
                    .find(".h5p-button-back")
                    .click(function () {
                      return o.find("button").last().focus();
                    });
              }));
          (h.dnb.dialog.open(o),
            h.disableTabIndexes(),
            h.dnb.dialog.addLibraryClass(g),
            h.dnb.dialog.toggleClass(
              "goto-clickable-visualize",
              !(!i || !u.goto.visualize),
            ),
            h.dnb.dialog.toggleClass("h5p-goto-timecode", R(u, "timecode")),
            h.dnb.dialog.disableOverlay && h.restorePosterTabIndexes(),
            h.dnb.dialog.once("close", function () {
              h.dnb.$dialogContainer.one("transitionend", function () {
                o.is(".h5p-image") &&
                  o.find("img").css({ width: "", height: "" });
              });
              try {
                void 0 !== m.pause &&
                  (m.pause instanceof Function ||
                    "function" == typeof m.pause) &&
                  m.pause();
              } catch (t) {
                H5P.error(t);
              }
              (d && (d.focus(), d.attr("aria-expanded", "false")),
                m && m.trigger("hide"));
              var t = r
                .find(".h5p-dialog-titlebar")
                .find(".h5p-sc-sound-control");
              t.length && r.find(".h5p-sc-set-wrapper").append(t);
            }),
            h.dnb.dialog.on("close", function t() {
              ((p.dialogWidth = h.dnb.dialog.getDialogWidth()),
                h.dnb.dialog.off("close", t));
            }),
            "H5P.Image" === g
              ? ((s = h.dnb.dialog.getMaxSize(d)),
                (a = o.find("img")),
                f.params.file.width && f.params.file.height
                  ? I(
                      a,
                      s,
                      {
                        width: f.params.file.width,
                        height: f.params.file.height,
                      },
                      !h.isMobileView,
                    )
                  : (a.on("load", function () {
                      a.is(":visible") &&
                        I(
                          a,
                          s,
                          { width: this.width, height: this.height },
                          !h.isMobileView,
                        );
                    }),
                    h.dnb.dialog.position(d)))
              : h.isMobileView ||
                ((c = null),
                "H5P.FreeTextQuestion" === g
                  ? (c = "big")
                  : "H5P.Text" !== g && "H5P.Table" !== g && (c = "medium"),
                h.dnb.dialog.position(d, { width: p.dialogWidth / 16 }, c)),
            "H5P.Summary" === g &&
              ((l = 0),
              H5P.on(m, "resize", function () {
                var t = o.height();
                ((t + 10 < l || l < t - 10) &&
                  setTimeout(function () {
                    h.dnb.dialog.scroll(t, 300);
                  }, 500),
                  (l = t));
              })),
            e.find(".h5p-sc-sound-control").remove(),
            r.find(".h5p-sc-sound-control").length &&
              ((i = r.find(".h5p-sc-sound-control")),
              (c = r.find(".h5p-dialog-close")).length &&
                "none" !== c.css("display") &&
                ((c =
                  2 * parseFloat(c.css("right")) +
                  2 * parseFloat(c.css("padding-right"))),
                i.css({ right: c + "px" })),
              e.append(i)),
            setTimeout(function () {
              H5P.trigger(m, "resize");
            }, 0));
        },
        I = function (t, e, i, n) {
          ((i.width /= 16),
            (i.height /= 16),
            i.height > e.height &&
              ((i.width = (i.width * e.height) / i.height),
              (i.height = e.height)),
            i.width > e.width &&
              ((i.height = (i.height * e.width) / i.width),
              (i.width = e.width)));
          e = 16 / Number(t.css("fontSize").replace("px", ""));
          (t.css({ width: i.width * e + "em", height: i.height * e + "em" }),
            n && h.dnb.dialog.position(d, i));
        },
        E = function (t) {
          (p.isButton() && h.dnb.dialog.close(),
            (h.currentState !== H5P.Video.PAUSED &&
              h.currentState !== H5P.Video.ENDED) ||
              h.play());
          t = t.data;
          (t === u.duration.from && (t += 0.2), h.seek(t, { force: !0 }));
        },
        D = function () {
          var t = u.height || 10,
            e = u.width || 10,
            i = h.width / h.fontSize;
          return {
            height:
              (t / (i / (h.$videoWrapper.width() / h.$videoWrapper.height()))) *
                100 +
              "%",
            width: (e / i) * 100 + "%",
          };
        },
        A = function (t) {
          (t.css("zIndex", 52), h.showOverlayMask());
        },
        M = function (t) {
          (t && t.css("zIndex", ""), h.hideOverlayMask());
        },
        L = function (t) {
          var e = O(),
            i = e.filter(function (t) {
              return !t.isButton();
            });
          if (
            (i.length
              ? (e = i)
              : e.length &&
                h.$container.find(".h5p-dialog-wrapper .h5p-dialog").show(),
            e.length)
          ) {
            e = e[0];
            return (
              e.isButton() ? e.trigger("open-dialog") : e.trigger("show-mask"),
              void h.pause()
            );
          }
          h.currentState !== H5P.Video.ENDED &&
            (void 0 !== t && (h.pause(), h.seek(t, { force: !0 })),
            h.play(),
            h.controls.$play.focus());
        },
        O = function () {
          return h
            .getVisibleInteractions()
            .filter(function (t) {
              return t !== p;
            })
            .filter(function (t) {
              return t.getRequiresCompletion() && !t.hasFullScore();
            });
        };
      ((p.isGotoClickable = function () {
        return (
          -1 !== ["H5P.Text", "H5P.Image"].indexOf(g) &&
          u.goto &&
          -1 !== ["timecode", "url"].indexOf(u.goto.type)
        );
      }),
        (p.getCurrentState = function () {
          if (
            m &&
            (m.getCurrentState instanceof Function ||
              "function" == typeof m.getCurrentState)
          )
            return m.getCurrentState();
        }),
        (p.getDuration = function () {
          return { from: u.duration.from, to: u.duration.to + 1 };
        }),
        (p.getRequiresCompletion = function () {
          return !!u.adaptivity && !!u.adaptivity.requireCompletion;
        }),
        (p.pause = function () {
          return u.pause;
        }),
        (p.isButton = function () {
          return (
            "button" === u.displayType ||
            (!(!h.isMobileView || "H5P.IVHotspot" === g) &&
              ("H5P.Image" !== g || !1 !== u.buttonOnMobile))
          );
        }),
        (p.isStandaloneLabel = function () {
          return "H5P.Nil" === g;
        }),
        (p.isMainSummary = function () {
          return !0 === u.mainSummary;
        }),
        (p.selectDot = function () {
          h.isSkippingProhibited(u.duration.from)
            ? h.showPreventSkippingMessage(
                {
                  x:
                    (u.duration.from / h.video.getDuration()) *
                    h.controls.$slider.get(0).offsetWidth,
                  y: -13,
                },
                h.l10n.navForwardDisabled,
              )
            : ((h.seekingTo = !0),
              Math.floor(10 * h.video.getCurrentTime()) !==
                Math.floor(10 * u.duration.from) &&
                (h.currentState === H5P.Video.VIDEO_CUED
                  ? (h.play(), h.seek(u.duration.from))
                  : h.currentState === H5P.Video.PLAYING
                    ? h.seek(u.duration.from)
                    : (h.play(), h.seek(u.duration.from), h.pause())));
        }),
        (p.addDot = function () {
          if ("H5P.Nil" === g) return j("<div/>", { class: t });
          var t = "h5p-seekbar-interaction " + o,
            t = j("<div/>", {
              role: "menuitem",
              class: t,
              "aria-label": "".concat(a, ". ").concat(l),
              title: l,
              css: { left: u.duration.from * h.oneSecondInPercentage + "%" },
              on: {
                click: p.selectDot,
                keydown: function (t) {
                  if (13 === t.which || 32 === t.which)
                    return (p.selectDot(), !1);
                },
              },
            });
          return (
            h.preventSkipping &&
              t.attr("aria-disabled", "true").attr("tabindex", "-1"),
            (p.$menuitem = t)
          );
        }),
        (p.isVisible = function () {
          return b;
        }),
        (p.visibleAt = function (t) {
          return !(t < u.duration.from || t >= u.duration.to + 1);
        }),
        (p.toggle = function (t, e) {
          return p.visibleAt(t)
            ? d
              ? void 0
              : ((b = !0),
                p.isStandaloneLabel() ? x() : p.isButton() ? w(e) : k(),
                void 0 === h.editor
                  ? (r = h.dnb.add(d, void 0, {
                      dnbElement: r,
                      disableContextMenu: !0,
                    }))
                  : (p.fit && (h.editor.fit(d, u), (p.fit = !1)),
                    d.focus(function () {
                      h.pause();
                    })),
                d)
            : ((b = !1),
              void (
                d &&
                (r &&
                  (r.hideContextMenu(),
                  r === h.dnb.focusedElement &&
                    (r.blur(), delete h.dnb.focusedElement)),
                h.editor && c && (h.editor.hideInteractionTitle(), (c = !1)),
                p.remove())
              ));
        }),
        (p.setTitle = function (t) {
          (d && d.attr("aria-label", t), (l = t));
        }),
        (p.reCreateInteraction = function () {
          "H5P.IVHotspot" !== g &&
            d &&
            (m && m.trigger("hide"),
            p.trigger("hide", d),
            d.detach(),
            p.isStandaloneLabel() ? x() : p.isButton() ? w(!0) : k());
        }),
        (p.resizeInteraction = function () {
          p.isStandaloneLabel() || H5P.trigger(m, "resize");
        }),
        (p.positionLabel = function (t) {
          d &&
            p.isButton() &&
            e &&
            !p.isStandaloneLabel() &&
            (e.removeClass("h5p-left-label"),
            parseInt(d.css("left")) + e.position().left + e.outerWidth() > t &&
              e.addClass("h5p-left-label"));
        }),
        (p.setPosition = function (t, e) {
          ((u.x = t), (u.y = e), d.css({ left: t + "%", top: e + "%" }));
        }),
        (p.setSize = function (t, e) {
          (t && (u.width = t), e && (u.height = e), H5P.trigger(m, "resize"));
        }),
        (p.remove = function () {
          d &&
            (p.trigger(
              "domHidden",
              { $dom: d, key: "videoProgressedPast" },
              { bubbles: !0, external: !0 },
            ),
            m && m.trigger("hide"),
            p.trigger("hide", d),
            d.detach(),
            (d = void 0));
        }),
        (p.reCreate = function () {
          var t, e;
          (void 0 === (e = u.className) &&
            (e =
              (t = f.library.split(" ")[0].toLowerCase().split("."))[0] +
              "-" +
              t[1] +
              "-interaction"),
            u.goto && "timecode" === u.goto.type && (e += " h5p-goto-timecode"),
            (o = e),
            p.isStandaloneLabel() ||
              ((f.params = f.params || {}),
              (m = H5P.newRunnable(f, h.contentId, void 0, void 0, {
                parent: h,
                editing: void 0 !== h.editor,
              })),
              void 0 === p.maxScore &&
                m.getMaxScore &&
                (p.maxScore = m.getMaxScore()),
              f.userDatas && B(m) && (p.score = m.getScore()),
              h.isTask ||
                void 0 === h.options.assets.endscreens ||
                ((m.isTask ||
                  (void 0 === m.isTask && void 0 !== m.showSolutions)) &&
                  (h.isTask = !0)),
              m.on &&
                (m.on("xAPI", function (t) {
                  var e =
                      t.getVerifiedStatementValue([
                        "context",
                        "contextActivities",
                        "parent",
                      ]) || [],
                    i = t.getContentXAPIId(h),
                    n =
                      "completed" === t.getVerb() || "answered" === t.getVerb(),
                    e = e.some(function (t) {
                      return t.id === i;
                    });
                  (m.getScore && (p.score = m.getScore()),
                    m.getMaxScore && (p.maxScore = m.getMaxScore()),
                    e &&
                      n &&
                      t.getMaxScore() &&
                      ((p.score = null == t.getScore() ? 0 : t.getScore()),
                      (p.maxScore = p.maxScore || t.getMaxScore()),
                      C()),
                    p.setLastXAPIVerb(t.getVerb()),
                    p.trigger(t));
                }),
                m.on("question-finished", function () {
                  C();
                }),
                m.on("resize", function () {
                  (delete p.dialogWidth,
                    h && h.dnb && h.dnb.dialog.removeStaticWidth());
                }),
                "H5P.IVHotspot" === g && m.on("goto", E),
                "H5P.GoToQuestion" === g && m.on("chosen", E))));
        }));
      var B = function (t) {
        return (
          "undefined" !== $(t) &&
          "function" == typeof t.getScore &&
          "function" == typeof t.getMaxScore
        );
      };
      ((p.setDnbElement = function (t) {
        return r !== t && ((r = t), !0);
      }),
        (p.hasFullScore = function () {
          return p.score >= p.maxScore;
        }),
        (p.getLibraryName = function () {
          return g;
        }),
        (p.getMetadata = function () {
          return y;
        }),
        (p.getTitle = function () {
          return l;
        }),
        (p.isAnswerable = function () {
          return -1 === W.indexOf(p.getLibraryName()) && !p.isStandaloneLabel();
        }),
        (p.setProgress = function (t) {
          this.progress = t;
        }),
        (p.getProgress = function () {
          return this.progress;
        }),
        (p.setLastXAPIVerb = function (t) {
          i = t;
        }),
        (p.getLastXAPIVerb = function () {
          return i;
        }),
        (p.getClass = function () {
          return o;
        }),
        (p.getCopyrights = function () {
          if (!p.isStandaloneLabel()) {
            var t = H5P.newRunnable(f, h.contentId);
            if (void 0 !== t) {
              var e = new H5P.ContentCopyrights();
              return (
                e.addContent(H5P.getCopyrights(t, u, h.contentId)),
                e.setLabel(
                  l +
                    " " +
                    H5P.InteractiveVideo.humanizeTime(u.duration.from) +
                    " - " +
                    H5P.InteractiveVideo.humanizeTime(u.duration.to),
                ),
                e
              );
            }
          }
        }),
        (p.getXAPIData = function () {
          if (
            m &&
            (m.getXAPIData instanceof Function ||
              "function" == typeof m.getXAPIData)
          )
            return m.getXAPIData();
        }),
        (p.getSubcontentId = function () {
          return f.subContentId;
        }),
        (p.getElement = function () {
          return d;
        }),
        (p.focusOnFirstTabbableElement = function () {
          var t;
          d &&
            ((t = j(d.get(0)).find("[tabindex]")) && t.length
              ? t.get(0)
              : p
            ).focus();
        }),
        (p.focus = function () {
          d && d.focus();
        }),
        (p.getClipboardData = function () {
          return H5P.DragNBar.clipboardify(
            H5PEditor.InteractiveVideo.clipboardKey,
            u,
            "action",
          );
        }),
        (p.repositionToWrapper = function (t) {
          var e, i;
          d &&
            "H5P.IVHotspot" !== g &&
            "H5P.FreeTextQuestion" !== g &&
            (v &&
              (d.css({ top: u.y + "%", left: u.x + "%" }),
              d.css(p.isButton() ? { height: "", width: "" } : D()),
              (v = !1)),
            d.position().top + d.height() > t.height() &&
              ((i = ((t.height() - d.height()) / t.height()) * 100) < 0 &&
                ((i = 0),
                (e = t.height() / parseFloat(d.css("font-size"))),
                d.css("height", e + "em")),
              d.css("top", i + "%"),
              (v = !0)),
            d.position().left + d.width() > t.width() &&
              ((i = ((t.width() - d.width()) / t.width()) * 100) < 0 &&
                ((i = 0),
                (t = t.width() / parseFloat(d.css("font-size"))),
                d.css("width", t + "em")),
              d.css("left", i + "%"),
              (v = !0)));
        }),
        (p.resetTask = function () {
          (void 0 !== f.userDatas &&
            void 0 !== f.userDatas.state &&
            delete f.userDatas.state,
            delete p.score,
            delete p.maxScore,
            p.reCreate());
        }),
        (p.getInstance = function () {
          return m;
        }),
        p.reCreate());
    }
    ((((H.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = H).PROGRESS_INTERACTED = 0),
      (H.PROGRESS_ANSWERED = 1));
    const I = H;
    var E,
      D =
        (((E = O.prototype).getInteractionAnnouncer = function () {
          return this.interactionsAnnouncer;
        }),
        (E.announceInteractions = function (t) {
          0 < t.length &&
            ((this.interactionsAnnouncer.textContent = ""),
            (this.interactionsAnnouncer.textContent = "\n        "
              .concat(this.getAnnouncementMessage(t.length), "\n        ")
              .concat(this.getTitleAnnouncement(t.length, t[0]), "\n        ")
              .concat(this.getPauseAnnouncement(t))));
        }),
        (E.getAnnouncementMessage = function (t) {
          return 0 === t
            ? ""
            : 1 === t
              ? this.l10n.singleInteractionAnnouncement
              : this.l10n.multipleInteractionsAnnouncement;
        }),
        (E.getTitleAnnouncement = function (t, e) {
          return 1 === t ? e.getTitle() : "";
        }),
        (E.getPauseAnnouncement = function (t) {
          return t.some(function (t) {
            return t.pause();
          })
            ? ". ".concat(this.l10n.videoPausedAnnouncement)
            : "";
        }),
        O),
      A = H5P.jQuery,
      M = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function L(t) {
      var e =
        1 < arguments.length && void 0 !== arguments[1]
          ? arguments[1]
          : {
              content: "",
              maxWidth: "auto",
              style: "h5p-interactive-video-bubble",
              mode: "centered",
              focus: function () {},
            };
      ((this.$reference = t),
        (this.maxWidth = e.maxWidth),
        (this.style = e.style),
        (this.mode = e.mode),
        (this.focus = e.focus),
        (this.$tail = A("<div/>", { class: "".concat(this.style, "-tail") })),
        (this.$innerTail = A("<div/>", {
          class: "".concat(this.style, "-inner-tail"),
        })),
        (this.$content = A("<div/>", {
          class: "".concat(this.style, "-text"),
        })),
        "string" == typeof e.content
          ? this.$content.html(e.content)
          : this.$content.append(e.content),
        (this.$innerBubble = A("<div/>", {
          class: "".concat(this.style, "-inner"),
        })
          .append(this.$content)
          .prepend(this.$innerTail)),
        (this.$h5pContainer = this.$reference.closest(
          ".h5p-interactive-video",
        )),
        (this.$bubble = A("<div/>", {
          class: this.style,
          "aria-live": "polite",
        })
          .append([this.$tail, this.$innerBubble])
          .addClass("".concat(this.style, "-inactive"))
          .appendTo(this.$h5pContainer)),
        M && H5P.$body.css("cursor", "pointer"),
        "centered" === this.mode &&
          this.$bubble.css({
            width:
              "auto" === this.maxWidth
                ? "auto"
                : "".concat(this.maxWidth, "px"),
          }),
        this.update());
    }
    function O(t) {
      this.l10n = t;
      t = document.createElement("div");
      (t.classList.add("h5p-iv-interactions-announcer"),
        t.setAttribute("aria-live", "polite"),
        (this.interactionsAnnouncer = t));
    }
    const B =
        (((E = L.prototype).update = function () {
          var e = this,
            t = this.getOffsetBetween(this.$h5pContainer, this.$reference),
            i =
              "full" === this.mode
                ? this.$bubble.outerWidth()
                : Math.min(
                    0.9 * t.outerWidth,
                    "auto" === this.maxWidth
                      ? this.$bubble.outerWidth()
                      : this.maxWidth,
                  ),
            t = this.getBubblePosition(i, t, this.mode);
          ("centered" === this.mode &&
            this.$bubble.css({
              bottom: void 0 === t.bottom ? void 0 : "".concat(t.bottom, "px"),
              left: "".concat(t.left, "px"),
            }),
            setTimeout(function () {
              var t = e.getTailPosition(e.$reference),
                t = {
                  bottom: "".concat(t.bottom, "px"),
                  left:
                    "string" == typeof t.left
                      ? t.left
                      : "".concat(t.left, "px"),
                };
              (e.$tail.css(t), e.$innerTail.css(t));
            }, 75));
        }),
        (E.animate = function () {
          var t = this;
          this.$bubble.hasClass("".concat(this.style, "-inactive")) &&
            (this.$bubble
              .removeClass("".concat(this.style, "-inactive"))
              .addClass("".concat(this.style, "-active")),
            setTimeout(function () {
              t.$bubble
                .removeClass("".concat(t.style, "-active"))
                .addClass("".concat(t.style, "-inactive"));
            }, 2e3));
        }),
        (E.setContent = function () {
          (this.$content.html(
            0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "",
          ),
            this.update());
        }),
        (E.getContent = function () {
          return this.$content.get(0).outerHTML;
        }),
        (E.isActive = function () {
          return this.$bubble.hasClass("".concat(this.style, "-active"));
        }),
        (E.toggle = function (t) {
          var e = this,
            i = 1 < arguments.length && void 0 !== arguments[1] && arguments[1];
          ((t = void 0 === t ? !this.isActive() : t) && i
            ? (setTimeout(function () {
                (e.$bubble
                  .removeClass("".concat(e.style, "-preparing"))
                  .addClass("".concat(e.style, "-active")),
                  setTimeout(function () {
                    return e.focus();
                  }, 400));
              }, 100),
              this.$bubble
                .removeClass("".concat(this.style, "-inactive"))
                .addClass("".concat(this.style, "-preparing")))
            : this.$bubble
                .toggleClass("".concat(this.style, "-inactive"), !t)
                .toggleClass("".concat(this.style, "-active"), t),
            this.update());
        }),
        (E.getBubblePosition = function (t, e, i) {
          return {
            bottom: "full" === i ? void 0 : e.bottom + e.innerHeight + 4,
            left: "full" === i ? (e.outerWidth - t) / 2 : e.left - t / 2 + 16,
          };
        }),
        (E.getTailPosition = function (t) {
          return {
            left: t.offset().left - this.$tail.parent().offset().left + 8,
            top: -6,
            bottom: -6,
          };
        }),
        (E.getOffsetBetween = function (t, e) {
          var i = t[0].getBoundingClientRect(),
            t = e[0].getBoundingClientRect();
          return {
            top: t.top - i.top,
            right: i.right - t.right,
            bottom: i.bottom - t.bottom,
            left: t.left - i.left + parseInt(e.css("marginLeft")),
            innerWidth: t.width,
            innerHeight: t.height,
            outerWidth: i.width,
            outerHeight: i.height,
          };
        }),
        (E.fullscreen = function () {
          var t =
              0 < arguments.length && void 0 !== arguments[0] && arguments[0],
            e =
              1 < arguments.length && void 0 !== arguments[1]
                ? arguments[1]
                : void 0,
            i =
              2 < arguments.length && void 0 !== arguments[2]
                ? arguments[2]
                : void 0,
            n = this.isMobilePhone(),
            o = { maxHeight: "", top: "" };
          (t &&
            !n &&
            void 0 !== e &&
            void 0 !== i &&
            ((o.maxHeight = "calc(".concat(i, "px - 1em - 9px)")),
            (o.top = "calc(((".concat(e - i, "px + 1em) / 2) - 9px)"))),
            this.$bubble.toggleClass("mobile-fullscreen", n && t),
            this.$bubble.css(o));
        }),
        (E.isMobilePhone = function () {
          return (
            /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(
              navigator.userAgent,
            ) ||
            /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(
              navigator.userAgent.substr(0, 4),
            )
          );
        }),
        L),
      q = (
        t,
        e,
        { ignoreKeyboard: i = !1, preventDefaultForKeys: n = !0 } = {},
      ) => {
        var o = (t) => {
          ("click" !== t.type && n && t.preventDefault(), e(t));
        };
        (t.click(o), !0 !== i && S(t, [{ key: C.SPACE }, { key: C.ENTER }], o));
      };
    function V(t, e) {
      return (V = Object.setPrototypeOf
        ? Object.setPrototypeOf.bind()
        : function (t, e) {
            return ((t.__proto__ = e), t);
          })(t, e);
    }
    function U(t) {
      return null != t;
    }
    var Q = H5P.jQuery,
      Y = "h5p-interactive-video-endscreen",
      G = "h5p-interactive-video-endscreen-submit-button-hidden";
    const X = (function (n) {
      var t;
      function e(t) {
        var e,
          i =
            1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
        return (
          ((e = n.call(this) || this).parent = t),
          (e.l10n = Q.extend(
            {
              title: "@answered Questions answered",
              information:
                "You have answered @answered questions, click below to submit your answers.",
              informationOnSubmitButtonDisabled:
                "You have answered @answered questions.",
              informationNoAnswers: "You have not answered any questions.",
              informationMustHaveAnswer:
                "You have to answer at least one question before you can submit your answers.",
              submitButton: "Submit Answers",
              submitMessage: "Your answers have been submitted!",
              tableRowAnswered: "Answered questions",
              tableRowScore: "Score",
              answeredScore: "answered",
              tableRowSummaryWithScore:
                "You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.",
              tableRowSummaryWithoutScore:
                "You have answered the @question that appeared after @minutes minutes and @seconds seconds.",
            },
            i.l10n,
          )),
          (e.isSubmitButtonEnabled = e.parent.isSubmitButtonEnabled),
          e.buildDOM(),
          e
        );
      }
      ((i = n),
        ((t = e).prototype = Object.create(i.prototype)),
        V((t.prototype.constructor = t), i));
      var i = e.prototype;
      return (
        (i.buildDOM = function () {
          var t = this;
          ((this.$endscreenIntroductionTitleText = Q("<div/>", {
            class: "".concat(Y, "-introduction-title-text"),
            id: "".concat(Y, "-introduction-title-text"),
          })),
            (this.$closeButton = Q("<div>", {
              role: "button",
              class: "".concat(Y, "-close-button"),
              tabindex: "0",
              "aria-label": this.parent.l10n.close,
            })),
            q(this.$closeButton, function () {
              return t.parent.toggleEndscreen(!1);
            }));
          var e = Q("<div/>", {
            class: "".concat(Y, "-introduction-title"),
          }).append([this.$endscreenIntroductionTitleText, this.$closeButton]);
          ((this.$endscreenIntroductionText = Q("<div/>", {
            class: "".concat(Y, "-introduction-text"),
            id: "".concat(Y, "-introduction-text"),
          })),
            this.isSubmitButtonEnabled &&
              ((this.$submitButtonContainer = Q("<div/>", {
                class: "".concat(Y, "-submit-button-container ").concat(G),
              })),
              (this.$submitButton = H5P.JoubelUI.createButton({
                class: "".concat(Y, "-submit-button"),
                html: this.l10n.submitButton,
                appendTo: this.$submitButtonContainer,
                click: function () {
                  return t.handleSubmit();
                },
              }))),
            (this.$endscreenOverviewTitle = Q("<div/>", {
              class: "".concat(Y, "-overview-title"),
            })
              .append(
                Q("<div/>", {
                  class: "".concat(Y, "-overview-title-answered-questions"),
                  html: this.l10n.tableRowAnswered,
                }),
              )
              .append(
                Q("<div/>", {
                  class: "".concat(Y, "-overview-title-score"),
                  html: this.l10n.tableRowScore,
                }),
              )),
            (this.$endscreenBottomTable = Q("<div/>", {
              class: "".concat(Y, "-overview-table"),
            })),
            (this.$endscreen = Q("<div/>", {
              class: Y,
              role: "dialog",
              "aria-labelledby": "".concat(Y, "-introduction-title-text"),
              "aria-describedby": "".concat(Y, "-introduction-text"),
            })
              .append(
                Q("<div/>", { class: "".concat(Y, "-introduction") })
                  .append(Q("<div/>", { class: "".concat(Y, "-star-symbol") }))
                  .append(
                    Q("<div/>", {
                      class: "".concat(Y, "-introduction-container"),
                    }).append([
                      e,
                      this.$endscreenIntroductionText,
                      this.$submitButtonContainer,
                    ]),
                  ),
              )
              .append(
                Q("<div/>", { class: "".concat(Y, "-overview") })
                  .append(this.$endscreenOverviewTitle)
                  .append(this.$endscreenBottomTable),
              )));
        }),
        (i.handleSubmit = function () {
          var i = this;
          this.$submitButtonContainer.hasClass(G) ||
            (this.$submitButtonContainer.addClass(G),
            this.$endscreenIntroductionText.html(
              '<div class="'
                .concat(Y, '-introduction-text-submitted">')
                .concat(this.l10n.submitMessage, "</div>"),
            ),
            this.answered.forEach(function (t) {
              var e;
              "completed" !== t.getLastXAPIVerb() &&
                "answered" !== t.getLastXAPIVerb() &&
                (((e = new H5P.XAPIEvent()).data.statement =
                  t.getXAPIData().statement),
                t.setLastXAPIVerb(e.getVerb()),
                i.trigger(e));
            }),
            this.parent.triggerXAPIScored(
              this.parent.getUsersScore(),
              this.parent.getUsersMaxScore(),
              "completed",
            ));
        }),
        (i.getDOM = function () {
          return this.$endscreen;
        }),
        (i.buildTableRow = function (t, e, i, n) {
          var o = this,
            r = U(i) && U(n),
            s = r
              ? this.l10n.tableRowSummaryWithScore
              : this.l10n.tableRowSummaryWithoutScore,
            a = this.parent.isSkippingProhibited(t)
              ? " ".concat(Y, "-no-link")
              : "",
            s = Q("<div/>", {
              class: "".concat(Y, "-overview-table-row").concat(a),
              role: "row",
              tabIndex: 0,
              "aria-label": s
                .replace("@score", i)
                .replace("@total", n)
                .replace("@question", e)
                .replace("@minutes", Math.floor(t / 60))
                .replace("@seconds", t % 60),
            });
          return (
            q(s, function () {
              return o.jump(t);
            }),
            Q("<div/>", {
              class: "".concat(Y, "-overview-table-row-time"),
              html: H5P.InteractiveVideo.humanizeTime(t),
              appendTo: s,
              "aria-hidden": !0,
            }),
            Q("<div/>", {
              class: "".concat(Y, "-overview-table-row-title"),
              html: e,
              appendTo: s,
              "aria-hidden": !0,
            }),
            Q("<div/>", {
              class: "".concat(Y, "-overview-table-row-score"),
              html: r ? "".concat(i, " / ").concat(n) : this.l10n.answeredScore,
              appendTo: s,
              "aria-hidden": !0,
            }),
            s
          );
        }),
        (i.jump = function (t) {
          this.parent.isSkippingProhibited(t) ||
            (this.parent.seek(t), this.parent.toggleEndscreen(!1));
        }),
        (i.update = function () {
          var o = this,
            t =
              0 < arguments.length && void 0 !== arguments[0]
                ? arguments[0]
                : [];
          ((this.answered = t
            .filter(function (t) {
              return void 0 !== t.getProgress();
            })
            .sort(function (t, e) {
              return t.getDuration().from - e.getDuration().from;
            })),
            this.$endscreenBottomTable.empty(),
            this.answered.forEach(function (t) {
              var e = t.getDuration().from,
                i = o.getDescription(t),
                n = t.getInstance(),
                t = n.getScore ? n.getScore() : void 0,
                n = n.getMaxScore ? n.getMaxScore() : void 0;
              o.$endscreenBottomTable.append(o.buildTableRow(e, i, t, n));
            }));
          t = this.answered.length;
          (this.$endscreenIntroductionTitleText.html(
            this.l10n.title.replace("@answered", t),
          ),
            0 === t
              ? this.$endscreenIntroductionText.html(
                  '<div class="'
                    .concat(Y, '-bold-text">')
                    .concat(this.l10n.informationNoAnswers, "</div>\n      ")
                    .concat(
                      this.isSubmitButtonEnabled
                        ? "<div>".concat(
                            this.l10n.informationMustHaveAnswer,
                            "<div>",
                          )
                        : "",
                    ),
                )
              : this.$endscreenIntroductionText.html(
                  (this.isSubmitButtonEnabled
                    ? this.l10n.information
                    : this.l10n.informationOnSubmitButtonDisabled
                  ).replace("@answered", t),
                ),
            this.isSubmitButtonEnabled &&
              0 < t &&
              this.$submitButtonContainer.removeClass(G));
        }),
        (i.getDescription = function (t) {
          return (
            "function" == typeof t.getInstance &&
            "function" == typeof t.getInstance().getTitle
              ? t.getInstance()
              : t
          ).getTitle();
        }),
        (i.focus = function () {
          (!this.isSubmitButtonEnabled ||
          this.$submitButtonContainer.hasClass(G)
            ? this.$closeButton
            : this.$submitButton
          ).focus();
        }),
        e
      );
    })(H5P.EventDispatcher);
    var K = H5P.jQuery;
    function J(n, t, e) {
      var i,
        o,
        r = this;
      (H5P.EventDispatcher.call(r),
        (r.contentId = t),
        (r.contentData = e),
        (r.instanceIndex = it()),
        (r.isSubmitButtonEnabled =
          void 0 === e ||
          void 0 === e.isScoringEnabled ||
          void 0 === e.isReportingEnabled ||
          e.isScoringEnabled ||
          e.isReportingEnabled),
        (r.bookmarksMenuId =
          "interactive-video-" + this.contentId + "-bookmarks-chooser"),
        (r.endscreensMenuId =
          "interactive-video-" + this.contentId + "-endscreens-chooser"),
        (r.qualityMenuId =
          "interactive-video-" + this.contentId + "-quality-chooser"),
        (r.captionsMenuId =
          "interactive-video-" + this.contentId + "-captions-chooser"),
        (r.playbackRateMenuId =
          "interactive-video-" + this.contentId + "-playback-rate-chooser"),
        (r.popupMenuButtons = []),
        (r.popupMenuChoosers = []),
        (this.visibleInteractions = []),
        (r.isMinimal = !1),
        (r.options = K.extend(
          { video: { textTracks: { videoTrack: [] } }, assets: {} },
          n.interactiveVideo,
        )),
        (r.options.video.startScreenOptions =
          r.options.video.startScreenOptions || {}),
        (r.qualities = void 0),
        r.options.video.startScreenOptions.title ||
          (r.options.video.startScreenOptions.title = "Interactive Video"),
        (r.startScreenOptions = K.extend(
          { hideStartTitle: !1, shortStartDescription: "" },
          r.options.video.startScreenOptions,
        )),
        n.override &&
          (n.override.showSolutionButton || n.override.retryButton) &&
          ((r.override = {}),
          n.override.showSolutionButton &&
            (r.override.enableSolutionsButton =
              "on" === n.override.showSolutionButton),
          n.override.retryButton &&
            (r.override.enableRetry = "on" === n.override.retryButton)),
        void 0 !== n.override &&
          ((r.showRewind10 =
            void 0 !== n.override.showRewind10 && n.override.showRewind10),
          (r.showBookmarksmenuOnLoad =
            void 0 !== n.override.showBookmarksmenuOnLoad &&
            n.override.showBookmarksmenuOnLoad),
          (r.preventSkippingMode = n.override.preventSkippingMode || "none"),
          (r.deactivateSound = n.override.deactivateSound || !1)),
        (r.l10n = K.extend(
          {
            interaction: "Interaction",
            play: "Play",
            pause: "Pause",
            mute: "Mute, currently unmuted",
            unmute: "Unmute, currently muted",
            quality: "Video quality",
            captions: "Captions",
            close: "Close",
            fullscreen: "Fullscreen",
            exitFullscreen: "Exit fullscreen",
            summary: "Open summary dialog",
            bookmarks: "Bookmarks",
            endscreen: "Submit Screen",
            endscreens: "Submit Screens",
            defaultAdaptivitySeekLabel: "Continue",
            continueWithVideo: "Continue with video",
            more: "More player options",
            playbackRate: "Playback rate",
            rewind10: "Rewind 10 seconds",
            navDisabled: "Navigation is disabled",
            navForwardDisabled: "Navigating forward is disabled",
            sndDisabled: "Sound is disabled",
            requiresCompletionWarning:
              "You need to answer all the questions correctly before continuing.",
            back: "Back",
            hours: "Hours",
            minutes: "Minutes",
            seconds: "Seconds",
            currentTime: "Current time:",
            totalTime: "Total time:",
            singleInteractionAnnouncement: "Interaction appeared:",
            multipleInteractionsAnnouncement: "Multiple interactions appeared:",
            videoPausedAnnouncement: "Video was paused",
            content: "Content",
            answered: "@answered answered!",
            videoProgressBar: "Video progress",
            howToCreateInteractions:
              "Play the video to start creating interactions",
          },
          n.l10n,
        )),
        (r.l10n.play += " (k)"),
        (r.l10n.pause += " (k)"),
        (r.l10n.mute += " (m)"),
        (r.l10n.unmute += " (m)"),
        e &&
          void 0 !== e.previousState &&
          void 0 !== e.previousState.progress &&
          void 0 !== e.previousState.answers &&
          (r.previousState = e.previousState),
        (r.menuitems = []),
        (r.lastState = H5P.Video.ENDED),
        (r.justVideo = !1));
      e = navigator.userAgent.match(/(iPhone|iPod) OS (\d*)_/i);
      (null !== e && 3 === e.length && (r.justVideo = e[2] < 10),
        0 ===
          (i =
            r.previousState && r.previousState.progress
              ? Math.floor(r.previousState.progress)
              : 0) &&
          n.override &&
          n.override.startVideoAt &&
          (i = n.override.startVideoAt),
        (this.maxTimeReached =
          r.previousState && r.previousState.maxTimeReached
            ? r.previousState.maxTimeReached
            : 0),
        (r.interactionsProgress = []),
        r.previousState &&
          r.previousState.interactionsProgress &&
          (r.interactionsProgress = r.previousState.interactionsProgress),
        (o = n.override && !!n.override.loop),
        (r.$videoWrapper = K("<div>", { class: "h5p-video-wrapper" })),
        (r.$controls = K("<div>", {
          role: "toolbar",
          class: "h5p-controls hidden",
        })),
        (r.$read = K("<div/>", {
          "aria-live": "polite",
          class: "hidden-but-read",
        })),
        (this.fontSize = 16));
      var s = !(this.width = 640),
        a = !0,
        l = !1;
      if (
        ((r.isTask = !1), (r.interactions = []), r.options.assets.interactions)
      )
        for (var c = 0; c < r.options.assets.interactions.length; c++)
          this.initInteraction(c);
      ((r.initialize = function () {
        var t;
        l ||
          ((l = !0),
          r.on("resize", function () {
            r.resize();
          }),
          (t =
            !this.editor &&
            r.options.video.textTracks &&
            r.options.video.textTracks.videoTrack
              ? r.options.video.textTracks.videoTrack
              : []),
          (r.video = H5P.newRunnable(
            {
              library: "H5P.Video 1.6",
              params: {
                sources: r.options.video.files,
                visuals: {
                  poster: r.options.video.startScreenOptions.poster,
                  controls: r.justVideo,
                  fit: !1,
                  disableRemotePlayback: !0,
                },
                startAt: i,
                a11y: t,
                playback: { autoplay: n.override && !!n.override.autoplay },
              },
            },
            r.contentId,
            void 0,
            void 0,
            { parent: r },
          )),
          r.justVideo
            ? r.video.on("loaded", function () {
                r.trigger("resize");
              })
            : (r.video.on("containerLoaded", function () {
                r.trigger("resize");
              }),
              r.video.on("loaded", function () {
                ((s = !0),
                  r.loaded(),
                  "number" == typeof i &&
                    0 !== i &&
                    (r.controls || (r.addControls(), r.trigger("resize")),
                    r.seek(i),
                    r.updateCurrentTime(i)));
              }),
              r.video.on("canplay", function () {
                r.trigger("resize");
              }),
              r.video.on("error", function () {
                r.removeSplash();
              }),
              r.video.on("stateChange", function (t) {
                !r.controls && s && (r.addControls(), r.trigger("resize"));
                t = t.data;
                if (r.currentState !== J.SEEKING)
                  switch (t) {
                    case H5P.Video.ENDED:
                      ((r.currentState = H5P.Video.ENDED),
                        r.controls.$play
                          .addClass("h5p-pause")
                          .attr("aria-label", r.l10n.play),
                        r.timeUpdate(r.video.getCurrentTime()),
                        r.updateCurrentTime(r.getDuration()));
                      var e,
                        i = r.interactions
                          .map(function (t) {
                            return t.getProgress() || 0;
                          })
                          .reduce(function (t, e) {
                            return t + e;
                          }, 0);
                      (r.endscreensMap[r.getDuration()] &&
                        0 < i &&
                        r.toggleEndscreen(!0),
                        o &&
                          (r.video.play(),
                          (e =
                            n.override && n.override.startVideoAt
                              ? n.override.startVideoAt
                              : 0),
                          r.seek(e)));
                      break;
                    case H5P.Video.PLAYING:
                      (a &&
                        (r.addQualityChooser(),
                        r.addPlaybackRateChooser(),
                        r.removeSplash(),
                        r.startUpdatingBufferBar(),
                        r.toggleBookmarksChooser(!1, { firstPlay: a }),
                        r.toggleEndscreensChooser(!1, { firstPlay: a }),
                        (a = !1),
                        (e = r.options.video.startScreenOptions.poster) &&
                          void 0 !== e.path &&
                          setTimeout(function () {
                            r.trigger("resize");
                          }, 400)),
                        (r.currentState = H5P.Video.PLAYING),
                        r.controls.$play
                          .removeClass("h5p-pause")
                          .attr("aria-label", r.l10n.pause),
                        r.controls.$play.is(":focus") &&
                          (r.controls.$play.blur(), r.controls.$play.focus()),
                        r.timeUpdate(r.video.getCurrentTime()));
                      break;
                    case H5P.Video.PAUSED:
                      ((r.currentState = H5P.Video.PAUSED),
                        r.controls.$play
                          .addClass("h5p-pause")
                          .attr("aria-label", r.l10n.play),
                        r.focusInteraction
                          ? (r.focusInteraction.focusOnFirstTabbableElement(),
                            delete r.focusInteraction)
                          : r.controls.$play.is(":focus") &&
                            (r.controls.$play.blur(), r.controls.$play.focus()),
                        r.timeUpdate(r.video.getCurrentTime()));
                      break;
                    case H5P.Video.BUFFERING:
                      ((r.currentState = H5P.Video.BUFFERING),
                        r.removeSplash(),
                        r.startUpdatingBufferBar());
                  }
              }),
              r.video.on("qualityChange", function (e) {
                var t = e.data;
                r.controls &&
                  r.controls.$qualityChooser &&
                  ("YouTube" !== this.getHandlerName()
                    ? r.controls.$qualityChooser
                        .find("li")
                        .attr("aria-checked", "false")
                        .filter('[data-quality="' + t + '"]')
                        .attr("aria-checked", "true")
                    : r.qualities &&
                      ((t = r.qualities.filter(function (t) {
                        return t.name === e.data;
                      })[0]),
                      r.controls.$qualityChooser
                        .find("li")
                        .attr("data-quality", e.data)
                        .html(t.label)));
              }),
              r.video.on("playbackRateChange", function (t) {
                t = t.data;
                r.controls &&
                  r.controls.$playbackRateChooser &&
                  r.controls.$playbackRateChooser
                    .find("li")
                    .attr("aria-checked", "false")
                    .filter('[playback-rate="' + t + '"]')
                    .attr("aria-checked", "true");
              }),
              r.on("enterFullScreen", function () {
                var t = this;
                ((r.hasFullScreen = !0),
                  r.$container.parent(".h5p-content").css("height", "100%"),
                  r.controls.$fullscreen
                    .addClass("h5p-exit")
                    .attr("aria-label", r.l10n.exitFullscreen),
                  r.controls.$fullscreen.blur(),
                  r.controls.$fullscreen.focus(),
                  r.resizeInteractions(),
                  setTimeout(function () {
                    void 0 !== t.bubbleEndscreen && t.bubbleEndscreen.update();
                  }, 225));
              }),
              r.on("exitFullScreen", function () {
                (r.$container.hasClass("h5p-standalone") &&
                  r.$container.hasClass("h5p-minimal") &&
                  r.pause(),
                  (r.hasFullScreen = !1),
                  r.$container.parent(".h5p-content").css("height", ""),
                  r.controls.$fullscreen
                    .removeClass("h5p-exit")
                    .attr("aria-label", r.l10n.fullscreen),
                  r.controls.$fullscreen.blur(),
                  r.controls.$fullscreen.focus(),
                  r.resizeInteractions(),
                  r.dnb &&
                    r.dnb.dialog &&
                    !r.hasUncompletedRequiredInteractions() &&
                    r.dnb.dialog.close());
              }),
              r.video.on("captions", function (t) {
                (r.controls || (r.addControls(), r.trigger("resize")),
                  r.setCaptionTracks(t.data));
              }),
              (r.accessibility = new D(r.l10n))));
      }),
        (r.togglePlayPause = function () {
          var t = r.isDisabled(r.controls.$play);
          (r.controls.$play.hasClass("h5p-pause") && !t
            ? ((t =
                !screen || Math.min(screen.width, screen.height) <= r.width),
              H5P.fullscreenSupported &&
                !r.hasFullScreen &&
                t &&
                r.$container.hasClass("h5p-standalone") &&
                r.$container.hasClass("h5p-minimal") &&
                r.toggleFullScreen(),
              r.video.play(),
              r.toggleEndscreen(!1),
              r.closePopupMenus())
            : r.video.pause(),
            r.handleAnswered());
        }),
        (r.toggleMute = function () {
          var t =
              !(0 < arguments.length && void 0 !== arguments[0]) ||
              arguments[0],
            e = r.controls.$volume;
          r.deactivateSound ||
            (e.hasClass("h5p-muted")
              ? (e.removeClass("h5p-muted").attr("aria-label", r.l10n.mute),
                r.video.unMute())
              : (e.addClass("h5p-muted").attr("aria-label", r.l10n.unmute),
                r.video.mute()),
            t && (e.blur(), e.focus()));
        }));
    }
    ((((J.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = J).prototype.setCaptionTracks = function (t) {
      var i,
        e,
        n = this;
      (t.unshift(new H5P.Video.LabelValue("Off", "off")),
        n.captionsTrackSelector
          ? n.captionsTrackSelector.updateOptions(t)
          : ((i = this.editor
              ? void 0
              : n.options.video.textTracks.defaultTrackLabel),
            (e =
              (e =
                t.reduce(
                  function (t, e) {
                    return void 0 === t && i && e.label === i ? e : t;
                  },
                  void 0,
                ) || n.video.getCaptionsTrack()) || t[0]),
            (n.captionsTrackSelector = new k(
              "captions",
              t,
              e,
              "menuitemradio",
              n.l10n,
              n.contentId,
            )),
            (n.controls.$captionsButton = K(n.captionsTrackSelector.control)),
            n.popupMenuButtons.push(n.controls.$captionsButton),
            n.controls.$volume
              ? K(n.captionsTrackSelector.control).insertAfter(
                  n.controls.$volume,
                )
              : K(n.captionsTrackSelector.control).insertAfter(
                  n.controls.$qualityButton,
                ),
            K(n.captionsTrackSelector.popup)
              .css(n.controlsCss)
              .insertAfter(K(n.captionsTrackSelector.control)),
            n.popupMenuChoosers.push(K(n.captionsTrackSelector.popup)),
            K(n.captionsTrackSelector.overlayControl).insertAfter(
              n.controls.$qualityButtonMinimal,
            ),
            (n.controls.$overlayButtons = n.controls.$overlayButtons.add(
              n.captionsTrackSelector.overlayControl,
            )),
            n.captionsTrackSelector.on("select", function (t) {
              n.video.setCaptionsTrack("off" === t.data.value ? null : t.data);
            }),
            n.captionsTrackSelector.on("close", function () {
              (n.controls.$overlayButtons.removeClass("h5p-hide"),
                "true" === n.controls.$more.attr("aria-expanded") &&
                  n.controls.$more.click(),
                n.resumeVideo());
            }),
            n.captionsTrackSelector.on("open", function () {
              (n.controls.$overlayButtons.addClass("h5p-hide"),
                n.closePopupMenus(n.controls.$captionsButton));
            }),
            n.minimalMenuKeyboardControls.insertElementAt(
              n.captionsTrackSelector.overlayControl,
              2,
            )));
    }),
      (J.prototype.getCurrentState = function () {
        var t = this;
        if (t.video && t.video.play) {
          var e = {
            progress: t.video.getCurrentTime(),
            maxTimeReached: this.maxTimeReached,
            answers: [],
            interactionsProgress: t.interactions
              .slice()
              .sort(function (t, e) {
                return t.getDuration().from - e.getDuration().from;
              })
              .map(function (t) {
                return t.getProgress();
              }),
          };
          if (void 0 !== t.interactions)
            for (var i = 0; i < t.interactions.length; i++)
              e.answers[i] = t.interactions[i].getCurrentState();
          return e.progress
            ? e
            : t.previousState && t.previousState.progress
              ? t.previousState
              : void 0;
        }
      }),
      (J.prototype.removeSplash = function () {
        void 0 !== this.$splash && (this.$splash.remove(), delete this.$splash);
      }),
      (J.prototype.attach = function (t) {
        var i = this;
        ((this.$container = t),
          this.initialize(),
          void 0 !== this.isRoot && this.isRoot() && this.setActivityStarted(),
          t.addClass("h5p-interactive-video").html(""),
          this.$videoWrapper.appendTo(t),
          this.$controls.appendTo(t));
        var e = this.hasMainSummary();
        if (
          (this.interactions &&
            this.interactions.forEach(function (t) {
              (t.reCreate(), t.isAnswerable() && (e = !0));
            }),
          (this.hasStar =
            this.editor ||
            (void 0 !== this.options.assets.endscreens &&
              this.options.assets.endscreens.length &&
              e)),
          this.attachVideo(this.$videoWrapper),
          this.justVideo)
        )
          return (
            this.$videoWrapper.find("video").css("minHeight", "200px"),
            void t.children(":not(.h5p-video-wrapper)").remove()
          );
        (this.$read.appendTo(t),
          (this.readText = null),
          void 0 === this.editor
            ? ((this.dnb = new H5P.DragNBar(
                [],
                this.$videoWrapper,
                this.$container,
                { disableEditor: !0 },
              )),
              this.dnb.dialog.on("open", function () {
                ((i.lastState = i.currentState),
                  i.currentState !== H5P.Video.PAUSED &&
                    i.currentState !== H5P.Video.ENDED &&
                    i.video.pause());
              }),
              this.dnb.dialog.on("close", function () {
                (i.restoreTabIndexes(),
                  i.lastState !== H5P.Video.PAUSED &&
                    i.lastState !== H5P.Video.ENDED &&
                    i.video.play(),
                  i.handleAnswered());
              }))
            : i.on("dnbEditorReady", function () {
                ((i.dnb = i.editor.dnb), (i.dnb.dialog.disableOverlay = !0));
              }),
          this.video.pressToPlay ||
            (this.currentState === J.LOADED
              ? this.addControls()
              : this.addSplash()),
          t.attr("tabindex", "-1"));
        function n(t, e) {
          return (
            !(
              void 0 !==
                (e = i.controls && i.controls[e] ? i.controls[e] : void 0) &&
              "-1" !== e.attr("tabindex")
            ) || "INPUT" === t.target.nodeName
          );
        }
        (S(t, [{ key: C.M }], function (t) {
          n(t, "$volume") || i.toggleMute(!1);
        }),
          S(t, [{ key: C.K }], function (t) {
            var e;
            n(t, "$play") ||
              (i.hasUncompletedRequiredInteractions()
                ? ((e = K(document.activeElement)),
                  i
                    .showWarningMask()
                    .find(".h5p-button-back")
                    .click(function () {
                      return e.focus();
                    }))
                : i.togglePlayPause());
          }),
          this.$container.append(
            K(this.accessibility.getInteractionAnnouncer()),
          ),
          (this.currentState = J.ATTACHED));
      }),
      (J.prototype.attachVideo = function (t) {
        (this.video.attach(t),
          this.justVideo ||
            (this.$overlay = K(
              '<div class="h5p-overlay h5p-ie-transparent-background"></div>',
            ).appendTo(t)));
      }),
      (J.prototype.addSplash = function () {
        var e = this;
        void 0 !== this.editor ||
          this.video.pressToPlay ||
          !this.video.play ||
          this.$splash ||
          ((this.$splash = K(
            '<div class="h5p-splash-wrapper"><div class="h5p-splash-outer"><div class="h5p-splash" role="button" tabindex="0"><div class="h5p-splash-main"><div class="h5p-splash-main-outer"><div class="h5p-splash-main-inner"><div class="h5p-splash-play-icon" aria-label="' +
              this.l10n.play +
              '"></div><div class="h5p-splash-title">' +
              this.options.video.startScreenOptions.title +
              '</div></div></div></div><div class="h5p-splash-footer"><div class="h5p-splash-footer-holder"><div class="h5p-splash-description">' +
              e.startScreenOptions.shortStartDescription +
              "</div></div></div></div></div></div>",
          )
            .click(function () {
              e.video.play();
            })
            .appendTo(this.$overlay)
            .find(".h5p-interaction-button")
            .click(function () {
              return !1;
            })
            .end()),
          K(".h5p-splash", this.$splash).keydown(function (t) {
            _(t) &&
              (e.video.play(),
              t.preventDefault(),
              e.$controls.find(".h5p-play").focus());
          }),
          (void 0 !== this.startScreenOptions.shortStartDescription &&
            this.startScreenOptions.shortStartDescription.length) ||
            this.$splash.addClass("no-description"),
          this.startScreenOptions.hideStartTitle &&
            this.$splash.addClass("no-title"));
      }),
      (J.prototype.getDuration = function () {
        return (
          void 0 === this.duration &&
            (this.duration = this.video.getDuration()),
          this.duration
        );
      }),
      (J.prototype.addControls = function () {
        var t = this;
        (this.addSplash(),
          this.attachControls(this.$controls.removeClass("hidden")));
        var e = this.getDuration(),
          i = J.humanizeTime(e),
          n = J.formatTimeForA11y(e, this.l10n);
        if (
          (this.controls.$totalTime.find(".human-time").html(i),
          this.controls.$totalTime
            .find(".hidden-but-read")
            .html("".concat(this.l10n.totalTime, " ").concat(n)),
          this.controls.$slider.slider("option", "max", e),
          (this.bookmarkMenuKeyboardControls = new v([new b()])),
          this.bookmarkMenuKeyboardControls.on("close", function () {
            return t.toggleBookmarksChooser(!1);
          }),
          (this.endscreenMenuKeyboardControls = new v([new b()])),
          this.endscreenMenuKeyboardControls.on("close", function () {
            return t.toggleEndscreensChooser(!1);
          }),
          this.addSliderInteractions(),
          this.addBookmarks(),
          this.options.assets.endscreens &&
            0 < this.options.assets.endscreens.length)
        )
          for (
            var o = !1,
              r = this.getDuration(),
              s = this.options.assets.endscreens.length - 1;
            0 <= s;
            s--
          )
            this.options.assets.endscreens[s].time > r &&
              (o
                ? (this.options.assets.endscreens.splice(s, 1),
                  this.trigger("endscreensChanged", { index: s, number: -1 }))
                : ((this.options.assets.endscreens[s].time = r),
                  (this.options.assets.endscreens[s].label =
                    J.humanizeTime(r) + " " + this.l10n.endscreen),
                  this.trigger("endscreensChanged", { index: s, number: 1 }),
                  (o = !0)));
        (this.addEndscreenMarkers(),
          this.addBubbles(),
          this.trigger("controls"));
      }),
      (J.prototype.loaded = function () {
        var t,
          e = this.getDuration();
        if (
          ((this.oneSecondInPercentage = 100 / e),
          (e = Math.floor(e)),
          void 0 !== this.editor)
        ) {
          var i = tt("interactions", this.editor.field.fields),
            n = tt("duration", i.field.fields).fields;
          ((n[0].max = n[1].max = e), (n[0].min = n[1].min = 0));
          for (
            var o = tt("adaptivity", i.field.fields).fields, r = 0;
            r < o.length;
            r++
          )
            o[r].fields && (tt("seekTo", o[r].fields).max = e);
        }
        if (
          this.options.assets.interactions &&
          0 < this.options.assets.interactions.length
        )
          for (r = this.options.assets.interactions.length - 1; 0 <= r; r--)
            this.options.assets.interactions[r].duration.to > e &&
              ((t =
                this.options.assets.interactions[r].duration.to -
                this.options.assets.interactions[r].duration.from),
              (this.options.assets.interactions[r].duration.from =
                e - t <= 0 ? 0 : e - t),
              (this.options.assets.interactions[r].duration.to = e));
        (this.hasMainSummary() &&
          ((i = e - this.options.summary.displayAt) < 0 && (i = 0),
          void 0 === this.options.assets.interactions &&
            (this.options.assets.interactions = []),
          this.options.assets.interactions.push({
            action: this.options.summary.task,
            x: 80,
            y: 80,
            duration: { from: i, to: e },
            displayType: "button",
            bigDialog: !0,
            className: "h5p-summary-interaction h5p-end-summary",
            label: "<p>" + this.l10n.summary + "</p>",
            mainSummary: !0,
          }),
          this.initInteraction(this.options.assets.interactions.length - 1)),
          this.currentState === J.ATTACHED &&
            (this.video.pressToPlay || this.addControls(),
            this.trigger("resize")),
          (this.currentState = J.LOADED));
      }),
      (J.prototype.initInteraction = function (t) {
        var e,
          i,
          n = this,
          o = n.options.assets.interactions[t];
        (n.override &&
          ((i = {}),
          o.adaptivity &&
            o.adaptivity.requireCompletion &&
            (i.enableRetry = !0),
          H5P.jQuery.extend(o.action.params.behaviour, n.override, i)),
          void 0 !== n.previousState &&
            void 0 !== n.previousState.answers &&
            null !== n.previousState.answers[t] &&
            (e = n.previousState.answers[t]));
        var r = new I(o, n, e);
        return (
          r.on("display", function (t) {
            var e = t.data;
            (e.appendTo(n.$overlay), r.repositionToWrapper(n.$videoWrapper));
            t = void 0 !== n.video.pressToPlay;
            (et(t ? 100 : null, function () {
              (n.currentState !== H5P.Video.PLAYING &&
                n.currentState !== H5P.Video.BUFFERING) ||
                !r.pause() ||
                (n.focusInteraction || (n.focusInteraction = r),
                n.video.pause());
            }),
              n.seekingTo && ((n.seekingTo = void 0), e.focus()),
              setTimeout(function () {
                r.positionLabel(n.$videoWrapper.width());
              }, 0),
              n.toggleEndscreen(!1));
          }),
          r.on("hide", function () {
            n.handleAnswered();
          }),
          r.on("xAPI", function (t) {
            var e = t.getVerb();
            ("interacted" === e && this.setProgress(I.PROGRESS_INTERACTED),
              -1 !== K.inArray(e, ["completed", "answered"]) &&
                t.setVerb("answered"),
              void 0 === t.data.statement.context.extensions &&
                (t.data.statement.context.extensions = {}),
              (t.data.statement.context.extensions[
                "http://id.tincanapi.com/extension/ending-point"
              ] = "PT" + Math.floor(n.video.getCurrentTime()) + "S"));
          }),
          n.interactions.push(r),
          r
        );
      }),
      (J.prototype.handleAnswered = function () {
        var e = this;
        e.interactions.forEach(function (t) {
          t.getProgress() === I.PROGRESS_INTERACTED &&
            (t.setProgress(I.PROGRESS_ANSWERED),
            t.$menuitem.addClass("h5p-interaction-answered"),
            e.hasStar &&
              (e.playStarAnimation(),
              e.playBubbleAnimation(
                e.l10n.answered.replace(
                  "@answered",
                  "<strong>" + e.getAnsweredTotal() + "</strong>",
                ),
              ),
              e.endscreen.update(e.interactions)));
        });
      }),
      (J.prototype.getAnsweredTotal = function () {
        return this.interactions.filter(function (t) {
          return t.getProgress() === I.PROGRESS_ANSWERED;
        }).length;
      }),
      (J.prototype.hasMainSummary = function () {
        var t = this.options.summary;
        return !(
          void 0 === t ||
          void 0 === t.displayAt ||
          void 0 === t.task ||
          void 0 === t.task.params ||
          void 0 === t.task.params.summaries ||
          !t.task.params.summaries.length ||
          void 0 === t.task.params.summaries[0].summary ||
          !t.task.params.summaries[0].summary.length
        );
      }),
      (J.prototype.addSliderInteractions = function () {
        var i = this,
          n = this;
        (this.controls.$interactionsContainer.children().remove(),
          (this.interactionKeyboardControls.elements = []),
          H5P.jQuery
            .extend([], this.interactions)
            .sort(function (t, e) {
              return t.getDuration().from - e.getDuration().from;
            })
            .forEach(function (t) {
              var e = t.addDot();
              (n.menuitems.push(e),
                void 0 === n.previousState &&
                  n.interactionsProgress.push(void 0),
                n.interactionsProgress[n.menuitems.length - 1] ===
                  I.PROGRESS_ANSWERED &&
                  (t.setProgress(
                    n.interactionsProgress[n.menuitems.length - 1],
                  ),
                  e.addClass("h5p-interaction-answered")),
                void 0 !== e &&
                  (e.appendTo(i.controls.$interactionsContainer),
                  "both" !== n.preventSkippingMode &&
                    i.interactionKeyboardControls.addElement(e.get(0))));
            }),
          n.interactionKeyboardControls.on("afterNextElement", function (t) {
            return i.handleInteractionTabIndex(t);
          }),
          n.interactionKeyboardControls.on(
            "afterPreviousElement",
            function (t) {
              return i.handleInteractionTabIndex(t);
            },
          ));
      }),
      (J.prototype.handleInteractionTabIndex = function (t) {
        t.element.removeAttribute("tabindex");
      }),
      (J.prototype.closePopupMenus = function (e) {
        this.popupMenuButtons.forEach(function (t) {
          void 0 !== t &&
            t !== e &&
            void 0 === t.attr("aria-disabled") &&
            "true" === t.attr("aria-expanded") &&
            t.click();
        });
      }),
      (J.prototype.displayBookmarks = function () {
        return (
          this.options.assets.bookmarks &&
          this.options.assets.bookmarks.length &&
          "both" !== this.preventSkippingMode
        );
      }),
      (J.prototype.addBookmarks = function () {
        if (
          ((this.bookmarksMap = {}),
          void 0 !== this.options.assets.bookmarks &&
            "both" !== this.preventSkippingMode)
        )
          for (var t = 0; t < this.options.assets.bookmarks.length; t++)
            this.addBookmark(t);
      }),
      (J.prototype.addEndscreenMarkers = function () {
        if (
          ((this.endscreensMap = {}), void 0 !== this.options.assets.endscreens)
        )
          for (var t = 0; t < this.options.assets.endscreens.length; t++)
            this.addEndscreen(t);
        this.editor &&
          this.editor.freshVideo &&
          (this.endscreensMap[this.getDuration()] ||
            this.editor.addEndscreen(this.getDuration(), !0));
      }),
      (J.prototype.addBubbles = function () {
        var t = this;
        !this.editor &&
          this.hasStar &&
          ((this.bubbleScore = new B(this.$star)),
          (this.endscreen = new X(this, {
            l10n: {
              title: this.l10n.endcardTitle,
              information: this.l10n.endcardInformation,
              informationOnSubmitButtonDisabled:
                this.l10n.endcardInformationOnSubmitButtonDisabled,
              informationNoAnswers: this.l10n.endcardInformationNoAnswers,
              informationMustHaveAnswer:
                this.l10n.endcardInformationMustHaveAnswer,
              submitButton: this.l10n.endcardSubmitButton,
              submitMessage: this.l10n.endcardSubmitMessage,
              tableRowAnswered: this.l10n.endcardTableRowAnswered,
              tableRowScore: this.l10n.endcardTableRowScore,
              answeredScore: this.l10n.endcardAnsweredScore,
              tableRowSummary: this.l10n.endCardTableRowSummary,
              tableRowSummaryWithoutScore:
                this.l10n.endCardTableRowSummaryWithoutScore,
            },
          })),
          this.endscreen.update(this.interactions),
          (this.bubbleEndscreen = new B(this.$star, {
            content: this.endscreen.getDOM(),
            focus: function () {
              return t.endscreen.focus();
            },
            maxWidth: "auto",
            style: "h5p-interactive-video-bubble-endscreen",
            mode: "full",
          })));
      }),
      (J.prototype.toggleBookmarksChooser = function (t) {
        var e,
          i =
            1 < arguments.length && void 0 !== arguments[1]
              ? arguments[1]
              : { initialLoad: !1, keepStopped: !1, firstPlay: !1 };
        (this.controls.$bookmarksButton &&
          ((t =
            void 0 === t
              ? !this.controls.$bookmarksChooser.hasClass("h5p-show")
              : t),
          (e = this.controls.$bookmarksChooser.hasClass("h5p-show")),
          this.controls.$minimalOverlay.toggleClass("h5p-show", t),
          this.controls.$minimalOverlay
            .find(".h5p-minimal-button")
            .toggleClass("h5p-hide", t),
          this.controls.$bookmarksButton.attr("aria-expanded", !!t && "true"),
          this.controls.$more.attr("aria-expanded", t ? "true" : "false"),
          this.controls.$bookmarksChooser
            .css({ maxHeight: t ? this.controlsCss.maxHeight : "32px" })
            .toggleClass("h5p-show", t)
            .toggleClass("h5p-transitioning", t || e)),
          t
            ? (this.closePopupMenus(this.controls.$bookmarksButton),
              (this.showBookmarksmenuOnLoad && i.initialLoad) ||
                this.controls.$bookmarksChooser
                  .find('[tabindex="0"]')
                  .first()
                  .focus(),
              this.editor &&
                (this.interruptVideo(),
                this.updateChooserTime(
                  this.controls.$bookmarksChooser,
                  ".h5p-add-bookmark",
                )))
            : i.firstPlay ||
              (this.editor && !i.keepStopped && this.resumeVideo(),
              this.controls.$bookmarksChooser.hasClass("h5p-show") ||
                this.controls.$bookmarksButton.focus()));
      }),
      (J.prototype.toggleEndscreensChooser = function (t) {
        var e,
          i,
          n =
            1 < arguments.length && void 0 !== arguments[1]
              ? arguments[1]
              : { keepStopped: !1, firstPlay: !1 };
        (this.editor &&
          this.controls.$endscreensButton &&
          ((t =
            void 0 === t
              ? !this.controls.$endscreensChooser.hasClass("h5p-show")
              : t),
          (e = this.controls.$endscreensChooser.hasClass("h5p-show")),
          this.controls.$minimalOverlay.toggleClass("h5p-show", t),
          this.controls.$minimalOverlay
            .find(".h5p-minimal-button")
            .toggleClass("h5p-hide", t),
          this.controls.$endscreensButton
            .attr("aria-expanded", t ? "true" : "false")
            .toggleClass("h5p-star-active-editor", t),
          this.controls.$more.attr("aria-expanded", t ? "true" : "false"),
          (i =
            -10 +
            Math.min(
              0,
              this.$container.outerWidth() -
                this.controls.$endscreensChooser.parent().offset().left -
                this.controls.$endscreensChooser.outerWidth(),
            ) +
            "px"),
          this.controls.$endscreensChooser
            .css({ maxHeight: t ? this.controlsCss.maxHeight : "32px" })
            .css({ left: i })
            .toggleClass("h5p-show", t)
            .toggleClass("h5p-transitioning", t || e)),
          t
            ? (this.closePopupMenus(this.controls.$endscreensButton),
              this.editor &&
                (this.interruptVideo(),
                this.updateChooserTime(
                  this.controls.$endscreensChooser,
                  ".h5p-add-endscreen",
                )),
              this.controls.$endscreensChooser
                .find('[tabindex="0"]')
                .first()
                .focus())
            : n.firstPlay ||
              (this.editor && !n.keepStopped && this.resumeVideo(),
              this.controls.$endscreensChooser.hasClass("h5p-show") ||
                this.controls.$endscreensButton.focus()));
      }),
      (J.prototype.updateChooserTime = function (t, e) {
        e = t.find(e);
        e.html(
          e
            .data("default")
            .replace("@timecode", J.humanizeTime(this.video.getCurrentTime())),
        );
      }),
      (J.prototype.interruptVideo = function () {
        this.currentState === H5P.Video.PLAYING &&
          ((this.interruptedTemporarily = !0), this.video.pause());
      }),
      (J.prototype.resumeVideo = function (t) {
        if (!t) {
          if (!this.interruptedTemporarily) return;
          if (
            this.popupMenuChoosers.some(function (t) {
              return t.hasClass("h5p-show");
            })
          )
            return;
        }
        ((this.interruptedTemporarily = !1), this.video.play());
      }),
      (J.prototype.toggleEndscreen = function (t) {
        !this.editor &&
          this.hasStar &&
          t !== this.bubbleEndscreen.isActive() &&
          ((t = void 0 === t ? !this.bubbleEndscreen.isActive() : t)
            ? (this.disableTabIndexes(".h5p-interactive-video-endscreen"),
              (this.stateBeforeEndscreen = this.currentState),
              this.video.pause(),
              this.endscreen.update(this.interactions))
            : (this.restoreTabIndexes(),
              this.controls.$endscreensButton.focus(),
              this.stateBeforeEndscreen === H5P.Video.PLAYING &&
                (this.video.play(), (this.stateBeforeEndscreen = void 0))),
          this.controls.$endscreensButton.attr("aria-expanded", t),
          this.controls.$endscreensButton.toggleClass("h5p-star-active", t),
          this.bubbleEndscreen.toggle(t, !0));
      }),
      (J.prototype.showPreventSkippingMessage = function () {
        var t,
          e =
            0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
          i = 1 < arguments.length ? arguments[1] : void 0,
          n = this;
        ((e.x = null !== (t = e.x) && void 0 !== t ? t : 0),
          (e.y = "number" == typeof e.y ? 25 - e.y : 25),
          (i = null !== i && void 0 !== i ? i : n.l10n.navDisabled),
          n.preventSkippingWarningTimeout ||
            (n.$preventSkippingMessage ||
              ((n.$preventSkippingMessage = K("<div>", {
                class: "h5p-prevent-skipping-message",
                appendTo: n.controls.$bookmarksContainer,
              })),
              (n.$preventSkippingMessage = K("<div>", {
                class: "h5p-prevent-skipping-message",
                appendTo: n.controls.$endscreensContainer,
              })),
              (n.$preventSkippingMessageText = K("<div>", {
                class: "h5p-prevent-skipping-message-text",
                html: i,
                appendTo: n.$preventSkippingMessage,
              })),
              (n.$preventSkippingMessageTextA11y = K("<div>", {
                class: "hidden-but-read",
                html: i,
                appendTo: n.controls.$slider,
              }))),
            (i =
              n.$preventSkippingMessage.innerWidth() -
              n.$preventSkippingMessage.width()),
            n.$preventSkippingMessage.css(
              "max-width",
              "".concat(n.$videoWrapper.width() - i, "px"),
            ),
            (i = parseFloat(
              null !==
                (i = n.$preventSkippingMessage
                  .css("transform")
                  .split(",")[4]) && void 0 !== i
                ? i
                : 0,
            )),
            (i =
              n.$sliderContainer.get(0).offsetLeft +
              n.controls.$slider.get(0).offsetLeft +
              e.x +
              i +
              n.$preventSkippingMessage.outerWidth()),
            (i = Math.max(0, i - n.$container.width())),
            (e.x -= i),
            n.$preventSkippingMessage.toggleClass("h5p-overflow", 0 < i),
            n.$preventSkippingMessage.css("left", e.x),
            n.$preventSkippingMessage.css("bottom", e.y),
            setTimeout(function () {
              n.$preventSkippingMessage
                .addClass("h5p-show")
                .attr("aria-hidden", "false");
            }, 0),
            (n.preventSkippingWarningTimeout = setTimeout(function () {
              (n.$preventSkippingMessage
                .removeClass("h5p-show")
                .attr("aria-hidden", "true"),
                setTimeout(function () {
                  n.preventSkippingWarningTimeout = void 0;
                }, 500));
            }, 2e3))));
      }),
      (J.prototype.onBookmarkSelect = function (t, e) {
        var i,
          n = this;
        this.isSkippingProhibited(e.time)
          ? this.showPreventSkippingMessage(
              {
                x:
                  (e.time / n.video.getDuration()) *
                    n.controls.$slider.get(0).offsetWidth +
                  2,
                y: -23,
              },
              n.l10n.navForwardDisabled,
            )
          : (n.currentState !== H5P.Video.PLAYING &&
              (t.mouseover().mouseout(),
              setTimeout(function () {
                n.timeUpdate(n.video.getCurrentTime());
              }, 0)),
            "true" === n.controls.$more.attr("aria-expanded") &&
            n.$container.hasClass("h5p-minimal")
              ? n.controls.$more.click()
              : n.toggleBookmarksChooser(!1),
            n.video.play(),
            n.seek(e.time),
            (i = J.formatTimeForA11y(e.time, n.l10n)),
            setTimeout(function () {
              return n.read("".concat(n.l10n.currentTime, " ").concat(i));
            }, 150));
      }),
      (J.prototype.onEndscreenSelect = function (t, e) {
        var i = this;
        (i.currentState !== H5P.Video.PLAYING &&
          (t.mouseover().mouseout(),
          setTimeout(function () {
            i.timeUpdate(i.video.getCurrentTime());
          }, 0)),
          "true" === i.controls.$more.attr("aria-expanded") &&
          i.$container.hasClass("h5p-minimal")
            ? i.controls.$more.click()
            : i.toggleEndscreensChooser(!1),
          i.video.play(),
          i.seek(e.time));
        var n = J.formatTimeForA11y(e.time, i.l10n);
        setTimeout(function () {
          return i.read("".concat(i.l10n.currentTime, " ").concat(n));
        }, 150);
      }),
      (J.prototype.addBookmark = function (i, n) {
        var o = this,
          e = o.options.assets.bookmarks[i];
        void 0 === n && (n = Math.floor(10 * e.time) / 10);
        var r = (o.bookmarksMap[n] = K(
          '<div class="h5p-bookmark" style="left:' +
            e.time * o.oneSecondInPercentage +
            '%"><div class="h5p-bookmark-label"><div class="h5p-bookmark-text">' +
            e.label +
            "</div></div></div>",
        )
          .appendTo(o.controls.$bookmarksContainer)
          .data("id", i)
          .hover(
            function () {
              (void 0 !== o.bookmarkTimeout && clearTimeout(o.bookmarkTimeout),
                o.controls.$bookmarksContainer
                  .children(".h5p-show")
                  .removeClass("h5p-show"),
                r.addClass("h5p-show"));
            },
            function () {
              o.bookmarkTimeout = setTimeout(
                function () {
                  r.removeClass("h5p-show");
                },
                o.editor ? 1e3 : 2e3,
              );
            },
          ));
        (r
          .find(".h5p-bookmark-label")
          .css(
            "maxWidth",
            parseInt(o.controls.$slider.parent().css("marginRight")) - 35,
          ),
          void 0 === o.controls.$bookmarksList &&
            (o.controls.$bookmarksList = K('<ul role="menu"></ul>').insertAfter(
              o.controls.$bookmarksChooser.find("h2"),
            )));
        var s = K(
          '<li role="menuitem" aria-describedby="'
            .concat(o.bookmarksMenuId, '">')
            .concat(e.label, "</li>"),
        )
          .click(function () {
            return o.onBookmarkSelect(r, e);
          })
          .keydown(function (t) {
            (_(t) && o.onBookmarkSelect(r, e), t.stopPropagation());
          });
        o.bookmarkMenuKeyboardControls.addElement(s.get(0));
        var t = o.controls.$bookmarksList.children(":eq(" + i + ")");
        return (
          0 !== t.length
            ? s.insertBefore(t)
            : s.appendTo(o.controls.$bookmarksList),
          o.on("bookmarksChanged", function (t) {
            var e = t.data.index,
              t = t.data.number;
            e === i && t < 0
              ? (s.remove(), delete o.bookmarksMap[n])
              : e <= i && ((i += t), r.data("id", i));
          }),
          o.trigger("bookmarkAdded", { bookmark: r }),
          r
        );
      }),
      (J.prototype.addEndscreen = function (i, n) {
        var o,
          r = this,
          e = r.options.assets.endscreens[i];
        if ((void 0 === n && (n = Math.floor(10 * e.time) / 10), !this.editor))
          return (
            r.getDuration() - n < 1 && (n = r.getDuration()),
            void (o = r.endscreensMap[n] = !0)
          );
        ((o = r.endscreensMap[n] =
          K(
            '<div class="h5p-endscreen" style="left:' +
              e.time * r.oneSecondInPercentage +
              '%"><div class="h5p-endscreen-label"><div class="h5p-endscreen-text">' +
              e.label +
              "</div></div></div>",
          )
            .appendTo(r.controls.$endscreensContainer)
            .data("id", i)
            .hover(
              function () {
                (void 0 !== r.endscreenTimeout &&
                  clearTimeout(r.endscreenTimeout),
                  r.controls.$endscreensContainer
                    .children(".h5p-show")
                    .removeClass("h5p-show"),
                  o.addClass("h5p-show"));
              },
              function () {
                r.endscreenTimeout = setTimeout(
                  function () {
                    o.removeClass("h5p-show");
                  },
                  r.editor ? 1e3 : 2e3,
                );
              },
            )),
          r.editor &&
            (r.endscreenTimeout = setTimeout(function () {
              o.removeClass("h5p-show");
            }, 1e3)),
          o
            .find(".h5p-endscreen-label")
            .css(
              "maxWidth",
              parseInt(r.controls.$slider.parent().css("marginRight")) - 35,
            ),
          void 0 === r.controls.$endscreensList &&
            (r.controls.$endscreensList = K(
              '<ul role="menu"></ul>',
            ).insertAfter(r.controls.$endscreensChooser.find("h2"))));
        var s = K(
          '<li role="menuitem" aria-describedby="'
            .concat(r.endscreensMenuId, '">')
            .concat(e.label, "</li>"),
        )
          .click(function () {
            return r.onEndscreenSelect(o, e);
          })
          .keydown(function (t) {
            (_(t) && r.onEndscreenSelect(o, e), t.stopPropagation());
          });
        r.endscreenMenuKeyboardControls.addElement(s.get(0));
        var t = r.controls.$endscreensList.children(":eq(" + i + ")");
        return (
          0 !== t.length
            ? s.insertBefore(t)
            : s.appendTo(r.controls.$endscreensList),
          r.on("endscreensChanged", function (t) {
            var e = t.data.index,
              t = t.data.number;
            e === i && t < 0
              ? (s.remove(), delete r.endscreensMap[n])
              : e <= i && ((i += t), o.data("id", i));
          }),
          r.trigger("endscreenAdded", { endscreen: o }),
          o
        );
      }),
      (J.prototype.attachControls = function (t) {
        var s = this,
          e = K("<div/>", { class: "h5p-controls-left", appendTo: t });
        ((s.$sliderContainer = K("<div/>", {
          class: "h5p-control h5p-slider",
          appendTo: t,
        })),
          s.hasStar &&
            ((s.$star = K("<div/>", {
              class: "h5p-control h5p-star",
              appendTo: t,
            })),
            (s.$starBar = K("<div/>", {
              class: "h5p-control h5p-star h5p-star-bar",
              appendTo: s.$star,
            })),
            K("<div/>", {
              class: "h5p-control h5p-star h5p-star-background",
              appendTo: s.$star,
            }),
            (s.$starAnimation = K("<div/>", {
              class:
                "h5p-control h5p-star h5p-star-animation h5p-star-animation-inactive",
              appendTo: s.$star,
            }))));
        var i = K("<div/>", { class: "h5p-controls-right", appendTo: t });
        ("both" === s.preventSkippingMode && s.setDisabled(s.$sliderContainer),
          (s.controls = {}),
          (s.controls.$play = s.createButton(
            "play",
            "h5p-control h5p-pause",
            e,
            s.togglePlayPause,
          )),
          s.showRewind10 &&
            (s.controls.$rewind10 = s.createButton(
              "rewind10",
              "h5p-control",
              e,
              function () {
                var t;
                0 < s.video.getCurrentTime() &&
                  ((t = Math.max(s.video.getCurrentTime() - 10, 0)),
                  s.seek(t),
                  s.currentState === H5P.Video.PAUSED && s.timeUpdate(t),
                  s.currentState === H5P.Video.ENDED && s.video.play());
              },
            )));
        function n(o, r) {
          return function () {
            var t = s.controls[o],
              e = s.controls[r],
              i = "true" === t.attr("aria-disabled"),
              n = "true" === t.attr("aria-expanded");
            i ||
              (n
                ? (t.attr("aria-expanded", "false"),
                  e.hasClass("h5p-show") || t.focus(),
                  e.removeClass("h5p-show"),
                  s.$container.hasClass("h5p-minimal") &&
                    "true" === s.controls.$more.attr("aria-expanded") &&
                    s.controls.$more.click(),
                  s.resumeVideo())
                : (t.attr("aria-expanded", "true"),
                  e.addClass("h5p-show"),
                  e.find('[tabindex="0"]').focus(),
                  s.closePopupMenus(t)));
          };
        }
        var o = s.editor || s.displayBookmarks();
        (o &&
          ((s.controls.$bookmarksChooser = H5P.jQuery("<div/>", {
            class: "h5p-chooser h5p-bookmarks",
            role: "dialog",
            html: '<h2 id="'
              .concat(s.bookmarksMenuId, '">')
              .concat(s.l10n.bookmarks, "</h2>"),
          })),
          s.popupMenuChoosers.push(s.controls.$bookmarksChooser),
          s.controls.$bookmarksChooser.append(
            K("<span>", {
              role: "button",
              class: "h5p-chooser-close-button",
              tabindex: "0",
              "aria-label": s.l10n.close,
              click: function () {
                return s.toggleBookmarksChooser();
              },
              keydown: function (t) {
                _(t) && (s.toggleBookmarksChooser(), t.preventDefault());
              },
            }),
          ),
          s.showRewind10 &&
            s.controls.$bookmarksChooser.addClass("h5p-rewind-displacement"),
          (s.controls.$bookmarksButton = s.createButton(
            "bookmarks",
            "h5p-control",
            e,
            function () {
              s.toggleBookmarksChooser();
            },
          )),
          s.controls.$bookmarksButton.attr("aria-haspopup", "true"),
          s.controls.$bookmarksButton.attr("aria-expanded", "false"),
          s.controls.$bookmarksChooser.insertAfter(s.controls.$bookmarksButton),
          s.controls.$bookmarksChooser.bind("transitionend", function () {
            s.controls.$bookmarksChooser.removeClass("h5p-transitioning");
          }),
          s.popupMenuButtons.push(s.controls.$bookmarksButton)),
          s.hasStar &&
            ((t = s.editor
              ? "star h5p-star-foreground-editor"
              : "star h5p-star-foreground"),
            (r = s.editor
              ? function () {
                  return s.toggleEndscreensChooser();
                }
              : function () {
                  return s.toggleEndscreen();
                }),
            (s.controls.$endscreensButton = s.createButton(
              t,
              "h5p-control",
              s.$star,
              r,
            )),
            s.controls.$endscreensButton
              .attr("aria-label", s.l10n.summary)
              .attr("aria-haspopup", "dialog")
              .attr("aria-expanded", "false"),
            s.popupMenuButtons.push(s.controls.$endscreensButton)),
          s.editor &&
            ((s.controls.$endscreensChooser = H5P.jQuery("<div/>", {
              class: "h5p-chooser h5p-endscreens",
              role: "dialog",
              html: '<h2 id="'
                .concat(s.endscreensMenuId, '">')
                .concat(s.l10n.endscreens, "</h2>"),
            })),
            s.popupMenuChoosers.push(s.controls.$endscreensChooser),
            s.controls.$endscreensChooser.append(
              K("<span>", {
                role: "button",
                class: "h5p-chooser-close-button",
                tabindex: "0",
                "aria-label": s.l10n.close,
                click: function () {
                  return s.toggleEndscreensChooser();
                },
                keydown: function (t) {
                  _(t) && (s.toggleEndscreensChooser(), t.preventDefault());
                },
              }),
            ),
            s.hasStar &&
              (s.controls.$endscreensButton
                .attr("aria-haspopup", "true")
                .attr("aria-expanded", "false"),
              s.controls.$endscreensChooser
                .insertAfter(s.controls.$endscreensButton)
                .bind("transitionend", function () {
                  s.controls.$endscreensChooser.removeClass(
                    "h5p-transitioning",
                  );
                }))));
        var r =
            '<time class="h5p-current">\n      <span class="hidden-but-read"></span>\n      <span class="human-time" aria-hidden="true">0:00</span>\n    </time>',
          e = K(
            '<div class="h5p-control h5p-simple-time">'.concat(r, "</div>"),
          ).appendTo(e);
        ((s.controls.$currentTimeSimple = e.find(".human-time")),
          (s.controls.$currentTimeA11ySimple = e.find(".hidden-but-read")));
        ((e = J.formatTimeForA11y(0, s.l10n)),
          (r = K(
            '<div class="h5p-control h5p-time">\n    '
              .concat(
                r,
                '\n    <span aria-hidden="true"> / </span>\n    <time class="h5p-total">\n      <span class="hidden-but-read">',
              )
              .concat(s.l10n.totalTime, " ")
              .concat(
                e,
                '</span>\n      <span class="human-time" aria-hidden="true">0:00</span>\n    </time>\n  </div>',
              ),
          ).appendTo(i)),
          (e = r.find(".h5p-current")));
        ((s.controls.$currentTime = e.find(".human-time")),
          (s.controls.$currentTimeA11y = e.find(".hidden-but-read")),
          (s.controls.$totalTime = r.find(".h5p-total")),
          s.updateCurrentTime(0));
        function a() {
          (s.controls.$minimalOverlay.removeClass("h5p-show"),
            s.controls.$more.attr("aria-expanded", "false"),
            s.controls.$more.focus(),
            setTimeout(function () {
              s.controls.$overlayButtons.removeClass("h5p-hide");
            }, 150));
        }
        ((s.controls.$more = s.createButton(
          "more",
          "h5p-control",
          i,
          function () {
            ("true" === s.controls.$more.attr("aria-expanded")
              ? a()
              : (s.controls.$minimalOverlay.addClass("h5p-show"),
                s.controls.$more.attr("aria-expanded", "true"),
                s.removeSplash(),
                setTimeout(function () {
                  s.controls.$minimalOverlay.find('[tabindex="0"]').focus();
                }, 150)),
              s.closePopupMenus());
          },
        )),
          (s.controls.$playbackRateChooser = H5P.jQuery("<div/>", {
            class: "h5p-chooser h5p-playbackRate",
            role: "dialog",
            html: '<h2 id="'
              .concat(s.playbackRateMenuId, '">')
              .concat(s.l10n.playbackRate, "</h2>"),
          })),
          s.popupMenuChoosers.push(s.controls.$playbackRateChooser));
        function l() {
          ((s.isMinimal
            ? s.controls.$more
            : s.controls.$playbackRateButton
          ).click(),
            s.resumeVideo());
        }
        (s.controls.$playbackRateChooser.append(
          K("<span>", {
            role: "button",
            class: "h5p-chooser-close-button",
            tabindex: "0",
            "aria-label": s.l10n.close,
            click: l,
            keydown: function (t) {
              _(t) && (l(), t.preventDefault());
            },
          }),
        ),
          (s.controls.$playbackRateButton = s.createButton(
            "playbackRate",
            "h5p-control",
            i,
            n("$playbackRateButton", "$playbackRateChooser"),
          )),
          s.popupMenuButtons.push(s.controls.$playbackRateButton),
          s.setDisabled(s.controls.$playbackRateButton),
          s.controls.$playbackRateButton.attr("aria-haspopup", "true"),
          s.controls.$playbackRateButton.attr("aria-expanded", "false"),
          s.controls.$playbackRateChooser.insertAfter(
            s.controls.$playbackRateButton,
          ),
          -1 === navigator.userAgent.indexOf("Android") &&
            -1 === navigator.userAgent.indexOf("iPad") &&
            ((s.controls.$volume = s.createButton(
              "mute",
              "h5p-control",
              i,
              s.toggleMute,
            )),
            s.deactivateSound &&
              (s.controls.$volume
                .addClass("h5p-muted")
                .attr("aria-label", s.l10n.sndDisabled),
              s.setDisabled(s.controls.$volume))),
          s.deactivateSound && s.video.mute(),
          s.video.isMuted() &&
            s.controls.$volume
              .addClass("h5p-muted")
              .attr("aria-label", s.l10n.sndDisabled),
          (s.controls.$qualityChooser = H5P.jQuery("<div/>", {
            class: "h5p-chooser h5p-quality",
            role: "dialog",
            html: '<h2 id="'
              .concat(s.qualityMenuId, '">')
              .concat(s.l10n.quality, "</h2>"),
          })),
          s.popupMenuChoosers.push(s.controls.$qualityChooser));
        function c() {
          ((s.isMinimal ? s.controls.$more : s.controls.$qualityButton).click(),
            s.resumeVideo());
        }
        (s.controls.$qualityChooser.append(
          K("<span>", {
            role: "button",
            class: "h5p-chooser-close-button",
            tabindex: "0",
            "aria-label": s.l10n.close,
            click: c,
            keydown: function (t) {
              _(t) && (c(), t.preventDefault());
            },
          }),
        ),
          (s.controls.$qualityButton = s.createButton(
            "quality",
            "h5p-control",
            i,
            n("$qualityButton", "$qualityChooser"),
          )),
          s.popupMenuButtons.push(s.controls.$qualityButton),
          s.setDisabled(s.controls.$qualityButton),
          s.controls.$qualityButton.attr("aria-haspopup", "true"),
          s.controls.$qualityButton.attr("aria-expanded", "false"),
          s.controls.$qualityChooser.insertAfter(s.controls.$qualityButton),
          s.editor ||
            !1 === H5P.fullscreenSupported ||
            (s.controls.$fullscreen = s.createButton(
              "fullscreen",
              "h5p-control",
              i,
              function () {
                s.toggleFullScreen();
              },
            )),
          (s.controls.$minimalOverlay = H5P.jQuery("<div/>", {
            class: "h5p-minimal-overlay",
            appendTo: s.$container,
          })));
        i = H5P.jQuery("<div/>", {
          role: "menu",
          class: "h5p-minimal-wrap",
          appendTo: s.controls.$minimalOverlay,
        });
        ((s.minimalMenuKeyboardControls = new v([new b()])),
          s.minimalMenuKeyboardControls.on("close", a),
          (s.controls.$overlayButtons = H5P.jQuery([])),
          o &&
            ((s.controls.$bookmarkButtonMinimal = s.createButton(
              "bookmarks",
              "h5p-minimal-button",
              i,
              function () {
                (s.controls.$overlayButtons.addClass("h5p-hide"),
                  s.toggleBookmarksChooser(!0));
              },
              !0,
            )),
            s.controls.$bookmarkButtonMinimal.attr("role", "menuitem"),
            s.controls.$bookmarkButtonMinimal.attr("tabindex", "-1"),
            (s.controls.$overlayButtons = s.controls.$overlayButtons.add(
              s.controls.$bookmarkButtonMinimal,
            )),
            s.minimalMenuKeyboardControls.addElement(
              s.controls.$bookmarkButtonMinimal.get(0),
            )),
          (s.controls.$qualityButtonMinimal = s.createButton(
            "quality",
            "h5p-minimal-button",
            i,
            function () {
              s.isDisabled(s.controls.$qualityButton) ||
                (s.controls.$overlayButtons.addClass("h5p-hide"),
                s.controls.$qualityButton.click());
            },
            !0,
          )),
          s.setDisabled(s.controls.$qualityButtonMinimal),
          s.controls.$qualityButtonMinimal.attr("role", "menuitem"),
          (s.controls.$overlayButtons = s.controls.$overlayButtons.add(
            s.controls.$qualityButtonMinimal,
          )),
          s.minimalMenuKeyboardControls.addElement(
            s.controls.$qualityButtonMinimal.get(0),
          ),
          (s.controls.$playbackRateButtonMinimal = s.createButton(
            "playbackRate",
            "h5p-minimal-button",
            i,
            function () {
              s.isDisabled(s.controls.$playbackRateButton) ||
                (s.controls.$overlayButtons.addClass("h5p-hide"),
                s.controls.$playbackRateButton.click());
            },
            !0,
          )),
          s.controls.$playbackRateButtonMinimal.attr("role", "menuitem"),
          s.setDisabled(s.controls.$playbackRateButtonMinimal),
          (s.controls.$overlayButtons = s.controls.$overlayButtons.add(
            s.controls.$playbackRateButtonMinimal,
          )),
          s.minimalMenuKeyboardControls.addElement(
            s.controls.$playbackRateButtonMinimal.get(0),
          ),
          s.addQualityChooser(),
          s.addPlaybackRateChooser(),
          (s.interactionKeyboardControls = new v([new b()])),
          (s.controls.$interactionsContainer = K("<div/>", {
            role: "menu",
            class: "h5p-interactions-container",
            "aria-label": s.l10n.interaction,
          })),
          (s.controls.$bookmarksContainer = K("<div/>", {
            class: "h5p-bookmarks-container",
            appendTo: s.$sliderContainer,
          })),
          (s.controls.$endscreensContainer = K("<div/>", {
            class: "h5p-endscreens-container",
            appendTo: s.$sliderContainer,
          })),
          (s.hasPlayPromise = !1),
          (s.hasQueuedPause = !1),
          (s.delayed = !1),
          (s.controls.$slider = K("<div/>", {
            appendTo: s.$sliderContainer,
          }).slider({
            value: 0,
            step: 0.01,
            orientation: "horizontal",
            range: "min",
            max: 0,
            create: function (t) {
              t = K(t.target).find(".ui-slider-handle");
              (t
                .attr("role", "slider")
                .attr("aria-valuemin", "0")
                .attr("aria-valuemax", s.getDuration().toString())
                .attr("aria-valuetext", J.formatTimeForA11y(0, s.l10n))
                .attr("aria-valuenow", "0")
                .attr("aria-label", s.l10n.videoProgressBar)
                .attr("tabindex", "-1"),
                "both" === s.preventSkippingMode &&
                  s.setDisabled(t).attr("aria-hidden", "true"));
            },
            start: function () {
              s.currentState !== J.SEEKING &&
                (s.toggleEndscreen(!1),
                s.delayedState ||
                  (s.currentState === H5P.Video.ENDED
                    ? (s.lastState = H5P.Video.PLAYING)
                    : (s.currentState === H5P.Video.BUFFERING && s.lastState) ||
                      (s.lastState = s.currentState)),
                (s.delayedState = !0),
                clearTimeout(s.delayTimeout),
                (s.delayTimeout = setTimeout(function () {
                  s.delayedState = !1;
                }, 200)),
                s.hasPlayPromise ? (s.hasQueuedPause = !0) : s.video.pause(),
                (s.currentState = J.SEEKING),
                s.removeSplash(),
                s.$overlay.addClass("h5p-visible"));
            },
            slide: function (t, e) {
              var i = P(t, [C.ARROW_LEFT, C.ARROW_RIGHT]),
                n = e.value;
              return (
                s.isSkippingProhibited(n) && (n = s.maxTimeReached),
                i &&
                  ((e = P(t, [C.ARROW_RIGHT])),
                  (t = s.getDuration()),
                  (n = e ? Math.min(n + 5, t) : Math.max(n - 5, 0)),
                  s.isSkippingProhibited(n) && (n = s.maxTimeReached),
                  s.timeUpdate(n, !0)),
                s.seek(n),
                s.updateInteractions(n),
                s.updateCurrentTime(n),
                !i
              );
            },
            stop: function (t, e) {
              s.currentState = s.lastState;
              var i = s.isSkippingProhibited(e.value)
                ? s.maxTimeReached
                : e.value;
              (s.seek(i), s.recreateCurrentInteractions());
              var n =
                s.lastState === H5P.Video.PLAYING ||
                s.lastState === H5P.Video.VIDEO_CUED ||
                s.hasQueuedPause;
              (s.hasPlayPromise
                ? (s.hasQueuedPause = !1)
                : n
                  ? ((s.hasQueuedPause = !1),
                    (n = s.video.play()),
                    (s.hasQueuedPause = !1),
                    n && n.then
                      ? ((s.hasPlayPromise = !0),
                        n.then(function () {
                          setTimeout(function () {
                            ((s.hasQueuedPause ||
                              s.hasActivePauseInteraction()) &&
                              s.video.pause(),
                              (s.hasPlayPromise = !1));
                          }, 0);
                        }))
                      : s.hasActivePauseInteraction() &&
                        (s.video.play(),
                        setTimeout(function () {
                          s.video.pause();
                        }, 50)))
                  : s.timeUpdate(i),
                s.isSkippingProhibited(e.value) &&
                  (s.showPreventSkippingMessage(
                    {
                      x:
                        (e.value / s.video.getDuration()) *
                        s.controls.$slider.get(0).offsetWidth,
                    },
                    s.l10n.navForwardDisabled,
                  ),
                  s.setSliderPosition(i)),
                s.$overlay.removeClass("h5p-visible"),
                s.editor &&
                  (s.updateChooserTime(
                    s.controls.$bookmarksChooser,
                    ".h5p-add-bookmark",
                  ),
                  s.updateChooserTime(
                    s.controls.$endscreensChooser,
                    ".h5p-add-endscreen",
                  )));
            },
          })),
          s.controls.$interactionsContainer.appendTo(s.$sliderContainer),
          "both" === s.preventSkippingMode &&
            (s.controls.$slider.slider("disable"),
            s.controls.$slider.parent().click(function (t) {
              t = s.menuitems
                .map(function (t) {
                  return t.get(0);
                })
                .includes(t.target)
                ? t.target.offsetLeft
                : t.offsetX;
              return (s.showPreventSkippingMessage({ x: t, y: -13 }), !1);
            })),
          s.displayBookmarks() &&
            s.showBookmarksmenuOnLoad &&
            !1 === s.video.pressToPlay &&
            s.toggleBookmarksChooser(!0, { initialLoad: !0 }),
          (s.controls.$buffered = K("<div/>", {
            class: "h5p-buffered",
            prependTo: s.controls.$slider,
          })));
      }),
      (J.prototype.playStarAnimation = function () {
        var t = this;
        this.$starAnimation.hasClass("h5p-star-animation-inactive") &&
          (this.$starAnimation
            .removeClass("h5p-star-animation-inactive")
            .addClass("h5p-star-animation-active"),
          setTimeout(function () {
            t.$starAnimation
              .removeClass("h5p-star-animation-active")
              .addClass("h5p-star-animation-inactive");
          }, 1e3));
      }),
      (J.prototype.playBubbleAnimation = function (t) {
        (this.bubbleScore.setContent(t), this.bubbleScore.animate());
      }),
      (J.prototype.hasActivePauseInteraction = function () {
        var e = !1;
        return (
          this.interactions.forEach(function (t) {
            t.getElement() && t.pause() && (e = !0);
          }),
          e
        );
      }),
      (J.prototype.createButton = function (t, e, i, n, o) {
        i = {
          role: "button",
          tabindex: 0,
          class: (void 0 === e ? "" : e + " ") + "h5p-" + t,
          on: {
            click: function () {
              n.call(this);
            },
            keydown: function (t) {
              _(t) && (n.call(this), t.preventDefault(), t.stopPropagation());
            },
          },
          appendTo: i,
        };
        return (
          (i[o ? "text" : "aria-label"] = this.l10n[t]),
          H5P.jQuery("<div/>", i)
        );
      }),
      (J.prototype.addQualityChooser = function () {
        var i = this;
        if (
          ((i.qualityMenuKeyboardControls = new v([new b()])),
          i.qualityMenuKeyboardControls.on("close", function () {
            return i.controls.$qualityButton.click();
          }),
          this.video.getQualities &&
            ((i.qualities = this.video.getQualities()),
            i.qualities &&
              void 0 !== this.controls.$qualityButton &&
              i.isDisabled(i.controls.$qualityButton)))
        ) {
          var e = this.video.getQuality(),
            t = i.qualities;
          "YouTube" === this.video.getHandlerName() &&
            (t = t.filter(function (t) {
              return t.name === e;
            }));
          for (var n = "", o = 0; o < t.length; o++) {
            var r = t[o],
              s = r.name === e;
            n += '<li role="menuitemradio" data-quality="'
              .concat(r.name, '" aria-checked="')
              .concat(s, '" aria-describedby="')
              .concat(i.qualityMenuId, '">')
              .concat(r.label, "</li>");
          }
          var a = K('<ul role="menu">'.concat(n, "</ul>")).appendTo(
            this.controls.$qualityChooser,
          );
          (a
            .children()
            .click(function () {
              var t = K(this).attr("data-quality");
              i.updateQuality(t);
            })
            .keydown(function (t) {
              var e;
              (_(t) && ((e = K(this).attr("data-quality")), i.updateQuality(e)),
                t.stopPropagation());
            }),
            a
              .find("li")
              .get()
              .forEach(function (t) {
                i.qualityMenuKeyboardControls.addElement(t);
                var e = "true" === t.getAttribute("aria-checked");
                Z(t, e);
              }),
            i.removeDisabled(
              this.controls.$qualityButton.add(
                this.controls.$qualityButtonMinimal,
              ),
            ));
        }
      }),
      (J.prototype.updateQuality = function (t) {
        (this.video.setQuality(t),
          "true" === this.controls.$more.attr("aria-expanded")
            ? this.controls.$more.click()
            : (this.controls.$qualityButton.click(),
              this.controls.$qualityButton.focus()));
      }),
      (J.prototype.addPlaybackRateChooser = function () {
        var i = this,
          n = this;
        if (
          ((this.playbackRateMenuKeyboardControls = new v([new b()])),
          this.playbackRateMenuKeyboardControls.on("close", function () {
            return n.controls.$playbackRateButton.click();
          }),
          this.video.getPlaybackRates)
        ) {
          var t = this.video.getPlaybackRates();
          if (
            !(t.length < 2) &&
            t &&
            void 0 !== this.controls.$playbackRateButton &&
            n.isDisabled(this.controls.$playbackRateButton)
          ) {
            for (
              var e = this.video.getPlaybackRate(), o = "", r = 0;
              r < t.length;
              r++
            ) {
              var s = t[r],
                a = s === e;
              o += '<li role="menuitemradio" playback-rate="'
                .concat(s, '" aria-checked="')
                .concat(a, '" aria-describedby="')
                .concat(n.playbackRateMenuId, '">')
                .concat(s, "</li>");
            }
            var l = K('<ul role="menu">' + o + "</ul>").appendTo(
              this.controls.$playbackRateChooser,
            );
            (l
              .children()
              .click(function () {
                var t = K(this).attr("playback-rate");
                n.updatePlaybackRate(t);
              })
              .keydown(function (t) {
                var e;
                (_(t) &&
                  ((e = K(this).attr("playback-rate")),
                  n.updatePlaybackRate(e)),
                  t.stopPropagation());
              }),
              l
                .find("li")
                .get()
                .forEach(function (t) {
                  i.playbackRateMenuKeyboardControls.addElement(t);
                  var e = "true" === t.getAttribute("aria-checked");
                  Z(t, e);
                }),
              n.removeDisabled(
                this.controls.$playbackRateButton.add(
                  this.controls.$playbackRateButtonMinimal,
                ),
              ));
          }
        }
      }),
      (J.prototype.updatePlaybackRate = function (t) {
        (this.video.setPlaybackRate(t),
          ("true" === this.controls.$more.attr("aria-expanded")
            ? this.controls.$more
            : this.controls.$playbackRateButton
          ).click());
      }),
      (J.prototype.startUpdatingBufferBar = function () {
        var i = this;
        i.bufferLoop ||
          !(function t() {
            var e = i.video.getBuffered();
            (e &&
              i.controls.$buffered &&
              (i.controls.$buffered.css("width", e + "%"),
              i.hasStar &&
                (99 < e
                  ? i.$starBar.addClass("h5p-star-bar-buffered")
                  : i.$starBar.removeClass("h5p-star-bar-buffered"))),
              (i.bufferLoop = setTimeout(t, 500)));
          })();
      }),
      (J.prototype.resize = function () {
        var t, e, i, n, o, r;
        this.$container &&
          ((e =
            this.$container.hasClass("h5p-fullscreen") ||
            this.$container.hasClass("h5p-semi-fullscreen")),
          this.$videoWrapper.css({
            marginTop: "",
            marginLeft: "",
            width: "",
            height: "",
          }),
          this.video.trigger("resize"),
          (i = this.justVideo ? 0 : this.$controls.height()),
          (n = this.$container.height()),
          e
            ? ((t = this.$videoWrapper.height()) + i <= n
                ? (this.$videoWrapper.css("marginTop", (n - i - t) / 2),
                  (r = this.$videoWrapper.width()),
                  void 0 !== this.bubbleEndscreen &&
                    this.bubbleEndscreen.fullscreen(!0, n, t))
                : ((r = (o = n - i) * (this.$videoWrapper.width() / t)),
                  this.$videoWrapper.css({
                    marginLeft: (this.$container.width() - r) / 2,
                    width: r,
                    height: o,
                  }),
                  void 0 !== this.bubbleEndscreen &&
                    this.bubbleEndscreen.fullscreen(!0)),
              this.video.trigger("resize"))
            : ((r = this.$container.width()),
              void 0 !== this.bubbleEndscreen &&
                this.bubbleEndscreen.fullscreen()),
          (this.scaledFontSize =
            r > this.width ? this.fontSize * (r / this.width) : this.fontSize),
          this.$container.css("fontSize", this.scaledFontSize + "px"),
          this.editor ||
            (r < this.width
              ? this.$container.hasClass("h5p-minimal") ||
                this.$container.addClass("h5p-minimal")
              : this.$container.hasClass("h5p-minimal") &&
                this.$container.removeClass("h5p-minimal")),
          (this.isMinimal = this.$container.hasClass("h5p-minimal")),
          (r = this.$videoWrapper.height()),
          (this.controlsCss = { bottom: "", maxHeight: r + "px" }),
          e &&
            (this.controlsCss.bottom =
              (t + i <= n ? i + (n - i - t) / 2 : i) + "px"),
          this.controls &&
            this.controls.$minimalOverlay &&
            this.controls.$minimalOverlay.css(this.controlsCss),
          this.$container.find(".h5p-chooser").css(this.controlsCss),
          this.editor
            ? this.editor.dnb &&
              this.editor.dnb.dnr.setContainerEm(this.scaledFontSize)
            : (this.resizeMobileView(),
              void 0 !== this.$splash && this.resizeStartScreen()),
          this.showInteractionsAssistance(),
          this.bubbleScore &&
            (this.bubbleScore.update(), this.bubbleEndscreen.update()),
          this.resizeInteractions());
      }),
      (J.prototype.resizeMobileView = function () {
        isNaN(this.currentState) ||
          (this.$container.width() /
            parseInt(this.$container.css("font-size"), 10) <
          30
            ? (this.resizeInteractions(),
              this.isMobileView ||
                (this.$container.addClass("mobile"),
                (this.isMobileView = !0),
                this.hasUncompletedRequiredInteractions()
                  ? K(".h5p-dialog", this.$container).show()
                  : (this.restoreTabIndexes(), this.dnb.dialog.closeOverlay()),
                this.recreateCurrentInteractions()))
            : this.isMobileView &&
              (this.dnb &&
                this.dnb.dialog &&
                !this.hasUncompletedRequiredInteractions() &&
                (this.dnb.dialog.close(!0),
                this.$container
                  .find(".h5p-dialog .h5p-image img")
                  .css({ width: "", height: "" })),
              this.$container.removeClass("mobile"),
              (this.isMobileView = !1),
              this.recreateCurrentInteractions()));
      }),
      (J.prototype.resizeInteractions = function () {
        var e;
        isNaN(this.currentState) ||
          (e = this).interactions.forEach(function (t) {
            (t.resizeInteraction(),
              t.repositionToWrapper(e.$videoWrapper),
              t.positionLabel(e.$videoWrapper.width()));
          });
      }),
      (J.prototype.recreateCurrentInteractions = function () {
        (void 0 !== this.dnb && this.dnb.blurAll(),
          this.interactions.forEach(function (t) {
            t.reCreateInteraction();
          }));
      }),
      (J.prototype.resizeStartScreen = function () {
        var t = 50,
          e = !0,
          i = !0;
        (void 0 !== this.startScreenOptions.shortStartDescription &&
          this.startScreenOptions.shortStartDescription.length) ||
          ((e = !1),
          this.startScreenOptions.hideStartTitle && ((i = !1), (t = 45)));
        var n = K(".h5p-splash-description", this.$splash),
          o = K(".h5p-splash-title", this.$splash),
          r = n
            .clone()
            .css("position", "absolute")
            .addClass("minimum-font-size")
            .appendTo(n.parent()),
          s = o
            .clone()
            .css("position", "absolute")
            .addClass("minimum-font-size")
            .appendTo(o.parent()),
          a = parseInt(r.css("font-size"), 10),
          l = parseInt(s.css("font-size"), 10),
          c = this.$container.width(),
          t = parseInt(c / t, 10);
        (e || (i && t < a ? (t = a) : t < 10 && (t = 10)),
          c < 510
            ? this.$splash.addClass("mobile")
            : this.$splash.removeClass("mobile"),
          0.8 * t < a
            ? n.addClass("minimum-font-size")
            : n.removeClass("minimum-font-size"),
          1.5 * t < l
            ? o.addClass("minimum-font-size")
            : o.removeClass("minimum-font-size"),
          this.$splash.css("font-size", t),
          r.remove(),
          s.remove());
      }),
      (J.prototype.toggleFullScreen = function () {
        (H5P.isFullscreen ||
        this.$container.hasClass("h5p-fullscreen") ||
        this.$container.hasClass("h5p-semi-fullscreen")
          ? void 0 !== H5P.exitFullScreen &&
            void 0 !== H5P.fullScreenBrowserPrefix
            ? H5P.exitFullScreen()
            : (void 0 === H5P.fullScreenBrowserPrefix
                ? K(".h5p-disable-fullscreen").click()
                : "" === H5P.fullScreenBrowserPrefix
                  ? window.top.document.exitFullScreen()
                  : "ms" === H5P.fullScreenBrowserPrefix
                    ? window.top.document.msExitFullscreen()
                    : window.top.document[
                        H5P.fullScreenBrowserPrefix + "CancelFullScreen"
                      ](),
              this.trigger("exitFullScreen"))
          : (H5P.fullScreen(this.$container, this),
            void 0 === H5P.exitFullScreen && this.trigger("enterFullScreen")),
          this.resizeInteractions());
      }),
      (J.prototype.timeUpdate = function (t, e) {
        var i = this;
        (0 <= t &&
          ((this.maxTimeReached = Math.max(this.maxTimeReached, t)),
          this.setSliderPosition(t)),
          i.updateInteractions(t),
          e ||
            setTimeout(function () {
              (i.currentState === H5P.Video.PLAYING ||
                (i.currentState === H5P.Video.BUFFERING &&
                  i.lastState === H5P.Video.PLAYING)) &&
                i.timeUpdate(i.video.getCurrentTime());
            }, 40));
      }),
      (J.prototype.setSliderPosition = function (t) {
        try {
          var e = this.controls.$slider.find(".ui-slider-handle"),
            i = J.formatTimeForA11y(t, this.l10n);
          (this.controls.$slider.slider("option", "value", t),
            e.attr("aria-valuetext", i),
            e.attr("aria-valuenow", t.toString()));
        } catch (t) {
          return;
        }
      }),
      (J.prototype.updateInteractions = function (t) {
        var e = this,
          i = Math.floor(10 * t) / 10;
        (i !== e.lastTenth &&
          (void 0 !== e.bookmarksMap &&
            void 0 !== e.bookmarksMap[i] &&
            e.bookmarksMap[i].mouseover().mouseout(),
          void 0 !== e.endscreensMap &&
            void 0 !== e.endscreensMap[i] &&
            e.currentState !== J.SEEKING &&
            0 < e.getAnsweredTotal() &&
            e.toggleEndscreen(!0)),
          (e.lastTenth = i),
          e.toggleInteractions(t));
        t = Math.floor(t);
        (t !== e.lastSecond &&
          ((e.currentState !== H5P.Video.PLAYING &&
            e.currentState !== H5P.Video.PAUSED) ||
            e.updateCurrentTime(t)),
          (e.lastSecond = t));
      }),
      (J.prototype.updateCurrentTime = function (t) {
        t = Math.max(t, 0);
        var e = J.humanizeTime(t),
          t = J.formatTimeForA11y(t, this.l10n);
        (this.controls.$currentTime.html(e),
          this.controls.$currentTimeA11y.html(
            "".concat(this.l10n.currentTime, " ").concat(t),
          ),
          this.controls.$currentTimeSimple.html(e),
          this.controls.$currentTimeA11ySimple.html(
            "".concat(this.l10n.currentTime, " ").concat(t),
          ));
      }),
      (J.prototype.getUsersScore = function () {
        for (var t = 0, e = 0; e < this.interactions.length; e++)
          this.interactions[e].score && (t += this.interactions[e].score);
        return t;
      }),
      (J.prototype.getUsersMaxScore = function () {
        for (var t = 0, e = 0; e < this.interactions.length; e++)
          this.interactions[e].maxScore && (t += this.interactions[e].maxScore);
        return t;
      }),
      (J.prototype.getScore = function () {
        return this.getUsersScore();
      }),
      (J.prototype.getMaxScore = function () {
        return this.getUsersMaxScore();
      }),
      (J.prototype.showOverlayMask = function () {
        var t = this;
        (t.$videoWrapper.addClass("h5p-disable-opt-out"),
          t.disableTabIndexes(),
          t.dnb.dialog.openOverlay(),
          t.restorePosterTabIndexes(),
          t.$container.find(".h5p-dialog-wrapper").click(function () {
            t.hasUncompletedRequiredInteractions() && t.showWarningMask();
          }),
          t.toggleFocusTrap());
      }),
      (J.prototype.restorePosterTabIndexes = function () {
        var t = this;
        t.$overlay.find(".h5p-interaction.h5p-poster").each(function () {
          t.restoreTabIndexes(K(this));
        });
      }),
      (J.prototype.disableTabIndexes = function () {
        var i = this.$container.find(
          0 < arguments.length && void 0 !== arguments[0]
            ? arguments[0]
            : ".h5p-dialog-wrapper",
        );
        this.$tabbables = this.$container
          .find(
            "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",
          )
          .filter(function () {
            var t = K(this),
              e = K.contains(i.get(0), t.get(0));
            if (t.data("tabindex")) return !0;
            if (e) return !1;
            e = t.attr("tabindex");
            return (t.data("tabindex", e), t.attr("tabindex", "-1"), !0);
          });
      }),
      (J.prototype.restoreTabIndexes = function (i) {
        this.$tabbables &&
          (this.$tabbables.each(function () {
            var t = K(this),
              e = t.data("tabindex");
            if (i && !K.contains(i.get(0), t.get(0))) return !0;
            t.hasClass("ui-slider-handle")
              ? (t.attr("tabindex", 0), t.removeData("tabindex"))
              : void 0 !== e
                ? (t.attr("tabindex", e), t.removeData("tabindex"))
                : t.removeAttr("tabindex");
          }),
          i || (this.$tabbables = void 0));
      }),
      (J.prototype.toggleFocusTrap = function () {
        var e = this,
          i = this.getVisibleInteractions().filter(function (t) {
            return t.getRequiresCompletion() && !t.hasFullScore();
          });
        0 < i.length
          ? this.$container.off("focusin").on("focusin", function (t) {
              return e.trapFocusInInteractions(i, K(t.target));
            })
          : this.$container.off("focusin", "**");
      }),
      (J.prototype.trapFocusInInteractions = function (t, e) {
        var i = t.some(function (t) {
            t = t.getElement();
            return rt(t, e);
          }),
          n = !!this.$mask && rt(this.$mask, e);
        i || n || ((t = t[0].getElement()) && t.focus());
      }),
      (J.prototype.hideOverlayMask = function () {
        return (
          this.restoreTabIndexes(),
          this.dnb.dialog.closeOverlay(),
          this.$videoWrapper.removeClass("h5p-disable-opt-out"),
          this.toggleFocusTrap(),
          this.$container.find(".h5p-dialog-wrapper")
        );
      }),
      (J.prototype.showWarningMask = function () {
        var t = this,
          e = "interactive-video-"
            .concat(t.contentId, "-")
            .concat(t.instanceIndex, "-completion-warning-text");
        return (
          t.$mask ||
            (t.$mask = K(
              '<div class="h5p-warning-mask" role="alertdialog" aria-describedby="'
                .concat(
                  e,
                  '">\n        <div class="h5p-warning-mask-wrapper">\n          <div id="',
                )
                .concat(e, '" class="h5p-warning-mask-content">')
                .concat(
                  t.l10n.requiresCompletionWarning,
                  '</div>\n          <button type="button" class="h5p-joubelui-button h5p-button-back">',
                )
                .concat(t.l10n.back, "</button>\n        </div>\n      </div>"),
            )
              .click(function () {
                t.$mask.hide();
              })
              .appendTo(t.$container)),
          t.$mask.show(),
          t.$mask.find(".h5p-button-back").focus(),
          t.$mask
        );
      }),
      (J.prototype.setDisabled = function (t) {
        return t.attr("aria-disabled", "true").attr("tabindex", "-1");
      }),
      (J.prototype.isDisabled = function (t) {
        return "true" === t.attr("aria-disabled");
      }),
      (J.prototype.removeDisabled = function (t) {
        return t.removeAttr("aria-disabled").attr("tabindex", "0");
      }),
      (J.prototype.hasUncompletedRequiredInteractions = function (t) {
        return (
          void 0 !== t
            ? this.getVisibleInteractionsAt(t)
            : this.getVisibleInteractions()
        ).some(function (t) {
          return t.getRequiresCompletion() && !t.hasFullScore();
        });
      }),
      (J.prototype.getVisibleInteractions = function () {
        return this.interactions.filter(function (t) {
          return t.isVisible();
        });
      }),
      (J.prototype.getVisibleInteractionsAt = function (e) {
        return this.interactions.filter(function (t) {
          return t.visibleAt(e);
        });
      }),
      (J.prototype.showSolutions = function () {}),
      (J.prototype.getTitle = function () {
        return H5P.createTitle(
          this.contentData &&
            this.contentData.metadata &&
            this.contentData.metadata.title
            ? this.contentData.metadata.title
            : "Interactive Video",
        );
      }),
      (J.prototype.findNextInteractionToShow = function (t, e) {
        for (var i, n = 0; n < this.interactions.length; n++) {
          var o = this.interactions[n].getDuration();
          if (
            this.interactions[n].visibleAt(t) &&
            !this.interactions[n].isVisible()
          ) {
            i = n;
            break;
          }
          (o.from > t || (o.from == t && (void 0 === e || e < n))) &&
            (void 0 === i ||
              o.from < this.interactions[i].getDuration().from) &&
            (i = n);
        }
        return i;
      }),
      (J.prototype.findNextInteractionToHide = function (t) {
        for (var e, i = 0; i < this.visibleInteractions.length; i++) {
          var n = this.interactions[this.visibleInteractions[i]].getDuration();
          (void 0 === e ||
            n.to <
              this.interactions[this.visibleInteractions[e]].getDuration()
                .to) &&
            (e = i);
        }
        return e;
      }),
      (J.prototype.hideInteractions = function (t) {
        void 0 === this.nextInteractionToHide &&
          (this.nextInteractionToHide = this.findNextInteractionToHide(t));
        for (
          var e =
            void 0 !== this.nextInteractionToHide
              ? this.interactions[
                  this.visibleInteractions[this.nextInteractionToHide]
                ]
              : null;
          e && !e.visibleAt(t);
        )
          (e.toggle(t),
            this.visibleInteractions.splice(this.nextInteractionToHide, 1),
            (this.nextInteractionToHide = this.findNextInteractionToHide(t)),
            (e =
              void 0 !== this.nextInteractionToHide
                ? this.interactions[
                    this.visibleInteractions[this.nextInteractionToHide]
                  ]
                : null));
      }),
      (J.prototype.showInteractions = function (t) {
        void 0 === this.nextInteractionToShow &&
          (this.nextInteractionToShow = this.findNextInteractionToShow(t));
        for (
          var e = [],
            i =
              void 0 !== this.nextInteractionToShow
                ? this.interactions[this.nextInteractionToShow]
                : null;
          i && i.getDuration().from <= t;
        )
          (i.toggle(t),
            i.repositionToWrapper(this.$videoWrapper),
            this.visibleInteractions.push(this.nextInteractionToShow),
            (this.nextInteractionToHide = void 0),
            e.push(i),
            (this.nextInteractionToShow = this.findNextInteractionToShow(
              t,
              this.nextInteractionToShow,
            )),
            (i =
              void 0 !== this.nextInteractionToShow
                ? this.interactions[this.nextInteractionToShow]
                : null));
        this.accessibility.announceInteractions(e);
      }),
      (J.prototype.toggleInteractions = function (t) {
        (this.hideInteractions(t), this.showInteractions(t));
      }),
      (J.prototype.play = function () {
        this.video.play();
      }),
      (J.prototype.seek = function () {
        var t =
            0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0,
          e =
            1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
        (this.isSkippingProhibited(t) && !e.force) ||
          ((this.maxTimeReached = Math.max(this.maxTimeReached, t)),
          (this.nextInteractionToShow = this.nextInteractionToHide = void 0),
          this.video.seek(t));
      }),
      (J.prototype.pause = function () {
        this.video && this.video.pause && this.video.pause();
      }),
      (J.prototype.resetTask = function () {
        this.interactionsProgress = [];
        for (var t = 0; t < this.interactions.length; t++)
          this.interactions[t].resetTask();
        (void 0 !== this.bubbleEndscreen && this.bubbleEndscreen.toggle(!1, !1),
          void 0 !== this.controls &&
            (this.addSliderInteractions(),
            0 < this.video.getCurrentTime() && this.seek(0),
            this.timeUpdate(-1),
            this.controls.$slider.slider("option", "value", 0)),
          (this.maxTimeReached = 0));
      }),
      (J.prototype.read = function (t) {
        var e = this;
        e.$read &&
          (e.readText
            ? (e.readText +=
                ("." === e.readText.substr(-1, 1) ? " " : ". ") + t)
            : (e.readText = t),
          e.$read.html(e.readText),
          setTimeout(function () {
            ((e.readText = null), e.$read.html(""));
          }, 100));
      }),
      (J.prototype.getCopyrights = function () {
        var t = this,
          e = new H5P.ContentCopyrights();
        (void 0 !== t.options.video.files &&
          void 0 !== t.options.video.files[0] &&
          e.addMedia(
            new H5P.MediaCopyright(t.options.video.files[0].copyright, t.l10n),
          ),
          void 0 !== t.options.video.startScreenOptions.copyright &&
            e.addMedia(t.options.video.startScreenOptions.copyright));
        var i,
          n = t.options.video.startScreenOptions.poster;
        n &&
          void 0 !== n.copyright &&
          ((o = new H5P.MediaCopyright(n.copyright, t.l10n)),
          (i = H5P.getPath(n.path, t.contentId)),
          o.setThumbnail(new H5P.Thumbnail(i, n.width, n.height)),
          e.addMedia(o));
        for (var o, r = 0; r < t.interactions.length; r++) {
          var s = t.interactions[r].getCopyrights();
          s && e.addContent(s);
        }
        return (
          !t.hasMainSummary() ||
            (void 0 !==
              (n = H5P.newRunnable(t.options.summary.task, t.contentId)) &&
              ((o = new H5P.ContentCopyrights()).addContent(
                H5P.getCopyrights(
                  n,
                  { action: t.options.summary.task },
                  t.contentId,
                ),
              ),
              o.setLabel(t.l10n.summary),
              e.addContent(o))),
          t.options.video.textTracks.videoTrack &&
            0 < t.options.video.textTracks.videoTrack.length &&
            t.options.video.textTracks.videoTrack.forEach(function (t) {
              t.track &&
                t.track.copyright &&
                e.addMedia(new H5P.MediaCopyright(t.track.copyright));
            }),
          e
        );
      }),
      (J.prototype.isSkippingProhibited = function () {
        return (
          !this.editor &&
          ("both" === this.preventSkippingMode ||
            ("none" !== this.preventSkippingMode &&
              this.maxTimeReached <
                (0 < arguments.length && void 0 !== arguments[0]
                  ? arguments[0]
                  : 0)))
        );
      }),
      (J.SEEKING = 4),
      (J.LOADED = 5),
      (J.ATTACHED = 6),
      (J.humanizeTime = function (t) {
        var e = J.secondsToMinutesAndHours(t),
          t = "";
        return (
          0 !== e.hours && ((t += e.hours + ":"), e.minutes < 10 && (t += "0")),
          (t += e.minutes + ":"),
          e.seconds < 10 && (t += "0"),
          t + e.seconds
        );
      }),
      (J.formatTimeForA11y = function (t, e) {
        var i = J.secondsToMinutesAndHours(t),
          t = 0 < i.hours ? "".concat(i.hours, " ").concat(e.hours, ", ") : "";
        return ""
          .concat(t)
          .concat(i.minutes, " ")
          .concat(e.minutes, ", ")
          .concat(i.seconds, " ")
          .concat(e.seconds);
      }),
      (J.secondsToMinutesAndHours = function (t) {
        var e = Math.floor(t / 60);
        return {
          seconds: Math.floor(t % 60),
          minutes: e % 60,
          hours: Math.floor(e / 60),
        };
      }));
    var Z = function (t, e) {
        e ? t.setAttribute("tabindex", "0") : t.removeAttribute("tabindex");
      },
      tt = function (t, e) {
        for (var i = 0; i < e.length; i++) if (e[i].name === t) return e[i];
      },
      et = function (t, e) {
        null === t ? e() : setTimeout(e, t);
      },
      it = function () {
        return (
          void 0 === window.interactiveVideoCounter &&
            (window.interactiveVideoCounter = 0),
          window.interactiveVideoCounter++
        );
      };
    ((J.prototype.getXAPIData = function () {
      var t = this.createXAPIEventTemplate("answered");
      (nt(t),
        t.setScoredResult(
          this.getScore(),
          this.getMaxScore(),
          this,
          !0,
          this.getScore() === this.getMaxScore(),
        ));
      var e = st(this.interactions);
      return { statement: t.data.statement, children: e };
    }),
      (J.prototype.getContext = function () {
        var t = this.video.getCurrentTime();
        return void 0 === t ? {} : { type: "time", value: t };
      }),
      (J.prototype.showInteractionsAssistance = function () {
        var t = this;
        t.editor &&
          (!t.controls && 1 === t.editor.currentTabIndex && t.video.isLoaded()
            ? (t.$videoWrapper.addClass("heart-beat"),
              t.$videoInfo ||
                (t.$videoInfo = K("<div>", {
                  class: "h5p-video-info",
                  text: t.l10n.howToCreateInteractions,
                }).appendTo(t.$videoWrapper)),
              "VimeoPlayer" !== t.video.getHandlerName() ||
                t.$videoPlaybutton ||
                (t.$videoPlaybutton = K("<div>", {
                  class: "h5p-play-button",
                }).appendTo(t.$videoWrapper)),
              t.$videoInfo.show(),
              t.$videoPlaybutton && t.$videoPlaybutton.show())
            : (t.$videoWrapper.removeClass("heart-beat info-text"),
              t.$videoInfo && t.$videoInfo.hide(),
              t.$videoPlaybutton && t.$videoPlaybutton.hide(),
              t.editor.startGuidedTour()));
      }));
    var nt = function (t) {
        t = t.getVerifiedStatementValue(["object", "definition"]);
        H5P.jQuery.extend(t, ot());
      },
      ot = function () {
        return {
          interactionType: "compound",
          type: "http://adlnet.gov/expapi/activities/cmi.interaction",
          description: { "en-US": "" },
        };
      },
      rt = function (t, e) {
        return (
          void 0 !== t &&
          void 0 !== e &&
          (t.is(e) || K.contains(t.get(0), e.get(0)))
        );
      },
      st = function (t) {
        return t
          .map(function (t) {
            return t.getXAPIData();
          })
          .filter(function (t) {
            return !!t;
          });
      };
    (H5P = H5P || {}).InteractiveVideo = J;
  })() /*!@license H5P.InteractiveBook-1.7/dist/h5p-interactive-book.js by Joubel licensed under MIT*/,
  (() => {
    var i = {
        9552: (t) => {
          "use strict";
          t.exports = {
            aliceblue: [240, 248, 255],
            antiquewhite: [250, 235, 215],
            aqua: [0, 255, 255],
            aquamarine: [127, 255, 212],
            azure: [240, 255, 255],
            beige: [245, 245, 220],
            bisque: [255, 228, 196],
            black: [0, 0, 0],
            blanchedalmond: [255, 235, 205],
            blue: [0, 0, 255],
            blueviolet: [138, 43, 226],
            brown: [165, 42, 42],
            burlywood: [222, 184, 135],
            cadetblue: [95, 158, 160],
            chartreuse: [127, 255, 0],
            chocolate: [210, 105, 30],
            coral: [255, 127, 80],
            cornflowerblue: [100, 149, 237],
            cornsilk: [255, 248, 220],
            crimson: [220, 20, 60],
            cyan: [0, 255, 255],
            darkblue: [0, 0, 139],
            darkcyan: [0, 139, 139],
            darkgoldenrod: [184, 134, 11],
            darkgray: [169, 169, 169],
            darkgreen: [0, 100, 0],
            darkgrey: [169, 169, 169],
            darkkhaki: [189, 183, 107],
            darkmagenta: [139, 0, 139],
            darkolivegreen: [85, 107, 47],
            darkorange: [255, 140, 0],
            darkorchid: [153, 50, 204],
            darkred: [139, 0, 0],
            darksalmon: [233, 150, 122],
            darkseagreen: [143, 188, 143],
            darkslateblue: [72, 61, 139],
            darkslategray: [47, 79, 79],
            darkslategrey: [47, 79, 79],
            darkturquoise: [0, 206, 209],
            darkviolet: [148, 0, 211],
            deeppink: [255, 20, 147],
            deepskyblue: [0, 191, 255],
            dimgray: [105, 105, 105],
            dimgrey: [105, 105, 105],
            dodgerblue: [30, 144, 255],
            firebrick: [178, 34, 34],
            floralwhite: [255, 250, 240],
            forestgreen: [34, 139, 34],
            fuchsia: [255, 0, 255],
            gainsboro: [220, 220, 220],
            ghostwhite: [248, 248, 255],
            gold: [255, 215, 0],
            goldenrod: [218, 165, 32],
            gray: [128, 128, 128],
            green: [0, 128, 0],
            greenyellow: [173, 255, 47],
            grey: [128, 128, 128],
            honeydew: [240, 255, 240],
            hotpink: [255, 105, 180],
            indianred: [205, 92, 92],
            indigo: [75, 0, 130],
            ivory: [255, 255, 240],
            khaki: [240, 230, 140],
            lavender: [230, 230, 250],
            lavenderblush: [255, 240, 245],
            lawngreen: [124, 252, 0],
            lemonchiffon: [255, 250, 205],
            lightblue: [173, 216, 230],
            lightcoral: [240, 128, 128],
            lightcyan: [224, 255, 255],
            lightgoldenrodyellow: [250, 250, 210],
            lightgray: [211, 211, 211],
            lightgreen: [144, 238, 144],
            lightgrey: [211, 211, 211],
            lightpink: [255, 182, 193],
            lightsalmon: [255, 160, 122],
            lightseagreen: [32, 178, 170],
            lightskyblue: [135, 206, 250],
            lightslategray: [119, 136, 153],
            lightslategrey: [119, 136, 153],
            lightsteelblue: [176, 196, 222],
            lightyellow: [255, 255, 224],
            lime: [0, 255, 0],
            limegreen: [50, 205, 50],
            linen: [250, 240, 230],
            magenta: [255, 0, 255],
            maroon: [128, 0, 0],
            mediumaquamarine: [102, 205, 170],
            mediumblue: [0, 0, 205],
            mediumorchid: [186, 85, 211],
            mediumpurple: [147, 112, 219],
            mediumseagreen: [60, 179, 113],
            mediumslateblue: [123, 104, 238],
            mediumspringgreen: [0, 250, 154],
            mediumturquoise: [72, 209, 204],
            mediumvioletred: [199, 21, 133],
            midnightblue: [25, 25, 112],
            mintcream: [245, 255, 250],
            mistyrose: [255, 228, 225],
            moccasin: [255, 228, 181],
            navajowhite: [255, 222, 173],
            navy: [0, 0, 128],
            oldlace: [253, 245, 230],
            olive: [128, 128, 0],
            olivedrab: [107, 142, 35],
            orange: [255, 165, 0],
            orangered: [255, 69, 0],
            orchid: [218, 112, 214],
            palegoldenrod: [238, 232, 170],
            palegreen: [152, 251, 152],
            paleturquoise: [175, 238, 238],
            palevioletred: [219, 112, 147],
            papayawhip: [255, 239, 213],
            peachpuff: [255, 218, 185],
            peru: [205, 133, 63],
            pink: [255, 192, 203],
            plum: [221, 160, 221],
            powderblue: [176, 224, 230],
            purple: [128, 0, 128],
            rebeccapurple: [102, 51, 153],
            red: [255, 0, 0],
            rosybrown: [188, 143, 143],
            royalblue: [65, 105, 225],
            saddlebrown: [139, 69, 19],
            salmon: [250, 128, 114],
            sandybrown: [244, 164, 96],
            seagreen: [46, 139, 87],
            seashell: [255, 245, 238],
            sienna: [160, 82, 45],
            silver: [192, 192, 192],
            skyblue: [135, 206, 235],
            slateblue: [106, 90, 205],
            slategray: [112, 128, 144],
            slategrey: [112, 128, 144],
            snow: [255, 250, 250],
            springgreen: [0, 255, 127],
            steelblue: [70, 130, 180],
            tan: [210, 180, 140],
            teal: [0, 128, 128],
            thistle: [216, 191, 216],
            tomato: [255, 99, 71],
            turquoise: [64, 224, 208],
            violet: [238, 130, 238],
            wheat: [245, 222, 179],
            white: [255, 255, 255],
            whitesmoke: [245, 245, 245],
            yellow: [255, 255, 0],
            yellowgreen: [154, 205, 50],
          };
        },
        6855: (t, e, i) => {
          var n,
            s = i(9552),
            o = i(521),
            a = Object.hasOwnProperty,
            r = Object.create(null);
          for (n in s) a.call(s, n) && (r[s[n]] = n);
          var l = (t.exports = { to: {}, get: {} });
          function c(t, e, i) {
            return Math.min(Math.max(e, t), i);
          }
          function u(t) {
            t = Math.round(t).toString(16).toUpperCase();
            return t.length < 2 ? "0" + t : t;
          }
          ((l.get = function (t) {
            var e, i;
            switch (t.substring(0, 3).toLowerCase()) {
              case "hsl":
                ((e = l.get.hsl(t)), (i = "hsl"));
                break;
              case "hwb":
                ((e = l.get.hwb(t)), (i = "hwb"));
                break;
              default:
                ((e = l.get.rgb(t)), (i = "rgb"));
            }
            return e ? { model: i, value: e } : null;
          }),
            (l.get.rgb = function (t) {
              if (!t) return null;
              var e,
                i,
                n,
                o = [0, 0, 0, 1];
              if ((e = t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i))) {
                for (n = e[2], e = e[1], i = 0; i < 3; i++) {
                  var r = 2 * i;
                  o[i] = parseInt(e.slice(r, 2 + r), 16);
                }
                n && (o[3] = parseInt(n, 16) / 255);
              } else if ((e = t.match(/^#([a-f0-9]{3,4})$/i))) {
                for (n = (e = e[1])[3], i = 0; i < 3; i++)
                  o[i] = parseInt(e[i] + e[i], 16);
                n && (o[3] = parseInt(n + n, 16) / 255);
              } else if (
                (e = t.match(
                  /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
                ))
              ) {
                for (i = 0; i < 3; i++) o[i] = parseInt(e[i + 1], 0);
                e[4] &&
                  (e[5]
                    ? (o[3] = 0.01 * parseFloat(e[4]))
                    : (o[3] = parseFloat(e[4])));
              } else {
                if (
                  !(e = t.match(
                    /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
                  ))
                )
                  return (e = t.match(/^(\w+)$/))
                    ? "transparent" === e[1]
                      ? [0, 0, 0, 0]
                      : a.call(s, e[1])
                        ? (((o = s[e[1]])[3] = 1), o)
                        : null
                    : null;
                for (i = 0; i < 3; i++)
                  o[i] = Math.round(2.55 * parseFloat(e[i + 1]));
                e[4] &&
                  (e[5]
                    ? (o[3] = 0.01 * parseFloat(e[4]))
                    : (o[3] = parseFloat(e[4])));
              }
              for (i = 0; i < 3; i++) o[i] = c(o[i], 0, 255);
              return ((o[3] = c(o[3], 0, 1)), o);
            }),
            (l.get.hsl = function (t) {
              if (!t) return null;
              var e = t.match(
                /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,
              );
              if (e) {
                t = parseFloat(e[4]);
                return [
                  ((parseFloat(e[1]) % 360) + 360) % 360,
                  c(parseFloat(e[2]), 0, 100),
                  c(parseFloat(e[3]), 0, 100),
                  c(isNaN(t) ? 1 : t, 0, 1),
                ];
              }
              return null;
            }),
            (l.get.hwb = function (t) {
              if (!t) return null;
              var e = t.match(
                /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,
              );
              if (e) {
                t = parseFloat(e[4]);
                return [
                  ((parseFloat(e[1]) % 360) + 360) % 360,
                  c(parseFloat(e[2]), 0, 100),
                  c(parseFloat(e[3]), 0, 100),
                  c(isNaN(t) ? 1 : t, 0, 1),
                ];
              }
              return null;
            }),
            (l.to.hex = function () {
              var t = o(arguments);
              return (
                "#" +
                u(t[0]) +
                u(t[1]) +
                u(t[2]) +
                (t[3] < 1 ? u(Math.round(255 * t[3])) : "")
              );
            }),
            (l.to.rgb = function () {
              var t = o(arguments);
              return t.length < 4 || 1 === t[3]
                ? "rgb(" +
                    Math.round(t[0]) +
                    ", " +
                    Math.round(t[1]) +
                    ", " +
                    Math.round(t[2]) +
                    ")"
                : "rgba(" +
                    Math.round(t[0]) +
                    ", " +
                    Math.round(t[1]) +
                    ", " +
                    Math.round(t[2]) +
                    ", " +
                    t[3] +
                    ")";
            }),
            (l.to.rgb.percent = function () {
              var t = o(arguments),
                e = Math.round((t[0] / 255) * 100),
                i = Math.round((t[1] / 255) * 100),
                n = Math.round((t[2] / 255) * 100);
              return t.length < 4 || 1 === t[3]
                ? "rgb(" + e + "%, " + i + "%, " + n + "%)"
                : "rgba(" + e + "%, " + i + "%, " + n + "%, " + t[3] + ")";
            }),
            (l.to.hsl = function () {
              var t = o(arguments);
              return t.length < 4 || 1 === t[3]
                ? "hsl(" + t[0] + ", " + t[1] + "%, " + t[2] + "%)"
                : "hsla(" +
                    t[0] +
                    ", " +
                    t[1] +
                    "%, " +
                    t[2] +
                    "%, " +
                    t[3] +
                    ")";
            }),
            (l.to.hwb = function () {
              var t = o(arguments),
                e = "";
              return (
                4 <= t.length && 1 !== t[3] && (e = ", " + t[3]),
                "hwb(" + t[0] + ", " + t[1] + "%, " + t[2] + "%" + e + ")"
              );
            }),
            (l.to.keyword = function (t) {
              return r[t.slice(0, 3)];
            }));
        },
        7124: (i, n, t) => {
          const o = t(6855),
            r = t(7747),
            s = ["keyword", "gray", "hex"],
            a = {};
          for (const i of Object.keys(r))
            a[[...r[i].labels].sort().join("")] = i;
          const l = {};
          function c(t, e) {
            if (!(this instanceof c)) return new c(t, e);
            if ((e = e && e in s ? null : e) && !(e in r))
              throw new Error("Unknown model: " + e);
            let i, n;
            if (null == t)
              ((this.model = "rgb"),
                (this.color = [0, 0, 0]),
                (this.valpha = 1));
            else if (t instanceof c)
              ((this.model = t.model),
                (this.color = [...t.color]),
                (this.valpha = t.valpha));
            else if ("string" == typeof t) {
              const e = o.get(t);
              if (null === e)
                throw new Error("Unable to parse color from string: " + t);
              ((this.model = e.model),
                (n = r[this.model].channels),
                (this.color = e.value.slice(0, n)),
                (this.valpha = "number" == typeof e.value[n] ? e.value[n] : 1));
            } else if (0 < t.length) {
              ((this.model = e || "rgb"), (n = r[this.model].channels));
              const i = Array.prototype.slice.call(t, 0, n);
              ((this.color = h(i, n)),
                (this.valpha = "number" == typeof t[n] ? t[n] : 1));
            } else if ("number" == typeof t)
              ((this.model = "rgb"),
                (this.color = [(t >> 16) & 255, (t >> 8) & 255, 255 & t]),
                (this.valpha = 1));
            else {
              this.valpha = 1;
              const e = Object.keys(t);
              "alpha" in t &&
                (e.splice(e.indexOf("alpha"), 1),
                (this.valpha = "number" == typeof t.alpha ? t.alpha : 0));
              const o = e.sort().join("");
              if (!(o in a))
                throw new Error(
                  "Unable to parse color from object: " + JSON.stringify(t),
                );
              this.model = a[o];
              const s = r[this.model]["labels"],
                l = [];
              for (i = 0; i < s.length; i++) l.push(t[s[i]]);
              this.color = h(l);
            }
            if (l[this.model])
              for (n = r[this.model].channels, i = 0; i < n; i++) {
                const t = l[this.model][i];
                t && (this.color[i] = t(this.color[i]));
              }
            ((this.valpha = Math.max(0, Math.min(1, this.valpha))),
              Object.freeze && Object.freeze(this));
          }
          c.prototype = {
            toString() {
              return this.string();
            },
            toJSON() {
              return this[this.model]();
            },
            string(t) {
              let e = this.model in o.to ? this : this.rgb();
              e = e.round("number" == typeof t ? t : 1);
              t = 1 === e.valpha ? e.color : [...e.color, this.valpha];
              return o.to[e.model](t);
            },
            percentString(t) {
              ((t = this.rgb().round("number" == typeof t ? t : 1)),
                (t = 1 === t.valpha ? t.color : [...t.color, this.valpha]));
              return o.to.rgb.percent(t);
            },
            array() {
              return 1 === this.valpha
                ? [...this.color]
                : [...this.color, this.valpha];
            },
            object() {
              const e = {},
                i = r[this.model]["channels"],
                n = r[this.model]["labels"];
              for (let t = 0; t < i; t++) e[n[t]] = this.color[t];
              return (1 !== this.valpha && (e.alpha = this.valpha), e);
            },
            unitArray() {
              const t = this.rgb().color;
              return (
                (t[0] /= 255),
                (t[1] /= 255),
                (t[2] /= 255),
                1 !== this.valpha && t.push(this.valpha),
                t
              );
            },
            unitObject() {
              const t = this.rgb().object();
              return (
                (t.r /= 255),
                (t.g /= 255),
                (t.b /= 255),
                1 !== this.valpha && (t.alpha = this.valpha),
                t
              );
            },
            round(t) {
              return (
                (t = Math.max(t || 0, 0)),
                new c(
                  [
                    ...this.color.map(
                      ((e = t),
                      function (t) {
                        return Number(t.toFixed(e));
                      }),
                    ),
                    this.valpha,
                  ],
                  this.model,
                )
              );
              var e;
            },
            alpha(t) {
              return void 0 !== t
                ? new c(
                    [...this.color, Math.max(0, Math.min(1, t))],
                    this.model,
                  )
                : this.valpha;
            },
            red: e("rgb", 0, u(255)),
            green: e("rgb", 1, u(255)),
            blue: e("rgb", 2, u(255)),
            hue: e(
              ["hsl", "hsv", "hsl", "hwb", "hcg"],
              0,
              (t) => ((t % 360) + 360) % 360,
            ),
            saturationl: e("hsl", 1, u(100)),
            lightness: e("hsl", 2, u(100)),
            saturationv: e("hsv", 1, u(100)),
            value: e("hsv", 2, u(100)),
            chroma: e("hcg", 1, u(100)),
            gray: e("hcg", 2, u(100)),
            white: e("hwb", 1, u(100)),
            wblack: e("hwb", 2, u(100)),
            cyan: e("cmyk", 0, u(100)),
            magenta: e("cmyk", 1, u(100)),
            yellow: e("cmyk", 2, u(100)),
            black: e("cmyk", 3, u(100)),
            x: e("xyz", 0, u(95.047)),
            y: e("xyz", 1, u(100)),
            z: e("xyz", 2, u(108.833)),
            l: e("lab", 0, u(100)),
            a: e("lab", 1),
            b: e("lab", 2),
            keyword(t) {
              return void 0 !== t
                ? new c(t)
                : r[this.model].keyword(this.color);
            },
            hex(t) {
              return void 0 !== t
                ? new c(t)
                : o.to.hex(this.rgb().round().color);
            },
            hexa(t) {
              if (void 0 !== t) return new c(t);
              t = this.rgb().round().color;
              let e = Math.round(255 * this.valpha)
                .toString(16)
                .toUpperCase();
              return (1 === e.length && (e = "0" + e), o.to.hex(t) + e);
            },
            rgbNumber() {
              var t = this.rgb().color;
              return ((255 & t[0]) << 16) | ((255 & t[1]) << 8) | (255 & t[2]);
            },
            luminosity() {
              const t = this.rgb().color,
                e = [];
              for (var [i, n] of t.entries()) {
                const t = n / 255;
                e[i] = t <= 0.04045 ? t / 12.92 : ((0.055 + t) / 1.055) ** 2.4;
              }
              return 0.2126 * e[0] + 0.7152 * e[1] + 0.0722 * e[2];
            },
            contrast(t) {
              var e = this.luminosity(),
                t = t.luminosity();
              return t < e ? (e + 0.05) / (t + 0.05) : (t + 0.05) / (e + 0.05);
            },
            level(t) {
              t = this.contrast(t);
              return 7 <= t ? "AAA" : 4.5 <= t ? "AA" : "";
            },
            isDark() {
              var t = this.rgb().color;
              return (2126 * t[0] + 7152 * t[1] + 722 * t[2]) / 1e4 < 128;
            },
            isLight() {
              return !this.isDark();
            },
            negate() {
              const e = this.rgb();
              for (let t = 0; t < 3; t++) e.color[t] = 255 - e.color[t];
              return e;
            },
            lighten(t) {
              const e = this.hsl();
              return ((e.color[2] += e.color[2] * t), e);
            },
            darken(t) {
              const e = this.hsl();
              return ((e.color[2] -= e.color[2] * t), e);
            },
            saturate(t) {
              const e = this.hsl();
              return ((e.color[1] += e.color[1] * t), e);
            },
            desaturate(t) {
              const e = this.hsl();
              return ((e.color[1] -= e.color[1] * t), e);
            },
            whiten(t) {
              const e = this.hwb();
              return ((e.color[1] += e.color[1] * t), e);
            },
            blacken(t) {
              const e = this.hwb();
              return ((e.color[2] += e.color[2] * t), e);
            },
            grayscale() {
              var t = this.rgb().color,
                t = 0.3 * t[0] + 0.59 * t[1] + 0.11 * t[2];
              return c.rgb(t, t, t);
            },
            fade(t) {
              return this.alpha(this.valpha - this.valpha * t);
            },
            opaquer(t) {
              return this.alpha(this.valpha + this.valpha * t);
            },
            rotate(t) {
              const e = this.hsl();
              let i = e.color[0];
              return (
                (i = (i + t) % 360),
                (i = i < 0 ? 360 + i : i),
                (e.color[0] = i),
                e
              );
            },
            mix(t, e) {
              if (!t || !t.rgb)
                throw new Error(
                  'Argument to "mix" was not a Color instance, but rather an instance of ' +
                    typeof t,
                );
              const i = t.rgb(),
                n = this.rgb(),
                o = void 0 === e ? 0.5 : e,
                r = 2 * o - 1,
                s = i.alpha() - n.alpha(),
                a = (1 + (r * s == -1 ? r : (r + s) / (1 + r * s))) / 2,
                l = 1 - a;
              return c.rgb(
                a * i.red() + l * n.red(),
                a * i.green() + l * n.green(),
                a * i.blue() + l * n.blue(),
                i.alpha() * o + n.alpha() * (1 - o),
              );
            },
          };
          for (const i of Object.keys(r))
            if (!s.includes(i)) {
              const n = r[i]["channels"];
              ((c.prototype[i] = function (...t) {
                return this.model === i
                  ? new c(this)
                  : 0 < t.length
                    ? new c(t, i)
                    : new c(
                        [
                          ...((t = r[this.model][i].raw(this.color)),
                          Array.isArray(t) ? t : [t]),
                          this.valpha,
                        ],
                        i,
                      );
              }),
                (c[i] = function (...t) {
                  let e = t[0];
                  return ("number" == typeof e && (e = h(t, n)), new c(e, i));
                }));
            }
          function e(i, n, o) {
            for (const t of (i = Array.isArray(i) ? i : [i]))
              (l[t] || (l[t] = []))[n] = o;
            return (
              (i = i[0]),
              function (t) {
                let e;
                return (
                  void 0 !== t
                    ? (o && (t = o(t)), (e = this[i]()), (e.color[n] = t))
                    : ((e = this[i]().color[n]), o && (e = o(e))),
                  e
                );
              }
            );
          }
          function u(e) {
            return function (t) {
              return Math.max(0, Math.min(e, t));
            };
          }
          function h(e, i) {
            for (let t = 0; t < i; t++) "number" != typeof e[t] && (e[t] = 0);
            return e;
          }
          i.exports = c;
        },
        5043: (t, e, i) => {
          const s = i(1086),
            a = {};
          for (const t of Object.keys(s)) a[s[t]] = t;
          const l = {
            rgb: { channels: 3, labels: "rgb" },
            hsl: { channels: 3, labels: "hsl" },
            hsv: { channels: 3, labels: "hsv" },
            hwb: { channels: 3, labels: "hwb" },
            cmyk: { channels: 4, labels: "cmyk" },
            xyz: { channels: 3, labels: "xyz" },
            lab: { channels: 3, labels: "lab" },
            lch: { channels: 3, labels: "lch" },
            hex: { channels: 1, labels: ["hex"] },
            keyword: { channels: 1, labels: ["keyword"] },
            ansi16: { channels: 1, labels: ["ansi16"] },
            ansi256: { channels: 1, labels: ["ansi256"] },
            hcg: { channels: 3, labels: ["h", "c", "g"] },
            apple: { channels: 3, labels: ["r16", "g16", "b16"] },
            gray: { channels: 1, labels: ["gray"] },
          };
          t.exports = l;
          for (const t of Object.keys(l)) {
            if (!("channels" in l[t]))
              throw new Error("missing channels property: " + t);
            if (!("labels" in l[t]))
              throw new Error("missing channel labels property: " + t);
            if (l[t].labels.length !== l[t].channels)
              throw new Error("channel and label counts mismatch: " + t);
            const { channels: e, labels: i } = l[t];
            (delete l[t].channels,
              delete l[t].labels,
              Object.defineProperty(l[t], "channels", { value: e }),
              Object.defineProperty(l[t], "labels", { value: i }));
          }
          ((l.rgb.hsl = function (t) {
            var e = t[0] / 255,
              i = t[1] / 255,
              n = t[2] / 255,
              o = Math.min(e, i, n),
              r = Math.max(e, i, n),
              t = r - o;
            let s;
            (r === o
              ? (s = 0)
              : e === r
                ? (s = (i - n) / t)
                : i === r
                  ? (s = 2 + (n - e) / t)
                  : n === r && (s = 4 + (e - i) / t),
              (s = Math.min(60 * s, 360)),
              s < 0 && (s += 360));
            i = (o + r) / 2;
            return [
              s,
              100 * (r === o ? 0 : i <= 0.5 ? t / (r + o) : t / (2 - r - o)),
              100 * i,
            ];
          }),
            (l.rgb.hsv = function (t) {
              let e, i, n, o, r;
              function s(t) {
                return (u - t) / 6 / h + 0.5;
              }
              const a = t[0] / 255,
                l = t[1] / 255,
                c = t[2] / 255,
                u = Math.max(a, l, c),
                h = u - Math.min(a, l, c);
              return (
                0 == h
                  ? ((o = 0), (r = 0))
                  : ((r = h / u),
                    (e = s(a)),
                    (i = s(l)),
                    (n = s(c)),
                    a === u
                      ? (o = n - i)
                      : l === u
                        ? (o = 1 / 3 + e - n)
                        : c === u && (o = 2 / 3 + i - e),
                    o < 0 ? (o += 1) : 1 < o && --o),
                [360 * o, 100 * r, 100 * u]
              );
            }),
            (l.rgb.hwb = function (t) {
              var e = t[0],
                i = t[1],
                n = t[2];
              return [
                l.rgb.hsl(t)[0],
                100 * ((1 / 255) * Math.min(e, Math.min(i, n))),
                100 * (n = 1 - (1 / 255) * Math.max(e, Math.max(i, n))),
              ];
            }),
            (l.rgb.cmyk = function (t) {
              var e = t[0] / 255,
                i = t[1] / 255,
                n = t[2] / 255,
                t = Math.min(1 - e, 1 - i, 1 - n);
              return [
                100 * ((1 - e - t) / (1 - t) || 0),
                100 * ((1 - i - t) / (1 - t) || 0),
                100 * ((1 - n - t) / (1 - t) || 0),
                100 * t,
              ];
            }),
            (l.rgb.keyword = function (t) {
              const e = a[t];
              if (e) return e;
              let i,
                n = 1 / 0;
              for (const e of Object.keys(s)) {
                const a = s[e],
                  r =
                    ((o = a),
                    (t[0] - o[0]) ** 2 +
                      (t[1] - o[1]) ** 2 +
                      (t[2] - o[2]) ** 2);
                r < n && ((n = r), (i = e));
              }
              var o;
              return i;
            }),
            (l.keyword.rgb = function (t) {
              return s[t];
            }),
            (l.rgb.xyz = function (t) {
              let e = t[0] / 255,
                i = t[1] / 255,
                n = t[2] / 255;
              return (
                (e = 0.04045 < e ? ((e + 0.055) / 1.055) ** 2.4 : e / 12.92),
                (i = 0.04045 < i ? ((i + 0.055) / 1.055) ** 2.4 : i / 12.92),
                (n = 0.04045 < n ? ((n + 0.055) / 1.055) ** 2.4 : n / 12.92),
                [
                  100 * (0.4124 * e + 0.3576 * i + 0.1805 * n),
                  100 * (0.2126 * e + 0.7152 * i + 0.0722 * n),
                  100 * (0.0193 * e + 0.1192 * i + 0.9505 * n),
                ]
              );
            }),
            (l.rgb.lab = function (t) {
              t = l.rgb.xyz(t);
              let e = t[0],
                i = t[1],
                n = t[2];
              return (
                (e /= 95.047),
                (i /= 100),
                (n /= 108.883),
                (e = 0.008856 < e ? e ** (1 / 3) : 7.787 * e + 16 / 116),
                (i = 0.008856 < i ? i ** (1 / 3) : 7.787 * i + 16 / 116),
                (n = 0.008856 < n ? n ** (1 / 3) : 7.787 * n + 16 / 116),
                [116 * i - 16, 500 * (e - i), 200 * (i - n)]
              );
            }),
            (l.hsl.rgb = function (t) {
              var e = t[0] / 360,
                i = t[1] / 100,
                t = t[2] / 100;
              let n, o, r;
              if (0 == i) return ((r = 255 * t), [r, r, r]);
              const s = 2 * t - (n = t < 0.5 ? t * (1 + i) : t + i - t * i),
                a = [0, 0, 0];
              for (let t = 0; t < 3; t++)
                ((o = e + (1 / 3) * -(t - 1)),
                  o < 0 && o++,
                  1 < o && o--,
                  (r =
                    6 * o < 1
                      ? s + 6 * (n - s) * o
                      : 2 * o < 1
                        ? n
                        : 3 * o < 2
                          ? s + (n - s) * (2 / 3 - o) * 6
                          : s),
                  (a[t] = 255 * r));
              return a;
            }),
            (l.hsl.hsv = function (t) {
              var e = t[0],
                i = t[1] / 100,
                n = t[2] / 100,
                o = i,
                t = Math.max(n, 0.01);
              return (
                (i *= (n *= 2) <= 1 ? n : 2 - n),
                (o *= t <= 1 ? t : 2 - t),
                [
                  e,
                  100 * (0 == n ? (2 * o) / (t + o) : (2 * i) / (n + i)),
                  ((n + i) / 2) * 100,
                ]
              );
            }),
            (l.hsv.rgb = function (t) {
              var e = t[0] / 60,
                i = t[1] / 100,
                n = t[2] / 100,
                t = Math.floor(e) % 6,
                e = e - Math.floor(e),
                o = 255 * n * (1 - i),
                r = 255 * n * (1 - i * e),
                s = 255 * n * (1 - i * (1 - e));
              switch (((n *= 255), t)) {
                case 0:
                  return [n, s, o];
                case 1:
                  return [r, n, o];
                case 2:
                  return [o, n, s];
                case 3:
                  return [o, r, n];
                case 4:
                  return [s, o, n];
                case 5:
                  return [n, o, r];
              }
            }),
            (l.hsv.hsl = function (t) {
              var e = t[0],
                i = t[1] / 100,
                n = t[2] / 100,
                o = Math.max(n, 0.01),
                t = (2 - i) * n,
                n = (2 - i) * o,
                o = i * o;
              return [
                e,
                100 * ((o /= n <= 1 ? n : 2 - n) || 0),
                100 * (t /= 2),
              ];
            }),
            (l.hwb.rgb = function (t) {
              var e = t[0] / 360;
              let i = t[1] / 100,
                n = t[2] / 100;
              t = i + n;
              let o;
              1 < t && ((i /= t), (n /= t));
              var t = Math.floor(6 * e),
                r = 1 - n;
              ((o = 6 * e - t), 0 != (1 & t) && (o = 1 - o));
              var s = i + o * (r - i);
              let a, l, c;
              switch (t) {
                default:
                case 6:
                case 0:
                  ((a = r), (l = s), (c = i));
                  break;
                case 1:
                  ((a = s), (l = r), (c = i));
                  break;
                case 2:
                  ((a = i), (l = r), (c = s));
                  break;
                case 3:
                  ((a = i), (l = s), (c = r));
                  break;
                case 4:
                  ((a = s), (l = i), (c = r));
                  break;
                case 5:
                  ((a = r), (l = i), (c = s));
              }
              return [255 * a, 255 * l, 255 * c];
            }),
            (l.cmyk.rgb = function (t) {
              var e = t[0] / 100,
                i = t[1] / 100,
                n = t[2] / 100,
                t = t[3] / 100;
              return [
                255 * (1 - Math.min(1, e * (1 - t) + t)),
                255 * (1 - Math.min(1, i * (1 - t) + t)),
                255 * (1 - Math.min(1, n * (1 - t) + t)),
              ];
            }),
            (l.xyz.rgb = function (t) {
              var e = t[0] / 100,
                i = t[1] / 100,
                t = t[2] / 100;
              let n, o, r;
              return (
                (n = 3.2406 * e + -1.5372 * i + -0.4986 * t),
                (o = -0.9689 * e + 1.8758 * i + 0.0415 * t),
                (r = 0.0557 * e + -0.204 * i + 1.057 * t),
                (n =
                  0.0031308 < n ? 1.055 * n ** (1 / 2.4) - 0.055 : 12.92 * n),
                (o =
                  0.0031308 < o ? 1.055 * o ** (1 / 2.4) - 0.055 : 12.92 * o),
                (r =
                  0.0031308 < r ? 1.055 * r ** (1 / 2.4) - 0.055 : 12.92 * r),
                (n = Math.min(Math.max(0, n), 1)),
                (o = Math.min(Math.max(0, o), 1)),
                (r = Math.min(Math.max(0, r), 1)),
                [255 * n, 255 * o, 255 * r]
              );
            }),
            (l.xyz.lab = function (t) {
              let e = t[0],
                i = t[1],
                n = t[2];
              return (
                (e /= 95.047),
                (i /= 100),
                (n /= 108.883),
                (e = 0.008856 < e ? e ** (1 / 3) : 7.787 * e + 16 / 116),
                (i = 0.008856 < i ? i ** (1 / 3) : 7.787 * i + 16 / 116),
                (n = 0.008856 < n ? n ** (1 / 3) : 7.787 * n + 16 / 116),
                [116 * i - 16, 500 * (e - i), 200 * (i - n)]
              );
            }),
            (l.lab.xyz = function (t) {
              let e, i, n;
              ((i = (t[0] + 16) / 116),
                (e = t[1] / 500 + i),
                (n = i - t[2] / 200));
              var o = i ** 3,
                r = e ** 3,
                t = n ** 3;
              return (
                (i = 0.008856 < o ? o : (i - 16 / 116) / 7.787),
                (e = 0.008856 < r ? r : (e - 16 / 116) / 7.787),
                (n = 0.008856 < t ? t : (n - 16 / 116) / 7.787),
                (e *= 95.047),
                (i *= 100),
                (n *= 108.883),
                [e, i, n]
              );
            }),
            (l.lab.lch = function (t) {
              var e = t[0],
                i = t[1],
                t = t[2];
              let n;
              return (
                (n = (360 * Math.atan2(t, i)) / 2 / Math.PI),
                n < 0 && (n += 360),
                [e, Math.sqrt(i * i + t * t), n]
              );
            }),
            (l.lch.lab = function (t) {
              var e = t[0],
                i = t[1],
                t = (t[2] / 360) * 2 * Math.PI;
              return [e, i * Math.cos(t), i * Math.sin(t)];
            }),
            (l.rgb.ansi16 = function (t, e = null) {
              var [i, n, o] = t,
                e = null === e ? l.rgb.hsv(t)[2] : e;
              if (0 === (e = Math.round(e / 50))) return 30;
              let r =
                30 +
                ((Math.round(o / 255) << 2) |
                  (Math.round(n / 255) << 1) |
                  Math.round(i / 255));
              return (2 === e && (r += 60), r);
            }),
            (l.hsv.ansi16 = function (t) {
              return l.rgb.ansi16(l.hsv.rgb(t), t[2]);
            }),
            (l.rgb.ansi256 = function (t) {
              var e = t[0],
                i = t[1],
                t = t[2];
              return e === i && i === t
                ? e < 8
                  ? 16
                  : 248 < e
                    ? 231
                    : Math.round(((e - 8) / 247) * 24) + 232
                : 16 +
                    36 * Math.round((e / 255) * 5) +
                    6 * Math.round((i / 255) * 5) +
                    Math.round((t / 255) * 5);
            }),
            (l.ansi16.rgb = function (t) {
              let e = t % 10;
              if (0 === e || 7 === e)
                return (
                  50 < t && (e += 3.5),
                  (e = (e / 10.5) * 255),
                  [e, e, e]
                );
              t = 0.5 * (1 + ~~(50 < t));
              return [
                (1 & e) * t * 255,
                ((e >> 1) & 1) * t * 255,
                ((e >> 2) & 1) * t * 255,
              ];
            }),
            (l.ansi256.rgb = function (t) {
              if (232 <= t) {
                const e = 10 * (t - 232) + 8;
                return [e, e, e];
              }
              let e;
              return (
                (t -= 16),
                [
                  (Math.floor(t / 36) / 5) * 255,
                  (Math.floor((e = t % 36) / 6) / 5) * 255,
                  ((e % 6) / 5) * 255,
                ]
              );
            }),
            (l.rgb.hex = function (t) {
              t = (
                ((255 & Math.round(t[0])) << 16) +
                ((255 & Math.round(t[1])) << 8) +
                (255 & Math.round(t[2]))
              )
                .toString(16)
                .toUpperCase();
              return "000000".substring(t.length) + t;
            }),
            (l.hex.rgb = function (t) {
              t = t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
              if (!t) return [0, 0, 0];
              let e = t[0];
              3 === t[0].length &&
                (e = e
                  .split("")
                  .map((t) => t + t)
                  .join(""));
              t = parseInt(e, 16);
              return [(t >> 16) & 255, (t >> 8) & 255, 255 & t];
            }),
            (l.rgb.hcg = function (t) {
              var e = t[0] / 255,
                i = t[1] / 255,
                n = t[2] / 255,
                o = Math.max(Math.max(e, i), n),
                r = Math.min(Math.min(e, i), n),
                t = o - r,
                i =
                  t <= 0
                    ? 0
                    : o === e
                      ? ((i - n) / t) % 6
                      : o === i
                        ? 2 + (n - e) / t
                        : 4 + (e - i) / t;
              return (
                (i /= 6),
                [360 * (i %= 1), 100 * t, 100 * (t < 1 ? r / (1 - t) : 0)]
              );
            }),
            (l.hsl.hcg = function (t) {
              var e = t[1] / 100,
                i = t[2] / 100,
                e = i < 0.5 ? 2 * e * i : 2 * e * (1 - i);
              let n = e < 1 ? (i - 0.5 * e) / (1 - e) : 0;
              return [t[0], 100 * e, 100 * n];
            }),
            (l.hsv.hcg = function (t) {
              var e = t[1] / 100,
                i = t[2] / 100,
                e = e * i;
              let n = e < 1 ? (i - e) / (1 - e) : 0;
              return [t[0], 100 * e, 100 * n];
            }),
            (l.hcg.rgb = function (t) {
              var e = t[0] / 360,
                i = t[1] / 100,
                t = t[2] / 100;
              if (0 == i) return [255 * t, 255 * t, 255 * t];
              const n = [0, 0, 0],
                o = (e % 1) * 6,
                r = o % 1,
                s = 1 - r;
              switch (Math.floor(o)) {
                case 0:
                  ((n[0] = 1), (n[1] = r), (n[2] = 0));
                  break;
                case 1:
                  ((n[0] = s), (n[1] = 1), (n[2] = 0));
                  break;
                case 2:
                  ((n[0] = 0), (n[1] = 1), (n[2] = r));
                  break;
                case 3:
                  ((n[0] = 0), (n[1] = s), (n[2] = 1));
                  break;
                case 4:
                  ((n[0] = r), (n[1] = 0), (n[2] = 1));
                  break;
                default:
                  ((n[0] = 1), (n[1] = 0), (n[2] = s));
              }
              return (
                (t = (1 - i) * t),
                [
                  255 * (i * n[0] + t),
                  255 * (i * n[1] + t),
                  255 * (i * n[2] + t),
                ]
              );
            }),
            (l.hcg.hsv = function (t) {
              var e = t[1] / 100,
                i = e + (t[2] / 100) * (1 - e);
              let n = 0 < i ? e / i : 0;
              return [t[0], 100 * n, 100 * i];
            }),
            (l.hcg.hsl = function (t) {
              var e = t[1] / 100,
                i = (t[2] / 100) * (1 - e) + 0.5 * e;
              let n = 0;
              return (
                0 < i && i < 0.5
                  ? (n = e / (2 * i))
                  : 0.5 <= i && i < 1 && (n = e / (2 * (1 - i))),
                [t[0], 100 * n, 100 * i]
              );
            }),
            (l.hcg.hwb = function (t) {
              var e = t[1] / 100,
                i = e + (t[2] / 100) * (1 - e);
              return [t[0], 100 * (i - e), 100 * (1 - i)];
            }),
            (l.hwb.hcg = function (t) {
              var e = t[1] / 100,
                i = 1 - t[2] / 100,
                e = i - e;
              let n = e < 1 ? (i - e) / (1 - e) : 0;
              return [t[0], 100 * e, 100 * n];
            }),
            (l.apple.rgb = function (t) {
              return [
                (t[0] / 65535) * 255,
                (t[1] / 65535) * 255,
                (t[2] / 65535) * 255,
              ];
            }),
            (l.rgb.apple = function (t) {
              return [
                (t[0] / 255) * 65535,
                (t[1] / 255) * 65535,
                (t[2] / 255) * 65535,
              ];
            }),
            (l.gray.rgb = function (t) {
              return [
                (t[0] / 100) * 255,
                (t[0] / 100) * 255,
                (t[0] / 100) * 255,
              ];
            }),
            (l.gray.hsl = function (t) {
              return [0, 0, t[0]];
            }),
            (l.gray.hsv = l.gray.hsl),
            (l.gray.hwb = function (t) {
              return [0, 100, t[0]];
            }),
            (l.gray.cmyk = function (t) {
              return [0, 0, 0, t[0]];
            }),
            (l.gray.lab = function (t) {
              return [t[0], 0, 0];
            }),
            (l.gray.hex = function (t) {
              ((t = 255 & Math.round((t[0] / 100) * 255)),
                (t = ((t << 16) + (t << 8) + t).toString(16).toUpperCase()));
              return "000000".substring(t.length) + t;
            }),
            (l.rgb.gray = function (t) {
              return [((t[0] + t[1] + t[2]) / 3 / 255) * 100];
            }));
        },
        7747: (t, e, i) => {
          const n = i(5043),
            o = i(8074),
            l = {};
          (Object.keys(n).forEach((s) => {
            ((l[s] = {}),
              Object.defineProperty(l[s], "channels", { value: n[s].channels }),
              Object.defineProperty(l[s], "labels", { value: n[s].labels }));
            const a = o(s);
            Object.keys(a).forEach((t) => {
              var i,
                n,
                e = a[t];
              function o(...t) {
                var e = t[0];
                return null == e ? e : (1 < e.length && (t = e), i(t));
              }
              function r(...t) {
                var e = t[0];
                if (null == e) return e;
                1 < e.length && (t = e);
                const i = n(t);
                if ("object" == typeof i)
                  for (let t = i.length, e = 0; e < t; e++)
                    i[e] = Math.round(i[e]);
                return i;
              }
              ((l[s][t] =
                ("conversion" in (n = e) && (r.conversion = n.conversion), r)),
                (l[s][t].raw =
                  ("conversion" in (i = e) && (o.conversion = i.conversion),
                  o)));
            });
          }),
            (t.exports = l));
        },
        8074: (t, e, i) => {
          const a = i(5043);
          function s(t, e) {
            const i = [e[t].parent, t];
            let n = a[e[t].parent][t],
              o = e[t].parent;
            for (; e[o].parent; )
              (i.unshift(e[o].parent),
                (n = (function (e, i) {
                  return function (t) {
                    return i(e(t));
                  };
                })(a[e[o].parent][o], n)),
                (o = e[o].parent));
            return ((n.conversion = i), n);
          }
          t.exports = function (i) {
            const n = (function (i) {
                const n = (function () {
                    const i = {},
                      n = Object.keys(a);
                    for (let t = n.length, e = 0; e < t; e++)
                      i[n[e]] = { distance: -1, parent: null };
                    return i;
                  })(),
                  o = [i];
                for (n[i].distance = 0; o.length; ) {
                  const i = o.pop(),
                    r = Object.keys(a[i]);
                  for (let t = r.length, e = 0; e < t; e++) {
                    const a = r[e],
                      s = n[a];
                    -1 === s.distance &&
                      ((s.distance = n[i].distance + 1),
                      (s.parent = i),
                      o.unshift(a));
                  }
                }
                return n;
              })(i),
              o = {},
              r = Object.keys(n);
            for (let t = r.length, e = 0; e < t; e++) {
              const i = r[e];
              null !== n[i].parent && (o[i] = s(i, n));
            }
            return o;
          };
        },
        1086: (t) => {
          "use strict";
          t.exports = {
            aliceblue: [240, 248, 255],
            antiquewhite: [250, 235, 215],
            aqua: [0, 255, 255],
            aquamarine: [127, 255, 212],
            azure: [240, 255, 255],
            beige: [245, 245, 220],
            bisque: [255, 228, 196],
            black: [0, 0, 0],
            blanchedalmond: [255, 235, 205],
            blue: [0, 0, 255],
            blueviolet: [138, 43, 226],
            brown: [165, 42, 42],
            burlywood: [222, 184, 135],
            cadetblue: [95, 158, 160],
            chartreuse: [127, 255, 0],
            chocolate: [210, 105, 30],
            coral: [255, 127, 80],
            cornflowerblue: [100, 149, 237],
            cornsilk: [255, 248, 220],
            crimson: [220, 20, 60],
            cyan: [0, 255, 255],
            darkblue: [0, 0, 139],
            darkcyan: [0, 139, 139],
            darkgoldenrod: [184, 134, 11],
            darkgray: [169, 169, 169],
            darkgreen: [0, 100, 0],
            darkgrey: [169, 169, 169],
            darkkhaki: [189, 183, 107],
            darkmagenta: [139, 0, 139],
            darkolivegreen: [85, 107, 47],
            darkorange: [255, 140, 0],
            darkorchid: [153, 50, 204],
            darkred: [139, 0, 0],
            darksalmon: [233, 150, 122],
            darkseagreen: [143, 188, 143],
            darkslateblue: [72, 61, 139],
            darkslategray: [47, 79, 79],
            darkslategrey: [47, 79, 79],
            darkturquoise: [0, 206, 209],
            darkviolet: [148, 0, 211],
            deeppink: [255, 20, 147],
            deepskyblue: [0, 191, 255],
            dimgray: [105, 105, 105],
            dimgrey: [105, 105, 105],
            dodgerblue: [30, 144, 255],
            firebrick: [178, 34, 34],
            floralwhite: [255, 250, 240],
            forestgreen: [34, 139, 34],
            fuchsia: [255, 0, 255],
            gainsboro: [220, 220, 220],
            ghostwhite: [248, 248, 255],
            gold: [255, 215, 0],
            goldenrod: [218, 165, 32],
            gray: [128, 128, 128],
            green: [0, 128, 0],
            greenyellow: [173, 255, 47],
            grey: [128, 128, 128],
            honeydew: [240, 255, 240],
            hotpink: [255, 105, 180],
            indianred: [205, 92, 92],
            indigo: [75, 0, 130],
            ivory: [255, 255, 240],
            khaki: [240, 230, 140],
            lavender: [230, 230, 250],
            lavenderblush: [255, 240, 245],
            lawngreen: [124, 252, 0],
            lemonchiffon: [255, 250, 205],
            lightblue: [173, 216, 230],
            lightcoral: [240, 128, 128],
            lightcyan: [224, 255, 255],
            lightgoldenrodyellow: [250, 250, 210],
            lightgray: [211, 211, 211],
            lightgreen: [144, 238, 144],
            lightgrey: [211, 211, 211],
            lightpink: [255, 182, 193],
            lightsalmon: [255, 160, 122],
            lightseagreen: [32, 178, 170],
            lightskyblue: [135, 206, 250],
            lightslategray: [119, 136, 153],
            lightslategrey: [119, 136, 153],
            lightsteelblue: [176, 196, 222],
            lightyellow: [255, 255, 224],
            lime: [0, 255, 0],
            limegreen: [50, 205, 50],
            linen: [250, 240, 230],
            magenta: [255, 0, 255],
            maroon: [128, 0, 0],
            mediumaquamarine: [102, 205, 170],
            mediumblue: [0, 0, 205],
            mediumorchid: [186, 85, 211],
            mediumpurple: [147, 112, 219],
            mediumseagreen: [60, 179, 113],
            mediumslateblue: [123, 104, 238],
            mediumspringgreen: [0, 250, 154],
            mediumturquoise: [72, 209, 204],
            mediumvioletred: [199, 21, 133],
            midnightblue: [25, 25, 112],
            mintcream: [245, 255, 250],
            mistyrose: [255, 228, 225],
            moccasin: [255, 228, 181],
            navajowhite: [255, 222, 173],
            navy: [0, 0, 128],
            oldlace: [253, 245, 230],
            olive: [128, 128, 0],
            olivedrab: [107, 142, 35],
            orange: [255, 165, 0],
            orangered: [255, 69, 0],
            orchid: [218, 112, 214],
            palegoldenrod: [238, 232, 170],
            palegreen: [152, 251, 152],
            paleturquoise: [175, 238, 238],
            palevioletred: [219, 112, 147],
            papayawhip: [255, 239, 213],
            peachpuff: [255, 218, 185],
            peru: [205, 133, 63],
            pink: [255, 192, 203],
            plum: [221, 160, 221],
            powderblue: [176, 224, 230],
            purple: [128, 0, 128],
            rebeccapurple: [102, 51, 153],
            red: [255, 0, 0],
            rosybrown: [188, 143, 143],
            royalblue: [65, 105, 225],
            saddlebrown: [139, 69, 19],
            salmon: [250, 128, 114],
            sandybrown: [244, 164, 96],
            seagreen: [46, 139, 87],
            seashell: [255, 245, 238],
            sienna: [160, 82, 45],
            silver: [192, 192, 192],
            skyblue: [135, 206, 235],
            slateblue: [106, 90, 205],
            slategray: [112, 128, 144],
            slategrey: [112, 128, 144],
            snow: [255, 250, 250],
            springgreen: [0, 255, 127],
            steelblue: [70, 130, 180],
            tan: [210, 180, 140],
            teal: [0, 128, 128],
            thistle: [216, 191, 216],
            tomato: [255, 99, 71],
            turquoise: [64, 224, 208],
            violet: [238, 130, 238],
            wheat: [245, 222, 179],
            white: [255, 255, 255],
            whitesmoke: [245, 245, 245],
            yellow: [255, 255, 0],
            yellowgreen: [154, 205, 50],
          };
        },
        5089: (t, e, i) => {
          var n = i(930),
            o = i(9268),
            r = TypeError;
          t.exports = function (t) {
            if (n(t)) return t;
            throw r(o(t) + " is not a function");
          };
        },
        1449: (t, e, i) => {
          var n = i(1956),
            o = i(9268),
            r = TypeError;
          t.exports = function (t) {
            if (n(t)) return t;
            throw r(o(t) + " is not a constructor");
          };
        },
        1378: (t, e, i) => {
          var n = i(930),
            o = String,
            r = TypeError;
          t.exports = function (t) {
            if ("object" == typeof t || n(t)) return t;
            throw r("Can't set " + o(t) + " as a prototype");
          };
        },
        8669: (t, e, i) => {
          var n = i(211),
            o = i(4710),
            i = i(7826).f,
            r = n("unscopables"),
            s = Array.prototype;
          (null == s[r] && i(s, r, { configurable: !0, value: o(null) }),
            (t.exports = function (t) {
              s[r][t] = !0;
            }));
        },
        9966: (t, e, i) => {
          "use strict";
          var n = i(3448).charAt;
          t.exports = function (t, e, i) {
            return e + (i ? n(t, e).length : 1);
          };
        },
        6112: (t, e, i) => {
          var n = i(8759),
            o = String,
            r = TypeError;
          t.exports = function (t) {
            if (n(t)) return t;
            throw r(o(t) + " is not an object");
          };
        },
        1005: (t, e, i) => {
          i = i(3677);
          t.exports = i(function () {
            var t;
            "function" == typeof ArrayBuffer &&
              ((t = new ArrayBuffer(8)),
              Object.isExtensible(t) &&
                Object.defineProperty(t, "a", { value: 8 }));
          });
        },
        1984: (t, e, i) => {
          "use strict";
          var n = i(8062).forEach,
            i = i(2802)("forEach");
          t.exports = i
            ? [].forEach
            : function (t) {
                return n(this, t, 1 < arguments.length ? arguments[1] : void 0);
              };
        },
        1842: (t, e, i) => {
          "use strict";
          var d = i(8516),
            p = i(9413),
            f = i(3060),
            m = i(7850),
            g = i(2814),
            v = i(1956),
            b = i(2871),
            y = i(9720),
            w = i(3546),
            x = i(1667),
            k = Array;
          t.exports = function (t) {
            var e = f(t),
              i = v(this),
              t = arguments.length,
              n = 1 < t ? arguments[1] : void 0,
              o = void 0 !== n;
            o && (n = d(n, 2 < t ? arguments[2] : void 0));
            var r,
              s,
              a,
              l,
              c,
              u,
              t = x(e),
              h = 0;
            if (!t || (this === k && g(t)))
              for (r = b(e), s = i ? new this(r) : k(r); h < r; h++)
                ((u = o ? n(e[h], h) : e[h]), y(s, h, u));
            else
              for (
                c = (l = w(e, t)).next, s = i ? new this() : [];
                !(a = p(c, l)).done;
                h++
              )
                ((u = o ? m(l, n, [a.value, h], !0) : a.value), y(s, h, u));
            return ((s.length = h), s);
          };
        },
        6198: (t, e, i) => {
          function n(a) {
            return function (t, e, i) {
              var n,
                o = l(t),
                r = u(o),
                s = c(i, r);
              if (a && e != e) {
                for (; s < r; ) if ((n = o[s++]) != n) return !0;
              } else
                for (; s < r; s++)
                  if ((a || s in o) && o[s] === e) return a || s || 0;
              return !a && -1;
            };
          }
          var l = i(4088),
            c = i(7740),
            u = i(2871);
          t.exports = { includes: n(!0), indexOf: n(!1) };
        },
        8062: (t, e, i) => {
          function n(d) {
            var p = 1 == d,
              f = 2 == d,
              m = 3 == d,
              g = 4 == d,
              v = 6 == d,
              b = 7 == d,
              y = 5 == d || v;
            return function (t, e, i, n) {
              for (
                var o,
                  r,
                  s = k(t),
                  a = x(s),
                  l = w(e, i),
                  c = C(a),
                  u = 0,
                  n = n || P,
                  h = p ? n(t, c) : f || b ? n(t, 0) : void 0;
                u < c;
                u++
              )
                if ((y || u in a) && ((r = l((o = a[u]), u, s)), d))
                  if (p) h[u] = r;
                  else if (r)
                    switch (d) {
                      case 3:
                        return !0;
                      case 5:
                        return o;
                      case 6:
                        return u;
                      case 2:
                        _(h, o);
                    }
                  else
                    switch (d) {
                      case 4:
                        return !1;
                      case 7:
                        _(h, o);
                    }
              return v ? -1 : m || g ? g : h;
            };
          }
          var w = i(8516),
            o = i(8240),
            x = i(5974),
            k = i(3060),
            C = i(2871),
            P = i(5574),
            _ = o([].push);
          t.exports = {
            forEach: n(0),
            map: n(1),
            filter: n(2),
            some: n(3),
            every: n(4),
            find: n(5),
            findIndex: n(6),
            filterReject: n(7),
          };
        },
        9955: (t, e, i) => {
          var n = i(3677),
            o = i(211),
            r = i(1448),
            s = o("species");
          t.exports = function (e) {
            return (
              51 <= r ||
              !n(function () {
                var t = [];
                return (
                  ((t.constructor = {})[s] = function () {
                    return { foo: 1 };
                  }),
                  1 !== t[e](Boolean).foo
                );
              })
            );
          };
        },
        2802: (t, e, i) => {
          "use strict";
          var n = i(3677);
          t.exports = function (t, e) {
            var i = [][t];
            return (
              !!i &&
              n(function () {
                i.call(
                  null,
                  e ||
                    function () {
                      return 1;
                    },
                  1,
                );
              })
            );
          };
        },
        3329: (t, e, i) => {
          var l = i(7740),
            c = i(2871),
            u = i(9720),
            h = Array,
            d = Math.max;
          t.exports = function (t, e, i) {
            for (
              var n = c(t),
                o = l(e, n),
                r = l(void 0 === i ? n : i, n),
                s = h(d(r - o, 0)),
                a = 0;
              o < r;
              o++, a++
            )
              u(s, a, t[o]);
            return ((s.length = a), s);
          };
        },
        745: (t, e, i) => {
          i = i(8240);
          t.exports = i([].slice);
        },
        8789: (t, e, i) => {
          var n = i(6526),
            o = i(1956),
            r = i(8759),
            s = i(211)("species"),
            a = Array;
          t.exports = function (t) {
            var e;
            return (
              n(t) &&
                ((e = t.constructor),
                ((o(e) && (e === a || n(e.prototype))) ||
                  (r(e) && null === (e = e[s]))) &&
                  (e = void 0)),
              void 0 === e ? a : e
            );
          };
        },
        5574: (t, e, i) => {
          var n = i(8789);
          t.exports = function (t, e) {
            return new (n(t))(0 === e ? 0 : e);
          };
        },
        7850: (t, e, i) => {
          var o = i(6112),
            r = i(6737);
          t.exports = function (t, e, i, n) {
            try {
              return n ? e(o(i)[0], i[1]) : e(i);
            } catch (e) {
              r(t, "throw", e);
            }
          };
        },
        8939: (t, e, i) => {
          var o = i(211)("iterator"),
            r = !1;
          try {
            var n = 0,
              s = {
                next: function () {
                  return { done: !!n++ };
                },
                return: function () {
                  r = !0;
                },
              };
            ((s[o] = function () {
              return this;
            }),
              Array.from(s, function () {
                throw 2;
              }));
          } catch (t) {}
          t.exports = function (t, e) {
            if (!e && !r) return !1;
            var i = !1;
            try {
              var n = {};
              ((n[o] = function () {
                return {
                  next: function () {
                    return { done: (i = !0) };
                  },
                };
              }),
                t(n));
            } catch (t) {}
            return i;
          };
        },
        2306: (t, e, i) => {
          var i = i(8240),
            n = i({}.toString),
            o = i("".slice);
          t.exports = function (t) {
            return o(n(t), 8, -1);
          };
        },
        375: (t, e, i) => {
          var n = i(2371),
            o = i(930),
            r = i(2306),
            s = i(211)("toStringTag"),
            a = Object,
            l =
              "Arguments" ==
              r(
                (function () {
                  return arguments;
                })(),
              );
          t.exports = n
            ? r
            : function (t) {
                var e;
                return void 0 === t
                  ? "Undefined"
                  : null === t
                    ? "Null"
                    : "string" ==
                        typeof (t = (function (t, e) {
                          try {
                            return t[e];
                          } catch (t) {}
                        })((e = a(t)), s))
                      ? t
                      : l
                        ? r(e)
                        : "Object" == (t = r(e)) && o(e.callee)
                          ? "Arguments"
                          : t;
              };
        },
        8474: (t, e, i) => {
          var l = i(9606),
            c = i(6095),
            u = i(4399),
            h = i(7826);
          t.exports = function (t, e, i) {
            for (var n = c(e), o = h.f, r = u.f, s = 0; s < n.length; s++) {
              var a = n[s];
              l(t, a) || (i && l(i, a)) || o(t, a, r(e, a));
            }
          };
        },
        7209: (t, e, i) => {
          i = i(3677);
          t.exports = !i(function () {
            function t() {}
            return (
              (t.prototype.constructor = null),
              Object.getPrototypeOf(new t()) !== t.prototype
            );
          });
        },
        471: (t, e, i) => {
          "use strict";
          function o() {
            return this;
          }
          var r = i(3083).IteratorPrototype,
            s = i(4710),
            a = i(5736),
            l = i(914),
            c = i(7719);
          t.exports = function (t, e, i, n) {
            e += " Iterator";
            return (
              (t.prototype = s(r, { next: a(+!n, i) })),
              l(t, e, !1, !0),
              (c[e] = o),
              t
            );
          };
        },
        2585: (t, e, i) => {
          var n = i(5283),
            o = i(7826),
            r = i(5736);
          t.exports = n
            ? function (t, e, i) {
                return o.f(t, e, r(1, i));
              }
            : function (t, e, i) {
                return ((t[e] = i), t);
              };
        },
        5736: (t) => {
          t.exports = function (t, e) {
            return {
              enumerable: !(1 & t),
              configurable: !(2 & t),
              writable: !(4 & t),
              value: e,
            };
          };
        },
        9720: (t, e, i) => {
          "use strict";
          var n = i(2258),
            o = i(7826),
            r = i(5736);
          t.exports = function (t, e, i) {
            e = n(e);
            e in t ? o.f(t, e, r(0, i)) : (t[e] = i);
          };
        },
        1343: (t, e, i) => {
          var s = i(930),
            a = i(7826),
            l = i(3712),
            c = i(9444);
          t.exports = function (t, e, i, n) {
            var o = (n = n || {}).enumerable,
              r = void 0 !== n.name ? n.name : e;
            if ((s(i) && l(i, r, n), n.global)) o ? (t[e] = i) : c(e, i);
            else {
              try {
                n.unsafe ? t[e] && (o = !0) : delete t[e];
              } catch (t) {}
              o
                ? (t[e] = i)
                : a.f(t, e, {
                    value: i,
                    enumerable: !1,
                    configurable: !n.nonConfigurable,
                    writable: !n.nonWritable,
                  });
            }
            return t;
          };
        },
        9444: (t, e, i) => {
          var n = i(2086),
            o = Object.defineProperty;
          t.exports = function (e, i) {
            try {
              o(n, e, { value: i, configurable: !0, writable: !0 });
            } catch (t) {
              n[e] = i;
            }
            return i;
          };
        },
        8432: (t, e, i) => {
          "use strict";
          function g() {
            return this;
          }
          var v = i(1695),
            b = i(9413),
            y = i(3296),
            n = i(4398),
            w = i(930),
            x = i(471),
            k = i(2130),
            C = i(7530),
            P = i(914),
            _ = i(2585),
            S = i(1343),
            o = i(211),
            T = i(7719),
            i = i(3083),
            H = n.PROPER,
            I = n.CONFIGURABLE,
            E = i.IteratorPrototype,
            D = i.BUGGY_SAFARI_ITERATORS,
            A = o("iterator"),
            M = "values";
          t.exports = function (t, e, i, n, o, r, s) {
            x(i, e, n);
            function a(t) {
              if (t === o && m) return m;
              if (!D && t in p) return p[t];
              switch (t) {
                case "keys":
                case M:
                case "entries":
                  return function () {
                    return new i(this, t);
                  };
              }
              return function () {
                return new i(this);
              };
            }
            var l,
              c,
              u,
              h = e + " Iterator",
              d = !1,
              p = t.prototype,
              f = p[A] || p["@@iterator"] || (o && p[o]),
              m = (!D && f) || a(o),
              n = ("Array" == e && p.entries) || f;
            if (
              (n &&
                (l = k(n.call(new t()))) !== Object.prototype &&
                l.next &&
                (y || k(l) === E || (C ? C(l, E) : w(l[A]) || S(l, A, g)),
                P(l, h, !0, !0),
                y && (T[h] = g)),
              H &&
                o == M &&
                f &&
                f.name !== M &&
                (!y && I
                  ? _(p, "name", M)
                  : ((d = !0),
                    (m = function () {
                      return b(f, this);
                    }))),
              o)
            )
              if (
                ((c = {
                  values: a(M),
                  keys: r ? m : a("keys"),
                  entries: a("entries"),
                }),
                s)
              )
                for (u in c) (!D && !d && u in p) || S(p, u, c[u]);
              else v({ target: e, proto: !0, forced: D || d }, c);
            return (
              (y && !s) || p[A] === m || S(p, A, m, { name: o }),
              (T[e] = m),
              c
            );
          };
        },
        4145: (t, e, i) => {
          var n = i(9775),
            o = i(9606),
            r = i(9251),
            s = i(7826).f;
          t.exports = function (t) {
            var e = n.Symbol || (n.Symbol = {});
            o(e, t) || s(e, t, { value: r.f(t) });
          };
        },
        5283: (t, e, i) => {
          i = i(3677);
          t.exports = !i(function () {
            return (
              7 !=
              Object.defineProperty({}, 1, {
                get: function () {
                  return 7;
                },
              })[1]
            );
          });
        },
        821: (t, e, i) => {
          var n = i(2086),
            i = i(8759),
            o = n.document,
            r = i(o) && i(o.createElement);
          t.exports = function (t) {
            return r ? o.createElement(t) : {};
          };
        },
        7620: (t) => {
          var e = TypeError;
          t.exports = function (t) {
            if (9007199254740991 < t) throw e("Maximum allowed index exceeded");
            return t;
          };
        },
        933: (t) => {
          t.exports = {
            CSSRuleList: 0,
            CSSStyleDeclaration: 0,
            CSSValueList: 0,
            ClientRectList: 0,
            DOMRectList: 0,
            DOMStringList: 0,
            DOMTokenList: 1,
            DataTransferItemList: 0,
            FileList: 0,
            HTMLAllCollection: 0,
            HTMLCollection: 0,
            HTMLFormElement: 0,
            HTMLSelectElement: 0,
            MediaList: 0,
            MimeTypeArray: 0,
            NamedNodeMap: 0,
            NodeList: 1,
            PaintRequestList: 0,
            Plugin: 0,
            PluginArray: 0,
            SVGLengthList: 0,
            SVGNumberList: 0,
            SVGPathSegList: 0,
            SVGPointList: 0,
            SVGStringList: 0,
            SVGTransformList: 0,
            SourceBufferList: 0,
            StyleSheetList: 0,
            TextTrackCueList: 0,
            TextTrackList: 0,
            TouchList: 0,
          };
        },
        3526: (t, e, i) => {
          ((i = i(821)("span").classList),
            (i = i && i.constructor && i.constructor.prototype));
          t.exports = i === Object.prototype ? void 0 : i;
        },
        4999: (t, e, i) => {
          i = i(563);
          t.exports = i("navigator", "userAgent") || "";
        },
        1448: (t, e, i) => {
          var n,
            o,
            r = i(2086),
            s = i(4999),
            i = r.process,
            r = r.Deno,
            r = (i && i.versions) || (r && r.version),
            r = r && r.v8;
          (!(o = r
            ? 0 < (n = r.split("."))[0] && n[0] < 4
              ? 1
              : +(n[0] + n[1])
            : o) &&
            s &&
            (!(n = s.match(/Edge\/(\d+)/)) || 74 <= n[1]) &&
            (n = s.match(/Chrome\/(\d+)/)) &&
            (o = +n[1]),
            (t.exports = o));
        },
        8684: (t) => {
          t.exports = [
            "constructor",
            "hasOwnProperty",
            "isPrototypeOf",
            "propertyIsEnumerable",
            "toLocaleString",
            "toString",
            "valueOf",
          ];
        },
        1695: (t, e, i) => {
          var c = i(2086),
            u = i(4399).f,
            h = i(2585),
            d = i(1343),
            p = i(9444),
            f = i(8474),
            m = i(7189);
          t.exports = function (t, e) {
            var i,
              n,
              o,
              r,
              s = t.target,
              a = t.global,
              l = t.stat;
            if ((i = a ? c : l ? c[s] || p(s, {}) : (c[s] || {}).prototype))
              for (n in e) {
                if (
                  ((o = e[n]),
                  (r = t.dontCallGetSet ? (r = u(i, n)) && r.value : i[n]),
                  !m(a ? n : s + (l ? "." : "#") + n, t.forced) && void 0 !== r)
                ) {
                  if (typeof o == typeof r) continue;
                  f(o, r);
                }
                ((t.sham || (r && r.sham)) && h(o, "sham", !0), d(i, n, o, t));
              }
          };
        },
        3677: (t) => {
          t.exports = function (t) {
            try {
              return !!t();
            } catch (t) {
              return !0;
            }
          };
        },
        2331: (t, e, i) => {
          "use strict";
          i(2077);
          var l = i(8240),
            c = i(1343),
            u = i(4861),
            h = i(3677),
            d = i(211),
            p = i(2585),
            f = d("species"),
            m = RegExp.prototype;
          t.exports = function (i, t, e, n) {
            var s,
              o = d(i),
              a = !h(function () {
                var t = {};
                return (
                  (t[o] = function () {
                    return 7;
                  }),
                  7 != ""[i](t)
                );
              }),
              r =
                a &&
                !h(function () {
                  var t = !1,
                    e = /a/;
                  return (
                    "split" === i &&
                      (((e = {}).constructor = {}),
                      (e.constructor[f] = function () {
                        return e;
                      }),
                      (e.flags = ""),
                      (e[o] = /./[o])),
                    (e.exec = function () {
                      return ((t = !0), null);
                    }),
                    e[o](""),
                    !t
                  );
                });
            ((a && r && !e) ||
              ((s = l(/./[o])),
              (t = t(o, ""[i], function (t, e, i, n, o) {
                var r = l(t),
                  t = e.exec;
                return t === u || t === m.exec
                  ? a && !o
                    ? { done: !0, value: s(e, i, n) }
                    : { done: !0, value: r(i, e, n) }
                  : { done: !1 };
              })),
              c(String.prototype, i, t[0]),
              c(m, o, t[1])),
              n && p(m[o], "sham", !0));
          };
        },
        6910: (t, e, i) => {
          i = i(3677);
          t.exports = !i(function () {
            return Object.isExtensible(Object.preventExtensions({}));
          });
        },
        7258: (t, e, i) => {
          var n = i(6059),
            i = Function.prototype,
            o = i.apply,
            r = i.call;
          t.exports =
            ("object" == typeof Reflect && Reflect.apply) ||
            (n
              ? r.bind(o)
              : function () {
                  return r.apply(o, arguments);
                });
        },
        8516: (t, e, i) => {
          var n = i(8240),
            o = i(5089),
            r = i(6059),
            s = n(n.bind);
          t.exports = function (t, e) {
            return (
              o(t),
              void 0 === e
                ? t
                : r
                  ? s(t, e)
                  : function () {
                      return t.apply(e, arguments);
                    }
            );
          };
        },
        6059: (t, e, i) => {
          i = i(3677);
          t.exports = !i(function () {
            var t = function () {}.bind();
            return "function" != typeof t || t.hasOwnProperty("prototype");
          });
        },
        2395: (t, e, i) => {
          "use strict";
          var n = i(8240),
            r = i(5089),
            s = i(8759),
            a = i(9606),
            l = i(745),
            i = i(6059),
            c = Function,
            u = n([].concat),
            h = n([].join),
            d = {};
          t.exports = i
            ? c.bind
            : function (e) {
                var i = r(this),
                  t = i.prototype,
                  n = l(arguments, 1),
                  o = function () {
                    var t = u(n, l(arguments));
                    return this instanceof o
                      ? (function (t, e, i) {
                          if (!a(d, e)) {
                            for (var n = [], o = 0; o < e; o++)
                              n[o] = "a[" + o + "]";
                            d[e] = c("C,a", "return new C(" + h(n, ",") + ")");
                          }
                          return d[e](t, i);
                        })(i, t.length, t)
                      : i.apply(e, t);
                  };
                return (s(t) && (o.prototype = t), o);
              };
        },
        9413: (t, e, i) => {
          var i = i(6059),
            n = Function.prototype.call;
          t.exports = i
            ? n.bind(n)
            : function () {
                return n.apply(n, arguments);
              };
        },
        4398: (t, e, i) => {
          var n = i(5283),
            o = i(9606),
            r = Function.prototype,
            s = n && Object.getOwnPropertyDescriptor,
            i = o(r, "name"),
            o = i && "something" === function () {}.name,
            r = i && (!n || s(r, "name").configurable);
          t.exports = { EXISTS: i, PROPER: o, CONFIGURABLE: r };
        },
        8240: (t, e, i) => {
          var n = i(6059),
            o = Function.prototype,
            i = o.bind,
            r = o.call,
            s = n && i.bind(r, r);
          t.exports = n
            ? function (t) {
                return t && s(t);
              }
            : function (t) {
                return (
                  t &&
                  function () {
                    return r.apply(t, arguments);
                  }
                );
              };
        },
        563: (t, e, i) => {
          var n = i(2086),
            o = i(930);
          t.exports = function (t, e) {
            return arguments.length < 2
              ? ((i = n[t]), o(i) ? i : void 0)
              : n[t] && n[t][e];
            var i;
          };
        },
        1667: (t, e, i) => {
          var n = i(375),
            o = i(2964),
            r = i(7719),
            s = i(211)("iterator");
          t.exports = function (t) {
            if (null != t) return o(t, s) || o(t, "@@iterator") || r[n(t)];
          };
        },
        3546: (t, e, i) => {
          var n = i(9413),
            o = i(5089),
            r = i(6112),
            s = i(9268),
            a = i(1667),
            l = TypeError;
          t.exports = function (t, e) {
            var i = arguments.length < 2 ? a(t) : e;
            if (o(i)) return r(n(i, t));
            throw l(s(t) + " is not iterable");
          };
        },
        2964: (t, e, i) => {
          var n = i(5089);
          t.exports = function (t, e) {
            e = t[e];
            return null == e ? void 0 : n(e);
          };
        },
        8509: (t, e, i) => {
          var n = i(8240),
            o = i(3060),
            d = Math.floor,
            p = n("".charAt),
            f = n("".replace),
            m = n("".slice),
            g = /\$([$&'`]|\d{1,2}|<[^>]*>)/g,
            v = /\$([$&'`]|\d{1,2})/g;
          t.exports = function (r, s, a, l, c, t) {
            var u = a + r.length,
              h = l.length,
              e = v;
            return (
              void 0 !== c && ((c = o(c)), (e = g)),
              f(t, e, function (t, e) {
                var i;
                switch (p(e, 0)) {
                  case "$":
                    return "$";
                  case "&":
                    return r;
                  case "`":
                    return m(s, 0, a);
                  case "'":
                    return m(s, u);
                  case "<":
                    i = c[m(e, 1, -1)];
                    break;
                  default:
                    var n = +e;
                    if (0 == n) return t;
                    if (h < n) {
                      var o = d(n / 10);
                      return 0 !== o && o <= h
                        ? void 0 === l[o - 1]
                          ? p(e, 1)
                          : l[o - 1] + p(e, 1)
                        : t;
                    }
                    i = l[n - 1];
                }
                return void 0 === i ? "" : i;
              })
            );
          };
        },
        2086: (t, e, i) => {
          function n(t) {
            return t && t.Math == Math && t;
          }
          t.exports =
            n("object" == typeof globalThis && globalThis) ||
            n("object" == typeof window && window) ||
            n("object" == typeof self && self) ||
            n("object" == typeof i.g && i.g) ||
            (function () {
              return this;
            })() ||
            Function("return this")();
        },
        9606: (t, e, i) => {
          var n = i(8240),
            o = i(3060),
            r = n({}.hasOwnProperty);
          t.exports =
            Object.hasOwn ||
            function (t, e) {
              return r(o(t), e);
            };
        },
        7153: (t) => {
          t.exports = {};
        },
        5963: (t, e, i) => {
          i = i(563);
          t.exports = i("document", "documentElement");
        },
        6761: (t, e, i) => {
          var n = i(5283),
            o = i(3677),
            r = i(821);
          t.exports =
            !n &&
            !o(function () {
              return (
                7 !=
                Object.defineProperty(r("div"), "a", {
                  get: function () {
                    return 7;
                  },
                }).a
              );
            });
        },
        5974: (t, e, i) => {
          var n = i(8240),
            o = i(3677),
            r = i(2306),
            s = Object,
            a = n("".split);
          t.exports = o(function () {
            return !s("z").propertyIsEnumerable(0);
          })
            ? function (t) {
                return "String" == r(t) ? a(t, "") : s(t);
              }
            : s;
        },
        9277: (t, e, i) => {
          var n = i(8240),
            o = i(930),
            i = i(4489),
            r = n(Function.toString);
          (o(i.inspectSource) ||
            (i.inspectSource = function (t) {
              return r(t);
            }),
            (t.exports = i.inspectSource));
        },
        2423: (t, e, i) => {
          function n(t) {
            c(t, g, { value: { objectID: "O" + v++, weakData: {} } });
          }
          var s = i(1695),
            a = i(8240),
            o = i(7153),
            r = i(8759),
            l = i(9606),
            c = i(7826).f,
            u = i(62),
            h = i(3226),
            d = i(3813),
            p = i(5422),
            f = i(6910),
            m = !1,
            g = p("meta"),
            v = 0,
            b = (t.exports = {
              enable: function () {
                ((b.enable = function () {}), (m = !0));
                var o = u.f,
                  r = a([].splice),
                  t = {};
                ((t[g] = 1),
                  o(t).length &&
                    ((u.f = function (t) {
                      for (var e = o(t), i = 0, n = e.length; i < n; i++)
                        if (e[i] === g) {
                          r(e, i, 1);
                          break;
                        }
                      return e;
                    }),
                    s(
                      { target: "Object", stat: !0, forced: !0 },
                      { getOwnPropertyNames: h.f },
                    )));
              },
              fastKey: function (t, e) {
                if (!r(t))
                  return "symbol" == typeof t
                    ? t
                    : ("string" == typeof t ? "S" : "P") + t;
                if (!l(t, g)) {
                  if (!d(t)) return "F";
                  if (!e) return "E";
                  n(t);
                }
                return t[g].objectID;
              },
              getWeakData: function (t, e) {
                if (!l(t, g)) {
                  if (!d(t)) return !0;
                  if (!e) return !1;
                  n(t);
                }
                return t[g].weakData;
              },
              onFreeze: function (t) {
                return (f && m && d(t) && !l(t, g) && n(t), t);
              },
            });
          o[g] = !0;
        },
        3278: (t, e, i) => {
          var n,
            o,
            r,
            s,
            a,
            l,
            c,
            u,
            h = i(9316),
            d = i(2086),
            p = i(8240),
            f = i(8759),
            m = i(2585),
            g = i(9606),
            v = i(4489),
            b = i(8944),
            i = i(7153),
            y = "Object already initialized",
            w = d.TypeError,
            d = d.WeakMap;
          ((c =
            h || v.state
              ? ((n = v.state || (v.state = new d())),
                (o = p(n.get)),
                (r = p(n.has)),
                (s = p(n.set)),
                (a = function (t, e) {
                  if (r(n, t)) throw new w(y);
                  return ((e.facade = t), s(n, t, e), e);
                }),
                (l = function (t) {
                  return o(n, t) || {};
                }),
                function (t) {
                  return r(n, t);
                })
              : ((i[(u = b("state"))] = !0),
                (a = function (t, e) {
                  if (g(t, u)) throw new w(y);
                  return ((e.facade = t), m(t, u, e), e);
                }),
                (l = function (t) {
                  return g(t, u) ? t[u] : {};
                }),
                function (t) {
                  return g(t, u);
                })),
            (t.exports = {
              set: a,
              get: l,
              has: c,
              enforce: function (t) {
                return c(t) ? l(t) : a(t, {});
              },
              getterFor: function (i) {
                return function (t) {
                  var e;
                  if (!f(t) || (e = l(t)).type !== i)
                    throw w("Incompatible receiver, " + i + " required");
                  return e;
                };
              },
            }));
        },
        2814: (t, e, i) => {
          var n = i(211),
            o = i(7719),
            r = n("iterator"),
            s = Array.prototype;
          t.exports = function (t) {
            return void 0 !== t && (o.Array === t || s[r] === t);
          };
        },
        6526: (t, e, i) => {
          var n = i(2306);
          t.exports =
            Array.isArray ||
            function (t) {
              return "Array" == n(t);
            };
        },
        930: (t) => {
          t.exports = function (t) {
            return "function" == typeof t;
          };
        },
        1956: (t, e, i) => {
          function n() {}
          function o(t) {
            if (!l(t)) return !1;
            try {
              return (p(n, d, t), !0);
            } catch (t) {
              return !1;
            }
          }
          function r(t) {
            if (!l(t)) return !1;
            switch (c(t)) {
              case "AsyncFunction":
              case "GeneratorFunction":
              case "AsyncGeneratorFunction":
                return !1;
            }
            try {
              return g || !!m(f, h(t));
            } catch (t) {
              return !0;
            }
          }
          var s = i(8240),
            a = i(3677),
            l = i(930),
            c = i(375),
            u = i(563),
            h = i(9277),
            d = [],
            p = u("Reflect", "construct"),
            f = /^\s*(?:class|function)\b/,
            m = s(f.exec),
            g = !f.exec(n);
          ((r.sham = !0),
            (t.exports =
              !p ||
              a(function () {
                var t;
                return (
                  o(o.call) ||
                  !o(Object) ||
                  !o(function () {
                    t = !0;
                  }) ||
                  t
                );
              })
                ? r
                : o));
        },
        7189: (t, e, i) => {
          function n(t, e) {
            return (t = l[a(t)]) == u || (t != c && (r(e) ? o(e) : !!e));
          }
          var o = i(3677),
            r = i(930),
            s = /#|\.prototype\./,
            a = (n.normalize = function (t) {
              return String(t).replace(s, ".").toLowerCase();
            }),
            l = (n.data = {}),
            c = (n.NATIVE = "N"),
            u = (n.POLYFILL = "P");
          t.exports = n;
        },
        8759: (t, e, i) => {
          var n = i(930);
          t.exports = function (t) {
            return "object" == typeof t ? null !== t : n(t);
          };
        },
        3296: (t) => {
          t.exports = !1;
        },
        7994: (t, e, i) => {
          var n = i(8759),
            o = i(2306),
            r = i(211)("match");
          t.exports = function (t) {
            var e;
            return n(t) && (void 0 !== (e = t[r]) ? !!e : "RegExp" == o(t));
          };
        },
        2071: (t, e, i) => {
          var n = i(563),
            o = i(930),
            r = i(5516),
            i = i(1876),
            s = Object;
          t.exports = i
            ? function (t) {
                return "symbol" == typeof t;
              }
            : function (t) {
                var e = n("Symbol");
                return o(e) && r(e.prototype, s(t));
              };
        },
        6737: (t, e, i) => {
          var r = i(9413),
            s = i(6112),
            a = i(2964);
          t.exports = function (t, e, i) {
            var n, o;
            s(t);
            try {
              if (!(n = a(t, "return"))) {
                if ("throw" === e) throw i;
                return i;
              }
              n = r(n, t);
            } catch (t) {
              ((o = !0), (n = t));
            }
            if ("throw" === e) throw i;
            if (o) throw n;
            return (s(n), i);
          };
        },
        3083: (t, e, i) => {
          "use strict";
          var n,
            o = i(3677),
            r = i(930),
            s = i(4710),
            a = i(2130),
            l = i(1343),
            c = i(211),
            u = i(3296),
            h = c("iterator"),
            i = !1;
          ([].keys &&
            ("next" in (c = [].keys())
              ? (c = a(a(c))) !== Object.prototype && (n = c)
              : (i = !0)),
            null == n ||
            o(function () {
              var t = {};
              return n[h].call(t) !== t;
            })
              ? (n = {})
              : u && (n = s(n)),
            r(n[h]) ||
              l(n, h, function () {
                return this;
              }),
            (t.exports = { IteratorPrototype: n, BUGGY_SAFARI_ITERATORS: i }));
        },
        7719: (t) => {
          t.exports = {};
        },
        2871: (t, e, i) => {
          var n = i(4005);
          t.exports = function (t) {
            return n(t.length);
          };
        },
        3712: (t, e, i) => {
          var n = i(3677),
            o = i(930),
            r = i(9606),
            s = i(5283),
            a = i(4398).CONFIGURABLE,
            l = i(9277),
            i = i(3278),
            c = i.enforce,
            u = i.get,
            h = Object.defineProperty,
            d =
              s &&
              !n(function () {
                return 8 !== h(function () {}, "length", { value: 8 }).length;
              }),
            p = String(String).split("String"),
            t = (t.exports = function (t, e, i) {
              ("Symbol(" === String(e).slice(0, 7) &&
                (e = "[" + String(e).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"),
                i && i.getter && (e = "get " + e),
                i && i.setter && (e = "set " + e),
                (!r(t, "name") || (a && t.name !== e)) &&
                  (s
                    ? h(t, "name", { value: e, configurable: !0 })
                    : (t.name = e)),
                d &&
                  i &&
                  r(i, "arity") &&
                  t.length !== i.arity &&
                  h(t, "length", { value: i.arity }));
              try {
                i && r(i, "constructor") && i.constructor
                  ? s && h(t, "prototype", { writable: !1 })
                  : t.prototype && (t.prototype = void 0);
              } catch (t) {}
              i = c(t);
              return (
                r(i, "source") ||
                  (i.source = p.join("string" == typeof e ? e : "")),
                t
              );
            });
          Function.prototype.toString = t(function () {
            return (o(this) && u(this).source) || l(this);
          }, "toString");
        },
        5681: (t) => {
          var e = Math.ceil,
            i = Math.floor;
          t.exports =
            Math.trunc ||
            function (t) {
              t = +t;
              return (0 < t ? i : e)(t);
            };
        },
        3441: (t, e, i) => {
          i = i(3193);
          t.exports = i && !!Symbol.for && !!Symbol.keyFor;
        },
        3193: (t, e, i) => {
          var n = i(1448),
            i = i(3677);
          t.exports =
            !!Object.getOwnPropertySymbols &&
            !i(function () {
              var t = Symbol();
              return (
                !String(t) ||
                !(Object(t) instanceof Symbol) ||
                (!Symbol.sham && n && n < 41)
              );
            });
        },
        9316: (t, e, i) => {
          var n = i(2086),
            o = i(930),
            i = i(9277),
            n = n.WeakMap;
          t.exports = o(n) && /native code/.test(i(n));
        },
        8675: (t, e, i) => {
          "use strict";
          var d = i(5283),
            n = i(8240),
            p = i(9413),
            o = i(3677),
            f = i(8779),
            m = i(6952),
            g = i(7446),
            v = i(3060),
            b = i(5974),
            r = Object.assign,
            s = Object.defineProperty,
            y = n([].concat);
          t.exports =
            !r ||
            o(function () {
              if (
                d &&
                1 !==
                  r(
                    { b: 1 },
                    r(
                      s({}, "a", {
                        enumerable: !0,
                        get: function () {
                          s(this, "b", { value: 3, enumerable: !1 });
                        },
                      }),
                      { b: 2 },
                    ),
                  ).b
              )
                return !0;
              var t = {},
                e = {},
                i = Symbol(),
                n = "abcdefghijklmnopqrst";
              return (
                (t[i] = 7),
                n.split("").forEach(function (t) {
                  e[t] = t;
                }),
                7 != r({}, t)[i] || f(r({}, e)).join("") != n
              );
            })
              ? function (t, e) {
                  for (
                    var i = v(t), n = arguments.length, o = 1, r = m.f, s = g.f;
                    o < n;
                  )
                    for (
                      var a,
                        l = b(arguments[o++]),
                        c = r ? y(f(l), r(l)) : f(l),
                        u = c.length,
                        h = 0;
                      h < u;
                    )
                      ((a = c[h++]), (d && !p(s, l, a)) || (i[a] = l[a]));
                  return i;
                }
              : r;
        },
        4710: (t, e, i) => {
          function n() {}
          function o(t) {
            (t.write(m("")), t.close());
            var e = t.parentWindow.Object;
            return ((t = null), e);
          }
          var r,
            s = i(6112),
            a = i(7711),
            l = i(8684),
            c = i(7153),
            u = i(5963),
            h = i(821),
            i = i(8944),
            d = "prototype",
            p = "script",
            f = i("IE_PROTO"),
            m = function (t) {
              return "<" + p + ">" + t + "</" + p + ">";
            },
            g = function () {
              try {
                r = new ActiveXObject("htmlfile");
              } catch (t) {}
              var t, e, i;
              g =
                "undefined" == typeof document || (document.domain && r)
                  ? o(r)
                  : ((e = h("iframe")),
                    (i = "java" + p + ":"),
                    (e.style.display = "none"),
                    u.appendChild(e),
                    (e.src = String(i)),
                    (t = e.contentWindow.document).open(),
                    t.write(m("document.F=Object")),
                    t.close(),
                    t.F);
              for (var n = l.length; n--; ) delete g[d][l[n]];
              return g();
            };
          ((c[f] = !0),
            (t.exports =
              Object.create ||
              function (t, e) {
                var i;
                return (
                  null !== t
                    ? ((n[d] = s(t)), (i = new n()), (n[d] = null), (i[f] = t))
                    : (i = g()),
                  void 0 === e ? i : a.f(i, e)
                );
              }));
        },
        7711: (t, e, i) => {
          var n = i(5283),
            o = i(8202),
            a = i(7826),
            l = i(6112),
            c = i(4088),
            u = i(8779);
          e.f =
            n && !o
              ? Object.defineProperties
              : function (t, e) {
                  l(t);
                  for (var i, n = c(e), o = u(e), r = o.length, s = 0; s < r; )
                    a.f(t, (i = o[s++]), n[i]);
                  return t;
                };
        },
        7826: (t, e, i) => {
          var n = i(5283),
            o = i(6761),
            r = i(8202),
            s = i(6112),
            a = i(2258),
            l = TypeError,
            c = Object.defineProperty,
            u = Object.getOwnPropertyDescriptor,
            h = "enumerable",
            d = "configurable",
            p = "writable";
          e.f = n
            ? r
              ? function (t, e, i) {
                  var n;
                  return (
                    s(t),
                    (e = a(e)),
                    s(i),
                    "function" == typeof t &&
                      "prototype" === e &&
                      "value" in i &&
                      p in i &&
                      !i[p] &&
                      (n = u(t, e)) &&
                      n[p] &&
                      ((t[e] = i.value),
                      (i = {
                        configurable: (d in i ? i : n)[d],
                        enumerable: (h in i ? i : n)[h],
                        writable: !1,
                      })),
                    c(t, e, i)
                  );
                }
              : c
            : function (t, e, i) {
                if ((s(t), (e = a(e)), s(i), o))
                  try {
                    return c(t, e, i);
                  } catch (t) {}
                if ("get" in i || "set" in i)
                  throw l("Accessors not supported");
                return ("value" in i && (t[e] = i.value), t);
              };
        },
        4399: (t, e, i) => {
          var n = i(5283),
            o = i(9413),
            r = i(7446),
            s = i(5736),
            a = i(4088),
            l = i(2258),
            c = i(9606),
            u = i(6761),
            h = Object.getOwnPropertyDescriptor;
          e.f = n
            ? h
            : function (t, e) {
                if (((t = a(t)), (e = l(e)), u))
                  try {
                    return h(t, e);
                  } catch (t) {}
                if (c(t, e)) return s(!o(r.f, t, e), t[e]);
              };
        },
        3226: (t, e, i) => {
          var n = i(2306),
            o = i(4088),
            r = i(62).f,
            s = i(3329),
            a =
              "object" == typeof window && window && Object.getOwnPropertyNames
                ? Object.getOwnPropertyNames(window)
                : [];
          t.exports.f = function (t) {
            return a && "Window" == n(t)
              ? (function (t) {
                  try {
                    return r(t);
                  } catch (t) {
                    return s(a);
                  }
                })(t)
              : r(o(t));
          };
        },
        62: (t, e, i) => {
          var n = i(1352),
            o = i(8684).concat("length", "prototype");
          e.f =
            Object.getOwnPropertyNames ||
            function (t) {
              return n(t, o);
            };
        },
        6952: (t, e) => {
          e.f = Object.getOwnPropertySymbols;
        },
        2130: (t, e, i) => {
          var n = i(9606),
            o = i(930),
            r = i(3060),
            s = i(8944),
            i = i(7209),
            a = s("IE_PROTO"),
            l = Object,
            c = l.prototype;
          t.exports = i
            ? l.getPrototypeOf
            : function (t) {
                var e = r(t);
                if (n(e, a)) return e[a];
                t = e.constructor;
                return o(t) && e instanceof t
                  ? t.prototype
                  : e instanceof l
                    ? c
                    : null;
              };
        },
        3813: (t, e, i) => {
          var n = i(3677),
            o = i(8759),
            r = i(2306),
            s = i(1005),
            a = Object.isExtensible,
            n = n(function () {
              a(1);
            });
          t.exports =
            n || s
              ? function (t) {
                  return (
                    !!o(t) && (!s || "ArrayBuffer" != r(t)) && (!a || a(t))
                  );
                }
              : a;
        },
        5516: (t, e, i) => {
          i = i(8240);
          t.exports = i({}.isPrototypeOf);
        },
        1352: (t, e, i) => {
          var n = i(8240),
            s = i(9606),
            a = i(4088),
            l = i(6198).indexOf,
            c = i(7153),
            u = n([].push);
          t.exports = function (t, e) {
            var i,
              n = a(t),
              o = 0,
              r = [];
            for (i in n) !s(c, i) && s(n, i) && u(r, i);
            for (; e.length > o; ) s(n, (i = e[o++])) && (~l(r, i) || u(r, i));
            return r;
          };
        },
        8779: (t, e, i) => {
          var n = i(1352),
            o = i(8684);
          t.exports =
            Object.keys ||
            function (t) {
              return n(t, o);
            };
        },
        7446: (t, e) => {
          "use strict";
          var i = {}.propertyIsEnumerable,
            n = Object.getOwnPropertyDescriptor,
            o = n && !i.call({ 1: 2 }, 1);
          e.f = o
            ? function (t) {
                t = n(this, t);
                return !!t && t.enumerable;
              }
            : i;
        },
        7530: (t, e, i) => {
          var o = i(8240),
            r = i(6112),
            s = i(1378);
          t.exports =
            Object.setPrototypeOf ||
            ("__proto__" in {}
              ? (function () {
                  var i,
                    n = !1,
                    t = {};
                  try {
                    ((i = o(
                      Object.getOwnPropertyDescriptor(
                        Object.prototype,
                        "__proto__",
                      ).set,
                    ))(t, []),
                      (n = t instanceof Array));
                  } catch (i) {}
                  return function (t, e) {
                    return (r(t), s(e), n ? i(t, e) : (t.__proto__ = e), t);
                  };
                })()
              : void 0);
        },
        999: (t, e, i) => {
          "use strict";
          var n = i(2371),
            o = i(375);
          t.exports = n
            ? {}.toString
            : function () {
                return "[object " + o(this) + "]";
              };
        },
        7999: (t, e, i) => {
          var o = i(9413),
            r = i(930),
            s = i(8759),
            a = TypeError;
          t.exports = function (t, e) {
            var i, n;
            if ("string" === e && r((i = t.toString)) && !s((n = o(i, t))))
              return n;
            if (r((i = t.valueOf)) && !s((n = o(i, t)))) return n;
            if ("string" !== e && r((i = t.toString)) && !s((n = o(i, t))))
              return n;
            throw a("Can't convert object to primitive value");
          };
        },
        6095: (t, e, i) => {
          var n = i(563),
            o = i(8240),
            r = i(62),
            s = i(6952),
            a = i(6112),
            l = o([].concat);
          t.exports =
            n("Reflect", "ownKeys") ||
            function (t) {
              var e = r.f(a(t)),
                i = s.f;
              return i ? l(e, i(t)) : e;
            };
        },
        9775: (t, e, i) => {
          i = i(2086);
          t.exports = i;
        },
        1189: (t, e, i) => {
          var n = i(9413),
            o = i(6112),
            r = i(930),
            s = i(2306),
            a = i(4861),
            l = TypeError;
          t.exports = function (t, e) {
            var i = t.exec;
            if (r(i)) {
              i = n(i, t, e);
              return (null !== i && o(i), i);
            }
            if ("RegExp" === s(t)) return n(a, t, e);
            throw l("RegExp#exec called on incompatible receiver");
          };
        },
        4861: (t, e, i) => {
          "use strict";
          var f = i(9413),
            n = i(8240),
            m = i(4059),
            g = i(4276),
            o = i(4930),
            r = i(9197),
            v = i(4710),
            b = i(3278).get,
            s = i(2582),
            i = i(2910),
            y = r("native-string-replace", String.prototype.replace),
            w = RegExp.prototype.exec,
            x = w,
            k = n("".charAt),
            C = n("".indexOf),
            P = n("".replace),
            _ = n("".slice),
            S =
              ((r = /b*/g),
              f(w, (n = /a/), "a"),
              f(w, r, "a"),
              0 !== n.lastIndex || 0 !== r.lastIndex),
            T = o.BROKEN_CARET,
            H = void 0 !== /()??/.exec("")[1];
          ((S || H || T || s || i) &&
            (x = function (t) {
              var e,
                i,
                n,
                o,
                r,
                s,
                a = this,
                l = b(a),
                c = m(t),
                u = l.raw;
              if (u)
                return (
                  (u.lastIndex = a.lastIndex),
                  (p = f(x, u, c)),
                  (a.lastIndex = u.lastIndex),
                  p
                );
              var h = l.groups,
                d = T && a.sticky,
                t = f(g, a),
                u = a.source,
                p = 0,
                l = c;
              if (
                (d &&
                  ((t = P(t, "y", "")),
                  -1 === C(t, "g") && (t += "g"),
                  (l = _(c, a.lastIndex)),
                  0 < a.lastIndex &&
                    (!a.multiline ||
                      (a.multiline && "\n" !== k(c, a.lastIndex - 1))) &&
                    ((u = "(?: " + u + ")"), (l = " " + l), p++),
                  (e = new RegExp("^(?:" + u + ")", t))),
                H && (e = new RegExp("^" + u + "$(?!\\s)", t)),
                S && (i = a.lastIndex),
                (n = f(w, d ? e : a, l)),
                d
                  ? n
                    ? ((n.input = _(n.input, p)),
                      (n[0] = _(n[0], p)),
                      (n.index = a.lastIndex),
                      (a.lastIndex += n[0].length))
                    : (a.lastIndex = 0)
                  : S &&
                    n &&
                    (a.lastIndex = a.global ? n.index + n[0].length : i),
                H &&
                  n &&
                  1 < n.length &&
                  f(y, n[0], e, function () {
                    for (o = 1; o < arguments.length - 2; o++)
                      void 0 === arguments[o] && (n[o] = void 0);
                  }),
                n && h)
              )
                for (n.groups = r = v(null), o = 0; o < h.length; o++)
                  r[(s = h[o])[0]] = n[s[1]];
              return n;
            }),
            (t.exports = x));
        },
        4276: (t, e, i) => {
          "use strict";
          var n = i(6112);
          t.exports = function () {
            var t = n(this),
              e = "";
            return (
              t.hasIndices && (e += "d"),
              t.global && (e += "g"),
              t.ignoreCase && (e += "i"),
              t.multiline && (e += "m"),
              t.dotAll && (e += "s"),
              t.unicode && (e += "u"),
              t.unicodeSets && (e += "v"),
              t.sticky && (e += "y"),
              e
            );
          };
        },
        9028: (t, e, i) => {
          var n = i(9413),
            o = i(9606),
            r = i(5516),
            s = i(4276),
            a = RegExp.prototype;
          t.exports = function (t) {
            var e = t.flags;
            return void 0 !== e || "flags" in a || o(t, "flags") || !r(a, t)
              ? e
              : n(s, t);
          };
        },
        4930: (t, e, i) => {
          var n = i(3677),
            o = i(2086).RegExp,
            r = n(function () {
              var t = o("a", "y");
              return ((t.lastIndex = 2), null != t.exec("abcd"));
            }),
            i =
              r ||
              n(function () {
                return !o("a", "y").sticky;
              }),
            n =
              r ||
              n(function () {
                var t = o("^r", "gy");
                return ((t.lastIndex = 2), null != t.exec("str"));
              });
          t.exports = { BROKEN_CARET: n, MISSED_STICKY: i, UNSUPPORTED_Y: r };
        },
        2582: (t, e, i) => {
          var n = i(3677),
            o = i(2086).RegExp;
          t.exports = n(function () {
            var t = o(".", "s");
            return !(t.dotAll && t.exec("\n") && "s" === t.flags);
          });
        },
        2910: (t, e, i) => {
          var n = i(3677),
            o = i(2086).RegExp;
          t.exports = n(function () {
            var t = o("(?<a>b)", "g");
            return (
              "b" !== t.exec("b").groups.a || "bc" !== "b".replace(t, "$<a>c")
            );
          });
        },
        9586: (t) => {
          var e = TypeError;
          t.exports = function (t) {
            if (null == t) throw e("Can't call method on " + t);
            return t;
          };
        },
        914: (t, e, i) => {
          var n = i(7826).f,
            o = i(9606),
            r = i(211)("toStringTag");
          t.exports = function (t, e, i) {
            (t = t && !i ? t.prototype : t) &&
              !o(t, r) &&
              n(t, r, { configurable: !0, value: e });
          };
        },
        8944: (t, e, i) => {
          var n = i(9197),
            o = i(5422),
            r = n("keys");
          t.exports = function (t) {
            return r[t] || (r[t] = o(t));
          };
        },
        4489: (t, e, i) => {
          var n = i(2086),
            o = i(9444),
            i = "__core-js_shared__",
            i = n[i] || o(i, {});
          t.exports = i;
        },
        9197: (t, e, i) => {
          var n = i(3296),
            o = i(4489);
          (t.exports = function (t, e) {
            return o[t] || (o[t] = void 0 !== e ? e : {});
          })("versions", []).push({
            version: "3.23.3",
            mode: n ? "pure" : "global",
            copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)",
            license: "https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",
            source: "https://github.com/zloirock/core-js",
          });
        },
        8515: (t, e, i) => {
          var n = i(6112),
            o = i(1449),
            r = i(211)("species");
          t.exports = function (t, e) {
            var i,
              t = n(t).constructor;
            return void 0 === t || null == (i = n(t)[r]) ? e : o(i);
          };
        },
        3448: (t, e, i) => {
          function n(r) {
            return function (t, e) {
              var i,
                n = a(l(t)),
                o = s(e),
                t = n.length;
              return o < 0 || t <= o
                ? r
                  ? ""
                  : void 0
                : (e = u(n, o)) < 55296 ||
                    56319 < e ||
                    o + 1 === t ||
                    (i = u(n, o + 1)) < 56320 ||
                    57343 < i
                  ? r
                    ? c(n, o)
                    : e
                  : r
                    ? h(n, o, o + 2)
                    : i - 56320 + ((e - 55296) << 10) + 65536;
            };
          }
          var o = i(8240),
            s = i(9502),
            a = i(4059),
            l = i(9586),
            c = o("".charAt),
            u = o("".charCodeAt),
            h = o("".slice);
          t.exports = { codeAt: n(!1), charAt: n(!0) };
        },
        338: (t, e, i) => {
          var n = i(9413),
            o = i(563),
            r = i(211),
            s = i(1343);
          t.exports = function () {
            var t = o("Symbol"),
              e = t && t.prototype,
              i = e && e.valueOf,
              t = r("toPrimitive");
            e &&
              !e[t] &&
              s(
                e,
                t,
                function (t) {
                  return n(i, this);
                },
                { arity: 1 },
              );
          };
        },
        7740: (t, e, i) => {
          var n = i(9502),
            o = Math.max,
            r = Math.min;
          t.exports = function (t, e) {
            t = n(t);
            return t < 0 ? o(t + e, 0) : r(t, e);
          };
        },
        4088: (t, e, i) => {
          var n = i(5974),
            o = i(9586);
          t.exports = function (t) {
            return n(o(t));
          };
        },
        9502: (t, e, i) => {
          var n = i(5681);
          t.exports = function (t) {
            t = +t;
            return t != t || 0 == t ? 0 : n(t);
          };
        },
        4005: (t, e, i) => {
          var n = i(9502),
            o = Math.min;
          t.exports = function (t) {
            return 0 < t ? o(n(t), 9007199254740991) : 0;
          };
        },
        3060: (t, e, i) => {
          var n = i(9586),
            o = Object;
          t.exports = function (t) {
            return o(n(t));
          };
        },
        1288: (t, e, i) => {
          var n = i(9413),
            o = i(8759),
            r = i(2071),
            s = i(2964),
            a = i(7999),
            i = i(211),
            l = TypeError,
            c = i("toPrimitive");
          t.exports = function (t, e) {
            if (!o(t) || r(t)) return t;
            var i = s(t, c);
            if (i) {
              if (
                ((i = n(i, t, (e = void 0 === e ? "default" : e))),
                !o(i) || r(i))
              )
                return i;
              throw l("Can't convert object to primitive value");
            }
            return a(t, (e = void 0 === e ? "number" : e));
          };
        },
        2258: (t, e, i) => {
          var n = i(1288),
            o = i(2071);
          t.exports = function (t) {
            t = n(t, "string");
            return o(t) ? t : t + "";
          };
        },
        2371: (t, e, i) => {
          var n = {};
          ((n[i(211)("toStringTag")] = "z"),
            (t.exports = "[object z]" === String(n)));
        },
        4059: (t, e, i) => {
          var n = i(375),
            o = String;
          t.exports = function (t) {
            if ("Symbol" === n(t))
              throw TypeError("Cannot convert a Symbol value to a string");
            return o(t);
          };
        },
        9268: (t) => {
          var e = String;
          t.exports = function (t) {
            try {
              return e(t);
            } catch (t) {
              return "Object";
            }
          };
        },
        5422: (t, e, i) => {
          var i = i(8240),
            n = 0,
            o = Math.random(),
            r = i((1).toString);
          t.exports = function (t) {
            return "Symbol(" + (void 0 === t ? "" : t) + ")_" + r(++n + o, 36);
          };
        },
        1876: (t, e, i) => {
          i = i(3193);
          t.exports = i && !Symbol.sham && "symbol" == typeof Symbol.iterator;
        },
        8202: (t, e, i) => {
          var n = i(5283),
            i = i(3677);
          t.exports =
            n &&
            i(function () {
              return (
                42 !=
                Object.defineProperty(function () {}, "prototype", {
                  value: 42,
                  writable: !1,
                }).prototype
              );
            });
        },
        9251: (t, e, i) => {
          i = i(211);
          e.f = i;
        },
        211: (t, e, i) => {
          var n = i(2086),
            o = i(9197),
            r = i(9606),
            s = i(5422),
            a = i(3193),
            l = i(1876),
            c = o("wks"),
            u = n.Symbol,
            h = u && u.for,
            d = l ? u : (u && u.withoutSetter) || s;
          t.exports = function (t) {
            var e;
            return (
              (r(c, t) && (a || "string" == typeof c[t])) ||
                ((e = "Symbol." + t),
                a && r(u, t) ? (c[t] = u[t]) : (c[t] = (l && h ? h : d)(e))),
              c[t]
            );
          };
        },
        3938: (t, e, i) => {
          "use strict";
          var n = i(1695),
            o = i(3677),
            c = i(6526),
            u = i(8759),
            h = i(3060),
            d = i(2871),
            p = i(7620),
            f = i(9720),
            m = i(5574),
            r = i(9955),
            s = i(211),
            i = i(1448),
            g = s("isConcatSpreadable"),
            o =
              51 <= i ||
              !o(function () {
                var t = [];
                return ((t[g] = !1), t.concat()[0] !== t);
              }),
            r = r("concat");
          n(
            { target: "Array", proto: !0, arity: 1, forced: !o || !r },
            {
              concat: function (t) {
                for (
                  var e,
                    i,
                    n,
                    o = h(this),
                    r = m(o, 0),
                    s = 0,
                    a = -1,
                    l = arguments.length;
                  a < l;
                  a++
                )
                  if (
                    (function (t) {
                      if (!u(t)) return !1;
                      var e = t[g];
                      return void 0 !== e ? !!e : c(t);
                    })((n = -1 === a ? o : arguments[a]))
                  )
                    for (i = d(n), p(s + i), e = 0; e < i; e++, s++)
                      e in n && f(r, s, n[e]);
                  else (p(s + 1), f(r, s++, n));
                return ((r.length = s), r);
              },
            },
          );
        },
        8010: (t, e, i) => {
          "use strict";
          var n = i(1695),
            o = i(8062).filter;
          n(
            { target: "Array", proto: !0, forced: !i(9955)("filter") },
            {
              filter: function (t) {
                return o(this, t, 1 < arguments.length ? arguments[1] : void 0);
              },
            },
          );
        },
        5610: (t, e, i) => {
          var n = i(1695),
            o = i(1842);
          n(
            {
              target: "Array",
              stat: !0,
              forced: !i(8939)(function (t) {
                Array.from(t);
              }),
            },
            { from: o },
          );
        },
        5769: (t, e, i) => {
          "use strict";
          var n = i(4088),
            o = i(8669),
            r = i(7719),
            s = i(3278),
            a = i(7826).f,
            l = i(8432),
            c = i(3296),
            i = i(5283),
            u = "Array Iterator",
            h = s.set,
            d = s.getterFor(u);
          t.exports = l(
            Array,
            "Array",
            function (t, e) {
              h(this, { type: u, target: n(t), index: 0, kind: e });
            },
            function () {
              var t = d(this),
                e = t.target,
                i = t.kind,
                n = t.index++;
              return !e || n >= e.length
                ? { value: (t.target = void 0), done: !0 }
                : "keys" == i
                  ? { value: n, done: !1 }
                  : "values" == i
                    ? { value: e[n], done: !1 }
                    : { value: [n, e[n]], done: !1 };
            },
            "values",
          );
          r = r.Arguments = r.Array;
          if (
            (o("keys"),
            o("values"),
            o("entries"),
            !c && i && "values" !== r.name)
          )
            try {
              a(r, "name", { value: "values" });
            } catch (t) {}
        },
        5613: (t, e, i) => {
          "use strict";
          var n = i(1695),
            o = i(8240),
            r = i(5974),
            s = i(4088),
            i = i(2802),
            a = o([].join),
            r = r != Object,
            i = i("join", ",");
          n(
            { target: "Array", proto: !0, forced: r || !i },
            {
              join: function (t) {
                return a(s(this), void 0 === t ? "," : t);
              },
            },
          );
        },
        1013: (t, e, i) => {
          "use strict";
          var n = i(1695),
            o = i(8062).map;
          n(
            { target: "Array", proto: !0, forced: !i(9955)("map") },
            {
              map: function (t) {
                return o(this, t, 1 < arguments.length ? arguments[1] : void 0);
              },
            },
          );
        },
        2410: (t, e, i) => {
          "use strict";
          var n = i(1695),
            c = i(6526),
            u = i(1956),
            h = i(8759),
            d = i(7740),
            p = i(2871),
            f = i(4088),
            m = i(9720),
            o = i(211),
            r = i(9955),
            g = i(745),
            r = r("slice"),
            v = o("species"),
            b = Array,
            y = Math.max;
          n(
            { target: "Array", proto: !0, forced: !r },
            {
              slice: function (t, e) {
                var i,
                  n,
                  o,
                  r = f(this),
                  s = p(r),
                  a = d(t, s),
                  l = d(void 0 === e ? s : e, s);
                if (
                  c(r) &&
                  ((i = r.constructor),
                  (i =
                    (u(i) && (i === b || c(i.prototype))) ||
                    (h(i) && null === (i = i[v]))
                      ? void 0
                      : i) === b || void 0 === i)
                )
                  return g(r, a, l);
                for (
                  n = new (void 0 === i ? b : i)(y(l - a, 0)), o = 0;
                  a < l;
                  a++, o++
                )
                  a in r && m(n, o, r[a]);
                return ((n.length = o), n);
              },
            },
          );
        },
        3352: (t, e, i) => {
          var n = i(5283),
            o = i(4398).EXISTS,
            r = i(8240),
            s = i(7826).f,
            i = Function.prototype,
            a = r(i.toString),
            l =
              /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,
            c = r(l.exec);
          n &&
            !o &&
            s(i, "name", {
              configurable: !0,
              get: function () {
                try {
                  return c(l, a(this))[1];
                } catch (t) {
                  return "";
                }
              },
            });
        },
        5735: (t, e, i) => {
          function o(t, e) {
            var i = m(arguments),
              n = e;
            if ((p(e) || void 0 !== t) && !f(t))
              return (
                h(e) ||
                  (e = function (t, e) {
                    if ((d(n) && (e = l(n, this, t, e)), !f(e))) return e;
                  }),
                (i[1] = e),
                a(g, null, i)
              );
          }
          function r(t, e, i) {
            var n = b(i, e - 1),
              e = b(i, e + 1);
            return (v(C, t) && !v(P, e)) || (v(P, t) && !v(C, n))
              ? "\\u" + x(y(t, 0), 16)
              : t;
          }
          var n = i(1695),
            s = i(563),
            a = i(7258),
            l = i(9413),
            c = i(8240),
            u = i(3677),
            h = i(6526),
            d = i(930),
            p = i(8759),
            f = i(2071),
            m = i(745),
            i = i(3193),
            g = s("JSON", "stringify"),
            v = c(/./.exec),
            b = c("".charAt),
            y = c("".charCodeAt),
            w = c("".replace),
            x = c((1).toString),
            k = /[\uD800-\uDFFF]/g,
            C = /^[\uD800-\uDBFF]$/,
            P = /^[\uDC00-\uDFFF]$/,
            _ =
              !i ||
              u(function () {
                var t = s("Symbol")();
                return (
                  "[null]" != g([t]) ||
                  "{}" != g({ a: t }) ||
                  "{}" != g(Object(t))
                );
              }),
            S = u(function () {
              return (
                '"\\udf06\\ud834"' !== g("\udf06\ud834") ||
                '"\\udead"' !== g("\udead")
              );
            });
          g &&
            n(
              { target: "JSON", stat: !0, arity: 3, forced: _ || S },
              {
                stringify: function (t, e, i) {
                  var n = m(arguments),
                    n = a(_ ? o : g, null, n);
                  return S && "string" == typeof n ? w(n, k, r) : n;
                },
              },
            );
        },
        8410: (t, e, i) => {
          var n = i(1695),
            i = i(8675);
          n(
            {
              target: "Object",
              stat: !0,
              arity: 2,
              forced: Object.assign !== i,
            },
            { assign: i },
          );
        },
        4844: (t, e, i) => {
          var n = i(1695),
            o = i(6910),
            r = i(3677),
            s = i(8759),
            a = i(2423).onFreeze,
            l = Object.freeze;
          n(
            {
              target: "Object",
              stat: !0,
              forced: r(function () {
                l(1);
              }),
              sham: !o,
            },
            {
              freeze: function (t) {
                return l && s(t) ? l(a(t)) : t;
              },
            },
          );
        },
        252: (t, e, i) => {
          var n = i(1695),
            o = i(3677),
            r = i(4088),
            s = i(4399).f,
            i = i(5283),
            o = o(function () {
              s(1);
            });
          n(
            { target: "Object", stat: !0, forced: !i || o, sham: !i },
            {
              getOwnPropertyDescriptor: function (t, e) {
                return s(r(t), e);
              },
            },
          );
        },
        4009: (t, e, i) => {
          var n = i(1695),
            o = i(5283),
            l = i(6095),
            c = i(4088),
            u = i(4399),
            h = i(9720);
          n(
            { target: "Object", stat: !0, sham: !o },
            {
              getOwnPropertyDescriptors: function (t) {
                for (
                  var e, i, n = c(t), o = u.f, r = l(n), s = {}, a = 0;
                  r.length > a;
                )
                  void 0 !== (i = o(n, (e = r[a++]))) && h(s, e, i);
                return s;
              },
            },
          );
        },
        883: (t, e, i) => {
          var n = i(1695),
            o = i(3193),
            r = i(3677),
            s = i(6952),
            a = i(3060);
          n(
            {
              target: "Object",
              stat: !0,
              forced:
                !o ||
                r(function () {
                  s.f(1);
                }),
            },
            {
              getOwnPropertySymbols: function (t) {
                var e = s.f;
                return e ? e(a(t)) : [];
              },
            },
          );
        },
        2274: (t, e, i) => {
          var n = i(1695),
            o = i(3677),
            r = i(3060),
            s = i(2130),
            i = i(7209);
          n(
            {
              target: "Object",
              stat: !0,
              forced: o(function () {
                s(1);
              }),
              sham: !i,
            },
            {
              getPrototypeOf: function (t) {
                return s(r(t));
              },
            },
          );
        },
        2571: (t, e, i) => {
          var n = i(1695),
            o = i(3060),
            r = i(8779);
          n(
            {
              target: "Object",
              stat: !0,
              forced: i(3677)(function () {
                r(1);
              }),
            },
            {
              keys: function (t) {
                return r(o(t));
              },
            },
          );
        },
        3238: (t, e, i) => {
          var n = i(2371),
            o = i(1343),
            i = i(999);
          n || o(Object.prototype, "toString", i, { unsafe: !0 });
        },
        3214: (t, e, i) => {
          var n = i(1695),
            o = i(563),
            r = i(7258),
            s = i(2395),
            a = i(1449),
            l = i(6112),
            c = i(8759),
            u = i(4710),
            i = i(3677),
            h = o("Reflect", "construct"),
            d = Object.prototype,
            p = [].push,
            f = i(function () {
              function t() {}
              return !(h(function () {}, [], t) instanceof t);
            }),
            m = !i(function () {
              h(function () {});
            }),
            i = f || m;
          n(
            { target: "Reflect", stat: !0, forced: i, sham: i },
            {
              construct: function (t, e) {
                (a(t), l(e));
                var i = arguments.length < 3 ? t : a(arguments[2]);
                if (m && !f) return h(t, e, i);
                if (t == i) {
                  switch (e.length) {
                    case 0:
                      return new t();
                    case 1:
                      return new t(e[0]);
                    case 2:
                      return new t(e[0], e[1]);
                    case 3:
                      return new t(e[0], e[1], e[2]);
                    case 4:
                      return new t(e[0], e[1], e[2], e[3]);
                  }
                  var n = [null];
                  return (r(p, n, e), new (r(s, t, n))());
                }
                ((n = i.prototype), (i = u(c(n) ? n : d)), (n = r(t, i, e)));
                return c(n) ? n : i;
              },
            },
          );
        },
        2077: (t, e, i) => {
          "use strict";
          var n = i(1695),
            i = i(4861);
          n(
            { target: "RegExp", proto: !0, forced: /./.exec !== i },
            { exec: i },
          );
        },
        895: (t, e, i) => {
          "use strict";
          var n = i(4398).PROPER,
            o = i(1343),
            r = i(6112),
            s = i(4059),
            a = i(3677),
            l = i(9028),
            i = "toString",
            c = RegExp.prototype[i],
            a = a(function () {
              return "/a/b" != c.call({ source: "a", flags: "b" });
            }),
            n = n && c.name != i;
          (a || n) &&
            o(
              RegExp.prototype,
              i,
              function () {
                var t = r(this);
                return "/" + s(t.source) + "/" + s(l(t));
              },
              { unsafe: !0 },
            );
        },
        7460: (t, e, i) => {
          "use strict";
          var n = i(3448).charAt,
            o = i(4059),
            r = i(3278),
            i = i(8432),
            s = "String Iterator",
            a = r.set,
            l = r.getterFor(s);
          i(
            String,
            "String",
            function (t) {
              a(this, { type: s, string: o(t), index: 0 });
            },
            function () {
              var t = l(this),
                e = t.string,
                i = t.index;
              return i >= e.length
                ? { value: void 0, done: !0 }
                : ((i = n(e, i)),
                  (t.index += i.length),
                  { value: i, done: !1 });
            },
          );
        },
        911: (t, e, i) => {
          "use strict";
          var k = i(7258),
            o = i(9413),
            n = i(8240),
            r = i(2331),
            s = i(3677),
            C = i(6112),
            P = i(930),
            _ = i(9502),
            S = i(4005),
            T = i(4059),
            a = i(9586),
            H = i(9966),
            l = i(2964),
            I = i(8509),
            E = i(1189),
            c = i(211)("replace"),
            D = Math.max,
            A = Math.min,
            M = n([].concat),
            L = n([].push),
            O = n("".indexOf),
            B = n("".slice),
            n = "$0" === "a".replace(/./, "$0"),
            u = !!/./[c] && "" === /./[c]("a", "$0");
          r(
            "replace",
            function (t, y, w) {
              var x = u ? "$" : "$0";
              return [
                function (t, e) {
                  var i = a(this),
                    n = null == t ? void 0 : l(t, c);
                  return n ? o(n, t, i, e) : o(y, T(i), t, e);
                },
                function (t, e) {
                  var i = C(this),
                    n = T(t);
                  if (
                    "string" == typeof e &&
                    -1 === O(e, x) &&
                    -1 === O(e, "$<")
                  ) {
                    t = w(y, i, n, e);
                    if (t.done) return t.value;
                  }
                  var o = P(e);
                  o || (e = T(e));
                  var r,
                    s = i.global;
                  s && ((r = i.unicode), (i.lastIndex = 0));
                  for (var a = []; ; ) {
                    var l = E(i, n);
                    if (null === l) break;
                    if ((L(a, l), !s)) break;
                    "" === T(l[0]) && (i.lastIndex = H(n, S(i.lastIndex), r));
                  }
                  for (var c, u = "", h = 0, d = 0; d < a.length; d++) {
                    for (
                      var p = T((l = a[d])[0]),
                        f = D(A(_(l.index), n.length), 0),
                        m = [],
                        g = 1;
                      g < l.length;
                      g++
                    )
                      L(m, void 0 === (c = l[g]) ? c : String(c));
                    var v,
                      b = l.groups,
                      b = o
                        ? ((v = M([p], m, f, n)),
                          void 0 !== b && L(v, b),
                          T(k(e, void 0, v)))
                        : I(p, n, f, m, b, e);
                    h <= f && ((u += B(n, h, f) + b), (h = f + p.length));
                  }
                  return u + B(n, h);
                },
              ];
            },
            !!s(function () {
              var t = /./;
              return (
                (t.exec = function () {
                  var t = [];
                  return ((t.groups = { a: "7" }), t);
                }),
                "7" !== "".replace(t, "$<a>")
              );
            }) ||
              !n ||
              u,
          );
        },
        2482: (t, e, i) => {
          "use strict";
          var u = i(7258),
            h = i(9413),
            n = i(8240),
            o = i(2331),
            d = i(7994),
            v = i(6112),
            p = i(9586),
            b = i(8515),
            y = i(9966),
            w = i(4005),
            x = i(4059),
            r = i(2964),
            k = i(3329),
            C = i(1189),
            P = i(4861),
            s = i(4930),
            i = i(3677),
            _ = s.UNSUPPORTED_Y,
            S = Math.min,
            T = [].push,
            H = n(/./.exec),
            I = n(T),
            E = n("".slice);
          o(
            "split",
            function (o, f, m) {
              var g =
                "c" == "abbc".split(/(b)*/)[1] ||
                4 != "test".split(/(?:)/, -1).length ||
                2 != "ab".split(/(?:ab)*/).length ||
                4 != ".".split(/(.?)(.?)/).length ||
                1 < ".".split(/()()/).length ||
                "".split(/.?/).length
                  ? function (t, e) {
                      var i = x(p(this)),
                        n = void 0 === e ? 4294967295 : e >>> 0;
                      if (0 == n) return [];
                      if (void 0 === t) return [i];
                      if (!d(t)) return h(f, i, t, n);
                      for (
                        var o,
                          r,
                          s,
                          a = [],
                          e =
                            (t.ignoreCase ? "i" : "") +
                            (t.multiline ? "m" : "") +
                            (t.unicode ? "u" : "") +
                            (t.sticky ? "y" : ""),
                          l = 0,
                          c = new RegExp(t.source, e + "g");
                        (o = h(P, c, i)) &&
                        !(
                          (r = c.lastIndex) > l &&
                          (I(a, E(i, l, o.index)),
                          1 < o.length &&
                            o.index < i.length &&
                            u(T, a, k(o, 1)),
                          (s = o[0].length),
                          (l = r),
                          n <= a.length)
                        );
                      )
                        c.lastIndex === o.index && c.lastIndex++;
                      return (
                        l === i.length
                          ? (!s && H(c, "")) || I(a, "")
                          : I(a, E(i, l)),
                        n < a.length ? k(a, 0, n) : a
                      );
                    }
                  : "0".split(void 0, 0).length
                    ? function (t, e) {
                        return void 0 === t && 0 === e ? [] : h(f, this, t, e);
                      }
                    : f;
              return [
                function (t, e) {
                  var i = p(this),
                    n = null == t ? void 0 : r(t, o);
                  return n ? h(n, t, i, e) : h(g, x(i), t, e);
                },
                function (t, e) {
                  var i = v(this),
                    n = x(t),
                    o = m(g, i, n, e, g !== f);
                  if (o.done) return o.value;
                  var t = b(i, RegExp),
                    r = i.unicode,
                    o =
                      (i.ignoreCase ? "i" : "") +
                      (i.multiline ? "m" : "") +
                      (i.unicode ? "u" : "") +
                      (_ ? "g" : "y"),
                    s = new t(_ ? "^(?:" + i.source + ")" : i, o),
                    a = void 0 === e ? 4294967295 : e >>> 0;
                  if (0 == a) return [];
                  if (0 === n.length) return null === C(s, n) ? [n] : [];
                  for (var l = 0, c = 0, u = []; c < n.length; ) {
                    s.lastIndex = _ ? 0 : c;
                    var h,
                      d = C(s, _ ? E(n, c) : n);
                    if (
                      null === d ||
                      (h = S(w(s.lastIndex + (_ ? c : 0)), n.length)) === l
                    )
                      c = y(n, c, r);
                    else {
                      if ((I(u, E(n, l, c)), u.length === a)) return u;
                      for (var p = 1; p <= d.length - 1; p++)
                        if ((I(u, d[p]), u.length === a)) return u;
                      c = l = h;
                    }
                  }
                  return (I(u, E(n, l)), u);
                },
              ];
            },
            !!i(function () {
              var t = /(?:)/,
                e = t.exec;
              t.exec = function () {
                return e.apply(this, arguments);
              };
              t = "ab".split(t);
              return 2 !== t.length || "a" !== t[0] || "b" !== t[1];
            }),
            _,
          );
        },
        4211: (t, e, i) => {
          "use strict";
          function n(t, e) {
            var i = (ot[t] = _(K));
            return (
              Y(i, { type: Q, tag: t, description: e }),
              m || (i.description = e),
              i
            );
          }
          function o(t, e, i) {
            return (
              t === X && o(rt, e, i),
              w(t),
              (e = k(e)),
              w(i),
              b(ot, e)
                ? (i.enumerable
                    ? (b(t, U) && t[U][e] && (t[U][e] = !1),
                      (i = _(i, { enumerable: P(0, !1) })))
                    : (b(t, U) || tt(t, U, P(1, {})), (t[U][e] = !0)),
                  at(t, e, i))
                : tt(t, e, i)
            );
          }
          function r(e, t) {
            w(e);
            var i = x(t),
              t = S(i).concat(c(i));
            return (
              V(t, function (t) {
                (m && !d(s, i, t)) || o(e, t, i[t]);
              }),
              e
            );
          }
          function s(t) {
            var e = k(t),
              t = d(it, this, e);
            return (
              !(this === X && b(ot, e) && !b(rt, e)) &&
              (!(t || !b(this, e) || !b(ot, e) || (b(this, U) && this[U][e])) ||
                t)
            );
          }
          function a(t, e) {
            var i = x(t),
              t = k(e);
            if (i !== X || !b(ot, t) || b(rt, t)) {
              e = Z(i, t);
              return (
                !e || !b(ot, t) || (b(i, U) && i[U][t]) || (e.enumerable = !0),
                e
              );
            }
          }
          function l(t) {
            var t = et(x(t)),
              e = [];
            return (
              V(t, function (t) {
                b(ot, t) || b($, t) || nt(e, t);
              }),
              e
            );
          }
          function c(t) {
            var e = t === X,
              t = et(e ? rt : x(t)),
              i = [];
            return (
              V(t, function (t) {
                !b(ot, t) || (e && !b(X, t)) || nt(i, ot[t]);
              }),
              i
            );
          }
          var u = i(1695),
            h = i(2086),
            d = i(9413),
            p = i(8240),
            f = i(3296),
            m = i(5283),
            g = i(3193),
            v = i(3677),
            b = i(9606),
            y = i(5516),
            w = i(6112),
            x = i(4088),
            k = i(2258),
            C = i(4059),
            P = i(5736),
            _ = i(4710),
            S = i(8779),
            T = i(62),
            H = i(3226),
            I = i(6952),
            E = i(4399),
            D = i(7826),
            A = i(7711),
            M = i(7446),
            L = i(1343),
            O = i(9197),
            B = i(8944),
            $ = i(7153),
            N = i(5422),
            R = i(211),
            F = i(9251),
            j = i(4145),
            z = i(338),
            W = i(914),
            q = i(3278),
            V = i(8062).forEach,
            U = B("hidden"),
            Q = "Symbol",
            B = "prototype",
            Y = q.set,
            G = q.getterFor(Q),
            X = Object[B],
            q = h.Symbol,
            K = q && q[B],
            J = h.TypeError,
            h = h.QObject,
            Z = E.f,
            tt = D.f,
            et = H.f,
            it = M.f,
            nt = p([].push),
            ot = O("symbols"),
            rt = O("op-symbols"),
            O = O("wks"),
            st = !h || !h[B] || !h[B].findChild,
            at =
              m &&
              v(function () {
                return (
                  7 !=
                  _(
                    tt({}, "a", {
                      get: function () {
                        return tt(this, "a", { value: 7 }).a;
                      },
                    }),
                  ).a
                );
              })
                ? function (t, e, i) {
                    var n = Z(X, e);
                    (n && delete X[e],
                      tt(t, e, i),
                      n && t !== X && tt(X, e, n));
                  }
                : tt;
          (g ||
            (L(
              (K = (q = function () {
                if (y(K, this)) throw J("Symbol is not a constructor");
                var t =
                    arguments.length && void 0 !== arguments[0]
                      ? C(arguments[0])
                      : void 0,
                  e = N(t),
                  i = function (t) {
                    (this === X && d(i, rt, t),
                      b(this, U) && b(this[U], e) && (this[U][e] = !1),
                      at(this, e, P(1, t)));
                  };
                return (
                  m && st && at(X, e, { configurable: !0, set: i }),
                  n(e, t)
                );
              })[B]),
              "toString",
              function () {
                return G(this).tag;
              },
            ),
            L(q, "withoutSetter", function (t) {
              return n(N(t), t);
            }),
            (M.f = s),
            (D.f = o),
            (A.f = r),
            (E.f = a),
            (T.f = H.f = l),
            (I.f = c),
            (F.f = function (t) {
              return n(R(t), t);
            }),
            m &&
              (tt(K, "description", {
                configurable: !0,
                get: function () {
                  return G(this).description;
                },
              }),
              f || L(X, "propertyIsEnumerable", s, { unsafe: !0 }))),
            u(
              { global: !0, constructor: !0, wrap: !0, forced: !g, sham: !g },
              { Symbol: q },
            ),
            V(S(O), function (t) {
              j(t);
            }),
            u(
              { target: Q, stat: !0, forced: !g },
              {
                useSetter: function () {
                  st = !0;
                },
                useSimple: function () {
                  st = !1;
                },
              },
            ),
            u(
              { target: "Object", stat: !0, forced: !g, sham: !m },
              {
                create: function (t, e) {
                  return void 0 === e ? _(t) : r(_(t), e);
                },
                defineProperty: o,
                defineProperties: r,
                getOwnPropertyDescriptor: a,
              },
            ),
            u(
              { target: "Object", stat: !0, forced: !g },
              { getOwnPropertyNames: l },
            ),
            z(),
            W(q, Q),
            ($[U] = !0));
        },
        2189: (t, e, i) => {
          "use strict";
          var n,
            o,
            r,
            s,
            a,
            l,
            c,
            u = i(1695),
            h = i(5283),
            d = i(2086),
            p = i(8240),
            f = i(9606),
            m = i(930),
            g = i(5516),
            v = i(4059),
            b = i(7826).f,
            i = i(8474),
            y = d.Symbol,
            w = y && y.prototype;
          !h ||
            !m(y) ||
            ("description" in w && void 0 === y().description) ||
            ((n = {}),
            i(
              (i = function () {
                var t =
                    arguments.length < 1 || void 0 === arguments[0]
                      ? void 0
                      : v(arguments[0]),
                  e = g(w, this) ? new y(t) : void 0 === t ? y() : y(t);
                return ("" === t && (n[e] = !0), e);
              }),
              y,
            ),
            ((i.prototype = w).constructor = i),
            (o = "Symbol(test)" == String(y("test"))),
            (r = p(w.toString)),
            (s = p(w.valueOf)),
            (a = /^Symbol\((.*)\)[^)]+$/),
            (l = p("".replace)),
            (c = p("".slice)),
            b(w, "description", {
              configurable: !0,
              get: function () {
                var t = s(this),
                  e = r(t);
                if (f(n, t)) return "";
                e = o ? c(e, 7, -1) : l(e, a, "$1");
                return "" === e ? void 0 : e;
              },
            }),
            u({ global: !0, constructor: !0, forced: !0 }, { Symbol: i }));
        },
        8028: (t, e, i) => {
          var n = i(1695),
            o = i(563),
            r = i(9606),
            s = i(4059),
            a = i(9197),
            i = i(3441),
            l = a("string-to-symbol-registry"),
            c = a("symbol-to-string-registry");
          n(
            { target: "Symbol", stat: !0, forced: !i },
            {
              for: function (t) {
                var e = s(t);
                if (r(l, e)) return l[e];
                t = o("Symbol")(e);
                return ((l[e] = t), (c[t] = e), t);
              },
            },
          );
        },
        1047: (t, e, i) => {
          i(4145)("iterator");
        },
        5901: (t, e, i) => {
          (i(4211), i(8028), i(9819), i(5735), i(883));
        },
        9819: (t, e, i) => {
          var n = i(1695),
            o = i(9606),
            r = i(2071),
            s = i(9268),
            a = i(9197),
            i = i(3441),
            l = a("symbol-to-string-registry");
          n(
            { target: "Symbol", stat: !0, forced: !i },
            {
              keyFor: function (t) {
                if (!r(t)) throw TypeError(s(t) + " is not a symbol");
                if (o(l, t)) return l[t];
              },
            },
          );
        },
        5849: (t, e, i) => {
          function n(e) {
            if (e && e.forEach !== l)
              try {
                c(e, "forEach", l);
              } catch (t) {
                e.forEach = l;
              }
          }
          var o,
            r = i(2086),
            s = i(933),
            a = i(3526),
            l = i(1984),
            c = i(2585);
          for (o in s) s[o] && n(r[o] && r[o].prototype);
          n(a);
        },
        4078: (t, e, i) => {
          function n(t, e) {
            if (t) {
              if (t[u] !== d)
                try {
                  c(t, u, d);
                } catch (e) {
                  t[u] = d;
                }
              if ((t[h] || c(t, h, e), s[e]))
                for (var i in l)
                  if (t[i] !== l[i])
                    try {
                      c(t, i, l[i]);
                    } catch (e) {
                      t[i] = l[i];
                    }
            }
          }
          var o,
            r = i(2086),
            s = i(933),
            a = i(3526),
            l = i(5769),
            c = i(2585),
            i = i(211),
            u = i("iterator"),
            h = i("toStringTag"),
            d = l.values;
          for (o in s) n(r[o] && r[o].prototype, o);
          n(a, "DOMTokenList");
        },
        2062: () => {
          var l = function (t) {
            return ((t = +t), isNaN(t) || t == 1 / 0 || t == -1 / 0 ? 0 : t);
          };
          (Element.prototype.scroll ||
            (Element.prototype.scroll = function () {
              var t,
                e = arguments.length,
                i = this.ownerDocument,
                n = i.defaultView,
                o = "BackCompat" == i.compatMode,
                r = document.getElementsByTagName("BODY")[0],
                s = {};
              if (i == window.document && n && 0 !== e) {
                if (1 === e) {
                  var a = arguments[0];
                  if ("object" != typeof a)
                    throw "Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.";
                  ("left" in a && (s.left = l(a.left)),
                    "top" in a && (s.top = l(a.top)),
                    (t = "left" in s ? s.left : this.scrollLeft),
                    (a = "top" in s ? s.top : this.scrollTop));
                } else
                  ((s.left = t = l(arguments[0])),
                    (s.top = a = l(arguments[1])));
                this != document.documentElement
                  ? this != r ||
                    !o ||
                    (function (t) {
                      t = r || document.getElementsByTagName("BODY")[0];
                      var e = window.getComputedStyle(t),
                        i = window.getComputedStyle(t.parent),
                        n = e.overflowX,
                        o = e.overflowY,
                        t = i.overflowX,
                        i = i.overflowY;
                      return (
                        ("table-column" == e.display ||
                          "table-column-group" == e.display) &&
                        "visible" != t &&
                        "clip" != t &&
                        "visible" != i &&
                        "clip" != i &&
                        "visible" != n &&
                        "clip" != n &&
                        "visible" != o &&
                        "clip" != o
                      );
                    })()
                    ? ((this.scrollLeft = t), (this.scrollTop = a))
                    : n.scroll(s.left, s.top)
                  : o ||
                    n.scroll(
                      "scrollX" in n
                        ? n.scrollX
                        : "pageXOffset" in n
                          ? n.pageXOffset
                          : this.scrollLeft,
                      a,
                    );
              }
            }),
            Element.prototype.scrollTo ||
              (Element.prototype.scrollTo = Element.prototype.scroll),
            Element.prototype.scrollBy ||
              (Element.prototype.scrollBy = function () {
                var t = arguments.length,
                  e = {};
                if (0 !== t) {
                  if (1 === t) {
                    t = arguments[0];
                    if ("object" != typeof t)
                      throw "Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.";
                    ("left" in t && (e.left = l(t.left)),
                      "top" in t && (e.top = l(t.top)));
                  } else
                    ((e.left = l(arguments[0])), (e.top = l(arguments[1])));
                  ((e.left =
                    "left" in e ? e.left + this.scrollLeft : this.scrollLeft),
                    (e.top =
                      "top" in e ? e.top + this.scrollTop : this.scrollTop),
                    this.scroll(e));
                }
              }));
        },
        7190: (t) => {
          t.exports = function (t) {
            return (
              !(!t || "string" == typeof t) &&
              (t instanceof Array ||
                Array.isArray(t) ||
                (0 <= t.length &&
                  (t.splice instanceof Function ||
                    (Object.getOwnPropertyDescriptor(t, t.length - 1) &&
                      "String" !== t.constructor.name))))
            );
          };
        },
        7159: (t, e, i) => {
          var n = [i(5998)];
          void 0 ===
            (i =
              "function" ==
              typeof (i = function (d) {
                function s(t) {
                  this.init(t);
                }
                ((s.prototype = {
                  value: 0,
                  size: 100,
                  startAngle: -Math.PI,
                  thickness: "auto",
                  fill: { gradient: ["#3aeabb", "#fdd250"] },
                  emptyFill: "rgba(0, 0, 0, .1)",
                  animation: { duration: 1200, easing: "circleProgressEasing" },
                  animationStartValue: 0,
                  reverse: !1,
                  lineCap: "butt",
                  insertMode: "prepend",
                  constructor: s,
                  el: null,
                  canvas: null,
                  ctx: null,
                  radius: 0,
                  arcFill: null,
                  lastFrameValue: 0,
                  init: function (t) {
                    (d.extend(this, t),
                      (this.radius = this.size / 2),
                      this.initWidget(),
                      this.initFill(),
                      this.draw(),
                      this.el.trigger("circle-inited"));
                  },
                  initWidget: function () {
                    this.canvas ||
                      (this.canvas = d("<canvas>")[
                        "prepend" == this.insertMode ? "prependTo" : "appendTo"
                      ](this.el)[0]);
                    var t,
                      e = this.canvas;
                    ((e.width = this.size),
                      (e.height = this.size),
                      (this.ctx = e.getContext("2d")),
                      1 < window.devicePixelRatio &&
                        ((t = window.devicePixelRatio),
                        (e.style.width = e.style.height = this.size + "px"),
                        (e.width = e.height = this.size * t),
                        this.ctx.scale(t, t)));
                  },
                  initFill: function () {
                    var e,
                      i = this,
                      t = this.fill,
                      n = this.ctx,
                      o = this.size;
                    if (!t) throw Error("The fill is not specified!");
                    if (
                      ((t = "string" == typeof t ? { color: t } : t).color &&
                        (this.arcFill = t.color),
                      t.gradient)
                    ) {
                      var r = t.gradient;
                      if (1 == r.length) this.arcFill = r[0];
                      else if (1 < r.length) {
                        for (
                          var s = t.gradientAngle || 0,
                            s = t.gradientDirection || [
                              (o / 2) * (1 - Math.cos(s)),
                              (o / 2) * (1 + Math.sin(s)),
                              (o / 2) * (1 + Math.cos(s)),
                              (o / 2) * (1 - Math.sin(s)),
                            ],
                            a = n.createLinearGradient.apply(n, s),
                            l = 0;
                          l < r.length;
                          l++
                        ) {
                          var c = r[l],
                            u = l / (r.length - 1);
                          (d.isArray(c) && ((u = c[1]), (c = c[0])),
                            a.addColorStop(u, c));
                        }
                        this.arcFill = a;
                      }
                    }
                    function h() {
                      var t = d("<canvas>")[0];
                      ((t.width = i.size),
                        (t.height = i.size),
                        t.getContext("2d").drawImage(e, 0, 0, o, o),
                        (i.arcFill = i.ctx.createPattern(t, "no-repeat")),
                        i.drawFrame(i.lastFrameValue));
                    }
                    t.image &&
                      (t.image instanceof Image
                        ? (e = t.image)
                        : ((e = new Image()).src = t.image),
                      e.complete ? h() : (e.onload = h));
                  },
                  draw: function () {
                    this.animation
                      ? this.drawAnimated(this.value)
                      : this.drawFrame(this.value);
                  },
                  drawFrame: function (t) {
                    ((this.lastFrameValue = t),
                      this.ctx.clearRect(0, 0, this.size, this.size),
                      this.drawEmptyArc(t),
                      this.drawArc(t));
                  },
                  drawArc: function (t) {
                    var e, i, n, o;
                    0 !== t &&
                      ((e = this.ctx),
                      (i = this.radius),
                      (n = this.getThickness()),
                      (o = this.startAngle),
                      e.save(),
                      e.beginPath(),
                      this.reverse
                        ? e.arc(i, i, i - n / 2, o - 2 * Math.PI * t, o)
                        : e.arc(i, i, i - n / 2, o, o + 2 * Math.PI * t),
                      (e.lineWidth = n),
                      (e.lineCap = this.lineCap),
                      (e.strokeStyle = this.arcFill),
                      e.stroke(),
                      e.restore());
                  },
                  drawEmptyArc: function (t) {
                    var e = this.ctx,
                      i = this.radius,
                      n = this.getThickness(),
                      o = this.startAngle;
                    t < 1 &&
                      (e.save(),
                      e.beginPath(),
                      t <= 0
                        ? e.arc(i, i, i - n / 2, 0, 2 * Math.PI)
                        : this.reverse
                          ? e.arc(i, i, i - n / 2, o, o - 2 * Math.PI * t)
                          : e.arc(i, i, i - n / 2, o + 2 * Math.PI * t, o),
                      (e.lineWidth = n),
                      (e.strokeStyle = this.emptyFill),
                      e.stroke(),
                      e.restore());
                  },
                  drawAnimated: function (i) {
                    var n = this,
                      o = this.el,
                      t = d(this.canvas);
                    (t.stop(!0, !1),
                      o.trigger("circle-animation-start"),
                      t
                        .css({ animationProgress: 0 })
                        .animate(
                          { animationProgress: 1 },
                          d.extend({}, this.animation, {
                            step: function (t) {
                              var e = n.animationStartValue * (1 - t) + i * t;
                              (n.drawFrame(e),
                                o.trigger("circle-animation-progress", [t, e]));
                            },
                          }),
                        )
                        .promise()
                        .always(function () {
                          o.trigger("circle-animation-end");
                        }));
                  },
                  getThickness: function () {
                    return d.isNumeric(this.thickness)
                      ? this.thickness
                      : this.size / 14;
                  },
                  getValue: function () {
                    return this.value;
                  },
                  setValue: function (t) {
                    (this.animation &&
                      (this.animationStartValue = this.lastFrameValue),
                      (this.value = t),
                      this.draw());
                  },
                }),
                  (d.circleProgress = { defaults: s.prototype }),
                  (d.easing.circleProgressEasing = function (t) {
                    return t < 0.5
                      ? 0.5 * (t *= 2) * t * t
                      : 1 - 0.5 * (t = 2 - 2 * t) * t * t;
                  }),
                  (d.fn.circleProgress = function (o, t) {
                    var r = "circle-progress",
                      e = this.data(r);
                    if ("widget" == o) {
                      if (!e)
                        throw Error(
                          'Calling "widget" method on not initialized instance is forbidden',
                        );
                      return e.canvas;
                    }
                    if ("value" != o)
                      return this.each(function () {
                        var t,
                          e = d(this),
                          i = e.data(r),
                          n = d.isPlainObject(o) ? o : {};
                        i
                          ? i.init(n)
                          : ("string" ==
                              typeof (t = d.extend({}, e.data())).fill &&
                              (t.fill = JSON.parse(t.fill)),
                            "string" == typeof t.animation &&
                              (t.animation = JSON.parse(t.animation)),
                            ((n = d.extend(t, n)).el = e),
                            (i = new s(n)),
                            e.data(r, i));
                      });
                    if (!e)
                      throw Error(
                        'Calling "value" method on not initialized instance is forbidden',
                      );
                    if (void 0 === t) return e.getValue();
                    var i = t;
                    return this.each(function () {
                      d(this).data(r).setValue(i);
                    });
                  }));
              })
                ? i.apply(e, n)
                : i) || (t.exports = i);
        },
        521: (t, e, i) => {
          "use strict";
          var r = i(7190),
            s = Array.prototype.concat,
            a = Array.prototype.slice,
            n = (t.exports = function (t) {
              for (var e = [], i = 0, n = t.length; i < n; i++) {
                var o = t[i];
                r(o) ? (e = s.call(e, a.call(o))) : e.push(o);
              }
              return e;
            });
          n.wrap = function (t) {
            return function () {
              return t(n(arguments));
            };
          };
        },
        5998: (t) => {
          "use strict";
          t.exports = H5P.jQuery;
        },
      },
      n = {};
    function X(t) {
      var e = n[t];
      if (void 0 !== e) return e.exports;
      e = n[t] = { exports: {} };
      return (i[t](e, e.exports, X), e.exports);
    }
    ((X.n = (t) => {
      var e = t && t.__esModule ? () => t.default : () => t;
      return (X.d(e, { a: e }), e);
    }),
      (X.d = (t, e) => {
        for (var i in e)
          X.o(e, i) &&
            !X.o(t, i) &&
            Object.defineProperty(t, i, { enumerable: !0, get: e[i] });
      }),
      (X.g = (function () {
        if ("object" == typeof globalThis) return globalThis;
        try {
          return this || new Function("return this")();
        } catch (t) {
          if ("object" == typeof window) return window;
        }
      })()),
      (X.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)),
      (() => {
        "use strict";
        function t(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        (X(3214),
          X(8410),
          X(2571),
          X(5901),
          X(252),
          X(4009),
          X(2189),
          X(1047),
          X(5769),
          X(7460),
          X(4078),
          X(3238),
          X(5849),
          X(1013),
          X(8010),
          X(3938),
          X(2410),
          X(2077),
          X(911),
          X(2274),
          X(2482),
          X(5613),
          X(895));
        const h =
          ((G = e),
          (i = [
            {
              key: "extractFragmentsFromURL",
              value: function (t, e) {
                if (!e.location.hash) return {};
                var i = {};
                return (
                  e.location.hash
                    .replace("#", "")
                    .split("&")
                    .forEach(function (t) {
                      -1 !== t.indexOf("=") &&
                        ((t = t.split("=")), (i[t[0]] = t[1]));
                    }),
                  "function" != typeof t || t(i) ? i : {}
                );
              },
            },
            {
              key: "createFragmentsString",
              value: function (t) {
                var e,
                  i = [];
                for (e in t) i.push("".concat(e, "=").concat(t[e]));
                return "#".concat(i.join("&"));
              },
            },
            {
              key: "areFragmentsEqual",
              value: function (t, e) {
                var i,
                  n =
                    2 < arguments.length && void 0 !== arguments[2]
                      ? arguments[2]
                      : [];
                for (i in t)
                  if (t.hasOwnProperty(i)) {
                    if (0 < n.length && -1 === n.indexOf(i)) continue;
                    if (!e[i] || t[i].toString() !== e[i].toString()) return !1;
                  }
                return !0;
              },
            },
          ]),
          null && t(G.prototype, null),
          t(G, i),
          Object.defineProperty(G, "prototype", { writable: !1 }),
          e);
        function e() {
          !(function (t) {
            if (!(t instanceof e))
              throw new TypeError("Cannot call a class as a function");
          })(this);
        }
        function o(t) {
          return (o =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function a(t, e) {
          (null == e || e > t.length) && (e = t.length);
          for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
          return n;
        }
        function l(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function c(t, e) {
          return (c = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function u(t) {
          return (u = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        (X(4844), X(3352), X(5610));
        const d = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && c(t, e));
          })(s, H5P.EventDispatcher);
          var t,
            i,
            n,
            r =
              ((i = s),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = u(i);
                return (function (t, e) {
                  if (e && ("object" === o(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (t) {
                    if (void 0 === t)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return t;
                  })(t);
                })(
                  this,
                  n
                    ? ((t = u(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function s(t, e, i, n) {
            var o;
            return (
              (function (t) {
                if (!(t instanceof s))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((o = r.call(this)).id = e),
              (o.parent = n),
              (o.behaviour = t.behaviour),
              (o.content = document.createElement("ul")),
              o.content.classList.add("navigation-list"),
              (o.container = o.addSideBar()),
              (o.l10n = t.l10n),
              (o.chapters = o.findAllChapters(t.chapters)),
              (o.chapterNodes = o.getChapterNodes()),
              i &&
                ((o.titleElem = o.addMainTitle(i)),
                o.container.appendChild(o.titleElem)),
              o.chapterNodes.forEach(function (t) {
                o.content.appendChild(t);
              }),
              20 < o.chapters.length &&
                o.content.classList.add("large-navigation-list"),
              o.container.appendChild(o.content),
              o.addTransformListener(),
              o.initializeNavigationControls(),
              o
            );
          }
          return (
            l((t = s).prototype, [
              {
                key: "initializeNavigationControls",
                value: function () {
                  var o = this,
                    r = Object.freeze({ UP: 38, DOWN: 40 });
                  this.chapterNodes.forEach(function (t, i) {
                    t.querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    ).addEventListener("keydown", function (t) {
                      switch (t.keyCode) {
                        case r.UP:
                          (o.setFocusToChapterItem(i, -1), t.preventDefault());
                          break;
                        case r.DOWN:
                          (o.setFocusToChapterItem(i, 1), t.preventDefault());
                      }
                    });
                    for (
                      var n = t.querySelectorAll(
                          ".h5p-interactive-book-navigation-section",
                        ),
                        e = 0;
                      e < n.length;
                      e++
                    )
                      !(function (e) {
                        n[e]
                          .querySelector(".section-button")
                          .addEventListener("keydown", function (t) {
                            switch (t.keyCode) {
                              case r.UP:
                                (o.setFocusToSectionItem(i, e, -1),
                                  t.preventDefault());
                                break;
                              case r.DOWN:
                                (o.setFocusToSectionItem(i, e, 1),
                                  t.preventDefault());
                            }
                          });
                      })(e);
                  });
                },
              },
              {
                key: "focus",
                value: function () {
                  this.content.querySelector("button").focus();
                },
              },
              {
                key: "setFocusToChapterItem",
                value: function (t) {
                  var e =
                      1 < arguments.length && void 0 !== arguments[1]
                        ? arguments[1]
                        : 0,
                    i = t + e;
                  if (
                    (i < 0
                      ? (i = this.chapterNodes.length - 1)
                      : i > this.chapterNodes.length - 1 && (i = 0),
                    e)
                  ) {
                    var n = 0 < e ? t : i,
                      t = this.chapterNodes[n];
                    if (
                      !t.classList.contains(
                        "h5p-interactive-book-navigation-closed",
                      )
                    ) {
                      t = t.querySelectorAll(
                        ".h5p-interactive-book-navigation-section",
                      );
                      if (t.length) {
                        var o = 0 < e ? 0 : t.length - 1;
                        return void this.setFocusToSectionItem(n, o);
                      }
                    }
                  }
                  o = this.chapterNodes[i].querySelector(
                    ".h5p-interactive-book-navigation-chapter-button",
                  );
                  this.setFocusToItem(o, i);
                },
              },
              {
                key: "setFocusToSectionItem",
                value: function (t, e) {
                  var i =
                      2 < arguments.length && void 0 !== arguments[2]
                        ? arguments[2]
                        : 0,
                    n = this.chapterNodes[t].querySelectorAll(
                      ".h5p-interactive-book-navigation-section",
                    ),
                    i = e + i;
                  i > n.length - 1
                    ? this.setFocusToChapterItem(t + 1)
                    : i < 0
                      ? this.setFocusToChapterItem(t)
                      : ((i = n[i].querySelector(".section-button")),
                        this.setFocusToItem(i, t));
                },
              },
              {
                key: "setFocusToItem",
                value: function (t, r) {
                  var e =
                    2 < arguments.length &&
                    void 0 !== arguments[2] &&
                    arguments[2];
                  (this.chapterNodes.forEach(function (t, e) {
                    var i = t.querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    );
                    (e === r
                      ? i.classList.add(
                          "h5p-interactive-book-navigation-current",
                        )
                      : i.classList.remove(
                          "h5p-interactive-book-navigation-current",
                        ),
                      i.setAttribute("tabindex", "-1"));
                    for (
                      var n = t.querySelectorAll(
                          ".h5p-interactive-book-navigation-section",
                        ),
                        o = 0;
                      o < n.length;
                      o++
                    )
                      n[o]
                        .querySelector(".section-button")
                        .setAttribute("tabindex", "-1");
                  }),
                    t.setAttribute("tabindex", "0"),
                    (this.focusedChapter = r),
                    e || t.focus());
                },
              },
              {
                key: "addSideBar",
                value: function () {
                  var t = document.createElement("div");
                  return (
                    (t.id = "h5p-interactive-book-navigation-menu"),
                    t.classList.add("h5p-interactive-book-navigation"),
                    t
                  );
                },
              },
              {
                key: "addMainTitle",
                value: function (t) {
                  var e = document.createElement("h2");
                  (e.classList.add("navigation-title"),
                    (e.innerHTML = t),
                    e.setAttribute("title", t));
                  t = document.createElement("div");
                  return (
                    t.classList.add(
                      "h5p-interactive-book-navigation-maintitle",
                    ),
                    t.appendChild(e),
                    t
                  );
                },
              },
              {
                key: "findSectionsInChapter",
                value: function (t) {
                  for (
                    var e = [], i = t.params.content, n = 0;
                    n < i.length;
                    n++
                  ) {
                    var o = i[n].content,
                      r =
                        "H5P.Link" === o.library.split(" ")[0]
                          ? o.params.title || "New link"
                          : o.metadata.title;
                    e.push({
                      title: r,
                      id: o.subContentId
                        ? "h5p-interactive-book-section-".concat(o.subContentId)
                        : void 0,
                    });
                  }
                  return e;
                },
              },
              {
                key: "findAllChapters",
                value: function (t) {
                  for (var e = [], i = 0; i < t.length; i++) {
                    var n = this.findSectionsInChapter(t[i]),
                      o = t[i].metadata.title,
                      r = "h5p-interactive-book-chapter-".concat(
                        t[i].subContentId,
                      );
                    e.push({ sections: n, title: o, id: r, isSummary: !1 });
                  }
                  return (
                    this.parent.hasSummary() &&
                      e.push({
                        sections: [],
                        title: this.l10n.summaryHeader,
                        id: "h5p-interactive-book-chapter-summary",
                        isSummary: !0,
                      }),
                    e
                  );
                },
              },
              {
                key: "toggleChapter",
                value: function (t, e) {
                  e =
                    void 0 !== e
                      ? e
                      : !t.classList.contains(
                          "h5p-interactive-book-navigation-closed",
                        );
                  var i = t.querySelector(
                      ".h5p-interactive-book-navigation-sectionlist",
                    ),
                    n = t.getElementsByClassName(
                      "h5p-interactive-book-navigation-chapter-accordion",
                    )[0];
                  (t
                    .querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    )
                    .setAttribute("aria-expanded", (!e).toString()),
                    !0 === e
                      ? (t.classList.add(
                          "h5p-interactive-book-navigation-closed",
                        ),
                        n &&
                          (n.classList.remove("icon-expanded"),
                          n.classList.add("icon-collapsed"),
                          i &&
                            (i.setAttribute("aria-hidden", !0),
                            i.setAttribute("tabindex", "-1"))))
                      : (t.classList.remove(
                          "h5p-interactive-book-navigation-closed",
                        ),
                        n &&
                          (n.classList.remove("icon-collapsed"),
                          n.classList.add("icon-expanded"),
                          i &&
                            (i.removeAttribute("aria-hidden"),
                            i.removeAttribute("tabindex")))));
                },
              },
              {
                key: "redirectHandler",
                value: function (i) {
                  var t,
                    n = this;
                  (this.chapterNodes.forEach(function (t, e) {
                    n.toggleChapter(t, e !== i);
                  }),
                    this.parent.trigger("resize"),
                    i !== this.focusedChapter &&
                      ((t = this.chapterNodes[i].querySelector(
                        ".h5p-interactive-book-navigation-chapter-button",
                      )),
                      this.setFocusToItem(t, i, !0)));
                },
              },
              {
                key: "resetIndicators",
                value: function () {
                  var r = this;
                  this.chapterNodes.forEach(function (t, e) {
                    r.updateChapterProgressIndicator(e, "BLANK");
                    var i,
                      n = (function (t, e) {
                        var i =
                          ("undefined" != typeof Symbol &&
                            t[Symbol.iterator]) ||
                          t["@@iterator"];
                        if (!i) {
                          if (
                            Array.isArray(t) ||
                            (i = (function (t) {
                              if (t) {
                                if ("string" == typeof t) return a(t, void 0);
                                var e = Object.prototype.toString
                                  .call(t)
                                  .slice(8, -1);
                                return "Map" ===
                                  (e =
                                    "Object" === e && t.constructor
                                      ? t.constructor.name
                                      : e) || "Set" === e
                                  ? Array.from(t)
                                  : "Arguments" === e ||
                                      /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(
                                        e,
                                      )
                                    ? a(t, void 0)
                                    : void 0;
                              }
                            })(t)) ||
                            (e && t && "number" == typeof t.length)
                          ) {
                            i && (t = i);
                            var n = 0,
                              e = function () {};
                            return {
                              s: e,
                              n: function () {
                                return n >= t.length
                                  ? { done: !0 }
                                  : { done: !1, value: t[n++] };
                              },
                              e: function (t) {
                                throw t;
                              },
                              f: e,
                            };
                          }
                          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,
                          r = !0,
                          s = !1;
                        return {
                          s: function () {
                            i = i.call(t);
                          },
                          n: function () {
                            var t = i.next();
                            return ((r = t.done), t);
                          },
                          e: function (t) {
                            ((s = !0), (o = t));
                          },
                          f: function () {
                            try {
                              r || null == i.return || i.return();
                            } finally {
                              if (s) throw o;
                            }
                          },
                        };
                      })(
                        t.getElementsByClassName(
                          "h5p-interactive-book-navigation-section",
                        ),
                      );
                    try {
                      for (n.s(); !(i = n.n()).done; ) {
                        var o = i.value.querySelector(
                          ".h5p-interactive-book-navigation-section-icon",
                        );
                        o &&
                          (o.classList.remove("icon-question-answered"),
                          o.classList.add("icon-chapter-blank"));
                      }
                    } catch (t) {
                      n.e(t);
                    } finally {
                      n.f();
                    }
                  });
                },
              },
              {
                key: "updateChapterProgressIndicator",
                value: function (t, e) {
                  this.behaviour.progressIndicators &&
                    !this.chapters[t].isSummary &&
                    ((t = this.chapterNodes[t].getElementsByClassName(
                      "h5p-interactive-book-navigation-chapter-progress",
                    )[0]),
                    "BLANK" === e
                      ? (t.classList.remove("icon-chapter-started"),
                        t.classList.remove("icon-chapter-done"),
                        t.classList.add("icon-chapter-blank"))
                      : "DONE" === e
                        ? (t.classList.remove("icon-chapter-blank"),
                          t.classList.remove("icon-chapter-started"),
                          t.classList.add("icon-chapter-done"))
                        : "STARTED" === e &&
                          (t.classList.remove("icon-chapter-blank"),
                          t.classList.remove("icon-chapter-done"),
                          t.classList.add("icon-chapter-started")));
                },
              },
              {
                key: "setSectionMarker",
                value: function (t, e) {
                  e = this.chapterNodes[t].querySelector(
                    ".h5p-interactive-book-navigation-section-" +
                      e +
                      " .h5p-interactive-book-navigation-section-icon",
                  );
                  e &&
                    (e.classList.remove("icon-chapter-blank"),
                    e.classList.add("icon-question-answered"));
                },
              },
              {
                key: "getNodesFromChapter",
                value: function (t, n) {
                  var o = this,
                    e = document.createElement("li"),
                    i = "h5p-interactive-book-sectionlist-" + n;
                  if (
                    (e.classList.add("h5p-interactive-book-navigation-chapter"),
                    t.isSummary)
                  ) {
                    e.classList.add(
                      "h5p-interactive-book-navigation-summary-button",
                    );
                    var r = this.parent.chapters[n].instance.summaryMenuButton;
                    return (
                      r.classList.add(
                        "h5p-interactive-book-navigation-chapter-button",
                      ),
                      e.appendChild(r),
                      e
                    );
                  }
                  var s = document.createElement("div");
                  s.classList.add(
                    "h5p-interactive-book-navigation-chapter-accordion",
                  );
                  var a = document.createElement("div");
                  (a.classList.add(
                    "h5p-interactive-book-navigation-chapter-title-text",
                  ),
                    (a.innerHTML = t.title),
                    a.setAttribute("title", t.title));
                  var l = document.createElement("div");
                  this.behaviour.progressIndicators &&
                    (l.classList.add("icon-chapter-blank"),
                    l.classList.add(
                      "h5p-interactive-book-navigation-chapter-progress",
                    ));
                  r = document.createElement("button");
                  (r.setAttribute("tabindex", 0 === n ? "0" : "-1"),
                    r.classList.add(
                      "h5p-interactive-book-navigation-chapter-button",
                    ),
                    this.parent.activeChapter !== n
                      ? (s.classList.add("icon-collapsed"),
                        r.setAttribute("aria-expanded", "false"))
                      : (s.classList.add("icon-expanded"),
                        r.setAttribute("aria-expanded", "true")),
                    r.setAttribute("aria-controls", i),
                    (r.onclick = function (t) {
                      var e = !t.currentTarget
                          .querySelector(
                            ".h5p-interactive-book-navigation-chapter-accordion",
                          )
                          .classList.contains("hidden"),
                        i =
                          "true" ===
                          t.currentTarget.getAttribute("aria-expanded");
                      (o.isOpenOnMobile() && o.parent.trigger("toggleMenu"),
                        (!o.isOpenOnMobile() && e && i) ||
                          ((i = {
                            h5pbookid: o.parent.contentId,
                            chapter: o.chapters[n].id,
                            section: 0,
                          }),
                          o.parent.trigger("newChapter", i)),
                        e &&
                          (o.toggleChapter(t.currentTarget.parentElement),
                          o.parent.trigger("resize")));
                    }),
                    r.appendChild(s),
                    r.appendChild(a),
                    r.appendChild(l),
                    e.appendChild(r),
                    this.parent.activeChapter === n
                      ? e
                          .querySelector(
                            ".h5p-interactive-book-navigation-chapter-button",
                          )
                          .classList.add(
                            "h5p-interactive-book-navigation-current",
                          )
                      : this.toggleChapter(e, !0));
                  var c = document.createElement("ul");
                  (c.classList.add(
                    "h5p-interactive-book-navigation-sectionlist",
                  ),
                    (c.id = i));
                  for (
                    var u, h = [], d = 0;
                    d < this.chapters[n].sections.length;
                    d++
                  )
                    if (this.parent.chapters[n].sections[d].isTask) {
                      var p = this.createSectionLink(n, d);
                      (h.push(p), c.appendChild(p));
                    } else {
                      var f =
                        this.parent.params.chapters[n].params.content[d]
                          .content;
                      if ("H5P.AdvancedText" === f.library.split(" ")[0]) {
                        p = document.createElement("div");
                        p.innerHTML = f.params.text;
                        for (
                          var m = p.querySelectorAll("h2, h3"), g = 0;
                          g < m.length;
                          g++
                        ) {
                          var v = m[g],
                            v = this.createSectionLink(n, d, v.textContent, g);
                          (h.push(v), c.appendChild(v));
                        }
                      }
                    }
                  return (
                    t.tasksLeft && (t.maxTasks = t.tasksLeft),
                    0 === h.length &&
                      (u = e.querySelector(
                        ".h5p-interactive-book-navigation-chapter-accordion",
                      )) &&
                      u.classList.add("hidden"),
                    e.appendChild(c),
                    e
                  );
                },
              },
              {
                key: "createSectionLink",
                value: function (i, t) {
                  var n = this,
                    e =
                      2 < arguments.length && void 0 !== arguments[2]
                        ? arguments[2]
                        : null,
                    o =
                      3 < arguments.length && void 0 !== arguments[3]
                        ? arguments[3]
                        : null,
                    r = this.chapters[i].sections[t],
                    s = document.createElement("div");
                  ((s.innerHTML = e || r.title),
                    s.setAttribute("title", e || r.title),
                    s.classList.add(
                      "h5p-interactive-book-navigation-section-title",
                    ));
                  var a = document.createElement("div");
                  (a.classList.add(
                    "h5p-interactive-book-navigation-section-icon",
                  ),
                    a.classList.add("icon-chapter-blank"),
                    this.parent.chapters[i].sections[t].isTask &&
                      a.classList.add(
                        "h5p-interactive-book-navigation-section-task",
                      ));
                  e = document.createElement("button");
                  (e.classList.add("section-button"),
                    e.setAttribute("tabindex", "-1"),
                    (e.onclick = function (t) {
                      var e = {
                        h5pbookid: n.parent.contentId,
                        chapter: n.chapters[i].id,
                        section: r.id,
                      };
                      (null !== o && (e.headerNumber = o),
                        n.parent.trigger("newChapter", e),
                        n.isOpenOnMobile() && n.parent.trigger("toggleMenu"),
                        t.preventDefault());
                    }),
                    e.appendChild(a),
                    e.appendChild(s));
                  s = document.createElement("li");
                  return (
                    s.classList.add("h5p-interactive-book-navigation-section"),
                    s.classList.add(
                      "h5p-interactive-book-navigation-section-" + t,
                    ),
                    s.appendChild(e),
                    s
                  );
                },
              },
              {
                key: "getChapterNodes",
                value: function () {
                  var i = this;
                  return this.chapters.map(function (t, e) {
                    return i.getNodesFromChapter(t, e);
                  });
                },
              },
              {
                key: "isOpenOnMobile",
                value: function () {
                  return (
                    this.parent.isMenuOpen() && this.parent.isSmallSurface()
                  );
                },
              },
              {
                key: "addTransformListener",
                value: function () {
                  var e = this;
                  this.container.addEventListener(
                    "transitionend",
                    function (t) {
                      "flex-basis" === t.propertyName &&
                        e.parent.trigger("resize");
                    },
                  );
                },
              },
            ]),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            s
          );
        })();
        function r(t) {
          return (r =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function p() {
          return (p = Object.assign
            ? Object.assign.bind()
            : function (t) {
                for (var e = 1; e < arguments.length; e++) {
                  var i,
                    n = arguments[e];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
                }
                return t;
              }).apply(this, arguments);
        }
        function f(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function m(t, e) {
          return (m = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function g(t) {
          return (g = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        const v = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && m(t, e));
          })(a, H5P.EventDispatcher);
          var t,
            i,
            n,
            s =
              ((i = a),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = g(i);
                return (function (t, e) {
                  if (e && ("object" === r(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (t) {
                    if (void 0 === t)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return t;
                  })(t);
                })(
                  this,
                  n
                    ? ((t = g(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function a(t, e, i, n, o) {
            var r;
            (!(function (t) {
              if (!(t instanceof a))
                throw new TypeError("Cannot call a class as a function");
            })(this),
              ((r = s.call(this)).id = t),
              (r.parent = i),
              (r.params = n || {}),
              (r.params.l10n = n.l10n),
              (r.params.a11y = p(
                {
                  progress: "Page @page of @total",
                  menu: "Toggle navigation menu",
                },
                r.params.a11y || {},
              )),
              (r.totalChapters = e),
              (r.arrows = r.addArrows()),
              (r.progressBar = r.createProgressBar()),
              (r.progressIndicator = r.createProgressIndicator()),
              (r.chapterTitle = r.createChapterTitle()),
              (r.menuToggleButton = r.createMenuToggleButton()));
            e = document.createElement("div");
            return (
              e.classList.add("h5p-interactive-book-status"),
              r.params.displayToTopButton &&
                e.appendChild(r.createToTopButton()),
              r.params.displayFullScreenButton &&
                H5P.fullscreenSupported &&
                e.appendChild(r.createFullScreenButton()),
              e.appendChild(r.arrows.buttonWrapperNext),
              e.appendChild(r.arrows.buttonWrapperPrevious),
              r.params.displayMenuToggleButton &&
                e.appendChild(r.menuToggleButton),
              e.appendChild(r.progressIndicator.wrapper),
              e.appendChild(r.chapterTitle.wrapper),
              (r.wrapper = document.createElement("div")),
              r.wrapper.classList.add(o),
              r.wrapper.setAttribute("tabindex", "-1"),
              r.wrapper.appendChild(r.progressBar.wrapper),
              r.wrapper.appendChild(e),
              r.on("updateStatusBar", r.updateStatusBar),
              r.on("seqChapter", function (t) {
                var e = { h5pbookid: r.parent.contentId };
                (t.data.toTop && (e.section = "top"),
                  "next" === t.data.direction
                    ? r.parent.activeChapter + 1 < r.parent.chapters.length
                      ? (e.chapter = "h5p-interactive-book-chapter-".concat(
                          r.parent.chapters[r.parent.activeChapter + 1].instance
                            .subContentId,
                        ))
                      : r.parent.hasSummary() &&
                        r.parent.activeChapter + 1 ===
                          r.parent.chapters.length &&
                        r.parent.trigger("viewSummary", e)
                    : "prev" === t.data.direction &&
                      0 < r.parent.activeChapter &&
                      (e.chapter = "h5p-interactive-book-chapter-".concat(
                        r.parent.chapters[r.parent.activeChapter - 1].instance
                          .subContentId,
                      )),
                  e.chapter && r.parent.trigger("newChapter", e));
              }),
              r
            );
          }
          return (
            f((t = a).prototype, [
              {
                key: "updateProgressBar",
                value: function (t) {
                  var e = "".concat((t / this.totalChapters) * 100, "%");
                  this.progressBar.progress.style.width = e;
                  t = this.params.a11y.progress
                    .replace("@page", t)
                    .replace("@total", this.totalChapters);
                  this.progressBar.progress.title = t;
                },
              },
              {
                key: "updateA11yProgress",
                value: function (t) {
                  this.progressIndicator.hiddenButRead.innerHTML =
                    this.params.a11y.progress
                      .replace("@page", t)
                      .replace("@total", this.totalChapters);
                },
              },
              {
                key: "updateStatusBar",
                value: function () {
                  var t = this.parent.getActiveChapter() + 1,
                    e = this.parent.chapters[t - 1].title;
                  ((this.progressIndicator.current.innerHTML = t),
                    this.updateA11yProgress(t),
                    this.updateProgressBar(t),
                    (this.chapterTitle.text.innerHTML = e),
                    this.chapterTitle.text.setAttribute("title", e),
                    this.parent.activeChapter <= 0
                      ? this.setButtonStatus("Previous", !0)
                      : this.setButtonStatus("Previous", !1),
                    this.parent.activeChapter + 1 >= this.totalChapters
                      ? this.setButtonStatus("Next", !0)
                      : this.setButtonStatus("Next", !1));
                },
              },
              {
                key: "addArrows",
                value: function () {
                  var t = this,
                    e = {};
                  return (
                    (e.buttonPrevious = document.createElement("div")),
                    e.buttonPrevious.classList.add(
                      "navigation-button",
                      "icon-previous",
                    ),
                    e.buttonPrevious.setAttribute(
                      "title",
                      this.params.l10n.previousPage,
                    ),
                    (e.buttonWrapperPrevious =
                      document.createElement("button")),
                    e.buttonWrapperPrevious.classList.add(
                      "h5p-interactive-book-status-arrow",
                      "h5p-interactive-book-status-button",
                      "previous",
                    ),
                    e.buttonWrapperPrevious.setAttribute(
                      "aria-label",
                      this.params.l10n.previousPage,
                    ),
                    (e.buttonWrapperPrevious.onclick = function () {
                      t.trigger("seqChapter", { direction: "prev", toTop: !0 });
                    }),
                    e.buttonWrapperPrevious.appendChild(e.buttonPrevious),
                    (e.buttonNext = document.createElement("div")),
                    e.buttonNext.classList.add(
                      "navigation-button",
                      "icon-next",
                    ),
                    e.buttonNext.setAttribute(
                      "title",
                      this.params.l10n.nextPage,
                    ),
                    (e.buttonWrapperNext = document.createElement("button")),
                    e.buttonWrapperNext.classList.add(
                      "h5p-interactive-book-status-arrow",
                      "h5p-interactive-book-status-button",
                      "next",
                    ),
                    e.buttonWrapperNext.setAttribute(
                      "aria-label",
                      this.params.l10n.nextPage,
                    ),
                    (e.buttonWrapperNext.onclick = function () {
                      t.trigger("seqChapter", { direction: "next", toTop: !0 });
                    }),
                    e.buttonWrapperNext.appendChild(e.buttonNext),
                    e
                  );
                },
              },
              {
                key: "createMenuToggleButton",
                value: function () {
                  var t = this,
                    e = document.createElement("a");
                  e.classList.add("icon-menu");
                  var i = document.createElement("button");
                  return (
                    i.classList.add("h5p-interactive-book-status-menu"),
                    i.classList.add("h5p-interactive-book-status-button"),
                    i.setAttribute("aria-label", this.params.a11y.menu),
                    i.setAttribute("aria-expanded", "false"),
                    i.setAttribute(
                      "aria-controls",
                      "h5p-interactive-book-navigation-menu",
                    ),
                    (i.onclick = function () {
                      t.parent.trigger("toggleMenu");
                    }),
                    i.appendChild(e),
                    i
                  );
                },
              },
              {
                key: "isMenuOpen",
                value: function () {
                  return this.menuToggleButton.classList.contains(
                    "h5p-interactive-book-status-menu-active",
                  );
                },
              },
              {
                key: "createProgressBar",
                value: function () {
                  var t = document.createElement("div");
                  (t.classList.add(
                    "h5p-interactive-book-status-progressbar-front",
                  ),
                    t.setAttribute("tabindex", "-1"));
                  var e = document.createElement("div");
                  return (
                    e.classList.add(
                      "h5p-interactive-book-status-progressbar-back",
                    ),
                    e.appendChild(t),
                    { wrapper: e, progress: t }
                  );
                },
              },
              {
                key: "createChapterTitle",
                value: function () {
                  var t = document.createElement("h1");
                  t.classList.add("title");
                  var e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-status-chapter"),
                    e.appendChild(t),
                    { wrapper: e, text: t }
                  );
                },
              },
              {
                key: "createToTopButton",
                value: function () {
                  var t = this,
                    e = document.createElement("div");
                  (e.classList.add("icon-up"),
                    e.classList.add("navigation-button"));
                  var i = document.createElement("button");
                  return (
                    i.classList.add("h5p-interactive-book-status-to-top"),
                    i.classList.add("h5p-interactive-book-status-button"),
                    i.classList.add("h5p-interactive-book-status-arrow"),
                    i.setAttribute(
                      "aria-label",
                      this.params.l10n.navigateToTop,
                    ),
                    i.addEventListener("click", function () {
                      (t.parent.trigger("scrollToTop"),
                        document
                          .querySelector(".h5p-interactive-book-status-menu")
                          .focus());
                    }),
                    i.appendChild(e),
                    i
                  );
                },
              },
              {
                key: "setVisibility",
                value: function (t) {
                  t
                    ? this.wrapper.classList.add("footer-hidden")
                    : this.wrapper.classList.remove("footer-hidden");
                },
              },
              {
                key: "createProgressIndicator",
                value: function () {
                  var t = document.createElement("span");
                  (t.classList.add(
                    "h5p-interactive-book-status-progress-number",
                  ),
                    t.setAttribute("aria-hidden", "true"));
                  var e = document.createElement("span");
                  (e.classList.add(
                    "h5p-interactive-book-status-progress-divider",
                  ),
                    (e.innerHTML = " / "),
                    e.setAttribute("aria-hidden", "true"));
                  var i = document.createElement("span");
                  (i.classList.add(
                    "h5p-interactive-book-status-progress-number",
                  ),
                    (i.innerHTML = this.totalChapters),
                    i.setAttribute("aria-hidden", "true"));
                  var n = document.createElement("p");
                  n.classList.add("hidden-but-read");
                  var o = document.createElement("p");
                  (o.classList.add("h5p-interactive-book-status-progress"),
                    o.appendChild(t),
                    o.appendChild(e),
                    o.appendChild(i),
                    o.appendChild(n));
                  var r = document.createElement("div");
                  return (
                    r.classList.add(
                      "h5p-interactive-book-status-progress-wrapper",
                    ),
                    r.appendChild(o),
                    {
                      wrapper: r,
                      current: t,
                      total: i,
                      divider: e,
                      progressText: o,
                      hiddenButRead: n,
                    }
                  );
                },
              },
              {
                key: "setButtonStatus",
                value: function (t, e) {
                  e
                    ? (this.arrows["buttonWrapper" + t].setAttribute(
                        "disabled",
                        "disabled",
                      ),
                      this.arrows["button" + t].classList.add("disabled"))
                    : (this.arrows["buttonWrapper" + t].removeAttribute(
                        "disabled",
                      ),
                      this.arrows["button" + t].classList.remove("disabled"));
                },
              },
              {
                key: "createFullScreenButton",
                value: function () {
                  function e() {
                    !0 === H5P.isFullscreen
                      ? H5P.exitFullScreen()
                      : H5P.fullScreen(t.parent.mainWrapper, t.parent);
                  }
                  var t = this,
                    i = document.createElement("button");
                  return (
                    i.classList.add("h5p-interactive-book-status-fullscreen"),
                    i.classList.add("h5p-interactive-book-status-button"),
                    i.classList.add("h5p-interactive-book-enter-fullscreen"),
                    i.setAttribute("title", this.params.l10n.fullscreen),
                    i.setAttribute("aria-label", this.params.l10n.fullscreen),
                    i.addEventListener("click", e),
                    i.addEventListener("keyPress", function (t) {
                      (13 !== t.which && 32 !== t.which) ||
                        (e(), t.preventDefault());
                    }),
                    this.parent.on("enterFullScreen", function () {
                      ((t.parent.isFullscreen = !0),
                        i.classList.remove(
                          "h5p-interactive-book-enter-fullscreen",
                        ),
                        i.classList.add("h5p-interactive-book-exit-fullscreen"),
                        i.setAttribute("title", t.params.l10n.exitFullscreen),
                        i.setAttribute(
                          "aria-label",
                          t.params.l10n.exitFullScreen,
                        ),
                        t.parent.pageContent.updateFooter());
                    }),
                    this.parent.on("exitFullScreen", function () {
                      ((t.parent.isFullscreen = !1),
                        i.classList.remove(
                          "h5p-interactive-book-exit-fullscreen",
                        ),
                        i.classList.add(
                          "h5p-interactive-book-enter-fullscreen",
                        ),
                        i.setAttribute("title", t.params.l10n.fullscreen),
                        i.setAttribute("aria-label", t.params.l10n.fullscreen),
                        t.parent.pageContent.updateFooter());
                    }),
                    i
                  );
                },
              },
            ]),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            a
          );
        })();
        function b(t) {
          return (b =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function y(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function w(t, e) {
          return (w = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function x(t) {
          return (x = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        const k = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && w(t, e));
          })(a, H5P.EventDispatcher);
          var t,
            i,
            n,
            s =
              ((i = a),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = x(i);
                return (function (t, e) {
                  if (e && ("object" === b(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (t) {
                    if (void 0 === t)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return t;
                  })(t);
                })(
                  this,
                  n
                    ? ((t = x(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function a(t, e, i, n, o) {
            var r;
            return (
              (function (t) {
                if (!(t instanceof a))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((r = s.call(this)).parent = o),
              (r.params = t),
              (r.contentId = n),
              (r.container = r.createContainer()),
              t.coverMedium
                ? ((r.visuals = r.createVisualsElement(t.coverMedium)),
                  r.visuals && r.container.appendChild(r.visuals))
                : r.container.classList.add("h5p-cover-nographics"),
              r.container.appendChild(r.createTitleElement(e)),
              t.coverDescription &&
                r.container.appendChild(
                  r.createDescriptionElement(t.coverDescription),
                ),
              r.container.appendChild(r.createReadButton(i)),
              r
            );
          }
          return (
            y((t = a).prototype, [
              {
                key: "createContainer",
                value: function () {
                  var t = document.createElement("div");
                  return (t.classList.add("h5p-interactive-book-cover"), t);
                },
              },
              {
                key: "createVisualsElement",
                value: function (t) {
                  if (!t || !t.params) return null;
                  t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-cover-graphics"),
                    t
                  );
                },
              },
              {
                key: "initMedia",
                value: function () {
                  var t;
                  this.visuals &&
                    this.params.coverMedium &&
                    ("H5P.Video" ===
                      ((t = this.params.coverMedium).library || "").split(
                        " ",
                      )[0] && (t.params.visuals.fit = !1),
                    H5P.newRunnable(
                      t,
                      this.contentId,
                      H5P.jQuery(this.visuals),
                      !1,
                      { metadata: t.medatata },
                    ),
                    "H5P.Image" === (t.library || "").split(" ")[0] &&
                      (((t =
                        this.visuals.querySelector("img") ||
                        this.visuals.querySelector(
                          ".h5p-placeholder",
                        )).style.height = "auto"),
                      (t.style.width = "auto")),
                    this.visuals.appendChild(this.createCoverBar()));
                },
              },
              {
                key: "createImage",
                value: function (t, e, i) {
                  var n = document.createElement("img");
                  return (
                    n.classList.add("h5p-interactive-book-cover-image"),
                    (n.src = H5P.getPath(t, e)),
                    n.setAttribute("draggable", "false"),
                    i && (n.alt = i),
                    n
                  );
                },
              },
              {
                key: "createCoverBar",
                value: function () {
                  var t = document.createElement("div");
                  return (t.classList.add("h5p-interactive-book-cover-bar"), t);
                },
              },
              {
                key: "createTitleElement",
                value: function (t) {
                  var e = document.createElement("p");
                  e.innerHTML = t;
                  t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-cover-title"),
                    t.appendChild(e),
                    t
                  );
                },
              },
              {
                key: "createDescriptionElement",
                value: function (t) {
                  if (!t) return null;
                  var e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-cover-description"),
                    (e.innerHTML = t),
                    e
                  );
                },
              },
              {
                key: "createReadButton",
                value: function (t) {
                  var e = this,
                    i = document.createElement("button");
                  ((i.innerHTML = t),
                    (i.onclick = function () {
                      e.removeCover();
                    }));
                  t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-cover-readbutton"),
                    t.appendChild(i),
                    t
                  );
                },
              },
              {
                key: "removeCover",
                value: function () {
                  (this.container.parentElement.classList.remove("covered"),
                    this.container.parentElement.removeChild(this.container),
                    (this.hidden = !0),
                    this.parent.trigger("coverRemoved"));
                },
              },
            ]),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            a
          );
        })();
        X(7159);
        var i = X(7124),
          s = X.n(i);
        function n(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        var C =
          ((G = P),
          (i = [
            {
              key: "setBase",
              value: function (t) {
                t &&
                  ((P.colorBase = s()(t)),
                  (P.colorText = [
                    P.DEFAULT_COLOR_BG,
                    P.computeContrastColor(P.colorBase),
                    P.computeContrastColor(P.colorBase, P.DEFAULT_COLOR_BG),
                  ]
                    .map(function (t) {
                      return { color: t, contrast: P.colorBase.contrast(t) };
                    })
                    .reduce(
                      function (t, e) {
                        return e.contrast > t.contrast ? e : t;
                      },
                      { contrast: 0 },
                    ).color));
              },
            },
            {
              key: "getColor",
              value: function (t) {
                var i =
                  1 < arguments.length && void 0 !== arguments[1]
                    ? arguments[1]
                    : {};
                if (
                  ("string" == typeof i.opacity &&
                    /^([0-9]|[1-8][0-9]|9[0-9]|100)(\.\d+)?\s?%$/.test(
                      i.opacity,
                    ) &&
                    (i.opacity = parseInt(i.opacity) / 100),
                  "number" != typeof i.opacity ||
                    i.opacity < 0 ||
                    1 < i.opacity)
                )
                  return t;
                var n = s()("#ffffff").rgb().array();
                return s().rgb(
                  t
                    .rgb()
                    .array()
                    .map(function (t, e) {
                      return i.opacity * t + (1 - i.opacity) * n[e];
                    }),
                );
              },
            },
            {
              key: "isBaseColor",
              value: function (t) {
                return s()(t).hex() === P.colorBase.hex();
              },
            },
            {
              key: "computeContrastColor",
              value: function (t, i) {
                for (
                  var n, o = (i = i || t).luminosity(), e = 0;
                  e <= 1 &&
                  "break" !==
                    (function (e) {
                      if (
                        (n = s().rgb(
                          t
                            .rgb()
                            .array()
                            .map(function (t) {
                              return t * (0.5 < o ? 1 - e : 1 + e);
                            }),
                        )).contrast(i) >= P.MINIMUM_ACCEPTABLE_CONTRAST
                      )
                        return "break";
                    })(e);
                  e += 0.05
                );
                return n;
              },
            },
            {
              key: "getContentTypeCSS",
              value: function (t) {
                return P.COLOR_OVERRIDES[t]
                  ? P.COLOR_OVERRIDES[t].getCSS()
                  : "";
              },
            },
            {
              key: "getCSS",
              value: function () {
                return ":root{\n      --color-base: "
                  .concat(P.colorBase, ";\n      --color-base-5: ")
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.05 }),
                    ";\n      --color-base-10: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.1 }),
                    ";\n      --color-base-20: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.2 }),
                    ";\n      --color-base-75: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.75 }),
                    ";\n      --color-base-80: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.8 }),
                    ";\n      --color-base-85: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.85 }),
                    ";\n      --color-base-90: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.9 }),
                    ";\n      --color-base-95: ",
                  )
                  .concat(
                    P.getColor(P.colorBase, { opacity: 0.95 }),
                    ";\n      --color-text: ",
                  )
                  .concat(P.colorText, ";\n      --color-contrast: ")
                  .concat(
                    P.computeContrastColor(P.colorBase, P.DEFAULT_COLOR_BG),
                    ";\n    }",
                  );
              },
            },
          ]),
          null && n(G.prototype, null),
          n(G, i),
          Object.defineProperty(G, "prototype", { writable: !1 }),
          P);
        function P() {
          !(function (t) {
            if (!(t instanceof P))
              throw new TypeError("Cannot call a class as a function");
          })(this);
        }
        function _(t) {
          return (_ =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function S(t, e) {
          var i =
            ("undefined" != typeof Symbol && t[Symbol.iterator]) ||
            t["@@iterator"];
          if (!i) {
            if (
              Array.isArray(t) ||
              (i = (function (t) {
                if (t) {
                  if ("string" == typeof t) return T(t, void 0);
                  var e = Object.prototype.toString.call(t).slice(8, -1);
                  return "Map" ===
                    (e =
                      "Object" === e && t.constructor
                        ? t.constructor.name
                        : e) || "Set" === e
                    ? Array.from(t)
                    : "Arguments" === e ||
                        /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)
                      ? T(t, void 0)
                      : void 0;
                }
              })(t)) ||
              (e && t && "number" == typeof t.length)
            ) {
              i && (t = i);
              var n = 0,
                e = function () {};
              return {
                s: e,
                n: function () {
                  return n >= t.length
                    ? { done: !0 }
                    : { done: !1, value: t[n++] };
                },
                e: function (t) {
                  throw t;
                },
                f: e,
              };
            }
            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,
            r = !0,
            s = !1;
          return {
            s: function () {
              i = i.call(t);
            },
            n: function () {
              var t = i.next();
              return ((r = t.done), t);
            },
            e: function (t) {
              ((s = !0), (o = t));
            },
            f: function () {
              try {
                r || null == i.return || i.return();
              } finally {
                if (s) throw o;
              }
            },
          };
        }
        function T(t, e) {
          (null == e || e > t.length) && (e = t.length);
          for (var i = 0, n = new Array(e); i < e; i++) n[i] = t[i];
          return n;
        }
        function H(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function I(t, e) {
          return (I = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function E(t) {
          return (E = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        ((C.DEFAULT_COLOR_BASE = s()("#1768c4")),
          (C.DEFAULT_COLOR_BG = s()("#ffffff")),
          (C.MINIMUM_ACCEPTABLE_CONTRAST = 4.5),
          (C.colorBase = C.DEFAULT_COLOR_BASE),
          (C.colorText = C.DEFAULT_COLOR_BG));
        const D = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && I(t, e));
          })(r, H5P.EventDispatcher);
          var t,
            i,
            n,
            o =
              ((i = r),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = E(i);
                return (function (t, e) {
                  if (e && ("object" === _(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (t) {
                    if (void 0 === t)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return t;
                  })(t);
                })(
                  this,
                  n
                    ? ((t = E(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function r(t, e, i) {
            var n;
            return (
              (function (t) {
                if (!(t instanceof r))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((n = o.call(this)).parent = e),
              (n.behaviour = t.behaviour),
              (n.l10n = t.l10n),
              (n.chapters = i || []),
              (n.subContentId = "summary"),
              (n.wrapper = null),
              (n.summaryMenuButton = n.createSummaryButton()),
              (n.filterActionAll = "all"),
              (n.filterActionUnanswered = "unanswered"),
              (n.bookCompleted = !1),
              (n.tempState = JSON.stringify(
                n.parent.previousState && n.parent.previousState.chapters
                  ? n.parent.previousState.chapters
                  : n.getChapterStats(),
              )),
              e.on("bookCompleted", function (t) {
                return n.setBookComplete(t.data.completed);
              }),
              e.on("toggleMenu", function () {
                var t = document.querySelector(
                  ".h5p-interactive-book-summary-footer",
                );
                t &&
                  n.bookCompleted &&
                  (n.parent.isMenuOpen()
                    ? t.classList.add("menu-open")
                    : t.classList.remove("menu-open"));
              }),
              n
            );
          }
          return (
            H((t = r).prototype, [
              {
                key: "setBookComplete",
                value: function (e) {
                  var t = this.parent.mainWrapper
                    ? this.parent.mainWrapper[0].querySelector(
                        ".h5p-interactive-book-summary-footer",
                      )
                    : null;
                  (!t &&
                    this.parent.isSmallSurface() &&
                    ((t = document.createElement("div")).classList.add(
                      "h5p-interactive-book-summary-footer",
                    ),
                    t.appendChild(this.createSummaryButton()),
                    this.parent.mainWrapper.append(t)),
                    t &&
                      e &&
                      setTimeout(function () {
                        return t.classList.add("show-footer");
                      }, 0),
                    (this.bookCompleted = e),
                    Array.from(
                      document.querySelectorAll(
                        ".h5p-interactive-book-summary-menu-button",
                      ),
                    ).forEach(function (t) {
                      return t.setAttribute(
                        "data-book-completed",
                        e.toString(),
                      );
                    }));
                },
              },
              {
                key: "setChapters",
                value: function (t) {
                  this.chapters = Array.isArray(t) ? t : [];
                },
              },
              {
                key: "setSummaryMenuButtonDisabled",
                value: function () {
                  this.summaryMenuButton.disabled =
                    !(0 < arguments.length && void 0 !== arguments[0]) ||
                    arguments[0];
                },
              },
              {
                key: "setFilter",
                value: function (t) {
                  var e = this,
                    i = this.wrapper.querySelector(
                      ".h5p-interactive-book-summary-overview-list",
                    ),
                    n = Array.from(
                      i.querySelectorAll(
                        ".h5p-interactive-book-summary-overview-section",
                      ),
                    );
                  n.forEach(function (t) {
                    (t.classList.remove(
                      "h5p-interactive-book-summary-top-section",
                    ),
                      t.classList.remove(
                        "h5p-interactive-book-summary-bottom-section",
                      ));
                  });
                  var o = i.querySelector(
                    ".h5p-interactive-book-summary-overview-list-empty",
                  );
                  ((o.style.display = "none"),
                    t === this.filterActionUnanswered
                      ? (i.classList.add(
                          "h5p-interactive-book-summary-overview-list-only-unanswered",
                        ),
                        (n = n.filter(function (t) {
                          return !t.classList.contains(
                            "h5p-interactive-book-summary-no-interactions",
                          );
                        })).length
                          ? (n[0].classList.add(
                              "h5p-interactive-book-summary-top-section",
                            ),
                            n[n.length - 1].classList.add(
                              "h5p-interactive-book-summary-bottom-section",
                            ))
                          : (o.style.display = "block"))
                      : t === this.filterActionAll &&
                        i.classList.remove(
                          "h5p-interactive-book-summary-overview-list-only-unanswered",
                        ),
                    setTimeout(function () {
                      return e.trigger("resize");
                    }, 1));
                },
              },
              {
                key: "createSummaryButton",
                value: function () {
                  var e = this,
                    t = document.createElement("button");
                  (t.classList.add("h5p-interactive-book-summary-menu-button"),
                    (t.onclick = function () {
                      var t = {
                        h5pbookid: e.parent.contentId,
                        chapter: "h5p-interactive-book-chapter-summary",
                        section: "top",
                      };
                      (e.parent.trigger("newChapter", t),
                        e.parent.isMenuOpen() &&
                          e.parent.isSmallSurface() &&
                          e.parent.trigger("toggleMenu"));
                    }));
                  var i = document.createElement("span");
                  (i.classList.add("h5p-interactive-book-summary-icon"),
                    i.classList.add("icon-paper"),
                    i.setAttribute("aria-hidden", "true"));
                  var n = document.createElement("span");
                  (n.classList.add("h5p-interactive-book-summary-text"),
                    (n.innerHTML = this.l10n.summaryAndSubmit));
                  var o = document.createElement("span");
                  return (
                    o.classList.add(
                      "h5p-interactive-book-summary-menu-button-arrow",
                    ),
                    o.classList.add("icon-up"),
                    o.setAttribute("aria-hidden", "true"),
                    t.appendChild(i),
                    t.appendChild(n),
                    t.appendChild(o),
                    t
                  );
                },
              },
              {
                key: "createCircle",
                value: function (t) {
                  var e = C.computeContrastColor(
                      C.colorBase,
                      C.DEFAULT_COLOR_BG,
                    ),
                    i = document.createElement("div");
                  return (
                    i.classList.add(
                      "h5p-interactive-book-summary-progress-circle",
                    ),
                    i.setAttribute("data-value", t),
                    i.setAttribute("data-start-angle", -Math.PI / 3),
                    i.setAttribute("data-thickness", 13),
                    i.setAttribute(
                      "data-empty-fill",
                      "rgba(".concat(e.rgb().array().join(", "), ", .1)"),
                    ),
                    i.setAttribute(
                      "data-fill",
                      JSON.stringify({ color: e.hex() }),
                    ),
                    i
                  );
                },
              },
              {
                key: "createProgress",
                value: function (t, e, i, n) {
                  var o =
                      4 < arguments.length &&
                      void 0 !== arguments[4] &&
                      arguments[4],
                    r = 5 < arguments.length ? arguments[5] : void 0,
                    s = 6 < arguments.length ? arguments[6] : void 0,
                    a = document.createElement("div"),
                    l = document.createElement("h3");
                  l.innerHTML = t;
                  var c = (100 * i) / n;
                  (void 0 === r && (r = i), void 0 === s && (s = n));
                  t = document.createElement("p");
                  (t.classList.add(
                    "h5p-interactive-book-summary-progressbox-bigtext",
                  ),
                    (t.innerHTML = Math.round(c) + "%"),
                    o &&
                      ((c = document.createElement("span")).classList.add(
                        "absolute-value",
                      ),
                      (c.innerHTML = i),
                      (o = document.createElement("span")).classList.add(
                        "separator",
                      ),
                      (o.innerHTML = "/"),
                      (u = document.createElement("span")).classList.add(
                        "absolute-value",
                      ),
                      (u.innerHTML = n),
                      (t.innerHTML = ""),
                      t.appendChild(c),
                      t.appendChild(o),
                      t.appendChild(u)));
                  var u = document.createElement("span");
                  (u.classList.add(
                    "h5p-interactive-book-summary-progressbox-smalltext",
                  ),
                    (u.innerHTML = e.replace("@count", r).replace("@total", s)),
                    a.appendChild(l),
                    a.appendChild(t),
                    a.appendChild(u));
                  u = document.createElement("div");
                  return (
                    u.appendChild(a),
                    u.appendChild(this.createCircle(i / n)),
                    u
                  );
                },
              },
              {
                key: "addScoreProgress",
                value: function () {
                  var t,
                    e = 0,
                    i = 0,
                    n = S(this.chapters);
                  try {
                    for (n.s(); !(t = n.n()).done; ) {
                      var o = t.value;
                      ((e += o.maxTasks), (i += o.tasksLeft));
                    }
                  } catch (t) {
                    n.e(t);
                  } finally {
                    n.f();
                  }
                  var r = this.createProgress(
                    this.l10n.totalScoreLabel,
                    this.l10n.interactionsProgressSubtext,
                    this.parent.getScore(),
                    this.parent.getMaxScore(),
                    !0,
                    Math.max(e - i, 0),
                    e,
                  );
                  (r.classList.add(
                    "h5p-interactive-book-summary-progress-container",
                  ),
                    r.classList.add(
                      "h5p-interactive-book-summary-score-progress",
                    ));
                  var s = r.querySelector(
                    ".h5p-interactive-book-summary-progress-circle",
                  );
                  return (
                    s.setAttribute("data-empty-fill", "rgb(198, 220, 212)"),
                    s.setAttribute(
                      "data-fill",
                      JSON.stringify({ color: "#0e7c57" }),
                    ),
                    r
                  );
                },
              },
              {
                key: "addBookProgress",
                value: function () {
                  var t = this.createProgress(
                    this.l10n.bookProgress,
                    this.l10n.bookProgressSubtext,
                    this.chapters.filter(function (t) {
                      return t.completed;
                    }).length,
                    this.chapters.length,
                  );
                  return (
                    t.classList.add(
                      "h5p-interactive-book-summary-progress-container",
                    ),
                    t.classList.add(
                      "h5p-interactive-book-summary-book-progress",
                    ),
                    t
                  );
                },
              },
              {
                key: "addInteractionsProgress",
                value: function () {
                  var t,
                    e = 0,
                    i = 0,
                    n = S(this.chapters);
                  try {
                    for (n.s(); !(t = n.n()).done; ) {
                      var o = t.value;
                      ((e += o.maxTasks), (i += o.tasksLeft));
                    }
                  } catch (t) {
                    n.e(t);
                  } finally {
                    n.f();
                  }
                  var r = this.createProgress(
                    this.l10n.interactionsProgress,
                    this.l10n.interactionsProgressSubtext,
                    Math.max(e - i, 0),
                    e,
                  );
                  return (
                    r.classList.add(
                      "h5p-interactive-book-summary-progress-container",
                    ),
                    r.classList.add(
                      "h5p-interactive-book-summary-interactions-progress",
                    ),
                    r
                  );
                },
              },
              {
                key: "addProgressIndicators",
                value: function () {
                  var t;
                  this.behaviour.progressIndicators &&
                    ((t = document.createElement("div")).classList.add(
                      "h5p-interactive-box-summary-progress",
                    ),
                    t.appendChild(this.addScoreProgress()),
                    t.appendChild(this.addBookProgress()),
                    t.appendChild(this.addInteractionsProgress()),
                    setTimeout(function () {
                      return H5P.jQuery(
                        ".h5p-interactive-book-summary-progress-circle",
                      ).circleProgress();
                    }, 100),
                    this.wrapper.appendChild(t));
                },
              },
              {
                key: "addActionButtons",
                value: function () {
                  var t,
                    e = this,
                    i = document.createElement("div");
                  (i.classList.add("h5p-interactive-book-summary-buttons"),
                    this.checkTheAnswerIsUpdated(),
                    this.parent.isSubmitButtonEnabled &&
                      this.parent.isAnswerUpdated &&
                      ((t = this.addButton(
                        "icon-paper-pencil",
                        this.l10n.submitReport,
                      )).classList.add("h5p-interactive-book-summary-submit"),
                      (t.onclick = function () {
                        (e.trigger("submitted"),
                          e.parent.triggerXAPIScored(
                            e.parent.getScore(),
                            e.parent.getMaxScore(),
                            "completed",
                          ),
                          i.classList.add("submitted"),
                          i.querySelector(".answers-submitted").focus(),
                          (e.tempState = JSON.stringify(e.getChapterStats())),
                          (e.parent.isAnswerUpdated = !1));
                      }),
                      i.appendChild(t)),
                    this.behaviour.enableRetry &&
                      i.appendChild(this.createRestartButton()),
                    i.appendChild(this.createSubmittedConfirmation()),
                    this.wrapper.appendChild(i));
                },
              },
              {
                key: "createRestartButton",
                value: function () {
                  var t = this,
                    e = this.addButton("icon-restart", this.l10n.restartLabel);
                  return (
                    e.classList.add("h5p-interactive-book-summary-restart"),
                    (e.onclick = function () {
                      return t.parent.resetTask();
                    }),
                    e
                  );
                },
              },
              {
                key: "createSubmittedConfirmation",
                value: function () {
                  var t = document.createElement("div");
                  t.classList.add("h5p-interactive-book-summary-submitted");
                  var e = document.createElement("span");
                  (e.classList.add("icon-chapter-done"),
                    e.classList.add("icon-check-mark"),
                    t.appendChild(e));
                  e = document.createElement("p");
                  return (
                    (e.innerHTML = this.l10n.yourAnswersAreSubmittedForReview),
                    (e.tabIndex = -1),
                    e.classList.add("answers-submitted"),
                    t.appendChild(e),
                    this.behaviour.enableRetry &&
                      t.appendChild(this.createRestartButton()),
                    t
                  );
                },
              },
              {
                key: "addButton",
                value: function (t, e) {
                  var i = document.createElement("button");
                  ((i.type = "button"),
                    i.classList.add("h5p-interactive-book-summary-button"),
                    (i.innerHTML = e));
                  e = document.createElement("span");
                  return (
                    e.classList.add(t),
                    e.setAttribute("aria-hidden", "true"),
                    i.appendChild(e),
                    i
                  );
                },
              },
              {
                key: "createSectionList",
                value: function (t, r) {
                  var s,
                    e,
                    i,
                    a = this,
                    l = [],
                    c = !1,
                    n = S(t);
                  try {
                    for (n.s(); !(s = n.n()).done; )
                      !(function () {
                        var e = s.value,
                          t = document.createElement("li");
                        (t.classList.add(
                          "h5p-interactive-book-summary-overview-section-details",
                        ),
                          a.behaviour.progressIndicators &&
                            ((o = document.createElement("span")).classList.add(
                              "h5p-interactive-book-summary-section-icon",
                            ),
                            o.classList.add(
                              e.taskDone
                                ? "icon-chapter-done"
                                : "icon-chapter-blank",
                            ),
                            t.appendChild(o)));
                        var i = document.createElement("button");
                        ((i.type = "button"),
                          i.classList.add(
                            "h5p-interactive-book-summary-section-title",
                          ),
                          (i.onclick = function () {
                            var t = {
                              h5pbookid: a.parent.contentId,
                              chapter: "h5p-interactive-book-chapter-".concat(
                                r,
                              ),
                              section: "h5p-interactive-book-section-".concat(
                                e.instance.subContentId,
                              ),
                            };
                            a.parent.trigger("newChapter", t);
                          }));
                        var n =
                            e.instance.contentData &&
                            e.instance.contentData.metadata &&
                            e.instance.contentData.metadata.title,
                          o =
                            e.content &&
                            e.content.metadata &&
                            e.content.metadata.title;
                        i.innerHTML = n || o || "Untitled";
                        o = document.createElement("div");
                        (o.classList.add(
                          "h5p-interactive-book-summary-section-score",
                        ),
                          (o.innerHTML = "-"),
                          "function" == typeof e.instance.getScore &&
                            (o.innerHTML = a.l10n.scoreText
                              .replace("@score", e.instance.getScore())
                              .replace("@maxscore", e.instance.getMaxScore())),
                          e.taskDone
                            ? t.classList.add(
                                "h5p-interactive-book-summary-overview-section-details-task-done",
                              )
                            : (c = !0),
                          t.appendChild(i),
                          t.appendChild(o),
                          l.push(t));
                      })();
                  } catch (t) {
                    n.e(t);
                  } finally {
                    n.f();
                  }
                  return (
                    l.length &&
                      ((e = document.createElement("div")).classList.add(
                        "h5p-interactive-book-summary-overview-section-score-header",
                      ),
                      ((i = document.createElement("div")).innerHTML =
                        this.l10n.score),
                      e.appendChild(i),
                      l.unshift(e)),
                    { hasUnansweredInteractions: c, sectionElements: l }
                  );
                },
              },
              {
                key: "createChapterOverview",
                value: function (e) {
                  var i = this,
                    t = document.createElement("li");
                  t.classList.add(
                    "h5p-interactive-book-summary-overview-section",
                  );
                  var n = document.createElement("h4");
                  n.onclick = function () {
                    var t = {
                      h5pbookid: i.parent.contentId,
                      chapter: "h5p-interactive-book-chapter-".concat(
                        e.instance.subContentId,
                      ),
                      section: "top",
                    };
                    i.parent.trigger("newChapter", t);
                  };
                  var o = document.createElement("span");
                  ((o.innerHTML = e.title),
                    n.appendChild(o),
                    this.behaviour.progressIndicators &&
                      ((r = document.createElement("span")),
                      (o = this.parent.getChapterStatus(e)),
                      r.classList.add("icon-chapter-".concat(o.toLowerCase())),
                      n.appendChild(r)),
                    t.appendChild(n));
                  var r = this.createSectionList(
                      e.sections.filter(function (t) {
                        return t.isTask;
                      }),
                      e.instance.subContentId,
                    ),
                    n = r.sectionElements;
                  !1 === r.hasUnansweredInteractions &&
                    t.classList.add(
                      "h5p-interactive-book-summary-no-interactions",
                    );
                  r = document.createElement("div");
                  (r.classList.add(
                    "h5p-interactive-book-summary-chapter-subheader",
                  ),
                    e.maxTasks
                      ? (r.innerHTML = this.l10n.leftOutOfTotalCompleted
                          .replace(
                            "@left",
                            Math.max(e.maxTasks - e.tasksLeft, 0),
                          )
                          .replace("@max", e.maxTasks))
                      : (r.innerHTML = this.l10n.noInteractions),
                    t.appendChild(r));
                  var s = document.createElement("ul");
                  return (
                    n.length &&
                      n.map(function (t) {
                        return s.appendChild(t);
                      }),
                    t.appendChild(s),
                    t
                  );
                },
              },
              {
                key: "createFilterDropdown",
                value: function () {
                  function t(t, e) {
                    var i = document.createElement("li");
                    i.role = "menuitem";
                    var n = document.createElement("button");
                    return (
                      (n.textContent = t),
                      (n.type = "button"),
                      (n.onclick = function (t) {
                        (o.setFilter(e),
                          r.removeAttribute("active"),
                          s.setAttribute("aria-expanded", "false"),
                          (a.textContent = t.currentTarget.innerHTML));
                      }),
                      i.appendChild(n),
                      i
                    );
                  }
                  var o = this,
                    r = document.createElement("div");
                  r.classList.add("h5p-interactive-book-summary-dropdown");
                  var s = document.createElement("button");
                  (s.setAttribute("aria-haspopup", "true"),
                    s.setAttribute("aria-expanded", "false"),
                    (s.type = "button"),
                    (s.onclick = function () {
                      r.hasAttribute("active")
                        ? (r.removeAttribute("active"),
                          s.setAttribute("aria-expanded", "false"))
                        : (r.setAttribute("active", ""),
                          s.setAttribute("aria-expanded", "true"),
                          s.focus());
                    }));
                  var a = document.createElement("span");
                  ((a.textContent = this.l10n.allInteractions),
                    s.appendChild(a));
                  var e = document.createElement("span");
                  (e.classList.add(
                    "h5p-interactive-book-summary-dropdown-icon",
                  ),
                    e.classList.add("icon-expanded"),
                    e.setAttribute("aria-hidden", "true"),
                    s.appendChild(e));
                  var i = document.createElement("ul");
                  ((i.role = "menu"),
                    i.classList.add(
                      "h5p-interactive-book-summary-dropdown-menu",
                    ));
                  var n = t(this.l10n.allInteractions, this.filterActionAll),
                    e = t(
                      this.l10n.unansweredInteractions,
                      this.filterActionUnanswered,
                    );
                  return (
                    i.appendChild(n),
                    i.appendChild(e),
                    r.appendChild(s),
                    r.appendChild(i),
                    r
                  );
                },
              },
              {
                key: "addSummaryOverview",
                value: function () {
                  var t = document.createElement("ul");
                  t.classList.add("h5p-interactive-book-summary-list");
                  var e = document.createElement("li");
                  e.classList.add(
                    "h5p-interactive-book-summary-overview-header",
                  );
                  var i = document.createElement("h3");
                  ((i.innerHTML = this.l10n.summaryHeader),
                    e.appendChild(i),
                    e.appendChild(this.createFilterDropdown()),
                    t.appendChild(e));
                  var n = document.createElement("ol");
                  n.classList.add("h5p-interactive-book-summary-overview-list");
                  var o,
                    r = S(this.chapters);
                  try {
                    for (r.s(); !(o = r.n()).done; ) {
                      var s = o.value;
                      n.appendChild(this.createChapterOverview(s));
                    }
                  } catch (t) {
                    r.e(t);
                  } finally {
                    r.f();
                  }
                  e = document.createElement("p");
                  (e.classList.add(
                    "h5p-interactive-book-summary-overview-list-empty",
                  ),
                    e.classList.add("h5p-interactive-book-summary-top-section"),
                    e.classList.add(
                      "h5p-interactive-book-summary-bottom-section",
                    ),
                    (e.innerHTML = this.l10n.noInteractions),
                    n.appendChild(e),
                    t.appendChild(n),
                    this.wrapper.appendChild(t));
                },
              },
              {
                key: "addScoreBar",
                value: function () {
                  var t = document.createElement("div");
                  t.classList.add("h5p-interactive-book-summary-score-bar");
                  var e = H5P.JoubelUI.createScoreBar(
                    this.parent.getMaxScore(),
                  );
                  (e.setScore(this.parent.getScore()),
                    e.appendTo(t),
                    this.wrapper.appendChild(t));
                },
              },
              {
                key: "noChapterInteractions",
                value: function () {
                  var t = document.createElement("div");
                  t.classList.add(
                    "h5p-interactive-book-summary-no-chapter-interactions",
                  );
                  var e = document.createElement("p");
                  e.innerHTML = this.l10n.noChapterInteractionBoldText;
                  var i = document.createElement("p");
                  (i.classList.add(
                    "h5p-interactive-book-summary-no-initialized-chapters",
                  ),
                    (i.innerHTML = this.l10n.noChapterInteractionText),
                    t.appendChild(e),
                    t.appendChild(i),
                    this.wrapper.appendChild(t));
                },
              },
              {
                key: "addSummaryPage",
                value: function (t) {
                  if (
                    ((this.wrapper = document.createElement("div")),
                    this.wrapper.classList.add(
                      "h5p-interactive-book-summary-page",
                    ),
                    0 <
                      this.chapters.filter(function (t) {
                        return t.isInitialized;
                      }).length ||
                      this.chapters.some(function (t) {
                        return t.sections.some(function (t) {
                          return t.taskDone;
                        });
                      }))
                  ) {
                    if (
                      (this.parent.pageContent &&
                        this.parent.chapters[
                          this.parent.getChapterId(
                            this.parent.pageContent.targetPage.chapter,
                          )
                        ].isSummary) ||
                      0 === this.parent.chapters.length
                    ) {
                      if (0 < this.parent.chapters.length)
                        for (var e in this.chapters)
                          this.parent.pageContent.initializeChapter(e);
                      (this.addProgressIndicators(),
                        this.addActionButtons(),
                        this.addSummaryOverview(),
                        this.addScoreBar());
                    }
                  } else this.noChapterInteractions();
                  return (
                    Array.from(
                      document.querySelectorAll(
                        ".h5p-interactive-book-summary-footer",
                      ),
                    ).forEach(function (t) {
                      return t.remove();
                    }),
                    t.append(this.wrapper),
                    t
                  );
                },
              },
              {
                key: "checkTheAnswerIsUpdated",
                value: function () {
                  var t,
                    e = this.getChapterStats(),
                    i = JSON.parse(this.tempState),
                    n = S(e.keys());
                  try {
                    for (n.s(); !(t = n.n()).done; ) {
                      var o,
                        r = t.value,
                        s = i[r].state.instances,
                        a = e[r].state.instances,
                        l = e[r].sections,
                        c = S(s.keys());
                      try {
                        for (c.s(); !(o = c.n()).done; ) {
                          var u = o.value;
                          null !== s[u] &&
                            void 0 !== s[u] &&
                            (Array.isArray(s[u]) &&
                              !this.compareStates(s[u], a[u]) &&
                              l[u].taskDone &&
                              (this.parent.isAnswerUpdated = !0),
                            "object" === _(s[u]) &&
                              !Array.isArray(s[u]) &&
                              JSON.stringify(s[u]) !== JSON.stringify(a[u]) &&
                              l[u].taskDone &&
                              (this.parent.isAnswerUpdated = !0));
                        }
                      } catch (t) {
                        c.e(t);
                      } finally {
                        c.f();
                      }
                      if (this.parent.isAnswerUpdated) break;
                    }
                  } catch (t) {
                    n.e(t);
                  } finally {
                    n.f();
                  }
                },
              },
              {
                key: "getChapterStats",
                value: function () {
                  return this.chapters
                    .filter(function (t) {
                      return !t.isSummary;
                    })
                    .map(function (t) {
                      return {
                        sections: t.sections.map(function (t) {
                          return { taskDone: t.taskDone };
                        }),
                        state: t.instance.getCurrentState(),
                      };
                    });
                },
              },
              {
                key: "compareStates",
                value: function (t, i) {
                  return (
                    Array.isArray(t) &&
                    Array.isArray(i) &&
                    t.length === i.length &&
                    t.every(function (t, e) {
                      return t === i[e] || "" === i[e];
                    })
                  );
                },
              },
            ]),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            r
          );
        })();
        function A(t) {
          return (A =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        function M(e, t) {
          var i,
            n = Object.keys(e);
          return (
            Object.getOwnPropertySymbols &&
              ((i = Object.getOwnPropertySymbols(e)),
              t &&
                (i = i.filter(function (t) {
                  return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })),
              n.push.apply(n, i)),
            n
          );
        }
        function L(n) {
          for (var t = 1; t < arguments.length; t++) {
            var o = null != arguments[t] ? arguments[t] : {};
            t % 2
              ? M(Object(o), !0).forEach(function (t) {
                  var e, i;
                  ((e = n),
                    (t = o[(i = t)]),
                    i in e
                      ? Object.defineProperty(e, i, {
                          value: t,
                          enumerable: !0,
                          configurable: !0,
                          writable: !0,
                        })
                      : (e[i] = t));
                })
              : Object.getOwnPropertyDescriptors
                ? Object.defineProperties(
                    n,
                    Object.getOwnPropertyDescriptors(o),
                  )
                : M(Object(o)).forEach(function (t) {
                    Object.defineProperty(
                      n,
                      t,
                      Object.getOwnPropertyDescriptor(o, t),
                    );
                  });
          }
          return n;
        }
        function O() {
          return (O = Object.assign
            ? Object.assign.bind()
            : function (t) {
                for (var e = 1; e < arguments.length; e++) {
                  var i,
                    n = arguments[e];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
                }
                return t;
              }).apply(this, arguments);
        }
        function B(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function $(t, e) {
          return ($ = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function N(t) {
          return (N = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        const R = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && $(t, e));
          })(a, H5P.EventDispatcher);
          var t,
            i,
            n,
            s =
              ((i = a),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = N(i);
                return (function (t, e) {
                  if (e && ("object" === A(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (t) {
                    if (void 0 === t)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return t;
                  })(t);
                })(
                  this,
                  n
                    ? ((t = N(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function a(t, e, i, n, o) {
            var r;
            return (
              (function (t) {
                if (!(t instanceof a))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((r = s.call(this)).parent = n),
              (r.behaviour = t.behaviour),
              (r.params = o),
              (r.targetPage = {}),
              (r.targetPage.redirectFromComponent = !1),
              (r.columnNodes = []),
              (r.chapters = []),
              (r.l10n = t.l10n),
              (r.sidebarIsOpen = !1),
              (r.previousState =
                i.previousState && 0 < Object.keys(i.previousState).length
                  ? i.previousState
                  : null),
              n.hasValidChapters() &&
                ((i = r.createColumns(t, e, i)), r.preloadChapter(i)),
              (r.content = r.createPageContent()),
              (r.container = document.createElement("div")),
              r.container.classList.add(
                "h5p-interactive-book-main",
                "h5p-interactive-book-navigation-hidden",
              ),
              r.container.appendChild(r.content),
              r
            );
          }
          return (
            B((t = a).prototype, [
              {
                key: "getChapters",
                value: function () {
                  var e =
                    !(0 < arguments.length && void 0 !== arguments[0]) ||
                    arguments[0];
                  return this.chapters.filter(function (t) {
                    return !t.isSummary || (t.isSummary && !!e);
                  });
                },
              },
              {
                key: "resetChapters",
                value: function () {
                  this.behaviour.progressIndicators &&
                    !this.behaviour.progressAuto &&
                    this.columnNodes.forEach(function (t) {
                      Array.from(
                        t.querySelectorAll(
                          ".h5p-interactive-book-status-progress-marker > input[type=checkbox]",
                        ),
                      ).forEach(function (t) {
                        return (t.checked = !1);
                      });
                    });
                },
              },
              {
                key: "createPageContent",
                value: function () {
                  var e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-content"),
                    this.columnNodes.forEach(function (t) {
                      e.appendChild(t);
                    }),
                    this.setChapterOrder(this.parent.getActiveChapter()),
                    e
                  );
                },
              },
              {
                key: "setChapterOrder",
                value: function (i) {
                  i < 0 ||
                    i > this.columnNodes.length - 1 ||
                    this.columnNodes.forEach(function (t, e) {
                      (t.classList.remove("h5p-interactive-book-previous"),
                        t.classList.remove("h5p-interactive-book-current"),
                        t.classList.remove("h5p-interactive-book-next"),
                        e === i - 1 ||
                          (e === i &&
                            t.classList.add("h5p-interactive-book-current")));
                    });
                },
              },
              {
                key: "createChapterReadCheckbox",
                value: function (t) {
                  var e = this,
                    i = document.createElement("input");
                  (i.setAttribute("type", "checkbox"),
                    (i.checked = t),
                    (i.onclick = function (t) {
                      e.parent.setChapterRead(void 0, t.target.checked);
                    }));
                  var n = document.createElement("p");
                  n.innerHTML = this.params.l10n.markAsFinished;
                  t = document.createElement("label");
                  return (
                    t.classList.add(
                      "h5p-interactive-book-status-progress-marker",
                    ),
                    t.appendChild(i),
                    t.appendChild(n),
                    t
                  );
                },
              },
              {
                key: "injectSectionId",
                value: function (t, e) {
                  for (
                    var i = e.getElementsByClassName("h5p-column-content"),
                      n = 0;
                    n < t.length;
                    n++
                  )
                    i[n].id = "h5p-interactive-book-section-".concat(
                      t[n].instance.subContentId,
                    );
                },
              },
              {
                key: "preloadChapter",
                value: function (t) {
                  (this.initializeChapter(t), this.initializeChapter(t + 1));
                },
              },
              {
                key: "initializeChapter",
                value: function (t) {
                  if (!(t < 0 || t > this.chapters.length - 1)) {
                    var e,
                      i = this.chapters[t];
                    if (i.isSummary) {
                      var n = this.columnNodes[t];
                      return (
                        i.isInitialized &&
                          (i.instance.setChapters(this.getChapters(!1)),
                          (n.innerHTML = "")),
                        i.instance.addSummaryPage(H5P.jQuery(n)),
                        void (i.isInitialized = !0)
                      );
                    }
                    i.isInitialized ||
                      ((n = this.columnNodes[t]),
                      i.instance.attach(H5P.jQuery(n)),
                      this.injectSectionId(i.sections, n),
                      this.behaviour.progressIndicators &&
                        !this.behaviour.progressAuto &&
                        n.appendChild(
                          this.createChapterReadCheckbox(
                            !(
                              null === (n = this.previousState) ||
                              void 0 === n ||
                              null === (e = n.chapters) ||
                              void 0 === e ||
                              !e[t].completed
                            ),
                          ),
                        ),
                      (i.isInitialized = !0));
                  }
                },
              },
              {
                key: "createColumns",
                value: function (o, r, s) {
                  var a = this,
                    l =
                      (s = O({}, s)).previousState &&
                      0 < Object.keys(s.previousState).length
                        ? s.previousState
                        : null,
                    t = h.extractFragmentsFromURL(
                      this.parent.validateFragments,
                      this.parent.hashWindow,
                    );
                  0 === Object.keys(t).length &&
                    s &&
                    l &&
                    l.urlFragments &&
                    (t = l.urlFragments);
                  var c = [];
                  this.chapters = c;
                  for (var e, i = 0; i < o.chapters.length; i++)
                    !(function (i) {
                      var t = document.createElement("div"),
                        e = L(
                          L({}, s),
                          {},
                          {
                            metadata: L({}, s.metadata),
                            previousState: l ? l.chapters[i].state : {},
                          },
                        ),
                        e = H5P.newRunnable(
                          o.chapters[i],
                          r,
                          void 0,
                          void 0,
                          e,
                        );
                      a.parent.bubbleUp(e, "resize", a.parent);
                      var n = {
                        isInitialized: !1,
                        instance: e,
                        title: o.chapters[i].metadata.title,
                        completed: !!l && l.chapters[i].completed,
                        tasksLeft: l ? l.chapters[i].tasksLeft : 0,
                        isSummary: !1,
                        sections: e.getInstances().map(function (t, e) {
                          return {
                            content: o.chapters[i].params.content[e].content,
                            instance: t,
                            isTask: !1,
                          };
                        }),
                      };
                      (t.classList.add("h5p-interactive-book-chapter"),
                        (t.id = "h5p-interactive-book-chapter-".concat(
                          e.subContentId,
                        )),
                        (n.maxTasks = 0),
                        (n.tasksLeft = 0),
                        n.sections.forEach(function (t, e) {
                          H5P.Column.isTask(t.instance) &&
                            ((t.isTask = !0),
                            n.maxTasks++,
                            n.tasksLeft++,
                            a.behaviour.progressIndicators &&
                              ((t.taskDone =
                                !!l && l.chapters[i].sections[e].taskDone),
                              t.taskDone && n.tasksLeft--));
                        }),
                        c.push(n),
                        a.columnNodes.push(t));
                    })(i);
                  if (
                    (this.parent.hasSummary(c) &&
                      ((u = document.createElement("div")),
                      (e = new D(L({}, o), this.parent, this.getChapters(!1))),
                      this.parent.bubbleUp(e, "resize", this.parent),
                      (e = {
                        isInitialized: !1,
                        instance: e,
                        title: this.l10n.summaryHeader,
                        isSummary: !0,
                        sections: [],
                      }),
                      u.classList.add("h5p-interactive-book-chapter"),
                      (u.id = "h5p-interactive-book-chapter-summary"),
                      (e.maxTasks = e.tasksLeft),
                      c.push(e),
                      this.columnNodes.push(u)),
                    t.chapter && t.h5pbookid == this.parent.contentId)
                  ) {
                    var n,
                      u = this.findChapterIndex(t.chapter);
                    return -1 === u
                      ? 0
                      : (this.parent.setActiveChapter(u),
                        t.section &&
                          ((n = t.headerNumber),
                          setTimeout(function () {
                            (a.redirectSection(t.section, n),
                              a.parent.hasCover() &&
                                a.parent.cover.removeCover());
                          }, 1e3)),
                        u);
                  }
                  return 0;
                },
              },
              {
                key: "redirectSection",
                value: function (t) {
                  var e,
                    i,
                    n =
                      1 < arguments.length && void 0 !== arguments[1]
                        ? arguments[1]
                        : null;
                  "top" === t
                    ? this.parent.trigger("scrollToTop")
                    : (e = document.getElementById(t)) &&
                      (null === n ||
                        ((t = e.querySelectorAll("h2, h3"))[n] && (e = t[n])),
                      (i = document.createElement("div")).setAttribute(
                        "tabindex",
                        "-1",
                      ),
                      e.parentNode.insertBefore(i, e),
                      i.focus(),
                      i.addEventListener("blur", function () {
                        i.parentNode.removeChild(i);
                      }),
                      (this.targetPage.redirectFromComponent = !1),
                      setTimeout(function () {
                        e.scrollIntoView(!0);
                      }, 100));
                },
              },
              {
                key: "findChapterIndex",
                value: function (i) {
                  var n = -1;
                  return (
                    this.columnNodes.forEach(function (t, e) {
                      -1 === n && t.id === i && (n = e);
                    }),
                    n
                  );
                },
              },
              {
                key: "changeChapter",
                value: function (t, e) {
                  var i,
                    n,
                    o,
                    r,
                    s,
                    a = this;
                  this.columnNodes[
                    this.parent.getActiveChapter()
                  ].classList.contains("h5p-interactive-book-animate") ||
                    ((this.targetPage = e),
                    (e =
                      (i = this.parent.getActiveChapter()) !==
                      (n = this.parent.getChapterId(this.targetPage.chapter))),
                    t || this.parent.updateChapterProgress(i, e),
                    this.preloadChapter(n),
                    n < this.columnNodes.length &&
                      ((o = this.columnNodes[i]),
                      (r = this.columnNodes[n]),
                      e && !t
                        ? (this.parent.setActiveChapter(n),
                          r.classList.add(
                            "h5p-interactive-book-".concat(
                              (s = i < n ? "next" : "previous"),
                            ),
                          ),
                          r.classList.add("h5p-interactive-book-animate"),
                          o.classList.add("h5p-interactive-book-animate"),
                          setTimeout(function () {
                            ("previous" == s
                              ? o.classList.add("h5p-interactive-book-next")
                              : (o.classList.remove(
                                  "h5p-interactive-book-current",
                                ),
                                o.classList.add(
                                  "h5p-interactive-book-previous",
                                )),
                              r.classList.remove(
                                "h5p-interactive-book-".concat(s),
                              ));
                          }, 1),
                          setTimeout(function () {
                            (o.classList.remove("h5p-interactive-book-next"),
                              o.classList.remove(
                                "h5p-interactive-book-previous",
                              ),
                              o.classList.remove(
                                "h5p-interactive-book-current",
                              ),
                              r.classList.add("h5p-interactive-book-current"),
                              r.classList.remove(
                                "h5p-interactive-book-animate",
                              ),
                              o.classList.remove(
                                "h5p-interactive-book-animate",
                              ),
                              a.redirectSection(
                                a.targetPage.section,
                                a.targetPage.headerNumber,
                              ),
                              a.parent.trigger("resize"));
                          }, 250))
                        : this.parent.cover && !this.parent.cover.hidden
                          ? this.parent.on("coverRemoved", function () {
                              a.redirectSection(
                                a.targetPage.section,
                                a.targetPage.headerNumber,
                              );
                            })
                          : this.redirectSection(
                              this.targetPage.section,
                              this.targetPage.headerNumber,
                            ),
                      this.parent.sideBar.redirectHandler(n)));
                },
              },
              {
                key: "updateFooter",
                value: function () {
                  var t, e;
                  0 !== this.chapters.length &&
                    ((t = this.parent.getActiveChapter()),
                    (e = this.columnNodes[t]),
                    (t = this.parent.shouldFooterBeHidden(e.clientHeight)),
                    (e = this.parent.statusBarFooter.wrapper.parentNode),
                    t
                      ? e !== this.content &&
                        this.content.appendChild(
                          this.parent.statusBarFooter.wrapper,
                        )
                      : e !== this.parent.$wrapper &&
                        this.parent.$wrapper.append(
                          this.parent.statusBarFooter.wrapper,
                        ));
                },
              },
              {
                key: "toggleNavigationMenu",
                value: function () {
                  var t = this;
                  (this.sidebarIsOpen
                    ? (H5P.Transition.onTransitionEnd(
                        H5P.jQuery(this.container),
                        function () {
                          t.container.classList.add(
                            "h5p-interactive-book-navigation-hidden",
                          );
                        },
                        500,
                      ),
                      this.container.classList.remove(
                        "h5p-interactive-book-navigation-open",
                      ))
                    : (this.container.classList.remove(
                        "h5p-interactive-book-navigation-hidden",
                      ),
                      setTimeout(function () {
                        t.container.classList.add(
                          "h5p-interactive-book-navigation-open",
                        );
                      }, 1)),
                    (this.sidebarIsOpen = !this.sidebarIsOpen));
                },
              },
            ]),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            a
          );
        })();
        function F(t) {
          return (F =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (t) {
                  return typeof t;
                }
              : function (t) {
                  return t &&
                    "function" == typeof Symbol &&
                    t.constructor === Symbol &&
                    t !== Symbol.prototype
                    ? "symbol"
                    : typeof t;
                })(t);
        }
        X(2062);
        var j = [
          "read",
          "displayTOC",
          "hideTOC",
          "nextPage",
          "previousPage",
          "chapterCompleted",
          "partCompleted",
          "incompleteChapter",
          "navigateToTop",
          "markAsFinished",
          "fullscreen",
          "exitFullscreen",
          "bookProgressSubtext",
          "interactionsProgressSubtext",
          "submitReport",
          "restartLabel",
          "summaryHeader",
          "allInteractions",
          "unansweredInteractions",
          "scoreText",
          "leftOutOfTotalCompleted",
          "noInteractions",
          "score",
          "summaryAndSubmit",
          "noChapterInteractionBoldText",
          "noChapterInteractionText",
          "yourAnswersAreSubmittedForReview",
          "bookProgress",
          "interactionsProgress",
          "totalScoreLabel",
        ];
        function z(e, t) {
          var i,
            n = Object.keys(e);
          return (
            Object.getOwnPropertySymbols &&
              ((i = Object.getOwnPropertySymbols(e)),
              t &&
                (i = i.filter(function (t) {
                  return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })),
              n.push.apply(n, i)),
            n
          );
        }
        function W(n) {
          for (var t = 1; t < arguments.length; t++) {
            var o = null != arguments[t] ? arguments[t] : {};
            t % 2
              ? z(Object(o), !0).forEach(function (t) {
                  var e, i;
                  ((e = n),
                    (t = o[(i = t)]),
                    i in e
                      ? Object.defineProperty(e, i, {
                          value: t,
                          enumerable: !0,
                          configurable: !0,
                          writable: !0,
                        })
                      : (e[i] = t));
                })
              : Object.getOwnPropertyDescriptors
                ? Object.defineProperties(
                    n,
                    Object.getOwnPropertyDescriptors(o),
                  )
                : z(Object(o)).forEach(function (t) {
                    Object.defineProperty(
                      n,
                      t,
                      Object.getOwnPropertyDescriptor(o, t),
                    );
                  });
          }
          return n;
        }
        function q() {
          return (q = Object.assign
            ? Object.assign.bind()
            : function (t) {
                for (var e = 1; e < arguments.length; e++) {
                  var i,
                    n = arguments[e];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
                }
                return t;
              }).apply(this, arguments);
        }
        function V(t, e) {
          for (var i = 0; i < e.length; i++) {
            var n = e[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(t, n.key, n));
          }
        }
        function U(t, e) {
          return (U = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (t, e) {
                return ((t.__proto__ = e), t);
              })(t, e);
        }
        function Q(t) {
          if (void 0 === t)
            throw new ReferenceError(
              "this hasn't been initialised - super() hasn't been called",
            );
          return t;
        }
        function Y(t) {
          return (Y = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (t) {
                return t.__proto__ || Object.getPrototypeOf(t);
              })(t);
        }
        var G = (function () {
          !(function (t, e) {
            if ("function" != typeof e && null !== e)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((t.prototype = Object.create(e && e.prototype, {
              constructor: { value: t, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(t, "prototype", { writable: !1 }),
              e && U(t, e));
          })(a, H5P.EventDispatcher);
          var t,
            e,
            i,
            n,
            s =
              ((i = a),
              (n = (function () {
                if ("undefined" == typeof Reflect || !Reflect.construct)
                  return !1;
                if (Reflect.construct.sham) return !1;
                if ("function" == typeof Proxy) return !0;
                try {
                  return (
                    Boolean.prototype.valueOf.call(
                      Reflect.construct(Boolean, [], function () {}),
                    ),
                    !0
                  );
                } catch (t) {
                  return !1;
                }
              })()),
              function () {
                var t,
                  e = Y(i);
                return (function (t, e) {
                  if (e && ("object" === F(e) || "function" == typeof e))
                    return e;
                  if (void 0 !== e)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return Q(t);
                })(
                  this,
                  n
                    ? ((t = Y(this).constructor),
                      Reflect.construct(e, arguments, t))
                    : e.apply(this, arguments),
                );
              });
          function a(t, e) {
            var r,
              i =
                2 < arguments.length && void 0 !== arguments[2]
                  ? arguments[2]
                  : {};
            !(function (t) {
              if (!(t instanceof a))
                throw new TypeError("Cannot call a class as a function");
            })(this);
            var n = Q((r = s.call(this)));
            ((r.contentId = e),
              (r.previousState = i.previousState),
              t &&
                t.behaviour &&
                t.behaviour.baseColor &&
                !C.isBaseColor(t.behaviour.baseColor) &&
                (C.setBase(t.behaviour.baseColor),
                (o = document.createElement("style")).styleSheet
                  ? (o.styleSheet.cssText = C.getCSS())
                  : o.appendChild(document.createTextNode(C.getCSS())),
                document.head.appendChild(o)),
              (r.activeChapter = 0),
              (r.newHandler = {}),
              (r.completed = !1),
              (r.params = a.sanitizeConfig(t)),
              (r.l10n = r.params.l10n),
              (r.params.behaviour = r.params.behaviour || {}),
              (r.mainWrapper = null),
              (r.currentRatio = null),
              (r.smallSurface = "h5p-interactive-book-small"),
              (r.mediumSurface = "h5p-interactive-book-medium"),
              (r.largeSurface = "h5p-interactive-book-large"),
              (r.chapters = []),
              (r.isSubmitButtonEnabled = !1),
              (r.isAnswerUpdated = !0),
              void 0 !== i.isScoringEnabled || void 0 !== i.isReportingEnabled
                ? (r.isSubmitButtonEnabled =
                    i.isScoringEnabled || i.isReportingEnabled)
                : void 0 !== H5PIntegration.reportingIsEnabled &&
                  (r.isSubmitButtonEnabled = H5PIntegration.reportingIsEnabled),
              (r.params.behaviour.enableSolutionsButton = !1),
              (r.params.behaviour.enableRetry =
                null === (o = r.params.behaviour.enableRetry) ||
                void 0 === o ||
                o),
              (r.getAnswerGiven = function () {
                return r.chapters.reduce(function (t, e) {
                  return "function" == typeof e.instance.getAnswerGiven
                    ? t && e.instance.getAnswerGiven()
                    : t;
                }, !0);
              }),
              (r.getScore = function () {
                return 0 < r.chapters.length
                  ? r.chapters.reduce(function (t, e) {
                      return "function" == typeof e.instance.getScore
                        ? t + e.instance.getScore()
                        : t;
                    }, 0)
                  : (r.previousState && r.previousState.score) || 0;
              }),
              (r.getMaxScore = function () {
                return 0 < r.chapters.length
                  ? r.chapters.reduce(function (t, e) {
                      return "function" == typeof e.instance.getMaxScore
                        ? t + e.instance.getMaxScore()
                        : t;
                    }, 0)
                  : (r.previousState && r.previousState.maxScore) || 0;
              }),
              (r.showSolutions = function () {
                r.chapters.forEach(function (t) {
                  ("function" == typeof t.instance.toggleReadSpeaker &&
                    t.instance.toggleReadSpeaker(!0),
                    "function" == typeof t.instance.showSolutions &&
                      t.instance.showSolutions(),
                    "function" == typeof t.instance.toggleReadSpeaker &&
                      t.instance.toggleReadSpeaker(!1));
                });
              }),
              (r.resetTask = function () {
                if (r.hasValidChapters()) {
                  for (var t in (r.chapters.forEach(function (t, e) {
                    ("function" == typeof t.instance.resetTask &&
                      t.instance.resetTask(),
                      (t.completed = !1),
                      (t.tasksLeft = t.maxTasks),
                      t.sections.forEach(function (t) {
                        return (t.taskDone = !1);
                      }),
                      r.setChapterRead(e, !1));
                  }),
                  r.previousState))
                    delete r.previousState[t];
                  r.hashWindow.location.hash = "";
                  var e = r.getActiveChapter();
                  (r.redirectChapter({
                    h5pbookid: r.contentId,
                    chapter: r.pageContent.columnNodes[0].id,
                    section: "top",
                  }),
                    (r.chapters[e].completed = !1),
                    r.hasCover() && r.displayCover(r.mainWrapper),
                    (r.isAnswerUpdated = !1),
                    r.setActivityStarted(!0),
                    r.pageContent.resetChapters(),
                    r.sideBar.resetIndicators());
                }
              }),
              (r.getXAPIData = function () {
                var t = r.createXAPIEventTemplate("answered");
                return (
                  r.addQuestionToXAPI(t),
                  t.setScoredResult(
                    r.getScore(),
                    r.getMaxScore(),
                    Q(r),
                    !0,
                    r.getScore() === r.getMaxScore(),
                  ),
                  {
                    statement: t.data.statement,
                    children: r.getXAPIDataFromChildren(
                      r.chapters.map(function (t) {
                        return t.instance;
                      }),
                    ),
                  }
                );
              }),
              (r.getXAPIDataFromChildren = function (t) {
                return t
                  .map(function (t) {
                    if ("function" == typeof t.getXAPIData)
                      return t.getXAPIData();
                  })
                  .filter(function (t) {
                    return !!t;
                  });
              }),
              (r.addQuestionToXAPI = function (t) {
                q(
                  t.getVerifiedStatementValue(["object", "definition"]),
                  r.getxAPIDefinition(),
                );
              }),
              (r.getxAPIDefinition = function () {
                return {
                  interactionType: "compound",
                  type: "http://adlnet.gov/expapi/activities/cmi.interaction",
                  description: { "en-US": "" },
                };
              }),
              (r.getCurrentState = function () {
                var t,
                  e = r.chapters
                    .filter(function (t) {
                      return !t.isSummary;
                    })
                    .map(function (t) {
                      return {
                        completed: t.completed || null,
                        sections: t.sections.map(function (t) {
                          return { taskDone: t.taskDone || null };
                        }),
                        state: t.instance.getCurrentState() || null,
                      };
                    }),
                  e = {
                    urlFragments:
                      !r.hashWindow.location.hash &&
                      null !== (t = r.previousState) &&
                      void 0 !== t &&
                      t.urlFragments
                        ? r.previousState.urlFragments
                        : h.extractFragmentsFromURL(
                            r.validateFragments,
                            r.hashWindow,
                          ),
                    chapters: e,
                  };
                return (
                  0 < r.activeChapter &&
                    ((e.score = r.getScore()), (e.maxScore = r.getMaxScore())),
                  e
                );
              }),
              (r.getContext = function () {
                return r.cover && !r.cover.hidden
                  ? {}
                  : { type: "page", value: r.activeChapter + 1 };
              }),
              (r.hasCover = function () {
                return r.cover && r.cover.container;
              }),
              (r.hasSummary = function () {
                var t =
                  0 < arguments.length && void 0 !== arguments[0]
                    ? arguments[0]
                    : r.chapters;
                return (
                  r.hasChaptersTasks(t) &&
                  r.params.behaviour.displaySummary &&
                  !0 === r.params.behaviour.displaySummary
                );
              }),
              (r.hasChaptersTasks = function (t) {
                return (
                  0 <
                  t.filter(function (t) {
                    return (
                      0 <
                      t.sections.filter(function (t) {
                        return !0 === t.isTask;
                      }).length
                    );
                  }).length
                );
              }),
              (r.hasValidChapters = function () {
                return 0 < r.params.chapters.length;
              }),
              (r.getActiveChapter = function () {
                return 0 < arguments.length &&
                  void 0 !== arguments[0] &&
                  arguments[0]
                  ? r.chapters[r.activeChapter]
                  : r.activeChapter;
              }),
              (r.setActiveChapter = function (t) {
                ((t = parseInt(t)), isNaN(t) || (r.activeChapter = t));
              }),
              (r.validateFragments = function (t) {
                return (
                  void 0 !== t.chapter &&
                  String(t.h5pbookid) === String(n.contentId)
                );
              }),
              (r.bubbleUp = function (t, e, i) {
                t.on(e, function (t) {
                  ((i.bubblingUpwards = !0),
                    i.trigger(e, t),
                    (i.bubblingUpwards = !1));
                });
              }),
              (r.isMenuOpen = function () {
                return r.statusBarHeader.isMenuOpen();
              }),
              (r.isSmallSurface = function () {
                return r.mainWrapper && r.mainWrapper.hasClass(r.smallSurface);
              }),
              (r.getRatio = function () {
                return (
                  r.mainWrapper.width() /
                  parseFloat(r.mainWrapper.css("font-size"))
                );
              }),
              (r.setWrapperClassFromRatio = function (t) {
                var e =
                  1 < arguments.length && void 0 !== arguments[1]
                    ? arguments[1]
                    : r.getRatio();
                e !== r.currentRatio &&
                  (r.breakpoints().forEach(function (t) {
                    t.shouldAdd(e)
                      ? r.mainWrapper.addClass(t.className)
                      : r.mainWrapper.removeClass(t.className);
                  }),
                  (r.currentRatio = e));
              }),
              (r.resize = function () {
                var t, e;
                r.pageContent &&
                  r.hasValidChapters() &&
                  r.mainWrapper &&
                  (r.setWrapperClassFromRatio(r.mainWrapper),
                  (t = r.getActiveChapter()),
                  null !== (e = r.pageContent.columnNodes[t]).offsetParent &&
                    (r.bubblingUpwards ||
                      r.pageContent.chapters[t].instance.trigger("resize"),
                    r.pageContent.content.style.height ===
                      "".concat(e.offsetHeight, "px") ||
                      e.classList.contains("h5p-interactive-book-animate") ||
                      ((r.pageContent.content.style.height = "".concat(
                        e.offsetHeight,
                        "px",
                      )),
                      r.pageContent.updateFooter(),
                      setTimeout(function () {
                        r.trigger("resize");
                      }, 10))));
              }),
              r.on("resize", r.resize, Q(r)),
              r.on("toggleMenu", function (t) {
                r.sideBar.container.addEventListener(
                  "transitionend",
                  function () {
                    r.trigger("resize");
                  },
                );
                t = !(
                  null !== (t = t.data) &&
                  void 0 !== t &&
                  t.shouldNotFocusNav
                );
                (r.pageContent.toggleNavigationMenu(),
                  r.statusBarHeader.menuToggleButton.setAttribute(
                    "aria-expanded",
                    r.statusBarHeader.menuToggleButton.classList.toggle(
                      "h5p-interactive-book-status-menu-active",
                    )
                      ? "true"
                      : "false",
                  ),
                  r.pageContent.sidebarIsOpen && t && r.sideBar.focus());
              }),
              r.on("scrollToTop", function () {
                var t;
                !0 === H5P.isFullscreen
                  ? (t = r.pageContent.container).scrollBy(0, -t.scrollHeight)
                  : r.statusBarHeader.wrapper.scrollIntoView(!0);
              }),
              r.on("newChapter", function (t) {
                var e;
                r.pageContent.columnNodes[
                  r.getActiveChapter()
                ].classList.contains("h5p-interactive-book-animate") ||
                  ((r.newHandler = t.data),
                  (t.data.newHash = h.createFragmentsString(r.newHandler)),
                  (r.newHandler.redirectFromComponent = !0),
                  r.getChapterId(t.data.chapter) === r.activeChapter &&
                  h.areFragmentsEqual(
                    t.data,
                    h.extractFragmentsFromURL(
                      r.validateFragments,
                      r.hashWindow,
                    ),
                    ["h5pbookid", "chapter", "section", "headerNumber"],
                  )
                    ? r.pageContent.changeChapter(!1, t.data)
                    : (r.params.behaviour.progressAuto &&
                        ((e = r.getChapterId(r.newHandler.chapter)),
                        r.isFinalChapterWithoutTask(e) && r.setChapterRead(e)),
                      H5P.trigger(Q(r), "changeHash", t.data),
                      H5P.trigger(Q(r), "scrollToTop")));
              }),
              (r.isCurrentChapterRead = function () {
                return r.isChapterRead(
                  r.chapters[r.activeChapter],
                  r.params.behaviour.progressAuto,
                );
              }),
              (r.isChapterRead = function (t) {
                var e =
                  1 < arguments.length && void 0 !== arguments[1]
                    ? arguments[1]
                    : r.params.behaviour.progressAuto;
                return t.completed || (e && 0 === t.tasksLeft);
              }),
              (r.isFinalChapterWithoutTask = function (t) {
                return (
                  0 === r.chapters[t].maxTasks &&
                  r.chapters
                    .slice(0, t)
                    .concat(r.chapters.slice(t + 1))
                    .every(function (t) {
                      return 0 === t.tasksLeft;
                    })
                );
              }),
              (r.setChapterRead = function () {
                var t =
                    0 < arguments.length && void 0 !== arguments[0]
                      ? arguments[0]
                      : r.activeChapter,
                  e =
                    !(1 < arguments.length && void 0 !== arguments[1]) ||
                    arguments[1];
                (r.handleChapterCompletion(t, e),
                  r.sideBar.updateChapterProgressIndicator(
                    t,
                    e
                      ? "DONE"
                      : r.hasChapterStartedTasks(r.chapters[t])
                        ? "STARTED"
                        : "BLANK",
                  ));
              }),
              (r.hasChapterStartedTasks = function (t) {
                return (
                  0 <
                  t.sections.filter(function (t) {
                    return t.taskDone;
                  }).length
                );
              }),
              (r.getChapterStatus = function (t) {
                var e =
                    1 < arguments.length && void 0 !== arguments[1]
                      ? arguments[1]
                      : r.params.behaviour.progressAuto,
                  i = "BLANK";
                return (
                  r.isChapterRead(t, e)
                    ? (i = "DONE")
                    : r.hasChapterStartedTasks(t) && (i = "STARTED"),
                  i
                );
              }),
              (r.updateChapterProgress = function (t) {
                var e,
                  i =
                    1 < arguments.length &&
                    void 0 !== arguments[1] &&
                    arguments[1];
                r.params.behaviour.progressIndicators &&
                  ("DONE" ===
                    (i = (e = r.chapters[t]).maxTasks
                      ? r.getChapterStatus(e)
                      : r.isChapterRead(e) && i
                        ? "DONE"
                        : "BLANK") && r.handleChapterCompletion(t),
                  r.sideBar.updateChapterProgressIndicator(t, i));
              }),
              (r.getChapterId = function (t) {
                t = t.replace("h5p-interactive-book-chapter-", "");
                t = r.chapters
                  .map(function (t) {
                    return t.instance.subContentId;
                  })
                  .indexOf(t);
                return -1 === t ? 0 : t;
              }),
              (r.handleChapterCompletion = function (t) {
                t = r.chapters[t];
                if (!0 !== t.isSummary) {
                  if (
                    !(
                      !(1 < arguments.length && void 0 !== arguments[1]) ||
                      arguments[1]
                    )
                  )
                    return (
                      (t.completed = !1),
                      (r.completed = !1),
                      void r.trigger("bookCompleted", {
                        completed: r.completed,
                      })
                    );
                  (t.completed ||
                    ((t.completed = !0),
                    t.instance.triggerXAPIScored(
                      t.instance.getScore(),
                      t.instance.getMaxScore(),
                      "completed",
                    )),
                    !r.completed &&
                      r.chapters
                        .filter(function (t) {
                          return !t.isSummary;
                        })
                        .every(function (t) {
                          return t.completed;
                        }) &&
                      ((r.completed = !0),
                      r.trigger("bookCompleted", { completed: r.completed })));
                }
              }),
              (r.shouldFooterBeHidden = function () {
                return r.isFullscreen;
              }),
              (r.getContainerWidth = function () {
                return r.pageContent && r.pageContent.container
                  ? r.pageContent.container.offsetWidth
                  : 0;
              }),
              (r.changeChapter = function (t) {
                (r.pageContent.changeChapter(t, r.newHandler),
                  r.statusBarHeader.updateStatusBar(),
                  r.statusBarFooter.updateStatusBar(),
                  (r.newHandler.redirectFromComponent = !1));
              }),
              (r.breakpoints = function () {
                return [
                  {
                    className: r.smallSurface,
                    shouldAdd: function (t) {
                      return t < 43;
                    },
                  },
                  {
                    className: r.mediumSurface,
                    shouldAdd: function (t) {
                      return 43 <= t && t < 60;
                    },
                  },
                  {
                    className: r.largeSurface,
                    shouldAdd: function (t) {
                      return 60 <= t;
                    },
                  },
                ];
              }),
              H5P.on(Q(r), "respondChangeHash", function () {
                var t = h.extractFragmentsFromURL(
                  n.validateFragments,
                  r.hashWindow,
                );
                t.h5pbookid &&
                  String(t.h5pbookid) === String(n.contentId) &&
                  r.redirectChapter(t);
              }),
              H5P.on(Q(r), "changeHash", function (t) {
                String(t.data.h5pbookid) === String(r.contentId) &&
                  (r.hashWindow.location.hash = t.data.newHash);
              }),
              H5P.externalDispatcher.on("xAPI", function (t) {
                var e,
                  i =
                    -1 <
                    [
                      "answered",
                      "completed",
                      "interacted",
                      "attempted",
                    ].indexOf(t.getVerb()),
                  t = n.chapters.length;
                n !== this &&
                  i &&
                  t &&
                  (e =
                    this.subContentId ||
                    (null === (e = this.contentData) || void 0 === e
                      ? void 0
                      : e.subContentId)) &&
                  n.setSectionStatusByID(e, n.activeChapter);
              }),
              (r.redirectChapter = function (t) {
                (r.newHandler.redirectFromComponent ||
                  (t.h5pbookid && String(t.h5pbookid) === String(n.contentId)
                    ? (n.newHandler = t)
                    : (n.newHandler = {
                        chapter: "h5p-interactive-book-chapter-".concat(
                          n.chapters[0].instance.subContentId,
                        ),
                        h5pbookid: n.h5pbookid,
                      })),
                  n.changeChapter(!1));
              }),
              (r.setSectionStatusByID = function (n, o) {
                r.chapters[o].sections.forEach(function (t, e) {
                  var i = t.instance;
                  i.subContentId !== n ||
                    t.taskDone ||
                    ((t.taskDone = !i.getAnswerGiven || i.getAnswerGiven()),
                    r.sideBar.setSectionMarker(o, e),
                    t.taskDone && --r.chapters[o].tasksLeft,
                    r.updateChapterProgress(o));
                });
              }),
              (r.addHashListener = function (t) {
                (t.addEventListener("hashchange", function (t) {
                  H5P.trigger(Q(r), "respondChangeHash", t);
                }),
                  (r.hashWindow = t));
              }));
            try {
              r.addHashListener(top);
            } catch (t) {
              if (!(t instanceof DOMException)) throw t;
              r.addHashListener(window);
            }
            ((r.displayCover = function (t) {
              (r.hideAllElements(!0),
                t.append(r.cover.container),
                t.addClass("covered"),
                r.cover.initMedia());
            }),
              (r.attach = function (t) {
                ((r.mainWrapper = t).addClass(
                  "h5p-interactive-book h5p-scrollable-fullscreen",
                ),
                  r.isEdge18orEarlier() && t.addClass("edge-18"),
                  r.setWrapperClassFromRatio(r.mainWrapper),
                  r.cover && r.displayCover(t),
                  t.append(r.statusBarHeader.wrapper));
                var e = r.pageContent.container.firstChild;
                (e &&
                  r.pageContent.container.insertBefore(r.sideBar.container, e),
                  t.append(r.pageContent.container),
                  t.append(r.statusBarFooter.wrapper),
                  (r.$wrapper = t),
                  r.params.behaviour.defaultTableOfContents &&
                    !r.isSmallSurface() &&
                    r.trigger("toggleMenu", { shouldNotFocusNav: !0 }),
                  r.pageContent.updateFooter());
              }),
              (r.isEdge18orEarlier = function () {
                var t = window.navigator.userAgent,
                  e = t.indexOf("Edge/");
                if (e < 0) return !1;
                e = t.substring(e + 5, t.indexOf(".", e));
                return parseInt(e) <= 18;
              }),
              (r.hideAllElements = function (t) {
                var e = [
                  this.statusBarHeader.wrapper,
                  this.statusBarFooter.wrapper,
                  this.pageContent.container,
                ];
                t
                  ? e.forEach(function (t) {
                      (t.classList.add("h5p-content-hidden"),
                        t.classList.add("h5p-interactive-book-cover-present"));
                    })
                  : e.forEach(function (t) {
                      (t.classList.remove("h5p-content-hidden"),
                        t.classList.remove(
                          "h5p-interactive-book-cover-present",
                        ));
                    });
              }),
              r.params.showCoverPage &&
                (r.cover = new k(
                  r.params.bookCover,
                  i.metadata.title,
                  r.l10n.read,
                  e,
                  Q(r),
                )));
            var o = W(W({}, i), {}, { parent: Q(r) });
            return (
              (r.pageContent = new R(r.params, e, o, Q(r), {
                l10n: { markAsFinished: r.l10n.markAsFinished },
                behaviour: r.params.behaviour,
              })),
              (r.chapters = r.pageContent.getChapters()),
              (r.sideBar = new d(r.params, e, i.metadata.title, Q(r))),
              r.chapters.forEach(function (t, e) {
                r.setChapterRead(e, t.completed);
              }),
              (r.statusBarHeader = new v(
                e,
                r.chapters.length,
                Q(r),
                {
                  l10n: r.l10n,
                  a11y: r.params.a11y,
                  behaviour: r.params.behaviour,
                  displayFullScreenButton: !0,
                  displayMenuToggleButton: !0,
                },
                "h5p-interactive-book-status-header",
              )),
              (r.statusBarFooter = new v(
                e,
                r.chapters.length,
                Q(r),
                {
                  l10n: r.l10n,
                  a11y: r.params.a11y,
                  behaviour: r.params.behaviour,
                  displayToTopButton: !0,
                },
                "h5p-interactive-book-status-footer",
              )),
              r.hasCover()
                ? (r.hideAllElements(!0),
                  r.on("coverRemoved", function () {
                    (r.hideAllElements(!1),
                      r.trigger("resize"),
                      r.setActivityStarted(),
                      r.statusBarHeader.progressBar.progress.focus());
                  }))
                : r.setActivityStarted(),
              r.hasValidChapters() &&
                (r.statusBarHeader.updateStatusBar(),
                r.statusBarFooter.updateStatusBar()),
              r
            );
          }
          return (
            (t = a),
            (e = [
              {
                key: "sanitizeConfig",
                value: function (t) {
                  var e = t.read,
                    i = void 0 === e ? "Read" : e,
                    n = t.displayTOC,
                    o =
                      void 0 === n
                        ? "Display &#039;Table of contents&#039;"
                        : n,
                    r = t.hideTOC,
                    s = void 0 === r ? "Hide &#039;Table of contents&#039;" : r,
                    a = t.nextPage,
                    l = void 0 === a ? "Next page" : a,
                    c = t.previousPage,
                    u = void 0 === c ? "Previous page" : c,
                    h = t.chapterCompleted,
                    d = void 0 === h ? "Page completed!" : h,
                    p = t.partCompleted,
                    f = void 0 === p ? "@pages of @total completed" : p,
                    m = t.incompleteChapter,
                    g = void 0 === m ? "Incomplete page" : m,
                    v = t.navigateToTop,
                    b = void 0 === v ? "Navigate to the top" : v,
                    y = t.markAsFinished,
                    w = void 0 === y ? "I have finished this page" : y,
                    x = t.fullscreen,
                    k = void 0 === x ? "Fullscreen" : x,
                    C = t.exitFullscreen,
                    P = void 0 === C ? "Exit fullscreen" : C,
                    _ = t.bookProgressSubtext,
                    S = void 0 === _ ? "@count of @total pages" : _,
                    T = t.interactionsProgressSubtext,
                    H = void 0 === T ? "@count of @total interactions" : T,
                    I = t.submitReport,
                    E = void 0 === I ? "Submit Report" : I,
                    e = t.restartLabel,
                    n = void 0 === e ? "Restart" : e,
                    r = t.summaryHeader,
                    a = void 0 === r ? "Summary" : r,
                    c = t.allInteractions,
                    h = void 0 === c ? "All interactions" : c,
                    p = t.unansweredInteractions,
                    m = void 0 === p ? "Unanswered interactions" : p,
                    v = t.scoreText,
                    y = void 0 === v ? "@score / @maxscore" : v,
                    x = t.leftOutOfTotalCompleted,
                    C =
                      void 0 === x ? "@left of @max interactinos completed" : x,
                    _ = t.noInteractions,
                    T = void 0 === _ ? "No interactions" : _,
                    I = t.score,
                    e = void 0 === I ? "Score" : I,
                    r = t.summaryAndSubmit,
                    c = void 0 === r ? "Summary & submit" : r,
                    p = t.noChapterInteractionBoldText,
                    v =
                      void 0 === p
                        ? "You have not interacted with any pages."
                        : p,
                    x = t.noChapterInteractionText,
                    _ =
                      void 0 === x
                        ? "You have to interact with at least one page before you can see the summary."
                        : x,
                    I = t.yourAnswersAreSubmittedForReview,
                    r =
                      void 0 === I
                        ? "Your answers are submitted for review!"
                        : I,
                    p = t.bookProgress,
                    x = void 0 === p ? "Book progress" : p,
                    I = t.interactionsProgress,
                    p = void 0 === I ? "Interactions progress" : I,
                    I = t.totalScoreLabel,
                    I = void 0 === I ? "Total score" : I,
                    t = (function (t, e) {
                      if (null == t) return {};
                      var i,
                        n = (function (t, e) {
                          if (null == t) return {};
                          for (
                            var i, n = {}, o = Object.keys(t), r = 0;
                            r < o.length;
                            r++
                          )
                            ((i = o[r]), 0 <= e.indexOf(i) || (n[i] = t[i]));
                          return n;
                        })(t, e);
                      if (Object.getOwnPropertySymbols)
                        for (
                          var o = Object.getOwnPropertySymbols(t), r = 0;
                          r < o.length;
                          r++
                        )
                          ((i = o[r]),
                            0 <= e.indexOf(i) ||
                              (Object.prototype.propertyIsEnumerable.call(
                                t,
                                i,
                              ) &&
                                (n[i] = t[i])));
                      return n;
                    })(t, j);
                  return (
                    (t.chapters = t.chapters
                      .map(function (t) {
                        return (
                          (t.params.content = t.params.content.filter(
                            function (t) {
                              return t.content;
                            },
                          )),
                          t
                        );
                      })
                      .filter(function (t) {
                        return t.params.content && 0 < t.params.content.length;
                      })),
                    (t.behaviour.displaySummary =
                      void 0 === t.behaviour.displaySummary ||
                      t.behaviour.displaySummary),
                    (t.l10n = {
                      read: i,
                      displayTOC: o,
                      hideTOC: s,
                      nextPage: l,
                      previousPage: u,
                      chapterCompleted: d,
                      partCompleted: f,
                      incompleteChapter: g,
                      navigateToTop: b,
                      markAsFinished: w,
                      fullscreen: k,
                      exitFullscreen: P,
                      bookProgressSubtext: S,
                      interactionsProgressSubtext: H,
                      submitReport: E,
                      restartLabel: n,
                      summaryHeader: a,
                      allInteractions: h,
                      unansweredInteractions: m,
                      scoreText: y,
                      leftOutOfTotalCompleted: C,
                      noInteractions: T,
                      score: e,
                      summaryAndSubmit: c,
                      noChapterInteractionBoldText: v,
                      noChapterInteractionText: _,
                      yourAnswersAreSubmittedForReview: r,
                      bookProgress: x,
                      interactionsProgress: p,
                      totalScoreLabel: I,
                    }),
                    t
                  );
                },
              },
            ]),
            null && V(t.prototype, null),
            V(t, e),
            Object.defineProperty(t, "prototype", { writable: !1 }),
            a
          );
        })();
        (H5P = H5P || {}).InteractiveBook = G;
      })());
  })());
const realH5PGetPath = H5P.getPath;
H5P.getPath = function (t, e) {
  return t.startsWith("data:") ? t : realH5PGetPath(t, e);
};
var furtherH5PInlineResources = {
  "jQuery.ui-1.10/images/ui-bg_flat_0_aaaaaa_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAe0lEQVRoge3OMQHAIBAAMcC/kjdZJHTI0A4XBdkz86wfO18H3hRUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUF8O8A8WdY6opAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_55_fbf9ee_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAP0lEQVQ4je3PMQrAMABC0a/3v2zX0mCXNkOgc6C4PARd5DqPGKCU8luS8SbAQhiCQRgJE56kZTfbbP9RSvnkBsWcEAZRWcgqAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_dadada_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANklEQVQ4jWN48uTJfyYGBgaGUWKUGCWGLfHt2zcoi5GREYNgYmJCZiG42IiB98woMUqMEtgIAMdjCdyg+eEBAAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_75_e6e6e6_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANUlEQVQ4je3LMQoAIBADwb38/6t5wFXaWAiCtUiaYZvF9hBACOFbuntVVe11B0CSjjeE8BwThQIJ8dhEl0YAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-bg_flat_75_ffffff_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAeUlEQVRoge3OMQHAIBAAsVL/nh8JDDfAkCjImpn5HvbfDpwIVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVhtqiwTEKTLXTgAAAABJRU5ErkJggg==",
  "jQuery.ui-1.10/images/ui-bg_glass_65_ffffff_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAMElEQVQ4je3LIQ4AIBTD0O3f/8wrFgmKhMy8pKJKwkhSKeVbbGuAPU9f4PIopTxgAeS0DRtI4yK0AAAAAElFTkSuQmCC",
  "jQuery.ui-1.10/images/ui-bg_glass_95_fef1ec_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAPklEQVQ4je3PMQqAMABD0Z/c/7aCIAXjJIhD10LJ8vgZw30eMUApZV/GhZNgSTjoLYElY/hNMJ/S6gullCkPiCIPCr4NiEwAAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-icons_454545_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/animated-overlay.gif":
    "data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==",
  "jQuery.ui-1.10/images/ui-bg_highlight-soft_75_cccccc_1x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAYAAABHLFpgAAAALElEQVQYlWN49OjRfyYGBgaGIUT8//8fSqBx0Yh///4RL8vAwAAVQ2MNOwIAl6g6KkOJwk8AAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-icons_888888_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_cd0a0a_256x240.png":
    "data:image/png;base64, ",
  "H5P.FontIcons-1.0/selection.json":
    "data:application/json;base64, ",
  "jQuery.ui-1.10/images/ui-icons_222222_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_2e83ff_256x240.png":
    "data:image/png;base64, ",
  "H5P.InteractiveVideo-1.26/package-lock.json":
    "data:application/json;base64, ",
};
!(function () {
  H5P.ContentType = function (t) {
    function e() {}
    return (
      ((e.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return t;
      }),
      (e.prototype.getLibraryFilePath = function (t) {
        return (
          furtherH5PInlineResources[
            this.libraryInfo.versionedNameNoSpaces + "/" + t
          ] || t
        );
      }),
      e
    );
  };
  var i = HTMLScriptElement.prototype.setAttribute;
  ((HTMLScriptElement.prototype.setAttribute = function (t, e) {
    if ("src" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    i.call(this, t, e);
  }),
    Object.defineProperty(HTMLScriptElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
  var n = HTMLLinkElement.prototype.setAttribute;
  ((HTMLLinkElement.prototype.setAttribute = function (t, e) {
    if ("href" === t) {
      if (!(e instanceof String)) {
        if (!e.toString) return void i.call(this, t, e);
        e = e.toString();
      }
      var r = window.location.href.substr(
          0,
          window.location.href.lastIndexOf("/"),
        ),
        r = (e = e.startsWith(r) ? e.substr(r.length + 1) : e).match(
          /^.\/libraries\/([^?]+)\??.*$/,
        );
      r &&
        ((r = r[1]),
        furtherH5PInlineResources[r] && (e = furtherH5PInlineResources[r]));
    }
    n.call(this, t, e);
  }),
    Object.defineProperty(HTMLLinkElement.prototype, "src", {
      set(t) {
        this.setAttribute("src", t);
      },
    }));
})();
H5P.getPath = function (t, n) {
  return t;
};
