H5PIntegration = {
  ajax: { setFinished: "", contentUserData: "" },
  ajaxPath: "/h5p/ajax?action=",
  contents: {
    "cid-3259174662": {
      displayOptions: {
        copy: false,
        copyright: false,
        embed: false,
        export: false,
        frame: false,
        icon: false,
      },
      fullScreen: "1",
      jsonContent:
        '{"showCoverPage":true,"bookCover":{"coverDescription":"<p style=\\"text-align:center\\"></p>\\n\\n<p style=\\"text-align:center\\"></p>\\n"},"chapters":[{"params":{"content":[{"content":{"params":{"text":"<p style=\\"text-align:center\\"><br />\\n<br />\\n<span style=\\"font-size:1.5em\\"><strong>ΟΔΗΓΙΕΣ</strong></span></p>\\n\\n<p style=\\"text-align:center\\"> </p>\\n\\n<ol>\\n\\t<li><span style=\\"font-size:1.25em\\">Διαβάστε κάποια Δικαιώματα για το Παιδί από την Οικουμενική Διακήρυξη των Ανθρώπινων Δικαιωμάτων </span></li>\\n\\t<li><span style=\\"font-size:1.25em\\">Στη συνέχεια συμπληρώστε δύο σχετικές δραστηριότητες.</span></li>\\n</ol>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]},"subContentId":"2be18b56-918a-4c4c-bf3b-d893770308fc"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"6ca3d2e3-769a-40f9-9723-1f87b34a15d2","metadata":{"contentType":"Column","license":"U","title":"Οδηγίες","authors":[],"changes":[],"extraTitle":"Οδηγίες"}},{"params":{"content":[{"content":{"params":{"text":"<p><span style=\\"font-size:1em\\"><span><span><span>1. Είμαστε Όλοι Γεννημένοι Ελεύθεροι και Ίσοι</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>2. Μην Κάνεις Διακρίσεις</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>3. Το Δικαίωμα στη Ζωή</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>4. Όχι Σκλαβιά</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>5. Όχι Βασανιστήρια</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>6. Έχεις Δικαιώματα Όπου κι αν Πηγαίνεις</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>7. Είμαστε Όλοι Ίσοι Ενώπιον του Νόµου</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>8. Τα Ανθρώπινα Δικαιώματά σου Προστατεύονται από το Νόµο</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>9. Όχι Άδικη Κράτηση</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>10. Το Δικαίωμα για Δίκη</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>11. Είμαστε Πάντα Αθώοι Μέχρι Αποδείξεως του Εναντίου</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>12. Δικαίωμα στην Ιδιωτική Ζωή</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>13. Ελευθερία της Μετακίνησης</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>14. Το Δικαίωμα στο να Αναζητάς Ασφαλή Τόπο να Ζήσεις</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>15. Δικαίωμα στην Εθνικότητα</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>16. Γάμος και Οικογένεια</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>17. Το Δικαίωμα στα Δικά σου Πράγματα</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>18. Ελευθερία της Σκέψης</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>19. Ελευθερία της Έκφρασης</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>20. Το Δικαίωμα στις Δημόσιες Συγκεντρώσεις</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>21. Το Δικαίωμα στη Δημοκρατία</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>22. Κοινωνική Ασφάλιση</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>23. Δικαιώματα Εργαζομένων</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>24. Το Δικαίωμα στο Παιχνίδι</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>25. Φαγητό και Στέγη για Όλους</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>26. Το Δικαίωμα στην Εκπαίδευση</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>27. Δικαίωμα Πνευματικής Ιδιοκτησίας</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>28. Ένας Δίκαιος και Ελεύθερος Κόσμος</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>29. Υπευθυνότητα. Έχουμε ένα καθήκον απέναντι στους άλλους ανθρώπους και θα πρέπει να προστατεύουμε τα δικά τους δικαιώματα και τις ελευθερίες τους.</span></span></span></span><br />\\n<span style=\\"font-size:1em\\"><span><span><span>30. Κανείς δεν μπορεί να σας Αφαιρέσει αυτά τα Δικαιώματα</span></span></span></span></p>\\n"},"library":"H5P.AdvancedText 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[]},"subContentId":"51789b65-085e-4319-970c-b8b04972ad08"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"45e744f2-f5cd-4033-80b0-a918321d11ba","metadata":{"contentType":"Column","license":"U","title":"Οικουμενική Διακήρυξη των Ανθρώπινων Δικαιωμάτων","authors":[],"changes":[],"extraTitle":"Οικουμενική Διακήρυξη των Ανθρώπινων Δικαιωμάτων"}},{"params":{"content":[{"content":{"params":{"scoreShow":"Έλεγχος","submit":"Submit","tryAgain":"Επανάληψη","scoreExplanation":"Για κάθε σωστή απάντηση κερδίζεις έναν βαθμό. Για κάθε λάθος απάντηση χάνεις έναν βαθμό. Η χαμηλότερη δυνατή βαθμολογία είναι 0.","question":{"settings":{"size":{"width":620,"height":310}},"task":{"elements":[{"x":8.403361344537815,"y":60.50420168067227,"width":6.443484844798658,"height":6.443484844798658,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Παιδιά που παίζουν","file":{"path":"./resources/image-5X5S4PA9.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":4167,"height":4167}},"subContentId":"8f7a13ca-4e37-4e23-9266-49502fc12924","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":70.58823529411764,"y":57.14285714285714,"width":8.12833524095311,"height":7.016491806722689,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Παιδιά που διαβάζουν","file":{"path":"./resources/image-JpSdPB2o.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5054,"height":4352}},"subContentId":"b79d4ced-0350-4b3b-9231-5bf5c3936756","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false},{"x":40.33613445378151,"y":57.14285714285714,"width":7.015703781512604,"height":7.015703781512604,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Γυναικά που κοιτάει τον χάρτη με την Γη μπροστά της","file":{"path":"./resources/image-e6fcxjmS.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5315,"height":5315}},"subContentId":"fb2ecc3b-c08b-4729-9e21-a64e5979d238","metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]}},"backgroundOpacity":100,"multiple":false}],"dropZones":[{"x":35.29411764705882,"y":16.80672268907563,"width":11.071428571428571,"height":7.163865546218487,"correctElements":["1"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα"},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\">Δικαίωμα στην<br />\\nΕκπαίδευση</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}},{"x":68.90756302521008,"y":16.80672268907563,"width":9.76890756302521,"height":7.163865546218487,"correctElements":["2"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα."},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\">Ελευθερία της</div>\\n\\n<div style=\\"text-align:center\\">Μετακίνησης</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}},{"x":1.680672268907563,"y":16.80672268907563,"width":11.722689075630251,"height":7.163865546218487,"correctElements":["0"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα.","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα"},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\"> Δικαίωμα στο</div>\\n\\n<div style=\\"text-align:center\\">Παιχνίδι</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}}]}},"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableCheckButton":true,"singlePoint":false,"applyPenalties":true,"enableScoreExplanation":true,"dropZoneHighlighting":"never","autoAlignSpacing":2,"enableFullScreen":false,"showScorePoints":true,"showTitle":true},"grabbablePrefix":"Συρόμενο στοιχείο {num} από {total}.","grabbableSuffix":"Έχει τοποθετηθεί στην περιοχή απόθεσης {num}.","dropzonePrefix":"Περιοχή απόθεσης {num} από {total}.","noDropzone":"Μη επιλεγμένη περιοχή απόθεσης.","tipLabel":"Επεξήγηση","tipAvailable":"Επεξήγηση διαθέσιμη","correctAnswer":"Σωστή απάντηση","wrongAnswer":"Λάθος απάντηση","feedbackHeader":"Ανατροφοδότηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","scoreExplanationButtonLabel":"Εμφάνιση επεξήγησης βαθμολογίας","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή.","localize":{"fullscreen":"Πλήρης οθόνη","exitFullscreen":"Έξοδος από την πλήρη οθόνη"}},"library":"H5P.DragQuestion 1.14","metadata":{"contentType":"Drag and Drop","license":"U","title":"Παρατηρήστε τις εικόνες και σύρετε πάνω σε αυτή τη φράση που ταιριάζει:","authors":[],"changes":[],"extraTitle":"Παρατηρήστε τις εικόνες και σύρετε πάνω σε αυτή τη φράση που ταιριάζει:"},"subContentId":"6ed4cabf-8405-488e-947c-18b5d0d7571c"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"d7f99741-239c-4e95-8e42-c2d4f06da341","metadata":{"contentType":"Column","license":"U","title":"Α. Σύρετε και τοποθετήστε","authors":[],"changes":[],"extraTitle":"Α. Σύρετε και τοποθετήστε"}},{"params":{"content":[{"content":{"params":{"scoreShow":"Έλεγχος","submit":"Submit","tryAgain":"Επανάληψη","scoreExplanation":"Για κάθε σωστή απάντηση κερδίζεις έναν βαθμό. Για κάθε λάθος απάντηση χάνεις έναν βαθμό. Η χαμηλότερη δυνατή βαθμολογία είναι 0.","question":{"settings":{"size":{"width":620,"height":310}},"task":{"elements":[{"x":68.90756302521008,"y":57.14285714285714,"width":9.386702373225232,"height":6.365231302521008,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Συζήτηση μεταξύ ανθρώπων","file":{"path":"./resources/image-9hBeIbX2.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":3000,"height":2000}},"metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]},"subContentId":"76c6afbe-bf73-42db-b9d3-f4759b3ee7b8"},"backgroundOpacity":100,"multiple":false},{"x":38.65546218487395,"y":57.14285714285714,"width":6.94067197468417,"height":6.94067197468417,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Συννεφάκι σκέψης","file":{"path":"./resources/image-OuuPL9rR.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5000,"height":5000}},"metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]},"subContentId":"06a01f2f-18ba-4181-a10a-9526aa85437f"},"backgroundOpacity":100,"multiple":false},{"x":5.042016806722689,"y":57.14285714285714,"width":6.474763014272803,"height":6.474763014272803,"dropZones":["0","1","2"],"type":{"library":"H5P.Image 1.1","params":{"decorative":false,"contentName":"Εικόνα","expandImage":"Expand Image","minimizeImage":"Minimize Image","alt":"Σφυρί δικαστηρίου","file":{"path":"./resources/image-rXxLbP7j.jpg","mime":"image/jpeg","copyright":{"license":"U"},"width":5000,"height":5000}},"metadata":{"contentType":"Image","license":"U","title":"Untitled Image","authors":[],"changes":[]},"subContentId":"b5acfda7-138f-42d9-b217-d9a2114b8229"},"backgroundOpacity":100,"multiple":false}],"dropZones":[{"x":1.680672268907563,"y":16.80672268907563,"width":11.722689075630251,"height":6.512605042016807,"correctElements":["1"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα.","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα"},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\">Ελευθερία<br />\\nΣκέψης</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}},{"x":35.29411764705882,"y":16.80672268907563,"width":10.420168067226891,"height":6.512605042016807,"correctElements":["0"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα"},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\">Ελευθερία<br />\\nΈκφρασης</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}},{"x":65.54621848739495,"y":16.80672268907563,"width":11.722689075630251,"height":6.512605042016807,"correctElements":["2"],"showLabel":true,"backgroundOpacity":100,"tipsAndFeedback":{"tip":"","feedbackOnCorrect":"Επέλεξες τη σωστή εικόνα","feedbackOnIncorrect":"Δεν επέλεξες τη σωστή εικόνα."},"single":false,"autoAlign":false,"label":"<div style=\\"text-align:center\\">Είμαστε Όλοι Ίσοι<br />\\nΕνώπιον του Νόµου</div>\\n","type":{"library":"H5P.DragQuestionDropzone 0.1"}}]}},"overallFeedback":[{"from":0,"to":100}],"behaviour":{"enableRetry":true,"enableCheckButton":true,"singlePoint":false,"applyPenalties":true,"enableScoreExplanation":true,"autoAlignSpacing":2,"enableFullScreen":false,"showScorePoints":true,"showTitle":true,"dropZoneHighlighting":"dragging"},"grabbablePrefix":"Συρόμενο στοιχείο {num} από {total}.","grabbableSuffix":"Έχει τοποθετηθεί στην περιοχή απόθεσης {num}.","dropzonePrefix":"Περιοχή απόθεσης {num} από {total}.","noDropzone":"Μη επιλεγμένη περιοχή απόθεσης.","tipLabel":"Επεξήγηση","tipAvailable":"Επεξήγηση διαθέσιμη","correctAnswer":"Σωστή απάντηση","wrongAnswer":"Λάθος απάντηση","feedbackHeader":"Ανατροφοδότηση","scoreBarLabel":"Συγκεντρώσατε :num από :total βαθμούς","scoreExplanationButtonLabel":"Εμφάνιση επεξήγησης βαθμολογίας","a11yCheck":"Έλεγχος απαντήσεων. Οι απαντήσεις θα μαρκαριστούν ως σωστές, λάθος και μη απαντημένες.","a11yRetry":"Επανάληψη της εργασίας. Επαναφορά όλων των απαντήσεων και έναρξη από την αρχή.","localize":{"fullscreen":"Πλήρης οθόνη","exitFullscreen":"Έξοδος από την πλήρη οθόνη"}},"library":"H5P.DragQuestion 1.14","metadata":{"contentType":"Drag and Drop","license":"U","title":"Παρατηρήστε τις εικόνες και σύρετε πάνω σε αυτή τη φράση που ταιριάζει:","authors":[],"changes":[],"extraTitle":"Παρατηρήστε τις εικόνες και σύρετε πάνω σε αυτή τη φράση που ταιριάζει:"},"subContentId":"f39e24c4-bc33-4de3-8eea-7c0b8719cb16"},"useSeparator":"auto"}]},"library":"H5P.Column 1.16","subContentId":"1ee26c0d-5cb6-41fd-b12d-4928b5be3056","metadata":{"contentType":"Column","license":"U","title":"Β. Σύρετε και τοποθετήστε","authors":[],"changes":[],"extraTitle":"Β. Σύρετε και τοποθετήστε"}}],"behaviour":{"baseColor":"#1768c4","defaultTableOfContents":false,"progressIndicators":true,"progressAuto":true,"displaySummary":true,"enableRetry":true},"read":"Ανάγνωση","displayTOC":"Προβολή &#039;Πίνακα Περιεχομένων&#039;","hideTOC":"Απόκρυψη &#039;Πίνακα Περιεχομένων&#039;","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: "el",
      },
      scripts: [
        "/h5p/libraries/H5P.AdvancedText-1.1/text.js?version=1.1.14",
        "/h5p/libraries/H5P.Column-1.16/scripts/h5p-column.js?version=1.16.5",
        "/h5p/libraries/H5P.Image-1.1/image.js?version=1.1.22",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.js?version=1.10.22",
        "/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.DragQuestion-1.14/h5p-drag-question.js?version=1.14.15",
        "/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.14",
        "/h5p/libraries/H5P.Column-1.16/styles/h5p-column.css?version=1.16.5",
        "/h5p/libraries/H5P.Image-1.1/image.css?version=1.1.22",
        "/h5p/libraries/FontAwesome-4.5/h5p-font-awesome.min.css?version=4.5.4",
        "/h5p/libraries/jQuery.ui-1.10/h5p-jquery-ui.css?version=1.10.22",
        "/h5p/libraries/H5P.FontIcons-1.0/styles/h5p-font-icons.css?version=1.0.6",
        "/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.DragQuestion-1.14/css/dragquestion.css?version=1.14.15",
        "/h5p/libraries/H5P.InteractiveBook-1.7/dist/h5p-interactive-book.css?version=1.7.12",
      ],
      url: "3259174662",
      exportUrl: "/h5p/download/3259174662",
    },
  },
  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-" + "3259174662"].displayOptions.embed = false;
} else {
  H5PIntegration.contents["cid-" + "3259174662"].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-" + "3259174662"].resizeCode = "";
}

/*!@license js/jquery.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/
!(function (e, t) {
  "use strict";
  "object" == typeof module && "object" == typeof module.exports
    ? (module.exports = e.document
        ? t(e, !0)
        : function (e) {
            if (!e.document)
              throw new Error("jQuery requires a window with a document");
            return t(e);
          })
    : t(e);
})("undefined" != typeof window ? window : this, function (x, e) {
  "use strict";
  function g(e) {
    return "function" == typeof e && "number" != typeof e.nodeType;
  }
  function m(e) {
    return null != e && e === e.window;
  }
  var t = [],
    i = Object.getPrototypeOf,
    a = t.slice,
    v = t.flat
      ? function (e) {
          return t.flat.call(e);
        }
      : function (e) {
          return t.concat.apply([], e);
        },
    l = t.push,
    r = t.indexOf,
    n = {},
    o = n.toString,
    b = n.hasOwnProperty,
    s = b.toString,
    c = s.call(Object),
    y = {},
    k = x.document,
    u = { type: !0, src: !0, nonce: !0, noModule: !0 };
  function _(e, t, i) {
    var n,
      r,
      o = (i = i || k).createElement("script");
    if (((o.text = e), t))
      for (n in u)
        (r = t[n] || (t.getAttribute && t.getAttribute(n))) &&
          o.setAttribute(n, r);
    i.head.appendChild(o).parentNode.removeChild(o);
  }
  function f(e) {
    return null == e
      ? e + ""
      : "object" == typeof e || "function" == typeof e
        ? n[o.call(e)] || "object"
        : typeof e;
  }
  var h = "3.5.1",
    C = function (e, t) {
      return new C.fn.init(e, t);
    };
  function d(e) {
    var t = !!e && "length" in e && e.length,
      i = f(e);
    return (
      !g(e) &&
      !m(e) &&
      ("array" === i ||
        0 === t ||
        ("number" == typeof t && 0 < t && t - 1 in e))
    );
  }
  ((C.fn = C.prototype =
    {
      jquery: h,
      constructor: C,
      length: 0,
      toArray: function () {
        return a.call(this);
      },
      get: function (e) {
        return null == e
          ? a.call(this)
          : e < 0
            ? this[e + this.length]
            : this[e];
      },
      pushStack: function (e) {
        e = C.merge(this.constructor(), e);
        return ((e.prevObject = this), e);
      },
      each: function (e) {
        return C.each(this, e);
      },
      map: function (i) {
        return this.pushStack(
          C.map(this, function (e, t) {
            return i.call(e, t, e);
          }),
        );
      },
      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(
          C.grep(this, function (e, t) {
            return (t + 1) % 2;
          }),
        );
      },
      odd: function () {
        return this.pushStack(
          C.grep(this, function (e, t) {
            return t % 2;
          }),
        );
      },
      eq: function (e) {
        var t = this.length,
          e = +e + (e < 0 ? t : 0);
        return this.pushStack(0 <= e && e < t ? [this[e]] : []);
      },
      end: function () {
        return this.prevObject || this.constructor();
      },
      push: l,
      sort: t.sort,
      splice: t.splice,
    }),
    (C.extend = C.fn.extend =
      function () {
        var e,
          t,
          i,
          n,
          r,
          o = arguments[0] || {},
          s = 1,
          a = arguments.length,
          l = !1;
        for (
          "boolean" == typeof o && ((l = o), (o = arguments[s] || {}), s++),
            "object" == typeof o || g(o) || (o = {}),
            s === a && ((o = this), s--);
          s < a;
          s++
        )
          if (null != (e = arguments[s]))
            for (t in e)
              ((i = e[t]),
                "__proto__" !== t &&
                  o !== i &&
                  (l && i && (C.isPlainObject(i) || (n = Array.isArray(i)))
                    ? ((r = o[t]),
                      (r =
                        n && !Array.isArray(r)
                          ? []
                          : n || C.isPlainObject(r)
                            ? r
                            : {}),
                      (n = !1),
                      (o[t] = C.extend(l, r, i)))
                    : void 0 !== i && (o[t] = i)));
        return o;
      }),
    C.extend({
      expando: "jQuery" + (h + Math.random()).replace(/\D/g, ""),
      isReady: !0,
      error: function (e) {
        throw new Error(e);
      },
      noop: function () {},
      isPlainObject: function (e) {
        return !(
          !e ||
          "[object Object]" !== o.call(e) ||
          ((e = i(e)) &&
            ("function" !=
              typeof (e = b.call(e, "constructor") && e.constructor) ||
              s.call(e) !== c))
        );
      },
      isEmptyObject: function (e) {
        for (var t in e) return !1;
        return !0;
      },
      globalEval: function (e, t, i) {
        _(e, { nonce: t && t.nonce }, i);
      },
      each: function (e, t) {
        var i,
          n = 0;
        if (d(e))
          for (i = e.length; n < i && !1 !== t.call(e[n], n, e[n]); n++);
        else for (n in e) if (!1 === t.call(e[n], n, e[n])) break;
        return e;
      },
      makeArray: function (e, t) {
        t = t || [];
        return (
          null != e &&
            (d(Object(e))
              ? C.merge(t, "string" == typeof e ? [e] : e)
              : l.call(t, e)),
          t
        );
      },
      inArray: function (e, t, i) {
        return null == t ? -1 : r.call(t, e, i);
      },
      merge: function (e, t) {
        for (var i = +t.length, n = 0, r = e.length; n < i; n++) e[r++] = t[n];
        return ((e.length = r), e);
      },
      grep: function (e, t, i) {
        for (var n = [], r = 0, o = e.length, s = !i; r < o; r++)
          !t(e[r], r) != s && n.push(e[r]);
        return n;
      },
      map: function (e, t, i) {
        var n,
          r,
          o = 0,
          s = [];
        if (d(e))
          for (n = e.length; o < n; o++)
            null != (r = t(e[o], o, i)) && s.push(r);
        else for (o in e) null != (r = t(e[o], o, i)) && s.push(r);
        return v(s);
      },
      guid: 1,
      support: y,
    }),
    "function" == typeof Symbol && (C.fn[Symbol.iterator] = t[Symbol.iterator]),
    C.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (e, t) {
        n["[object " + t + "]"] = t.toLowerCase();
      },
    ));
  var p = (function (i) {
    function h(e, t) {
      return (
        (e = "0x" + e.slice(1) - 65536),
        t ||
          (e < 0
            ? String.fromCharCode(65536 + e)
            : String.fromCharCode((e >> 10) | 55296, (1023 & e) | 56320))
      );
    }
    function d(e, t) {
      return t
        ? "\0" === e
          ? "�"
          : e.slice(0, -1) +
            "\\" +
            e.charCodeAt(e.length - 1).toString(16) +
            " "
        : "\\" + e;
    }
    function n() {
      x();
    }
    var e,
      p,
      _,
      o,
      r,
      f,
      g,
      m,
      w,
      l,
      c,
      x,
      k,
      s,
      C,
      v,
      a,
      u,
      b,
      P = "sizzle" + +new Date(),
      y = i.document,
      T = 0,
      S = 0,
      H = le(),
      D = le(),
      E = le(),
      I = le(),
      A = function (e, t) {
        return (e === t && (c = !0), 0);
      },
      O = {}.hasOwnProperty,
      t = [],
      M = t.pop,
      L = t.push,
      j = t.push,
      N = t.slice,
      F = function (e, t) {
        for (var i = 0, n = e.length; i < n; i++) if (e[i] === t) return i;
        return -1;
      },
      z =
        "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
      R = "[\\x20\\t\\r\\n\\f]",
      B =
        "(?:\\\\[\\da-fA-F]{1,6}" +
        R +
        "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
      q =
        "\\[" +
        R +
        "*(" +
        B +
        ")(?:" +
        R +
        "*([*^$|!~]?=)" +
        R +
        "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" +
        B +
        "))|)" +
        R +
        "*\\]",
      $ =
        ":(" +
        B +
        ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" +
        q +
        ")*)|.*)\\)|)",
      W = new RegExp(R + "+", "g"),
      U = new RegExp("^" + R + "+|((?:^|[^\\\\])(?:\\\\.)*)" + R + "+$", "g"),
      V = new RegExp("^" + R + "*," + R + "*"),
      Y = new RegExp("^" + R + "*([>+~]|" + R + ")" + R + "*"),
      Q = new RegExp(R + "|>"),
      X = new RegExp($),
      Z = new RegExp("^" + B + "$"),
      K = {
        ID: new RegExp("^#(" + B + ")"),
        CLASS: new RegExp("^\\.(" + B + ")"),
        TAG: new RegExp("^(" + B + "|[*])"),
        ATTR: new RegExp("^" + q),
        PSEUDO: new RegExp("^" + $),
        CHILD: new RegExp(
          "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
            R +
            "*(even|odd|(([+-]|)(\\d*)n|)" +
            R +
            "*(?:([+-]|)" +
            R +
            "*(\\d+)|))" +
            R +
            "*\\)|)",
          "i",
        ),
        bool: new RegExp("^(?:" + z + ")$", "i"),
        needsContext: new RegExp(
          "^" +
            R +
            "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
            R +
            "*((?:-\\d)?\\d*)" +
            R +
            "*\\)|)(?=[^-]|$)",
          "i",
        ),
      },
      G = /HTML$/i,
      J = /^(?:input|select|textarea|button)$/i,
      ee = /^h\d$/i,
      te = /^[^{]+\{\s*\[native \w/,
      ie = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
      ne = /[+~]/,
      re = new RegExp("\\\\[\\da-fA-F]{1,6}" + R + "?|\\\\([^\\r\\n\\f])", "g"),
      oe = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
      se = be(
        function (e) {
          return !0 === e.disabled && "fieldset" === e.nodeName.toLowerCase();
        },
        { dir: "parentNode", next: "legend" },
      );
    try {
      (j.apply((t = N.call(y.childNodes)), y.childNodes),
        t[y.childNodes.length].nodeType);
    } catch (e) {
      j = {
        apply: t.length
          ? function (e, t) {
              L.apply(e, N.call(t));
            }
          : function (e, t) {
              for (var i = e.length, n = 0; (e[i++] = t[n++]); );
              e.length = i - 1;
            },
      };
    }
    function ae(e, t, i, n) {
      var r,
        o,
        s,
        a,
        l,
        c,
        u = t && t.ownerDocument,
        h = t ? t.nodeType : 9;
      if (
        ((i = i || []),
        "string" != typeof e || !e || (1 !== h && 9 !== h && 11 !== h))
      )
        return i;
      if (!n && (x(t), (t = t || k), C)) {
        if (11 !== h && (a = ie.exec(e)))
          if ((c = a[1])) {
            if (9 === h) {
              if (!(o = t.getElementById(c))) return i;
              if (o.id === c) return (i.push(o), i);
            } else if (u && (o = u.getElementById(c)) && b(t, o) && o.id === c)
              return (i.push(o), i);
          } else {
            if (a[2]) return (j.apply(i, t.getElementsByTagName(e)), i);
            if (
              (c = a[3]) &&
              p.getElementsByClassName &&
              t.getElementsByClassName
            )
              return (j.apply(i, t.getElementsByClassName(c)), i);
          }
        if (
          p.qsa &&
          !I[e + " "] &&
          (!v || !v.test(e)) &&
          (1 !== h || "object" !== t.nodeName.toLowerCase())
        ) {
          if (((c = e), (u = t), 1 === h && (Q.test(e) || Y.test(e)))) {
            for (
              ((u = (ne.test(e) && ge(t.parentNode)) || t) === t && p.scope) ||
                ((s = t.getAttribute("id"))
                  ? (s = s.replace(oe, d))
                  : t.setAttribute("id", (s = P))),
                r = (l = f(e)).length;
              r--;

            )
              l[r] = (s ? "#" + s : ":scope") + " " + ve(l[r]);
            c = l.join(",");
          }
          try {
            return (j.apply(i, u.querySelectorAll(c)), i);
          } catch (t) {
            I(e, !0);
          } finally {
            s === P && t.removeAttribute("id");
          }
        }
      }
      return m(e.replace(U, "$1"), t, i, n);
    }
    function le() {
      var n = [];
      return function e(t, i) {
        return (
          n.push(t + " ") > _.cacheLength && delete e[n.shift()],
          (e[t + " "] = i)
        );
      };
    }
    function ce(e) {
      return ((e[P] = !0), e);
    }
    function ue(e) {
      var t = k.createElement("fieldset");
      try {
        return !!e(t);
      } catch (e) {
        return !1;
      } finally {
        t.parentNode && t.parentNode.removeChild(t);
      }
    }
    function he(e, t) {
      for (var i = e.split("|"), n = i.length; n--; ) _.attrHandle[i[n]] = t;
    }
    function de(e, t) {
      var i = t && e,
        n =
          i &&
          1 === e.nodeType &&
          1 === t.nodeType &&
          e.sourceIndex - t.sourceIndex;
      if (n) return n;
      if (i) for (; (i = i.nextSibling); ) if (i === t) return -1;
      return e ? 1 : -1;
    }
    function pe(t) {
      return function (e) {
        return "form" in e
          ? e.parentNode && !1 === e.disabled
            ? "label" in e
              ? "label" in e.parentNode
                ? e.parentNode.disabled === t
                : e.disabled === t
              : e.isDisabled === t || (e.isDisabled !== !t && se(e) === t)
            : e.disabled === t
          : "label" in e && e.disabled === t;
      };
    }
    function fe(s) {
      return ce(function (o) {
        return (
          (o = +o),
          ce(function (e, t) {
            for (var i, n = s([], e.length, o), r = n.length; r--; )
              e[(i = n[r])] && (e[i] = !(t[i] = e[i]));
          })
        );
      });
    }
    function ge(e) {
      return e && void 0 !== e.getElementsByTagName && e;
    }
    for (e in ((p = ae.support = {}),
    (r = ae.isXML =
      function (e) {
        var t = e.namespaceURI,
          e = (e.ownerDocument || e).documentElement;
        return !G.test(t || (e && e.nodeName) || "HTML");
      }),
    (x = ae.setDocument =
      function (e) {
        var t,
          e = e ? e.ownerDocument || e : y;
        return (
          e != k &&
            9 === e.nodeType &&
            e.documentElement &&
            ((s = (k = e).documentElement),
            (C = !r(k)),
            y != k &&
              (t = k.defaultView) &&
              t.top !== t &&
              (t.addEventListener
                ? t.addEventListener("unload", n, !1)
                : t.attachEvent && t.attachEvent("onunload", n)),
            (p.scope = ue(function (e) {
              return (
                s.appendChild(e).appendChild(k.createElement("div")),
                void 0 !== e.querySelectorAll &&
                  !e.querySelectorAll(":scope fieldset div").length
              );
            })),
            (p.attributes = ue(function (e) {
              return ((e.className = "i"), !e.getAttribute("className"));
            })),
            (p.getElementsByTagName = ue(function (e) {
              return (
                e.appendChild(k.createComment("")),
                !e.getElementsByTagName("*").length
              );
            })),
            (p.getElementsByClassName = te.test(k.getElementsByClassName)),
            (p.getById = ue(function (e) {
              return (
                (s.appendChild(e).id = P),
                !k.getElementsByName || !k.getElementsByName(P).length
              );
            })),
            p.getById
              ? ((_.filter.ID = function (e) {
                  var t = e.replace(re, h);
                  return function (e) {
                    return e.getAttribute("id") === t;
                  };
                }),
                (_.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && C) {
                    e = t.getElementById(e);
                    return e ? [e] : [];
                  }
                }))
              : ((_.filter.ID = function (e) {
                  var t = e.replace(re, h);
                  return function (e) {
                    e =
                      void 0 !== e.getAttributeNode && e.getAttributeNode("id");
                    return e && e.value === t;
                  };
                }),
                (_.find.ID = function (e, t) {
                  if (void 0 !== t.getElementById && C) {
                    var i,
                      n,
                      r,
                      o = t.getElementById(e);
                    if (o) {
                      if ((i = o.getAttributeNode("id")) && i.value === e)
                        return [o];
                      for (r = t.getElementsByName(e), n = 0; (o = r[n++]); )
                        if ((i = o.getAttributeNode("id")) && i.value === e)
                          return [o];
                    }
                    return [];
                  }
                })),
            (_.find.TAG = p.getElementsByTagName
              ? function (e, t) {
                  return void 0 !== t.getElementsByTagName
                    ? t.getElementsByTagName(e)
                    : p.qsa
                      ? t.querySelectorAll(e)
                      : void 0;
                }
              : function (e, t) {
                  var i,
                    n = [],
                    r = 0,
                    o = t.getElementsByTagName(e);
                  if ("*" !== e) return o;
                  for (; (i = o[r++]); ) 1 === i.nodeType && n.push(i);
                  return n;
                }),
            (_.find.CLASS =
              p.getElementsByClassName &&
              function (e, t) {
                if (void 0 !== t.getElementsByClassName && C)
                  return t.getElementsByClassName(e);
              }),
            (a = []),
            (v = []),
            (p.qsa = te.test(k.querySelectorAll)) &&
              (ue(function (e) {
                var t;
                ((s.appendChild(e).innerHTML =
                  "<a id='" +
                  P +
                  "'></a><select id='" +
                  P +
                  "-\r\\' msallowcapture=''><option selected=''></option></select>"),
                  e.querySelectorAll("[msallowcapture^='']").length &&
                    v.push("[*^$]=" + R + "*(?:''|\"\")"),
                  e.querySelectorAll("[selected]").length ||
                    v.push("\\[" + R + "*(?:value|" + z + ")"),
                  e.querySelectorAll("[id~=" + P + "-]").length || v.push("~="),
                  (t = k.createElement("input")).setAttribute("name", ""),
                  e.appendChild(t),
                  e.querySelectorAll("[name='']").length ||
                    v.push("\\[" + R + "*name" + R + "*=" + R + "*(?:''|\"\")"),
                  e.querySelectorAll(":checked").length || v.push(":checked"),
                  e.querySelectorAll("a#" + P + "+*").length ||
                    v.push(".#.+[+~]"),
                  e.querySelectorAll("\\\f"),
                  v.push("[\\r\\n\\f]"));
              }),
              ue(function (e) {
                e.innerHTML =
                  "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
                var t = k.createElement("input");
                (t.setAttribute("type", "hidden"),
                  e.appendChild(t).setAttribute("name", "D"),
                  e.querySelectorAll("[name=d]").length &&
                    v.push("name" + R + "*[*^$|!~]?="),
                  2 !== e.querySelectorAll(":enabled").length &&
                    v.push(":enabled", ":disabled"),
                  (s.appendChild(e).disabled = !0),
                  2 !== e.querySelectorAll(":disabled").length &&
                    v.push(":enabled", ":disabled"),
                  e.querySelectorAll("*,:x"),
                  v.push(",.*:"));
              })),
            (p.matchesSelector = te.test(
              (u =
                s.matches ||
                s.webkitMatchesSelector ||
                s.mozMatchesSelector ||
                s.oMatchesSelector ||
                s.msMatchesSelector),
            )) &&
              ue(function (e) {
                ((p.disconnectedMatch = u.call(e, "*")),
                  u.call(e, "[s!='']:x"),
                  a.push("!=", $));
              }),
            (v = v.length && new RegExp(v.join("|"))),
            (a = a.length && new RegExp(a.join("|"))),
            (t = te.test(s.compareDocumentPosition)),
            (b =
              t || te.test(s.contains)
                ? function (e, t) {
                    var i = 9 === e.nodeType ? e.documentElement : e,
                      t = t && t.parentNode;
                    return (
                      e === t ||
                      !(
                        !t ||
                        1 !== t.nodeType ||
                        !(i.contains
                          ? i.contains(t)
                          : e.compareDocumentPosition &&
                            16 & e.compareDocumentPosition(t))
                      )
                    );
                  }
                : function (e, t) {
                    if (t) for (; (t = t.parentNode); ) if (t === e) return !0;
                    return !1;
                  }),
            (A = t
              ? function (e, t) {
                  return e === t
                    ? ((c = !0), 0)
                    : (i =
                        !e.compareDocumentPosition -
                        !t.compareDocumentPosition) ||
                        (1 &
                          (i =
                            (e.ownerDocument || e) == (t.ownerDocument || t)
                              ? e.compareDocumentPosition(t)
                              : 1) ||
                        (!p.sortDetached && t.compareDocumentPosition(e) === i)
                          ? e == k || (e.ownerDocument == y && b(y, e))
                            ? -1
                            : t == k || (t.ownerDocument == y && b(y, t))
                              ? 1
                              : l
                                ? F(l, e) - F(l, t)
                                : 0
                          : 4 & i
                            ? -1
                            : 1);
                  var i;
                }
              : function (e, t) {
                  if (e === t) return ((c = !0), 0);
                  var i,
                    n = 0,
                    r = e.parentNode,
                    o = t.parentNode,
                    s = [e],
                    a = [t];
                  if (!r || !o)
                    return e == k
                      ? -1
                      : t == k
                        ? 1
                        : r
                          ? -1
                          : o
                            ? 1
                            : l
                              ? F(l, e) - F(l, t)
                              : 0;
                  if (r === o) return de(e, t);
                  for (i = e; (i = i.parentNode); ) s.unshift(i);
                  for (i = t; (i = i.parentNode); ) a.unshift(i);
                  for (; s[n] === a[n]; ) n++;
                  return n
                    ? de(s[n], a[n])
                    : s[n] == y
                      ? -1
                      : a[n] == y
                        ? 1
                        : 0;
                })),
          k
        );
      }),
    (ae.matches = function (e, t) {
      return ae(e, null, null, t);
    }),
    (ae.matchesSelector = function (e, t) {
      if (
        (x(e),
        p.matchesSelector &&
          C &&
          !I[t + " "] &&
          (!a || !a.test(t)) &&
          (!v || !v.test(t)))
      )
        try {
          var i = u.call(e, t);
          if (
            i ||
            p.disconnectedMatch ||
            (e.document && 11 !== e.document.nodeType)
          )
            return i;
        } catch (e) {
          I(t, !0);
        }
      return 0 < ae(t, k, null, [e]).length;
    }),
    (ae.contains = function (e, t) {
      return ((e.ownerDocument || e) != k && x(e), b(e, t));
    }),
    (ae.attr = function (e, t) {
      (e.ownerDocument || e) != k && x(e);
      var i = _.attrHandle[t.toLowerCase()],
        i = i && O.call(_.attrHandle, t.toLowerCase()) ? i(e, t, !C) : void 0;
      return void 0 !== i
        ? i
        : p.attributes || !C
          ? e.getAttribute(t)
          : (i = e.getAttributeNode(t)) && i.specified
            ? i.value
            : null;
    }),
    (ae.escape = function (e) {
      return (e + "").replace(oe, d);
    }),
    (ae.error = function (e) {
      throw new Error("Syntax error, unrecognized expression: " + e);
    }),
    (ae.uniqueSort = function (e) {
      var t,
        i = [],
        n = 0,
        r = 0;
      if (
        ((c = !p.detectDuplicates),
        (l = !p.sortStable && e.slice(0)),
        e.sort(A),
        c)
      ) {
        for (; (t = e[r++]); ) t === e[r] && (n = i.push(r));
        for (; n--; ) e.splice(i[n], 1);
      }
      return ((l = null), e);
    }),
    (o = ae.getText =
      function (e) {
        var t,
          i = "",
          n = 0,
          r = e.nodeType;
        if (r) {
          if (1 === r || 9 === r || 11 === r) {
            if ("string" == typeof e.textContent) return e.textContent;
            for (e = e.firstChild; e; e = e.nextSibling) i += o(e);
          } else if (3 === r || 4 === r) return e.nodeValue;
        } else for (; (t = e[n++]); ) i += o(t);
        return i;
      }),
    ((_ = ae.selectors =
      {
        cacheLength: 50,
        createPseudo: ce,
        match: K,
        attrHandle: {},
        find: {},
        relative: {
          ">": { dir: "parentNode", first: !0 },
          " ": { dir: "parentNode" },
          "+": { dir: "previousSibling", first: !0 },
          "~": { dir: "previousSibling" },
        },
        preFilter: {
          ATTR: function (e) {
            return (
              (e[1] = e[1].replace(re, h)),
              (e[3] = (e[3] || e[4] || e[5] || "").replace(re, h)),
              "~=" === e[2] && (e[3] = " " + e[3] + " "),
              e.slice(0, 4)
            );
          },
          CHILD: function (e) {
            return (
              (e[1] = e[1].toLowerCase()),
              "nth" === e[1].slice(0, 3)
                ? (e[3] || ae.error(e[0]),
                  (e[4] = +(e[4]
                    ? e[5] + (e[6] || 1)
                    : 2 * ("even" === e[3] || "odd" === e[3]))),
                  (e[5] = +(e[7] + e[8] || "odd" === e[3])))
                : e[3] && ae.error(e[0]),
              e
            );
          },
          PSEUDO: function (e) {
            var t,
              i = !e[6] && e[2];
            return K.CHILD.test(e[0])
              ? null
              : (e[3]
                  ? (e[2] = e[4] || e[5] || "")
                  : i &&
                    X.test(i) &&
                    (t = f(i, !0)) &&
                    (t = i.indexOf(")", i.length - t) - i.length) &&
                    ((e[0] = e[0].slice(0, t)), (e[2] = i.slice(0, t))),
                e.slice(0, 3));
          },
        },
        filter: {
          TAG: function (e) {
            var t = e.replace(re, h).toLowerCase();
            return "*" === e
              ? function () {
                  return !0;
                }
              : function (e) {
                  return e.nodeName && e.nodeName.toLowerCase() === t;
                };
          },
          CLASS: function (e) {
            var t = H[e + " "];
            return (
              t ||
              ((t = new RegExp("(^|" + R + ")" + e + "(" + R + "|$)")) &&
                H(e, function (e) {
                  return t.test(
                    ("string" == typeof e.className && e.className) ||
                      (void 0 !== e.getAttribute && e.getAttribute("class")) ||
                      "",
                  );
                }))
            );
          },
          ATTR: function (t, i, n) {
            return function (e) {
              e = ae.attr(e, t);
              return null == e
                ? "!=" === i
                : !i ||
                    ((e += ""),
                    "=" === i
                      ? e === n
                      : "!=" === i
                        ? e !== n
                        : "^=" === i
                          ? n && 0 === e.indexOf(n)
                          : "*=" === i
                            ? n && -1 < e.indexOf(n)
                            : "$=" === i
                              ? n && e.slice(-n.length) === n
                              : "~=" === i
                                ? -1 <
                                  (" " + e.replace(W, " ") + " ").indexOf(n)
                                : "|=" === i &&
                                  (e === n ||
                                    e.slice(0, n.length + 1) === n + "-"));
            };
          },
          CHILD: function (f, e, t, g, m) {
            var v = "nth" !== f.slice(0, 3),
              b = "last" !== f.slice(-4),
              y = "of-type" === e;
            return 1 === g && 0 === m
              ? function (e) {
                  return !!e.parentNode;
                }
              : function (e, t, i) {
                  var n,
                    r,
                    o,
                    s,
                    a,
                    l,
                    c = v != b ? "nextSibling" : "previousSibling",
                    u = e.parentNode,
                    h = y && e.nodeName.toLowerCase(),
                    d = !i && !y,
                    p = !1;
                  if (u) {
                    if (v) {
                      for (; c; ) {
                        for (s = e; (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 =
                              (r =
                                (o = (s = u)[P] || (s[P] = {}))[s.uniqueID] ||
                                (o[s.uniqueID] = {}))[f] || [])[0] === T &&
                            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 === e) {
                          r[f] = [T, a, p];
                          break;
                        }
                    } else if (
                      !1 ===
                      (p = d
                        ? (a =
                            (n =
                              (r =
                                (o = (s = e)[P] || (s[P] = {}))[s.uniqueID] ||
                                (o[s.uniqueID] = {}))[f] || [])[0] === T &&
                            n[1])
                        : p)
                    )
                      for (
                        ;
                        (s = (++a && s && s[c]) || (p = a = 0) || l.pop()) &&
                        ((y
                          ? s.nodeName.toLowerCase() !== h
                          : 1 !== s.nodeType) ||
                          !++p ||
                          (d &&
                            ((r =
                              (o = s[P] || (s[P] = {}))[s.uniqueID] ||
                              (o[s.uniqueID] = {}))[f] = [T, p]),
                          s !== e));

                      );
                    return (p -= m) === g || (p % g == 0 && 0 <= p / g);
                  }
                };
          },
          PSEUDO: function (e, o) {
            var t,
              s =
                _.pseudos[e] ||
                _.setFilters[e.toLowerCase()] ||
                ae.error("unsupported pseudo: " + e);
            return s[P]
              ? s(o)
              : 1 < s.length
                ? ((t = [e, e, "", o]),
                  _.setFilters.hasOwnProperty(e.toLowerCase())
                    ? ce(function (e, t) {
                        for (var i, n = s(e, o), r = n.length; r--; )
                          e[(i = F(e, n[r]))] = !(t[i] = n[r]);
                      })
                    : function (e) {
                        return s(e, 0, t);
                      })
                : s;
          },
        },
        pseudos: {
          not: ce(function (e) {
            var n = [],
              r = [],
              a = g(e.replace(U, "$1"));
            return a[P]
              ? ce(function (e, t, i, n) {
                  for (var r, o = a(e, null, n, []), s = e.length; s--; )
                    (r = o[s]) && (e[s] = !(t[s] = r));
                })
              : function (e, t, i) {
                  return (
                    (n[0] = e),
                    a(n, null, i, r),
                    (n[0] = null),
                    !r.pop()
                  );
                };
          }),
          has: ce(function (t) {
            return function (e) {
              return 0 < ae(t, e).length;
            };
          }),
          contains: ce(function (t) {
            return (
              (t = t.replace(re, h)),
              function (e) {
                return -1 < (e.textContent || o(e)).indexOf(t);
              }
            );
          }),
          lang: ce(function (i) {
            return (
              Z.test(i || "") || ae.error("unsupported lang: " + i),
              (i = i.replace(re, h).toLowerCase()),
              function (e) {
                var t;
                do {
                  if (
                    (t = C
                      ? e.lang
                      : e.getAttribute("xml:lang") || e.getAttribute("lang"))
                  )
                    return (
                      (t = t.toLowerCase()) === i || 0 === t.indexOf(i + "-")
                    );
                } while ((e = e.parentNode) && 1 === e.nodeType);
                return !1;
              }
            );
          }),
          target: function (e) {
            var t = i.location && i.location.hash;
            return t && t.slice(1) === e.id;
          },
          root: function (e) {
            return e === s;
          },
          focus: function (e) {
            return (
              e === k.activeElement &&
              (!k.hasFocus || k.hasFocus()) &&
              !!(e.type || e.href || ~e.tabIndex)
            );
          },
          enabled: pe(!1),
          disabled: pe(!0),
          checked: function (e) {
            var t = e.nodeName.toLowerCase();
            return (
              ("input" === t && !!e.checked) || ("option" === t && !!e.selected)
            );
          },
          selected: function (e) {
            return (
              e.parentNode && e.parentNode.selectedIndex,
              !0 === e.selected
            );
          },
          empty: function (e) {
            for (e = e.firstChild; e; e = e.nextSibling)
              if (e.nodeType < 6) return !1;
            return !0;
          },
          parent: function (e) {
            return !_.pseudos.empty(e);
          },
          header: function (e) {
            return ee.test(e.nodeName);
          },
          input: function (e) {
            return J.test(e.nodeName);
          },
          button: function (e) {
            var t = e.nodeName.toLowerCase();
            return ("input" === t && "button" === e.type) || "button" === t;
          },
          text: function (e) {
            return (
              "input" === e.nodeName.toLowerCase() &&
              "text" === e.type &&
              (null == (e = e.getAttribute("type")) ||
                "text" === e.toLowerCase())
            );
          },
          first: fe(function () {
            return [0];
          }),
          last: fe(function (e, t) {
            return [t - 1];
          }),
          eq: fe(function (e, t, i) {
            return [i < 0 ? i + t : i];
          }),
          even: fe(function (e, t) {
            for (var i = 0; i < t; i += 2) e.push(i);
            return e;
          }),
          odd: fe(function (e, t) {
            for (var i = 1; i < t; i += 2) e.push(i);
            return e;
          }),
          lt: fe(function (e, t, i) {
            for (var n = i < 0 ? i + t : t < i ? t : i; 0 <= --n; ) e.push(n);
            return e;
          }),
          gt: fe(function (e, t, i) {
            for (var n = i < 0 ? i + t : i; ++n < t; ) e.push(n);
            return e;
          }),
        },
      }).pseudos.nth = _.pseudos.eq),
    { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }))
      _.pseudos[e] = (function (t) {
        return function (e) {
          return "input" === e.nodeName.toLowerCase() && e.type === t;
        };
      })(e);
    for (e in { submit: !0, reset: !0 })
      _.pseudos[e] = (function (i) {
        return function (e) {
          var t = e.nodeName.toLowerCase();
          return ("input" === t || "button" === t) && e.type === i;
        };
      })(e);
    function me() {}
    function ve(e) {
      for (var t = 0, i = e.length, n = ""; t < i; t++) n += e[t].value;
      return n;
    }
    function be(s, e, t) {
      var a = e.dir,
        l = e.next,
        c = l || a,
        u = t && "parentNode" === c,
        h = S++;
      return e.first
        ? function (e, t, i) {
            for (; (e = e[a]); ) if (1 === e.nodeType || u) return s(e, t, i);
            return !1;
          }
        : function (e, t, i) {
            var n,
              r,
              o = [T, h];
            if (i) {
              for (; (e = e[a]); )
                if ((1 === e.nodeType || u) && s(e, t, i)) return !0;
            } else
              for (; (e = e[a]); )
                if (1 === e.nodeType || u)
                  if (
                    ((n =
                      (r = e[P] || (e[P] = {}))[e.uniqueID] ||
                      (r[e.uniqueID] = {})),
                    l && l === e.nodeName.toLowerCase())
                  )
                    e = e[a] || e;
                  else {
                    if ((r = n[c]) && r[0] === T && r[1] === h)
                      return (o[2] = r[2]);
                    if (((n[c] = o)[2] = s(e, t, i))) return !0;
                  }
            return !1;
          };
    }
    function ye(r) {
      return 1 < r.length
        ? function (e, t, i) {
            for (var n = r.length; n--; ) if (!r[n](e, t, i)) return !1;
            return !0;
          }
        : r[0];
    }
    function _e(e, t, i, n, r) {
      for (var o, s = [], a = 0, l = e.length, c = null != t; a < l; a++)
        (o = e[a]) && ((i && !i(o, n, r)) || (s.push(o), c && t.push(a)));
      return s;
    }
    function we(e) {
      for (
        var n,
          t,
          i,
          r = e.length,
          o = _.relative[e[0].type],
          s = o || _.relative[" "],
          a = o ? 1 : 0,
          l = be(
            function (e) {
              return e === n;
            },
            s,
            !0,
          ),
          c = be(
            function (e) {
              return -1 < F(n, e);
            },
            s,
            !0,
          ),
          u = [
            function (e, t, i) {
              i = (!o && (i || t !== w)) || ((n = t).nodeType ? l : c)(e, t, i);
              return ((n = null), i);
            },
          ];
        a < r;
        a++
      )
        if ((t = _.relative[e[a].type])) u = [be(ye(u), t)];
        else {
          if ((t = _.filter[e[a].type].apply(null, e[a].matches))[P]) {
            for (i = ++a; i < r && !_.relative[e[i].type]; i++);
            return (function e(p, f, g, m, v, t) {
              return (
                m && !m[P] && (m = e(m)),
                v && !v[P] && (v = e(v, t)),
                ce(function (e, t, i, n) {
                  var r,
                    o,
                    s,
                    a = [],
                    l = [],
                    c = t.length,
                    u =
                      e ||
                      (function (e, t, i) {
                        for (var n = 0, r = t.length; n < r; n++)
                          ae(e, t[n], i);
                        return i;
                      })(f || "*", i.nodeType ? [i] : i, []),
                    h = !p || (!e && f) ? u : _e(u, a, p, i, n),
                    d = g ? (v || (e ? p : c || m) ? [] : t) : h;
                  if ((g && g(h, d, i, n), m))
                    for (r = _e(d, l), m(r, [], i, n), o = r.length; o--; )
                      (s = r[o]) && (d[l[o]] = !(h[l[o]] = s));
                  if (e) {
                    if (v || p) {
                      if (v) {
                        for (r = [], o = d.length; o--; )
                          (s = d[o]) && r.push((h[o] = s));
                        v(null, (d = []), r, n);
                      }
                      for (o = d.length; o--; )
                        (s = d[o]) &&
                          -1 < (r = v ? F(e, s) : a[o]) &&
                          (e[r] = !(t[r] = s));
                    }
                  } else
                    ((d = _e(d === t ? d.splice(c, d.length) : d)),
                      v ? v(null, t, d, n) : j.apply(t, d));
                })
              );
            })(
              1 < a && ye(u),
              1 < a &&
                ve(
                  e
                    .slice(0, a - 1)
                    .concat({ value: " " === e[a - 2].type ? "*" : "" }),
                ).replace(U, "$1"),
              t,
              a < i && we(e.slice(a, i)),
              i < r && we((e = e.slice(i))),
              i < r && ve(e),
            );
          }
          u.push(t);
        }
      return ye(u);
    }
    return (
      (me.prototype = _.filters = _.pseudos),
      (_.setFilters = new me()),
      (f = ae.tokenize =
        function (e, t) {
          var i,
            n,
            r,
            o,
            s,
            a,
            l,
            c = D[e + " "];
          if (c) return t ? 0 : c.slice(0);
          for (s = e, a = [], l = _.preFilter; s; ) {
            for (o in ((i && !(n = V.exec(s))) ||
              (n && (s = s.slice(n[0].length) || s), a.push((r = []))),
            (i = !1),
            (n = Y.exec(s)) &&
              ((i = n.shift()),
              r.push({ value: i, type: n[0].replace(U, " ") }),
              (s = s.slice(i.length))),
            _.filter))
              !(n = K[o].exec(s)) ||
                (l[o] && !(n = l[o](n))) ||
                ((i = n.shift()),
                r.push({ value: i, type: o, matches: n }),
                (s = s.slice(i.length)));
            if (!i) break;
          }
          return t ? s.length : s ? ae.error(e) : D(e, a).slice(0);
        }),
      (g = ae.compile =
        function (e, t) {
          var i,
            m,
            v,
            b,
            y,
            n,
            r = [],
            o = [],
            s = E[e + " "];
          if (!s) {
            for (i = (t = t || f(e)).length; i--; )
              ((s = we(t[i]))[P] ? r : o).push(s);
            (s = E(
              e,
              ((b = 0 < (v = r).length),
              (y = 0 < (m = o).length),
              (n = function (e, t, i, n, r) {
                var o,
                  s,
                  a,
                  l = 0,
                  c = "0",
                  u = e && [],
                  h = [],
                  d = w,
                  p = e || (y && _.find.TAG("*", r)),
                  f = (T += null == d ? 1 : Math.random() || 0.1),
                  g = p.length;
                for (
                  r && (w = t == k || t || r);
                  c !== g && null != (o = p[c]);
                  c++
                ) {
                  if (y && o) {
                    for (
                      s = 0, t || o.ownerDocument == k || (x(o), (i = !C));
                      (a = m[s++]);

                    )
                      if (a(o, t || k, i)) {
                        n.push(o);
                        break;
                      }
                    r && (T = f);
                  }
                  b && ((o = !a && o) && l--, e && u.push(o));
                }
                if (((l += c), b && c !== l)) {
                  for (s = 0; (a = v[s++]); ) a(u, h, t, i);
                  if (e) {
                    if (0 < l) for (; c--; ) u[c] || h[c] || (h[c] = M.call(n));
                    h = _e(h);
                  }
                  (j.apply(n, h),
                    r &&
                      !e &&
                      0 < h.length &&
                      1 < l + v.length &&
                      ae.uniqueSort(n));
                }
                return (r && ((T = f), (w = d)), u);
              }),
              b ? ce(n) : n),
            )).selector = e;
          }
          return s;
        }),
      (m = ae.select =
        function (e, t, i, n) {
          var r,
            o,
            s,
            a,
            l,
            c = "function" == typeof e && e,
            u = !n && f((e = c.selector || e));
          if (((i = i || []), 1 === u.length)) {
            if (
              2 < (o = u[0] = u[0].slice(0)).length &&
              "ID" === (s = o[0]).type &&
              9 === t.nodeType &&
              C &&
              _.relative[o[1].type]
            ) {
              if (!(t = (_.find.ID(s.matches[0].replace(re, h), t) || [])[0]))
                return i;
              (c && (t = t.parentNode), (e = e.slice(o.shift().value.length)));
            }
            for (
              r = K.needsContext.test(e) ? 0 : o.length;
              r-- && ((s = o[r]), !_.relative[(a = s.type)]);

            )
              if (
                (l = _.find[a]) &&
                (n = l(
                  s.matches[0].replace(re, h),
                  (ne.test(o[0].type) && ge(t.parentNode)) || t,
                ))
              ) {
                if ((o.splice(r, 1), !(e = n.length && ve(o))))
                  return (j.apply(i, n), i);
                break;
              }
          }
          return (
            (c || g(e, u))(
              n,
              t,
              !C,
              i,
              !t || (ne.test(e) && ge(t.parentNode)) || t,
            ),
            i
          );
        }),
      (p.sortStable = P.split("").sort(A).join("") === P),
      (p.detectDuplicates = !!c),
      x(),
      (p.sortDetached = ue(function (e) {
        return 1 & e.compareDocumentPosition(k.createElement("fieldset"));
      })),
      ue(function (e) {
        return (
          (e.innerHTML = "<a href='#'></a>"),
          "#" === e.firstChild.getAttribute("href")
        );
      }) ||
        he("type|href|height|width", function (e, t, i) {
          if (!i) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
        }),
      (p.attributes &&
        ue(function (e) {
          return (
            (e.innerHTML = "<input/>"),
            e.firstChild.setAttribute("value", ""),
            "" === e.firstChild.getAttribute("value")
          );
        })) ||
        he("value", function (e, t, i) {
          if (!i && "input" === e.nodeName.toLowerCase()) return e.defaultValue;
        }),
      ue(function (e) {
        return null == e.getAttribute("disabled");
      }) ||
        he(z, function (e, t, i) {
          if (!i)
            return !0 === e[t]
              ? t.toLowerCase()
              : (t = e.getAttributeNode(t)) && t.specified
                ? t.value
                : null;
        }),
      ae
    );
  })(x);
  ((C.find = p),
    (C.expr = p.selectors),
    (C.expr[":"] = C.expr.pseudos),
    (C.uniqueSort = C.unique = p.uniqueSort),
    (C.text = p.getText),
    (C.isXMLDoc = p.isXML),
    (C.contains = p.contains),
    (C.escapeSelector = p.escape));
  function w(e, t, i) {
    for (var n = [], r = void 0 !== i; (e = e[t]) && 9 !== e.nodeType; )
      if (1 === e.nodeType) {
        if (r && C(e).is(i)) break;
        n.push(e);
      }
    return n;
  }
  function P(e, t) {
    for (var i = []; e; e = e.nextSibling)
      1 === e.nodeType && e !== t && i.push(e);
    return i;
  }
  var T = C.expr.match.needsContext;
  function S(e, t) {
    return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
  }
  var H = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  function D(e, i, n) {
    return g(i)
      ? C.grep(e, function (e, t) {
          return !!i.call(e, t, e) !== n;
        })
      : i.nodeType
        ? C.grep(e, function (e) {
            return (e === i) !== n;
          })
        : "string" != typeof i
          ? C.grep(e, function (e) {
              return -1 < r.call(i, e) !== n;
            })
          : C.filter(i, e, n);
  }
  ((C.filter = function (e, t, i) {
    var n = t[0];
    return (
      i && (e = ":not(" + e + ")"),
      1 === t.length && 1 === n.nodeType
        ? C.find.matchesSelector(n, e)
          ? [n]
          : []
        : C.find.matches(
            e,
            C.grep(t, function (e) {
              return 1 === e.nodeType;
            }),
          )
    );
  }),
    C.fn.extend({
      find: function (e) {
        var t,
          i,
          n = this.length,
          r = this;
        if ("string" != typeof e)
          return this.pushStack(
            C(e).filter(function () {
              for (t = 0; t < n; t++) if (C.contains(r[t], this)) return !0;
            }),
          );
        for (i = this.pushStack([]), t = 0; t < n; t++) C.find(e, r[t], i);
        return 1 < n ? C.uniqueSort(i) : i;
      },
      filter: function (e) {
        return this.pushStack(D(this, e || [], !1));
      },
      not: function (e) {
        return this.pushStack(D(this, e || [], !0));
      },
      is: function (e) {
        return !!D(this, "string" == typeof e && T.test(e) ? C(e) : e || [], !1)
          .length;
      },
    }));
  var E = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
  (C.fn.init = function (e, t, i) {
    if (!e) return this;
    if (((i = i || I), "string" != typeof e))
      return e.nodeType
        ? ((this[0] = e), (this.length = 1), this)
        : g(e)
          ? void 0 !== i.ready
            ? i.ready(e)
            : e(C)
          : C.makeArray(e, this);
    if (
      !(n =
        "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length
          ? [null, e, null]
          : E.exec(e)) ||
      (!n[1] && t)
    )
      return (!t || t.jquery ? t || i : this.constructor(t)).find(e);
    if (n[1]) {
      if (
        ((t = t instanceof C ? t[0] : t),
        C.merge(
          this,
          C.parseHTML(n[1], t && t.nodeType ? t.ownerDocument || t : k, !0),
        ),
        H.test(n[1]) && C.isPlainObject(t))
      )
        for (var n in t) g(this[n]) ? this[n](t[n]) : this.attr(n, t[n]);
      return this;
    }
    return (
      (e = k.getElementById(n[2])) && ((this[0] = e), (this.length = 1)),
      this
    );
  }).prototype = C.fn;
  var I = C(k),
    A = /^(?:parents|prev(?:Until|All))/,
    O = { children: !0, contents: !0, next: !0, prev: !0 };
  function M(e, t) {
    for (; (e = e[t]) && 1 !== e.nodeType; );
    return e;
  }
  (C.fn.extend({
    has: function (e) {
      var t = C(e, this),
        i = t.length;
      return this.filter(function () {
        for (var e = 0; e < i; e++) if (C.contains(this, t[e])) return !0;
      });
    },
    closest: function (e, t) {
      var i,
        n = 0,
        r = this.length,
        o = [],
        s = "string" != typeof e && C(e);
      if (!T.test(e))
        for (; n < r; n++)
          for (i = this[n]; i && i !== t; i = i.parentNode)
            if (
              i.nodeType < 11 &&
              (s
                ? -1 < s.index(i)
                : 1 === i.nodeType && C.find.matchesSelector(i, e))
            ) {
              o.push(i);
              break;
            }
      return this.pushStack(1 < o.length ? C.uniqueSort(o) : o);
    },
    index: function (e) {
      return e
        ? "string" == typeof e
          ? r.call(C(e), this[0])
          : r.call(this, e.jquery ? e[0] : e)
        : this[0] && this[0].parentNode
          ? this.first().prevAll().length
          : -1;
    },
    add: function (e, t) {
      return this.pushStack(C.uniqueSort(C.merge(this.get(), C(e, t))));
    },
    addBack: function (e) {
      return this.add(null == e ? this.prevObject : this.prevObject.filter(e));
    },
  }),
    C.each(
      {
        parent: function (e) {
          e = e.parentNode;
          return e && 11 !== e.nodeType ? e : null;
        },
        parents: function (e) {
          return w(e, "parentNode");
        },
        parentsUntil: function (e, t, i) {
          return w(e, "parentNode", i);
        },
        next: function (e) {
          return M(e, "nextSibling");
        },
        prev: function (e) {
          return M(e, "previousSibling");
        },
        nextAll: function (e) {
          return w(e, "nextSibling");
        },
        prevAll: function (e) {
          return w(e, "previousSibling");
        },
        nextUntil: function (e, t, i) {
          return w(e, "nextSibling", i);
        },
        prevUntil: function (e, t, i) {
          return w(e, "previousSibling", i);
        },
        siblings: function (e) {
          return P((e.parentNode || {}).firstChild, e);
        },
        children: function (e) {
          return P(e.firstChild);
        },
        contents: function (e) {
          return null != e.contentDocument && i(e.contentDocument)
            ? e.contentDocument
            : (S(e, "template") && (e = e.content || e),
              C.merge([], e.childNodes));
        },
      },
      function (n, r) {
        C.fn[n] = function (e, t) {
          var i = C.map(this, r, e);
          return (
            (t = "Until" !== n.slice(-5) ? e : t) &&
              "string" == typeof t &&
              (i = C.filter(t, i)),
            1 < this.length &&
              (O[n] || C.uniqueSort(i), A.test(n) && i.reverse()),
            this.pushStack(i)
          );
        };
      },
    ));
  var L = /[^\x20\t\r\n\f]+/g;
  function j(e) {
    return e;
  }
  function N(e) {
    throw e;
  }
  function F(e, t, i, n) {
    var r;
    try {
      e && g((r = e.promise))
        ? r.call(e).done(t).fail(i)
        : e && g((r = e.then))
          ? r.call(e, t, i)
          : t.apply(void 0, [e].slice(n));
    } catch (e) {
      i.apply(void 0, [e]);
    }
  }
  ((C.Callbacks = function (n) {
    var e, i;
    n =
      "string" == typeof n
        ? ((e = n),
          (i = {}),
          C.each(e.match(L) || [], function (e, t) {
            i[t] = !0;
          }),
          i)
        : C.extend({}, n);
    function r() {
      for (a = a || n.once, s = o = !0; c.length; u = -1)
        for (t = c.shift(); ++u < l.length; )
          !1 === l[u].apply(t[0], t[1]) &&
            n.stopOnFalse &&
            ((u = l.length), (t = !1));
      (n.memory || (t = !1), (o = !1), a && (l = t ? [] : ""));
    }
    var o,
      t,
      s,
      a,
      l = [],
      c = [],
      u = -1,
      h = {
        add: function () {
          return (
            l &&
              (t && !o && ((u = l.length - 1), c.push(t)),
              (function i(e) {
                C.each(e, function (e, t) {
                  g(t)
                    ? (n.unique && h.has(t)) || l.push(t)
                    : t && t.length && "string" !== f(t) && i(t);
                });
              })(arguments),
              t && !o && r()),
            this
          );
        },
        remove: function () {
          return (
            C.each(arguments, function (e, t) {
              for (var i; -1 < (i = C.inArray(t, l, i)); )
                (l.splice(i, 1), i <= u && u--);
            }),
            this
          );
        },
        has: function (e) {
          return e ? -1 < C.inArray(e, l) : 0 < l.length;
        },
        empty: function () {
          return ((l = l && []), this);
        },
        disable: function () {
          return ((a = c = []), (l = t = ""), this);
        },
        disabled: function () {
          return !l;
        },
        lock: function () {
          return ((a = c = []), t || o || (l = t = ""), this);
        },
        locked: function () {
          return !!a;
        },
        fireWith: function (e, t) {
          return (
            a ||
              ((t = [e, (t = t || []).slice ? t.slice() : t]),
              c.push(t),
              o || r()),
            this
          );
        },
        fire: function () {
          return (h.fireWith(this, arguments), this);
        },
        fired: function () {
          return !!s;
        },
      };
    return h;
  }),
    C.extend({
      Deferred: function (e) {
        var o = [
            [
              "notify",
              "progress",
              C.Callbacks("memory"),
              C.Callbacks("memory"),
              2,
            ],
            [
              "resolve",
              "done",
              C.Callbacks("once memory"),
              C.Callbacks("once memory"),
              0,
              "resolved",
            ],
            [
              "reject",
              "fail",
              C.Callbacks("once memory"),
              C.Callbacks("once memory"),
              1,
              "rejected",
            ],
          ],
          r = "pending",
          s = {
            state: function () {
              return r;
            },
            always: function () {
              return (a.done(arguments).fail(arguments), this);
            },
            catch: function (e) {
              return s.then(null, e);
            },
            pipe: function () {
              var r = arguments;
              return C.Deferred(function (n) {
                (C.each(o, function (e, t) {
                  var i = g(r[t[4]]) && r[t[4]];
                  a[t[1]](function () {
                    var e = i && i.apply(this, arguments);
                    e && g(e.promise)
                      ? e
                          .promise()
                          .progress(n.notify)
                          .done(n.resolve)
                          .fail(n.reject)
                      : n[t[0] + "With"](this, i ? [e] : arguments);
                  });
                }),
                  (r = null));
              }).promise();
            },
            then: function (t, i, n) {
              var l = 0;
              function c(r, o, s, a) {
                return function () {
                  function e() {
                    var e, t;
                    if (!(r < l)) {
                      if ((e = s.apply(i, n)) === o.promise())
                        throw new TypeError("Thenable self-resolution");
                      ((t =
                        e &&
                        ("object" == typeof e || "function" == typeof e) &&
                        e.then),
                        g(t)
                          ? a
                            ? t.call(e, c(l, o, j, a), c(l, o, N, a))
                            : (l++,
                              t.call(
                                e,
                                c(l, o, j, a),
                                c(l, o, N, a),
                                c(l, o, j, o.notifyWith),
                              ))
                          : (s !== j && ((i = void 0), (n = [e])),
                            (a || o.resolveWith)(i, n)));
                    }
                  }
                  var i = this,
                    n = arguments,
                    t = a
                      ? e
                      : function () {
                          try {
                            e();
                          } catch (e) {
                            (C.Deferred.exceptionHook &&
                              C.Deferred.exceptionHook(e, t.stackTrace),
                              l <= r + 1 &&
                                (s !== N && ((i = void 0), (n = [e])),
                                o.rejectWith(i, n)));
                          }
                        };
                  r
                    ? t()
                    : (C.Deferred.getStackHook &&
                        (t.stackTrace = C.Deferred.getStackHook()),
                      x.setTimeout(t));
                };
              }
              return C.Deferred(function (e) {
                (o[0][3].add(c(0, e, g(n) ? n : j, e.notifyWith)),
                  o[1][3].add(c(0, e, g(t) ? t : j)),
                  o[2][3].add(c(0, e, g(i) ? i : N)));
              }).promise();
            },
            promise: function (e) {
              return null != e ? C.extend(e, s) : s;
            },
          },
          a = {};
        return (
          C.each(o, function (e, t) {
            var i = t[2],
              n = t[5];
            ((s[t[1]] = i.add),
              n &&
                i.add(
                  function () {
                    r = n;
                  },
                  o[3 - e][2].disable,
                  o[3 - e][3].disable,
                  o[0][2].lock,
                  o[0][3].lock,
                ),
              i.add(t[3].fire),
              (a[t[0]] = function () {
                return (
                  a[t[0] + "With"](this === a ? void 0 : this, arguments),
                  this
                );
              }),
              (a[t[0] + "With"] = i.fireWith));
          }),
          s.promise(a),
          e && e.call(a, a),
          a
        );
      },
      when: function (e) {
        function t(t) {
          return function (e) {
            ((r[t] = this),
              (o[t] = 1 < arguments.length ? a.call(arguments) : e),
              --i || s.resolveWith(r, o));
          };
        }
        var i = arguments.length,
          n = i,
          r = Array(n),
          o = a.call(arguments),
          s = C.Deferred();
        if (
          i <= 1 &&
          (F(e, s.done(t(n)).resolve, s.reject, !i),
          "pending" === s.state() || g(o[n] && o[n].then))
        )
          return s.then();
        for (; n--; ) F(o[n], t(n), s.reject);
        return s.promise();
      },
    }));
  var z = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  ((C.Deferred.exceptionHook = function (e, t) {
    x.console &&
      x.console.warn &&
      e &&
      z.test(e.name) &&
      x.console.warn("jQuery.Deferred exception: " + e.message, e.stack, t);
  }),
    (C.readyException = function (e) {
      x.setTimeout(function () {
        throw e;
      });
    }));
  var R = C.Deferred();
  function B() {
    (k.removeEventListener("DOMContentLoaded", B),
      x.removeEventListener("load", B),
      C.ready());
  }
  ((C.fn.ready = function (e) {
    return (
      R.then(e).catch(function (e) {
        C.readyException(e);
      }),
      this
    );
  }),
    C.extend({
      isReady: !1,
      readyWait: 1,
      ready: function (e) {
        (!0 === e ? --C.readyWait : C.isReady) ||
          ((C.isReady = !0) !== e && 0 < --C.readyWait) ||
          R.resolveWith(k, [C]);
      },
    }),
    (C.ready.then = R.then),
    "complete" === k.readyState ||
    ("loading" !== k.readyState && !k.documentElement.doScroll)
      ? x.setTimeout(C.ready)
      : (k.addEventListener("DOMContentLoaded", B),
        x.addEventListener("load", B)));
  function q(e, t, i, n, r, o, s) {
    var a = 0,
      l = e.length,
      c = null == i;
    if ("object" === f(i)) for (a in ((r = !0), i)) q(e, t, a, i[a], !0, o, s);
    else if (
      void 0 !== n &&
      ((r = !0),
      g(n) || (s = !0),
      (t = c
        ? s
          ? (t.call(e, n), null)
          : ((c = t),
            function (e, t, i) {
              return c.call(C(e), i);
            })
        : t))
    )
      for (; a < l; a++) t(e[a], i, s ? n : n.call(e[a], a, t(e[a], i)));
    return r ? e : c ? t.call(e) : l ? t(e[0], i) : o;
  }
  var $ = /^-ms-/,
    W = /-([a-z])/g;
  function U(e, t) {
    return t.toUpperCase();
  }
  function V(e) {
    return e.replace($, "ms-").replace(W, U);
  }
  function Y(e) {
    return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType;
  }
  function Q() {
    this.expando = C.expando + Q.uid++;
  }
  ((Q.uid = 1),
    (Q.prototype = {
      cache: function (e) {
        var t = e[this.expando];
        return (
          t ||
            ((t = {}),
            Y(e) &&
              (e.nodeType
                ? (e[this.expando] = t)
                : Object.defineProperty(e, this.expando, {
                    value: t,
                    configurable: !0,
                  }))),
          t
        );
      },
      set: function (e, t, i) {
        var n,
          r = this.cache(e);
        if ("string" == typeof t) r[V(t)] = i;
        else for (n in t) r[V(n)] = t[n];
        return r;
      },
      get: function (e, t) {
        return void 0 === t
          ? this.cache(e)
          : e[this.expando] && e[this.expando][V(t)];
      },
      access: function (e, t, i) {
        return void 0 === t || (t && "string" == typeof t && void 0 === i)
          ? this.get(e, t)
          : (this.set(e, t, i), void 0 !== i ? i : t);
      },
      remove: function (e, t) {
        var i,
          n = e[this.expando];
        if (void 0 !== n) {
          if (void 0 !== t) {
            i = (t = Array.isArray(t)
              ? t.map(V)
              : (t = V(t)) in n
                ? [t]
                : t.match(L) || []).length;
            for (; i--; ) delete n[t[i]];
          }
          (void 0 !== t && !C.isEmptyObject(n)) ||
            (e.nodeType ? (e[this.expando] = void 0) : delete e[this.expando]);
        }
      },
      hasData: function (e) {
        e = e[this.expando];
        return void 0 !== e && !C.isEmptyObject(e);
      },
    }));
  var X = new Q(),
    Z = new Q(),
    K = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
    G = /[A-Z]/g;
  function J(e, t, i) {
    var n, r;
    if (void 0 === i && 1 === e.nodeType)
      if (
        ((n = "data-" + t.replace(G, "-$&").toLowerCase()),
        "string" == typeof (i = e.getAttribute(n)))
      ) {
        try {
          i =
            "true" === (r = i) ||
            ("false" !== r &&
              ("null" === r
                ? null
                : r === +r + ""
                  ? +r
                  : K.test(r)
                    ? JSON.parse(r)
                    : r));
        } catch (e) {}
        Z.set(e, t, i);
      } else i = void 0;
    return i;
  }
  (C.extend({
    hasData: function (e) {
      return Z.hasData(e) || X.hasData(e);
    },
    data: function (e, t, i) {
      return Z.access(e, t, i);
    },
    removeData: function (e, t) {
      Z.remove(e, t);
    },
    _data: function (e, t, i) {
      return X.access(e, t, i);
    },
    _removeData: function (e, t) {
      X.remove(e, t);
    },
  }),
    C.fn.extend({
      data: function (i, e) {
        var t,
          n,
          r,
          o = this[0],
          s = o && o.attributes;
        if (void 0 !== i)
          return "object" == typeof i
            ? this.each(function () {
                Z.set(this, i);
              })
            : q(
                this,
                function (e) {
                  var t;
                  return o && void 0 === e
                    ? void 0 !== (t = Z.get(o, i)) || void 0 !== (t = J(o, i))
                      ? t
                      : void 0
                    : void this.each(function () {
                        Z.set(this, i, e);
                      });
                },
                null,
                e,
                1 < arguments.length,
                null,
                !0,
              );
        if (
          this.length &&
          ((r = Z.get(o)), 1 === o.nodeType && !X.get(o, "hasDataAttrs"))
        ) {
          for (t = s.length; t--; )
            s[t] &&
              0 === (n = s[t].name).indexOf("data-") &&
              ((n = V(n.slice(5))), J(o, n, r[n]));
          X.set(o, "hasDataAttrs", !0);
        }
        return r;
      },
      removeData: function (e) {
        return this.each(function () {
          Z.remove(this, e);
        });
      },
    }),
    C.extend({
      queue: function (e, t, i) {
        var n;
        if (e)
          return (
            (n = X.get(e, (t = (t || "fx") + "queue"))),
            i &&
              (!n || Array.isArray(i)
                ? (n = X.access(e, t, C.makeArray(i)))
                : n.push(i)),
            n || []
          );
      },
      dequeue: function (e, t) {
        t = t || "fx";
        var i = C.queue(e, t),
          n = i.length,
          r = i.shift(),
          o = C._queueHooks(e, t);
        ("inprogress" === r && ((r = i.shift()), n--),
          r &&
            ("fx" === t && i.unshift("inprogress"),
            delete o.stop,
            r.call(
              e,
              function () {
                C.dequeue(e, t);
              },
              o,
            )),
          !n && o && o.empty.fire());
      },
      _queueHooks: function (e, t) {
        var i = t + "queueHooks";
        return (
          X.get(e, i) ||
          X.access(e, i, {
            empty: C.Callbacks("once memory").add(function () {
              X.remove(e, [t + "queue", i]);
            }),
          })
        );
      },
    }),
    C.fn.extend({
      queue: function (t, i) {
        var e = 2;
        return (
          "string" != typeof t && ((i = t), (t = "fx"), e--),
          arguments.length < e
            ? C.queue(this[0], t)
            : void 0 === i
              ? this
              : this.each(function () {
                  var e = C.queue(this, t, i);
                  (C._queueHooks(this, t),
                    "fx" === t && "inprogress" !== e[0] && C.dequeue(this, t));
                })
        );
      },
      dequeue: function (e) {
        return this.each(function () {
          C.dequeue(this, e);
        });
      },
      clearQueue: function (e) {
        return this.queue(e || "fx", []);
      },
      promise: function (e, t) {
        function i() {
          --r || o.resolveWith(s, [s]);
        }
        var n,
          r = 1,
          o = C.Deferred(),
          s = this,
          a = this.length;
        for (
          "string" != typeof e && ((t = e), (e = void 0)), e = e || "fx";
          a--;

        )
          (n = X.get(s[a], e + "queueHooks")) &&
            n.empty &&
            (r++, n.empty.add(i));
        return (i(), o.promise(t));
      },
    }));
  var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
    te = new RegExp("^(?:([+-])=|)(" + ee + ")([a-z%]*)$", "i"),
    ie = ["Top", "Right", "Bottom", "Left"],
    ne = k.documentElement,
    re = function (e) {
      return C.contains(e.ownerDocument, e);
    },
    oe = { composed: !0 };
  ne.getRootNode &&
    (re = function (e) {
      return (
        C.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument
      );
    });
  function se(e, t) {
    return (
      "none" === (e = t || e).style.display ||
      ("" === e.style.display && re(e) && "none" === C.css(e, "display"))
    );
  }
  function ae(e, t, i, n) {
    var r,
      o,
      s = 20,
      a = n
        ? function () {
            return n.cur();
          }
        : function () {
            return C.css(e, t, "");
          },
      l = a(),
      c = (i && i[3]) || (C.cssNumber[t] ? "" : "px"),
      u =
        e.nodeType &&
        (C.cssNumber[t] || ("px" !== c && +l)) &&
        te.exec(C.css(e, t));
    if (u && u[3] !== c) {
      for (c = c || u[3], u = +(l /= 2) || 1; s--; )
        (C.style(e, t, u + c),
          (1 - o) * (1 - (o = a() / l || 0.5)) <= 0 && (s = 0),
          (u /= o));
      (C.style(e, t, (u *= 2) + c), (i = i || []));
    }
    return (
      i &&
        ((u = +u || +l || 0),
        (r = i[1] ? u + (i[1] + 1) * i[2] : +i[2]),
        n && ((n.unit = c), (n.start = u), (n.end = r))),
      r
    );
  }
  var le = {};
  function ce(e, t) {
    for (var i, n, r, o, s, a, l = [], c = 0, u = e.length; c < u; c++)
      (n = e[c]).style &&
        ((i = n.style.display),
        t
          ? ("none" === i &&
              ((l[c] = X.get(n, "display") || null),
              l[c] || (n.style.display = "")),
            "" === n.style.display &&
              se(n) &&
              (l[c] =
                ((a = o = r = void 0),
                (o = n.ownerDocument),
                (s = n.nodeName),
                (a = le[s]) ||
                  ((r = o.body.appendChild(o.createElement(s))),
                  (a = C.css(r, "display")),
                  r.parentNode.removeChild(r),
                  (le[s] = a = "none" === a ? "block" : a)))))
          : "none" !== i && ((l[c] = "none"), X.set(n, "display", i)));
    for (c = 0; c < u; c++) null != l[c] && (e[c].style.display = l[c]);
    return e;
  }
  C.fn.extend({
    show: function () {
      return ce(this, !0);
    },
    hide: function () {
      return ce(this);
    },
    toggle: function (e) {
      return "boolean" == typeof e
        ? e
          ? this.show()
          : this.hide()
        : this.each(function () {
            se(this) ? C(this).show() : C(this).hide();
          });
    },
  });
  var ue = /^(?:checkbox|radio)$/i,
    he = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i,
    de = /^$|^module$|\/(?:java|ecma)script/i,
    h = k.createDocumentFragment().appendChild(k.createElement("div"));
  ((p = k.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 pe = {
    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 fe(e, t) {
    var i =
      void 0 !== e.getElementsByTagName
        ? e.getElementsByTagName(t || "*")
        : void 0 !== e.querySelectorAll
          ? e.querySelectorAll(t || "*")
          : [];
    return void 0 === t || (t && S(e, t)) ? C.merge([e], i) : i;
  }
  function ge(e, t) {
    for (var i = 0, n = e.length; i < n; i++)
      X.set(e[i], "globalEval", !t || X.get(t[i], "globalEval"));
  }
  ((pe.tbody = pe.tfoot = pe.colgroup = pe.caption = pe.thead),
    (pe.th = pe.td),
    y.option ||
      (pe.optgroup = pe.option =
        [1, "<select multiple='multiple'>", "</select>"]));
  var me = /<|&#?\w+;/;
  function ve(e, t, i, n, r) {
    for (
      var o,
        s,
        a,
        l,
        c,
        u = t.createDocumentFragment(),
        h = [],
        d = 0,
        p = e.length;
      d < p;
      d++
    )
      if ((o = e[d]) || 0 === o)
        if ("object" === f(o)) C.merge(h, o.nodeType ? [o] : o);
        else if (me.test(o)) {
          for (
            s = s || u.appendChild(t.createElement("div")),
              a = (he.exec(o) || ["", ""])[1].toLowerCase(),
              a = pe[a] || pe._default,
              s.innerHTML = a[1] + C.htmlPrefilter(o) + a[2],
              c = a[0];
            c--;

          )
            s = s.lastChild;
          (C.merge(h, s.childNodes), ((s = u.firstChild).textContent = ""));
        } else h.push(t.createTextNode(o));
    for (u.textContent = "", d = 0; (o = h[d++]); )
      if (n && -1 < C.inArray(o, n)) r && r.push(o);
      else if (
        ((l = re(o)), (s = fe(u.appendChild(o), "script")), l && ge(s), i)
      )
        for (c = 0; (o = s[c++]); ) de.test(o.type || "") && i.push(o);
    return u;
  }
  var be = /^key/,
    ye = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
    _e = /^([^.]*)(?:\.(.+)|)/;
  function we() {
    return !0;
  }
  function xe() {
    return !1;
  }
  function ke(e, t) {
    return (
      (e ===
        (function () {
          try {
            return k.activeElement;
          } catch (e) {}
        })()) ==
      ("focus" === t)
    );
  }
  function Ce(e, t, i, n, r, o) {
    var s, a;
    if ("object" == typeof t) {
      for (a in ("string" != typeof i && ((n = n || i), (i = void 0)), t))
        Ce(e, a, i, n, t[a], o);
      return e;
    }
    if (
      (null == n && null == r
        ? ((r = i), (n = i = void 0))
        : null == r &&
          ("string" == typeof i
            ? ((r = n), (n = void 0))
            : ((r = n), (n = i), (i = void 0))),
      !1 === r)
    )
      r = xe;
    else if (!r) return e;
    return (
      1 === o &&
        ((s = r),
        ((r = function (e) {
          return (C().off(e), s.apply(this, arguments));
        }).guid = s.guid || (s.guid = C.guid++))),
      e.each(function () {
        C.event.add(this, t, r, n, i);
      })
    );
  }
  function Pe(e, r, o) {
    o
      ? (X.set(e, r, !1),
        C.event.add(e, r, {
          namespace: !1,
          handler: function (e) {
            var t,
              i,
              n = X.get(this, r);
            if (1 & e.isTrigger && this[r]) {
              if (n.length)
                (C.event.special[r] || {}).delegateType && e.stopPropagation();
              else if (
                ((n = a.call(arguments)),
                X.set(this, r, n),
                (t = o(this, r)),
                this[r](),
                n !== (i = X.get(this, r)) || t ? X.set(this, r, !1) : (i = {}),
                n !== i)
              )
                return (
                  e.stopImmediatePropagation(),
                  e.preventDefault(),
                  i.value
                );
            } else
              n.length &&
                (X.set(this, r, {
                  value: C.event.trigger(
                    C.extend(n[0], C.Event.prototype),
                    n.slice(1),
                    this,
                  ),
                }),
                e.stopImmediatePropagation());
          },
        }))
      : void 0 === X.get(e, r) && C.event.add(e, r, we);
  }
  ((C.event = {
    global: {},
    add: function (t, e, i, n, r) {
      var o,
        s,
        a,
        l,
        c,
        u,
        h,
        d,
        p,
        f = X.get(t);
      if (Y(t))
        for (
          i.handler && ((i = (o = i).handler), (r = o.selector)),
            r && C.find.matchesSelector(ne, r),
            i.guid || (i.guid = C.guid++),
            (a = f.events) || (a = f.events = Object.create(null)),
            (s = f.handle) ||
              (s = f.handle =
                function (e) {
                  return void 0 !== C && C.event.triggered !== e.type
                    ? C.event.dispatch.apply(t, arguments)
                    : void 0;
                }),
            l = (e = (e || "").match(L) || [""]).length;
          l--;

        )
          ((h = p = (c = _e.exec(e[l]) || [])[1]),
            (d = (c[2] || "").split(".").sort()),
            h &&
              ((u = C.event.special[h] || {}),
              (h = (r ? u.delegateType : u.bindType) || h),
              (u = C.event.special[h] || {}),
              (c = C.extend(
                {
                  type: h,
                  origType: p,
                  data: n,
                  handler: i,
                  guid: i.guid,
                  selector: r,
                  needsContext: r && C.expr.match.needsContext.test(r),
                  namespace: d.join("."),
                },
                o,
              )),
              (p = a[h]) ||
                (((p = a[h] = []).delegateCount = 0),
                (u.setup && !1 !== u.setup.call(t, n, d, s)) ||
                  (t.addEventListener && t.addEventListener(h, s))),
              u.add &&
                (u.add.call(t, c), c.handler.guid || (c.handler.guid = i.guid)),
              r ? p.splice(p.delegateCount++, 0, c) : p.push(c),
              (C.event.global[h] = !0)));
    },
    remove: function (e, t, i, n, r) {
      var o,
        s,
        a,
        l,
        c,
        u,
        h,
        d,
        p,
        f,
        g,
        m = X.hasData(e) && X.get(e);
      if (m && (l = m.events)) {
        for (c = (t = (t || "").match(L) || [""]).length; c--; )
          if (
            ((p = g = (a = _e.exec(t[c]) || [])[1]),
            (f = (a[2] || "").split(".").sort()),
            p)
          ) {
            for (
              h = C.event.special[p] || {},
                d = l[(p = (n ? h.delegateType : h.bindType) || p)] || [],
                a =
                  a[2] &&
                  new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"),
                s = o = d.length;
              o--;

            )
              ((u = d[o]),
                (!r && g !== u.origType) ||
                  (i && i.guid !== u.guid) ||
                  (a && !a.test(u.namespace)) ||
                  (n && n !== u.selector && ("**" !== n || !u.selector)) ||
                  (d.splice(o, 1),
                  u.selector && d.delegateCount--,
                  h.remove && h.remove.call(e, u)));
            s &&
              !d.length &&
              ((h.teardown && !1 !== h.teardown.call(e, f, m.handle)) ||
                C.removeEvent(e, p, m.handle),
              delete l[p]);
          } else for (p in l) C.event.remove(e, p + t[c], i, n, !0);
        C.isEmptyObject(l) && X.remove(e, "handle events");
      }
    },
    dispatch: function (e) {
      var t,
        i,
        n,
        r,
        o,
        s = new Array(arguments.length),
        a = C.event.fix(e),
        l = (X.get(this, "events") || Object.create(null))[a.type] || [],
        e = C.event.special[a.type] || {};
      for (s[0] = a, t = 1; t < arguments.length; t++) s[t] = arguments[t];
      if (
        ((a.delegateTarget = this),
        !e.preDispatch || !1 !== e.preDispatch.call(this, a))
      ) {
        for (
          o = C.event.handlers.call(this, a, l), t = 0;
          (n = o[t++]) && !a.isPropagationStopped();

        )
          for (
            a.currentTarget = n.elem, i = 0;
            (r = n.handlers[i++]) && !a.isImmediatePropagationStopped();

          )
            (a.rnamespace &&
              !1 !== r.namespace &&
              !a.rnamespace.test(r.namespace)) ||
              ((a.handleObj = r),
              (a.data = r.data),
              void 0 !==
                (r = (
                  (C.event.special[r.origType] || {}).handle || r.handler
                ).apply(n.elem, s)) &&
                !1 === (a.result = r) &&
                (a.preventDefault(), a.stopPropagation()));
        return (e.postDispatch && e.postDispatch.call(this, a), a.result);
      }
    },
    handlers: function (e, t) {
      var i,
        n,
        r,
        o,
        s,
        a = [],
        l = t.delegateCount,
        c = e.target;
      if (l && c.nodeType && !("click" === e.type && 1 <= e.button))
        for (; c !== this; c = c.parentNode || this)
          if (1 === c.nodeType && ("click" !== e.type || !0 !== c.disabled)) {
            for (o = [], s = {}, i = 0; i < l; i++)
              (void 0 === s[(r = (n = t[i]).selector + " ")] &&
                (s[r] = n.needsContext
                  ? -1 < C(r, this).index(c)
                  : C.find(r, this, null, [c]).length),
                s[r] && o.push(n));
            o.length && a.push({ elem: c, handlers: o });
          }
      return (
        (c = this),
        l < t.length && a.push({ elem: c, handlers: t.slice(l) }),
        a
      );
    },
    addProp: function (t, e) {
      Object.defineProperty(C.Event.prototype, t, {
        enumerable: !0,
        configurable: !0,
        get: g(e)
          ? function () {
              if (this.originalEvent) return e(this.originalEvent);
            }
          : function () {
              if (this.originalEvent) return this.originalEvent[t];
            },
        set: function (e) {
          Object.defineProperty(this, t, {
            enumerable: !0,
            configurable: !0,
            writable: !0,
            value: e,
          });
        },
      });
    },
    fix: function (e) {
      return e[C.expando] ? e : new C.Event(e);
    },
    special: {
      load: { noBubble: !0 },
      click: {
        setup: function (e) {
          e = this || e;
          return (
            ue.test(e.type) && e.click && S(e, "input") && Pe(e, "click", we),
            !1
          );
        },
        trigger: function (e) {
          e = this || e;
          return (
            ue.test(e.type) && e.click && S(e, "input") && Pe(e, "click"),
            !0
          );
        },
        _default: function (e) {
          e = e.target;
          return (
            (ue.test(e.type) &&
              e.click &&
              S(e, "input") &&
              X.get(e, "click")) ||
            S(e, "a")
          );
        },
      },
      beforeunload: {
        postDispatch: function (e) {
          void 0 !== e.result &&
            e.originalEvent &&
            (e.originalEvent.returnValue = e.result);
        },
      },
    },
  }),
    (C.removeEvent = function (e, t, i) {
      e.removeEventListener && e.removeEventListener(t, i);
    }),
    (C.Event = function (e, t) {
      if (!(this instanceof C.Event)) return new C.Event(e, t);
      (e && e.type
        ? ((this.originalEvent = e),
          (this.type = e.type),
          (this.isDefaultPrevented =
            e.defaultPrevented ||
            (void 0 === e.defaultPrevented && !1 === e.returnValue)
              ? we
              : xe),
          (this.target =
            e.target && 3 === e.target.nodeType
              ? e.target.parentNode
              : e.target),
          (this.currentTarget = e.currentTarget),
          (this.relatedTarget = e.relatedTarget))
        : (this.type = e),
        t && C.extend(this, t),
        (this.timeStamp = (e && e.timeStamp) || Date.now()),
        (this[C.expando] = !0));
    }),
    (C.Event.prototype = {
      constructor: C.Event,
      isDefaultPrevented: xe,
      isPropagationStopped: xe,
      isImmediatePropagationStopped: xe,
      isSimulated: !1,
      preventDefault: function () {
        var e = this.originalEvent;
        ((this.isDefaultPrevented = we),
          e && !this.isSimulated && e.preventDefault());
      },
      stopPropagation: function () {
        var e = this.originalEvent;
        ((this.isPropagationStopped = we),
          e && !this.isSimulated && e.stopPropagation());
      },
      stopImmediatePropagation: function () {
        var e = this.originalEvent;
        ((this.isImmediatePropagationStopped = we),
          e && !this.isSimulated && e.stopImmediatePropagation(),
          this.stopPropagation());
      },
    }),
    C.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 (e) {
          var t = e.button;
          return null == e.which && be.test(e.type)
            ? null != e.charCode
              ? e.charCode
              : e.keyCode
            : !e.which && void 0 !== t && ye.test(e.type)
              ? 1 & t
                ? 1
                : 2 & t
                  ? 3
                  : 4 & t
                    ? 2
                    : 0
              : e.which;
        },
      },
      C.event.addProp,
    ),
    C.each({ focus: "focusin", blur: "focusout" }, function (e, t) {
      C.event.special[e] = {
        setup: function () {
          return (Pe(this, e, ke), !1);
        },
        trigger: function () {
          return (Pe(this, e), !0);
        },
        delegateType: t,
      };
    }),
    C.each(
      {
        mouseenter: "mouseover",
        mouseleave: "mouseout",
        pointerenter: "pointerover",
        pointerleave: "pointerout",
      },
      function (e, r) {
        C.event.special[e] = {
          delegateType: r,
          bindType: r,
          handle: function (e) {
            var t,
              i = e.relatedTarget,
              n = e.handleObj;
            return (
              (i && (i === this || C.contains(this, i))) ||
                ((e.type = n.origType),
                (t = n.handler.apply(this, arguments)),
                (e.type = r)),
              t
            );
          },
        };
      },
    ),
    C.fn.extend({
      on: function (e, t, i, n) {
        return Ce(this, e, t, i, n);
      },
      one: function (e, t, i, n) {
        return Ce(this, e, t, i, n, 1);
      },
      off: function (e, t, i) {
        var n, r;
        if (e && e.preventDefault && e.handleObj)
          return (
            (n = e.handleObj),
            C(e.delegateTarget).off(
              n.namespace ? n.origType + "." + n.namespace : n.origType,
              n.selector,
              n.handler,
            ),
            this
          );
        if ("object" != typeof e)
          return (
            (!1 !== t && "function" != typeof t) || ((i = t), (t = void 0)),
            !1 === i && (i = xe),
            this.each(function () {
              C.event.remove(this, e, i, t);
            })
          );
        for (r in e) this.off(r, t, e[r]);
        return this;
      },
    }));
  var Te = /<script|<style|<link/i,
    Se = /checked\s*(?:[^=]|=\s*.checked.)/i,
    He = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  function De(e, t) {
    return (
      (S(e, "table") &&
        S(11 !== t.nodeType ? t : t.firstChild, "tr") &&
        C(e).children("tbody")[0]) ||
      e
    );
  }
  function Ee(e) {
    return ((e.type = (null !== e.getAttribute("type")) + "/" + e.type), e);
  }
  function Ie(e) {
    return (
      "true/" === (e.type || "").slice(0, 5)
        ? (e.type = e.type.slice(5))
        : e.removeAttribute("type"),
      e
    );
  }
  function Ae(e, t) {
    var i, n, r, o;
    if (1 === t.nodeType) {
      if (X.hasData(e) && (o = X.get(e).events))
        for (r in (X.remove(t, "handle events"), o))
          for (i = 0, n = o[r].length; i < n; i++) C.event.add(t, r, o[r][i]);
      Z.hasData(e) && ((e = Z.access(e)), (e = C.extend({}, e)), Z.set(t, e));
    }
  }
  function Oe(i, n, r, o) {
    n = v(n);
    var e,
      t,
      s,
      a,
      l,
      c,
      u = 0,
      h = i.length,
      d = h - 1,
      p = n[0],
      f = g(p);
    if (f || (1 < h && "string" == typeof p && !y.checkClone && Se.test(p)))
      return i.each(function (e) {
        var t = i.eq(e);
        (f && (n[0] = p.call(this, e, t.html())), Oe(t, n, r, o));
      });
    if (
      h &&
      ((t = (e = ve(n, i[0].ownerDocument, !1, i, o)).firstChild),
      1 === e.childNodes.length && (e = t),
      t || o)
    ) {
      for (a = (s = C.map(fe(e, "script"), Ee)).length; u < h; u++)
        ((l = e),
          u !== d &&
            ((l = C.clone(l, !0, !0)), a && C.merge(s, fe(l, "script"))),
          r.call(i[u], l, u));
      if (a)
        for (c = s[s.length - 1].ownerDocument, C.map(s, Ie), u = 0; u < a; u++)
          ((l = s[u]),
            de.test(l.type || "") &&
              !X.access(l, "globalEval") &&
              C.contains(c, l) &&
              (l.src && "module" !== (l.type || "").toLowerCase()
                ? C._evalUrl &&
                  !l.noModule &&
                  C._evalUrl(
                    l.src,
                    { nonce: l.nonce || l.getAttribute("nonce") },
                    c,
                  )
                : _(l.textContent.replace(He, ""), l, c)));
    }
    return i;
  }
  function Me(e, t, i) {
    for (var n, r = t ? C.filter(t, e) : e, o = 0; null != (n = r[o]); o++)
      (i || 1 !== n.nodeType || C.cleanData(fe(n)),
        n.parentNode &&
          (i && re(n) && ge(fe(n, "script")), n.parentNode.removeChild(n)));
    return e;
  }
  (C.extend({
    htmlPrefilter: function (e) {
      return e;
    },
    clone: function (e, t, i) {
      var n,
        r,
        o,
        s,
        a,
        l,
        c,
        u = e.cloneNode(!0),
        h = re(e);
      if (
        !(
          y.noCloneChecked ||
          (1 !== e.nodeType && 11 !== e.nodeType) ||
          C.isXMLDoc(e)
        )
      )
        for (s = fe(u), n = 0, r = (o = fe(e)).length; n < r; n++)
          ((a = o[n]),
            "input" === (c = (l = s[n]).nodeName.toLowerCase()) &&
            ue.test(a.type)
              ? (l.checked = a.checked)
              : ("input" !== c && "textarea" !== c) ||
                (l.defaultValue = a.defaultValue));
      if (t)
        if (i)
          for (o = o || fe(e), s = s || fe(u), n = 0, r = o.length; n < r; n++)
            Ae(o[n], s[n]);
        else Ae(e, u);
      return (
        0 < (s = fe(u, "script")).length && ge(s, !h && fe(e, "script")),
        u
      );
    },
    cleanData: function (e) {
      for (var t, i, n, r = C.event.special, o = 0; void 0 !== (i = e[o]); o++)
        if (Y(i)) {
          if ((t = i[X.expando])) {
            if (t.events)
              for (n in t.events)
                r[n] ? C.event.remove(i, n) : C.removeEvent(i, n, t.handle);
            i[X.expando] = void 0;
          }
          i[Z.expando] && (i[Z.expando] = void 0);
        }
    },
  }),
    C.fn.extend({
      detach: function (e) {
        return Me(this, e, !0);
      },
      remove: function (e) {
        return Me(this, e);
      },
      text: function (e) {
        return q(
          this,
          function (e) {
            return void 0 === e
              ? C.text(this)
              : this.empty().each(function () {
                  (1 !== this.nodeType &&
                    11 !== this.nodeType &&
                    9 !== this.nodeType) ||
                    (this.textContent = e);
                });
          },
          null,
          e,
          arguments.length,
        );
      },
      append: function () {
        return Oe(this, arguments, function (e) {
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            De(this, e).appendChild(e);
        });
      },
      prepend: function () {
        return Oe(this, arguments, function (e) {
          var t;
          (1 !== this.nodeType &&
            11 !== this.nodeType &&
            9 !== this.nodeType) ||
            (t = De(this, e)).insertBefore(e, t.firstChild);
        });
      },
      before: function () {
        return Oe(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this);
        });
      },
      after: function () {
        return Oe(this, arguments, function (e) {
          this.parentNode && this.parentNode.insertBefore(e, this.nextSibling);
        });
      },
      empty: function () {
        for (var e, t = 0; null != (e = this[t]); t++)
          1 === e.nodeType && (C.cleanData(fe(e, !1)), (e.textContent = ""));
        return this;
      },
      clone: function (e, t) {
        return (
          (e = null != e && e),
          (t = null == t ? e : t),
          this.map(function () {
            return C.clone(this, e, t);
          })
        );
      },
      html: function (e) {
        return q(
          this,
          function (e) {
            var t = this[0] || {},
              i = 0,
              n = this.length;
            if (void 0 === e && 1 === t.nodeType) return t.innerHTML;
            if (
              "string" == typeof e &&
              !Te.test(e) &&
              !pe[(he.exec(e) || ["", ""])[1].toLowerCase()]
            ) {
              e = C.htmlPrefilter(e);
              try {
                for (; i < n; i++)
                  1 === (t = this[i] || {}).nodeType &&
                    (C.cleanData(fe(t, !1)), (t.innerHTML = e));
                t = 0;
              } catch (e) {}
            }
            t && this.empty().append(e);
          },
          null,
          e,
          arguments.length,
        );
      },
      replaceWith: function () {
        var i = [];
        return Oe(
          this,
          arguments,
          function (e) {
            var t = this.parentNode;
            C.inArray(this, i) < 0 &&
              (C.cleanData(fe(this)), t && t.replaceChild(e, this));
          },
          i,
        );
      },
    }),
    C.each(
      {
        appendTo: "append",
        prependTo: "prepend",
        insertBefore: "before",
        insertAfter: "after",
        replaceAll: "replaceWith",
      },
      function (e, s) {
        C.fn[e] = function (e) {
          for (var t, i = [], n = C(e), r = n.length - 1, o = 0; o <= r; o++)
            ((t = o === r ? this : this.clone(!0)),
              C(n[o])[s](t),
              l.apply(i, t.get()));
          return this.pushStack(i);
        };
      },
    ));
  function Le(e) {
    var t = e.ownerDocument.defaultView;
    return (t = !t || !t.opener ? x : t).getComputedStyle(e);
  }
  function je(e, t, i) {
    var n,
      r = {};
    for (n in t) ((r[n] = e.style[n]), (e.style[n] = t[n]));
    for (n in ((i = i.call(e)), t)) e.style[n] = r[n];
    return i;
  }
  var Ne,
    Fe,
    ze,
    Re,
    Be,
    qe,
    $e,
    We,
    Ue = new RegExp("^(" + ee + ")(?!px)[a-z%]+$", "i"),
    Ve = new RegExp(ie.join("|"), "i");
  function Ye(e, t, i) {
    var n,
      r,
      o = e.style;
    return (
      (i = i || Le(e)) &&
        ("" !== (r = i.getPropertyValue(t) || i[t]) ||
          re(e) ||
          (r = C.style(e, t)),
        !y.pixelBoxStyles() &&
          Ue.test(r) &&
          Ve.test(t) &&
          ((n = o.width),
          (e = o.minWidth),
          (t = o.maxWidth),
          (o.minWidth = o.maxWidth = o.width = r),
          (r = i.width),
          (o.width = n),
          (o.minWidth = e),
          (o.maxWidth = t))),
      void 0 !== r ? r + "" : r
    );
  }
  function Qe(e, t) {
    return {
      get: function () {
        if (!e()) return (this.get = t).apply(this, arguments);
        delete this.get;
      },
    };
  }
  function Xe() {
    var e;
    We &&
      (($e.style.cssText =
        "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"),
      (We.style.cssText =
        "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"),
      ne.appendChild($e).appendChild(We),
      (e = x.getComputedStyle(We)),
      (Ne = "1%" !== e.top),
      (qe = 12 === Ze(e.marginLeft)),
      (We.style.right = "60%"),
      (Re = 36 === Ze(e.right)),
      (Fe = 36 === Ze(e.width)),
      (We.style.position = "absolute"),
      (ze = 12 === Ze(We.offsetWidth / 3)),
      ne.removeChild($e),
      (We = null));
  }
  function Ze(e) {
    return Math.round(parseFloat(e));
  }
  (($e = k.createElement("div")),
    (We = k.createElement("div")).style &&
      ((We.style.backgroundClip = "content-box"),
      (We.cloneNode(!0).style.backgroundClip = ""),
      (y.clearCloneStyle = "content-box" === We.style.backgroundClip),
      C.extend(y, {
        boxSizingReliable: function () {
          return (Xe(), Fe);
        },
        pixelBoxStyles: function () {
          return (Xe(), Re);
        },
        pixelPosition: function () {
          return (Xe(), Ne);
        },
        reliableMarginLeft: function () {
          return (Xe(), qe);
        },
        scrollboxSize: function () {
          return (Xe(), ze);
        },
        reliableTrDimensions: function () {
          var e, t, i;
          return (
            null == Be &&
              ((e = k.createElement("table")),
              (i = k.createElement("tr")),
              (t = k.createElement("div")),
              (e.style.cssText = "position:absolute;left:-11111px"),
              (i.style.height = "1px"),
              (t.style.height = "9px"),
              ne.appendChild(e).appendChild(i).appendChild(t),
              (i = x.getComputedStyle(i)),
              (Be = 3 < parseInt(i.height)),
              ne.removeChild(e)),
            Be
          );
        },
      })));
  var Ke = ["Webkit", "Moz", "ms"],
    Ge = k.createElement("div").style,
    Je = {};
  function et(e) {
    return (
      C.cssProps[e] ||
      Je[e] ||
      (e in Ge
        ? e
        : (Je[e] =
            (function (e) {
              for (
                var t = e[0].toUpperCase() + e.slice(1), i = Ke.length;
                i--;

              )
                if ((e = Ke[i] + t) in Ge) return e;
            })(e) || e))
    );
  }
  var tt = /^(none|table(?!-c[ea]).+)/,
    it = /^--/,
    nt = { position: "absolute", visibility: "hidden", display: "block" },
    rt = { letterSpacing: "0", fontWeight: "400" };
  function ot(e, t, i) {
    var n = te.exec(t);
    return n ? Math.max(0, n[2] - (i || 0)) + (n[3] || "px") : t;
  }
  function st(e, t, i, n, r, o) {
    var s = "width" === t ? 1 : 0,
      a = 0,
      l = 0;
    if (i === (n ? "border" : "content")) return 0;
    for (; s < 4; s += 2)
      ("margin" === i && (l += C.css(e, i + ie[s], !0, r)),
        n
          ? ("content" === i && (l -= C.css(e, "padding" + ie[s], !0, r)),
            "margin" !== i &&
              (l -= C.css(e, "border" + ie[s] + "Width", !0, r)))
          : ((l += C.css(e, "padding" + ie[s], !0, r)),
            "padding" !== i
              ? (l += C.css(e, "border" + ie[s] + "Width", !0, r))
              : (a += C.css(e, "border" + ie[s] + "Width", !0, r))));
    return (
      !n &&
        0 <= o &&
        (l +=
          Math.max(
            0,
            Math.ceil(
              e["offset" + t[0].toUpperCase() + t.slice(1)] - o - l - a - 0.5,
            ),
          ) || 0),
      l
    );
  }
  function at(e, t, i) {
    var n = Le(e),
      r =
        (!y.boxSizingReliable() || i) &&
        "border-box" === C.css(e, "boxSizing", !1, n),
      o = r,
      s = Ye(e, t, n),
      a = "offset" + t[0].toUpperCase() + t.slice(1);
    if (Ue.test(s)) {
      if (!i) return s;
      s = "auto";
    }
    return (
      ((!y.boxSizingReliable() && r) ||
        (!y.reliableTrDimensions() && S(e, "tr")) ||
        "auto" === s ||
        (!parseFloat(s) && "inline" === C.css(e, "display", !1, n))) &&
        e.getClientRects().length &&
        ((r = "border-box" === C.css(e, "boxSizing", !1, n)),
        (o = a in e) && (s = e[a])),
      (s = parseFloat(s) || 0) +
        st(e, t, i || (r ? "border" : "content"), o, n, s) +
        "px"
    );
  }
  function lt(e, t, i, n, r) {
    return new lt.prototype.init(e, t, i, n, r);
  }
  (C.extend({
    cssHooks: {
      opacity: {
        get: function (e, t) {
          if (t) {
            e = Ye(e, "opacity");
            return "" === e ? "1" : e;
          }
        },
      },
    },
    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 (e, t, i, n) {
      if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
        var r,
          o,
          s,
          a = V(t),
          l = it.test(t),
          c = e.style;
        if (
          (l || (t = et(a)), (s = C.cssHooks[t] || C.cssHooks[a]), void 0 === i)
        )
          return s && "get" in s && void 0 !== (r = s.get(e, !1, n)) ? r : c[t];
        ("string" == (o = typeof i) &&
          (r = te.exec(i)) &&
          r[1] &&
          ((i = ae(e, t, r)), (o = "number")),
          null != i &&
            i == i &&
            ("number" !== o ||
              l ||
              (i += (r && r[3]) || (C.cssNumber[a] ? "" : "px")),
            y.clearCloneStyle ||
              "" !== i ||
              0 !== t.indexOf("background") ||
              (c[t] = "inherit"),
            (s && "set" in s && void 0 === (i = s.set(e, i, n))) ||
              (l ? c.setProperty(t, i) : (c[t] = i))));
      }
    },
    css: function (e, t, i, n) {
      var r,
        o = V(t);
      return (
        it.test(t) || (t = et(o)),
        "normal" ===
          (r =
            void 0 ===
            (r =
              (o = C.cssHooks[t] || C.cssHooks[o]) && "get" in o
                ? o.get(e, !0, i)
                : r)
              ? Ye(e, t, n)
              : r) &&
          t in rt &&
          (r = rt[t]),
        "" === i || i
          ? ((t = parseFloat(r)), !0 === i || isFinite(t) ? t || 0 : r)
          : r
      );
    },
  }),
    C.each(["height", "width"], function (e, a) {
      C.cssHooks[a] = {
        get: function (e, t, i) {
          if (t)
            return !tt.test(C.css(e, "display")) ||
              (e.getClientRects().length && e.getBoundingClientRect().width)
              ? at(e, a, i)
              : je(e, nt, function () {
                  return at(e, a, i);
                });
        },
        set: function (e, t, i) {
          var n,
            r = Le(e),
            o = !y.scrollboxSize() && "absolute" === r.position,
            s = (o || i) && "border-box" === C.css(e, "boxSizing", !1, r),
            i = i ? st(e, a, i, s, r) : 0;
          return (
            s &&
              o &&
              (i -= Math.ceil(
                e["offset" + a[0].toUpperCase() + a.slice(1)] -
                  parseFloat(r[a]) -
                  st(e, a, "border", !1, r) -
                  0.5,
              )),
            i &&
              (n = te.exec(t)) &&
              "px" !== (n[3] || "px") &&
              ((e.style[a] = t), (t = C.css(e, a))),
            ot(0, t, i)
          );
        },
      };
    }),
    (C.cssHooks.marginLeft = Qe(y.reliableMarginLeft, function (e, t) {
      if (t)
        return (
          (parseFloat(Ye(e, "marginLeft")) ||
            e.getBoundingClientRect().left -
              je(e, { marginLeft: 0 }, function () {
                return e.getBoundingClientRect().left;
              })) + "px"
        );
    })),
    C.each({ margin: "", padding: "", border: "Width" }, function (r, o) {
      ((C.cssHooks[r + o] = {
        expand: function (e) {
          for (
            var t = 0, i = {}, n = "string" == typeof e ? e.split(" ") : [e];
            t < 4;
            t++
          )
            i[r + ie[t] + o] = n[t] || n[t - 2] || n[0];
          return i;
        },
      }),
        "margin" !== r && (C.cssHooks[r + o].set = ot));
    }),
    C.fn.extend({
      css: function (e, t) {
        return q(
          this,
          function (e, t, i) {
            var n,
              r,
              o = {},
              s = 0;
            if (Array.isArray(t)) {
              for (n = Le(e), r = t.length; s < r; s++)
                o[t[s]] = C.css(e, t[s], !1, n);
              return o;
            }
            return void 0 !== i ? C.style(e, t, i) : C.css(e, t);
          },
          e,
          t,
          1 < arguments.length,
        );
      },
    }),
    (((C.Tween = lt).prototype = {
      constructor: lt,
      init: function (e, t, i, n, r, o) {
        ((this.elem = e),
          (this.prop = i),
          (this.easing = r || C.easing._default),
          (this.options = t),
          (this.start = this.now = this.cur()),
          (this.end = n),
          (this.unit = o || (C.cssNumber[i] ? "" : "px")));
      },
      cur: function () {
        var e = lt.propHooks[this.prop];
        return (e && e.get ? e : lt.propHooks._default).get(this);
      },
      run: function (e) {
        var t,
          i = lt.propHooks[this.prop];
        return (
          this.options.duration
            ? (this.pos = t =
                C.easing[this.easing](
                  e,
                  this.options.duration * e,
                  0,
                  1,
                  this.options.duration,
                ))
            : (this.pos = t = e),
          (this.now = (this.end - this.start) * t + this.start),
          this.options.step &&
            this.options.step.call(this.elem, this.now, this),
          (i && i.set ? i : lt.propHooks._default).set(this),
          this
        );
      },
    }).init.prototype = lt.prototype),
    ((lt.propHooks = {
      _default: {
        get: function (e) {
          return 1 !== e.elem.nodeType ||
            (null != e.elem[e.prop] && null == e.elem.style[e.prop])
            ? e.elem[e.prop]
            : (e = C.css(e.elem, e.prop, "")) && "auto" !== e
              ? e
              : 0;
        },
        set: function (e) {
          C.fx.step[e.prop]
            ? C.fx.step[e.prop](e)
            : 1 !== e.elem.nodeType ||
                (!C.cssHooks[e.prop] && null == e.elem.style[et(e.prop)])
              ? (e.elem[e.prop] = e.now)
              : C.style(e.elem, e.prop, e.now + e.unit);
        },
      },
    }).scrollTop = lt.propHooks.scrollLeft =
      {
        set: function (e) {
          e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now);
        },
      }),
    (C.easing = {
      linear: function (e) {
        return e;
      },
      swing: function (e) {
        return 0.5 - Math.cos(e * Math.PI) / 2;
      },
      _default: "swing",
    }),
    (C.fx = lt.prototype.init),
    (C.fx.step = {}));
  var ct,
    ut,
    ht = /^(?:toggle|show|hide)$/,
    dt = /queueHooks$/;
  function pt() {
    ut &&
      (!1 === k.hidden && x.requestAnimationFrame
        ? x.requestAnimationFrame(pt)
        : x.setTimeout(pt, C.fx.interval),
      C.fx.tick());
  }
  function ft() {
    return (
      x.setTimeout(function () {
        ct = void 0;
      }),
      (ct = Date.now())
    );
  }
  function gt(e, t) {
    var i,
      n = 0,
      r = { height: e };
    for (t = t ? 1 : 0; n < 4; n += 2 - t)
      r["margin" + (i = ie[n])] = r["padding" + i] = e;
    return (t && (r.opacity = r.width = e), r);
  }
  function mt(e, t, i) {
    for (
      var n,
        r = (vt.tweeners[t] || []).concat(vt.tweeners["*"]),
        o = 0,
        s = r.length;
      o < s;
      o++
    )
      if ((n = r[o].call(i, t, e))) return n;
  }
  function vt(r, e, t) {
    var i,
      o,
      n = 0,
      s = vt.prefilters.length,
      a = C.Deferred().always(function () {
        delete l.elem;
      }),
      l = function () {
        if (o) return !1;
        for (
          var e = ct || ft(),
            e = Math.max(0, c.startTime + c.duration - e),
            t = 1 - (e / c.duration || 0),
            i = 0,
            n = c.tweens.length;
          i < n;
          i++
        )
          c.tweens[i].run(t);
        return (
          a.notifyWith(r, [c, t, e]),
          t < 1 && n
            ? e
            : (n || a.notifyWith(r, [c, 1, 0]), a.resolveWith(r, [c]), !1)
        );
      },
      c = a.promise({
        elem: r,
        props: C.extend({}, e),
        opts: C.extend(!0, { specialEasing: {}, easing: C.easing._default }, t),
        originalProperties: e,
        originalOptions: t,
        startTime: ct || ft(),
        duration: t.duration,
        tweens: [],
        createTween: function (e, t) {
          e = C.Tween(
            r,
            c.opts,
            e,
            t,
            c.opts.specialEasing[e] || c.opts.easing,
          );
          return (c.tweens.push(e), e);
        },
        stop: function (e) {
          var t = 0,
            i = e ? c.tweens.length : 0;
          if (o) return this;
          for (o = !0; t < i; t++) c.tweens[t].run(1);
          return (
            e
              ? (a.notifyWith(r, [c, 1, 0]), a.resolveWith(r, [c, e]))
              : a.rejectWith(r, [c, e]),
            this
          );
        },
      }),
      u = c.props;
    for (
      (function (e, t) {
        var i, n, r, o, s;
        for (i in e)
          if (
            ((r = t[(n = V(i))]),
            (o = e[i]),
            Array.isArray(o) && ((r = o[1]), (o = e[i] = o[0])),
            i !== n && ((e[n] = o), delete e[i]),
            (s = C.cssHooks[n]) && ("expand" in s))
          )
            for (i in ((o = s.expand(o)), delete e[n], o))
              (i in e) || ((e[i] = o[i]), (t[i] = r));
          else t[n] = r;
      })(u, c.opts.specialEasing);
      n < s;
      n++
    )
      if ((i = vt.prefilters[n].call(c, r, u, c.opts)))
        return (
          g(i.stop) &&
            (C._queueHooks(c.elem, c.opts.queue).stop = i.stop.bind(i)),
          i
        );
    return (
      C.map(u, mt, c),
      g(c.opts.start) && c.opts.start.call(r, c),
      c
        .progress(c.opts.progress)
        .done(c.opts.done, c.opts.complete)
        .fail(c.opts.fail)
        .always(c.opts.always),
      C.fx.timer(C.extend(l, { elem: r, anim: c, queue: c.opts.queue })),
      c
    );
  }
  ((C.Animation = C.extend(vt, {
    tweeners: {
      "*": [
        function (e, t) {
          var i = this.createTween(e, t);
          return (ae(i.elem, e, te.exec(t), i), i);
        },
      ],
    },
    tweener: function (e, t) {
      for (
        var i, n = 0, r = (e = g(e) ? ((t = e), ["*"]) : e.match(L)).length;
        n < r;
        n++
      )
        ((i = e[n]),
          (vt.tweeners[i] = vt.tweeners[i] || []),
          vt.tweeners[i].unshift(t));
    },
    prefilters: [
      function (e, t, i) {
        var n,
          r,
          o,
          s,
          a,
          l,
          c,
          u = "width" in t || "height" in t,
          h = this,
          d = {},
          p = e.style,
          f = e.nodeType && se(e),
          g = X.get(e, "fxshow");
        for (n in (i.queue ||
          (null == (s = C._queueHooks(e, "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--, C.queue(e, "fx").length || s.empty.fire());
            });
          })),
        t))
          if (((r = t[n]), ht.test(r))) {
            if (
              (delete t[n],
              (o = o || "toggle" === r),
              r === (f ? "hide" : "show"))
            ) {
              if ("show" !== r || !g || void 0 === g[n]) continue;
              f = !0;
            }
            d[n] = (g && g[n]) || C.style(e, n);
          }
        if ((l = !C.isEmptyObject(t)) || !C.isEmptyObject(d))
          for (n in (u &&
            1 === e.nodeType &&
            ((i.overflow = [p.overflow, p.overflowX, p.overflowY]),
            null == (c = g && g.display) && (c = X.get(e, "display")),
            "none" === (u = C.css(e, "display")) &&
              (c
                ? (u = c)
                : (ce([e], !0),
                  (c = e.style.display || c),
                  (u = C.css(e, "display")),
                  ce([e]))),
            ("inline" === u || ("inline-block" === u && null != c)) &&
              "none" === C.css(e, "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 ||
              (g
                ? "hidden" in g && (f = g.hidden)
                : (g = X.access(e, "fxshow", { display: c })),
              o && (g.hidden = !f),
              f && ce([e], !0),
              h.done(function () {
                for (n in (f || ce([e]), X.remove(e, "fxshow"), d))
                  C.style(e, n, d[n]);
              })),
              (l = mt(f ? g[n] : 0, n, h)),
              n in g ||
                ((g[n] = l.start), f && ((l.end = l.start), (l.start = 0))));
      },
    ],
    prefilter: function (e, t) {
      t ? vt.prefilters.unshift(e) : vt.prefilters.push(e);
    },
  })),
    (C.speed = function (e, t, i) {
      var n =
        e && "object" == typeof e
          ? C.extend({}, e)
          : {
              complete: i || (!i && t) || (g(e) && e),
              duration: e,
              easing: (i && t) || (t && !g(t) && t),
            };
      return (
        C.fx.off
          ? (n.duration = 0)
          : "number" != typeof n.duration &&
            (n.duration in C.fx.speeds
              ? (n.duration = C.fx.speeds[n.duration])
              : (n.duration = C.fx.speeds._default)),
        (null != n.queue && !0 !== n.queue) || (n.queue = "fx"),
        (n.old = n.complete),
        (n.complete = function () {
          (g(n.old) && n.old.call(this), n.queue && C.dequeue(this, n.queue));
        }),
        n
      );
    }),
    C.fn.extend({
      fadeTo: function (e, t, i, n) {
        return this.filter(se)
          .css("opacity", 0)
          .show()
          .end()
          .animate({ opacity: t }, e, i, n);
      },
      animate: function (t, e, i, n) {
        function r() {
          var e = vt(this, C.extend({}, t), s);
          (o || X.get(this, "finish")) && e.stop(!0);
        }
        var o = C.isEmptyObject(t),
          s = C.speed(e, i, n);
        return (
          (r.finish = r),
          o || !1 === s.queue ? this.each(r) : this.queue(s.queue, r)
        );
      },
      stop: function (r, e, o) {
        function s(e) {
          var t = e.stop;
          (delete e.stop, t(o));
        }
        return (
          "string" != typeof r && ((o = e), (e = r), (r = void 0)),
          e && this.queue(r || "fx", []),
          this.each(function () {
            var e = !0,
              t = null != r && r + "queueHooks",
              i = C.timers,
              n = X.get(this);
            if (t) n[t] && n[t].stop && s(n[t]);
            else for (t in n) n[t] && n[t].stop && dt.test(t) && s(n[t]);
            for (t = i.length; t--; )
              i[t].elem !== this ||
                (null != r && i[t].queue !== r) ||
                (i[t].anim.stop(o), (e = !1), i.splice(t, 1));
            (!e && o) || C.dequeue(this, r);
          })
        );
      },
      finish: function (s) {
        return (
          !1 !== s && (s = s || "fx"),
          this.each(function () {
            var e,
              t = X.get(this),
              i = t[s + "queue"],
              n = t[s + "queueHooks"],
              r = C.timers,
              o = i ? i.length : 0;
            for (
              t.finish = !0,
                C.queue(this, s, []),
                n && n.stop && n.stop.call(this, !0),
                e = r.length;
              e--;

            )
              r[e].elem === this &&
                r[e].queue === s &&
                (r[e].anim.stop(!0), r.splice(e, 1));
            for (e = 0; e < o; e++)
              i[e] && i[e].finish && i[e].finish.call(this);
            delete t.finish;
          })
        );
      },
    }),
    C.each(["toggle", "show", "hide"], function (e, n) {
      var r = C.fn[n];
      C.fn[n] = function (e, t, i) {
        return null == e || "boolean" == typeof e
          ? r.apply(this, arguments)
          : this.animate(gt(n, !0), e, t, i);
      };
    }),
    C.each(
      {
        slideDown: gt("show"),
        slideUp: gt("hide"),
        slideToggle: gt("toggle"),
        fadeIn: { opacity: "show" },
        fadeOut: { opacity: "hide" },
        fadeToggle: { opacity: "toggle" },
      },
      function (e, n) {
        C.fn[e] = function (e, t, i) {
          return this.animate(n, e, t, i);
        };
      },
    ),
    (C.timers = []),
    (C.fx.tick = function () {
      var e,
        t = 0,
        i = C.timers;
      for (ct = Date.now(); t < i.length; t++)
        (e = i[t])() || i[t] !== e || i.splice(t--, 1);
      (i.length || C.fx.stop(), (ct = void 0));
    }),
    (C.fx.timer = function (e) {
      (C.timers.push(e), C.fx.start());
    }),
    (C.fx.interval = 13),
    (C.fx.start = function () {
      ut || ((ut = !0), pt());
    }),
    (C.fx.stop = function () {
      ut = null;
    }),
    (C.fx.speeds = { slow: 600, fast: 200, _default: 400 }),
    (C.fn.delay = function (n, e) {
      return (
        (n = (C.fx && C.fx.speeds[n]) || n),
        this.queue((e = e || "fx"), function (e, t) {
          var i = x.setTimeout(e, n);
          t.stop = function () {
            x.clearTimeout(i);
          };
        })
      );
    }),
    (h = k.createElement("input")),
    (ee = k.createElement("select").appendChild(k.createElement("option"))),
    (h.type = "checkbox"),
    (y.checkOn = "" !== h.value),
    (y.optSelected = ee.selected),
    ((h = k.createElement("input")).value = "t"),
    (h.type = "radio"),
    (y.radioValue = "t" === h.value));
  var bt,
    yt = C.expr.attrHandle;
  (C.fn.extend({
    attr: function (e, t) {
      return q(this, C.attr, e, t, 1 < arguments.length);
    },
    removeAttr: function (e) {
      return this.each(function () {
        C.removeAttr(this, e);
      });
    },
  }),
    C.extend({
      attr: function (e, t, i) {
        var n,
          r,
          o = e.nodeType;
        if (3 !== o && 8 !== o && 2 !== o)
          return void 0 === e.getAttribute
            ? C.prop(e, t, i)
            : ((1 === o && C.isXMLDoc(e)) ||
                (r =
                  C.attrHooks[t.toLowerCase()] ||
                  (C.expr.match.bool.test(t) ? bt : void 0)),
              void 0 !== i
                ? null === i
                  ? void C.removeAttr(e, t)
                  : r && "set" in r && void 0 !== (n = r.set(e, i, t))
                    ? n
                    : (e.setAttribute(t, i + ""), i)
                : !(r && "get" in r && null !== (n = r.get(e, t))) &&
                    null == (n = C.find.attr(e, t))
                  ? void 0
                  : n);
      },
      attrHooks: {
        type: {
          set: function (e, t) {
            if (!y.radioValue && "radio" === t && S(e, "input")) {
              var i = e.value;
              return (e.setAttribute("type", t), i && (e.value = i), t);
            }
          },
        },
      },
      removeAttr: function (e, t) {
        var i,
          n = 0,
          r = t && t.match(L);
        if (r && 1 === e.nodeType) for (; (i = r[n++]); ) e.removeAttribute(i);
      },
    }),
    (bt = {
      set: function (e, t, i) {
        return (!1 === t ? C.removeAttr(e, i) : e.setAttribute(i, i), i);
      },
    }),
    C.each(C.expr.match.bool.source.match(/\w+/g), function (e, t) {
      var s = yt[t] || C.find.attr;
      yt[t] = function (e, t, i) {
        var n,
          r,
          o = t.toLowerCase();
        return (
          i ||
            ((r = yt[o]),
            (yt[o] = n),
            (n = null != s(e, t, i) ? o : null),
            (yt[o] = r)),
          n
        );
      };
    }));
  var _t = /^(?:input|select|textarea|button)$/i,
    wt = /^(?:a|area)$/i;
  function xt(e) {
    return (e.match(L) || []).join(" ");
  }
  function kt(e) {
    return (e.getAttribute && e.getAttribute("class")) || "";
  }
  function Ct(e) {
    return Array.isArray(e) ? e : ("string" == typeof e && e.match(L)) || [];
  }
  (C.fn.extend({
    prop: function (e, t) {
      return q(this, C.prop, e, t, 1 < arguments.length);
    },
    removeProp: function (e) {
      return this.each(function () {
        delete this[C.propFix[e] || e];
      });
    },
  }),
    C.extend({
      prop: function (e, t, i) {
        var n,
          r,
          o = e.nodeType;
        if (3 !== o && 8 !== o && 2 !== o)
          return (
            (1 === o && C.isXMLDoc(e)) ||
              ((t = C.propFix[t] || t), (r = C.propHooks[t])),
            void 0 !== i
              ? r && "set" in r && void 0 !== (n = r.set(e, i, t))
                ? n
                : (e[t] = i)
              : r && "get" in r && null !== (n = r.get(e, t))
                ? n
                : e[t]
          );
      },
      propHooks: {
        tabIndex: {
          get: function (e) {
            var t = C.find.attr(e, "tabindex");
            return t
              ? parseInt(t, 10)
              : _t.test(e.nodeName) || (wt.test(e.nodeName) && e.href)
                ? 0
                : -1;
          },
        },
      },
      propFix: { for: "htmlFor", class: "className" },
    }),
    y.optSelected ||
      (C.propHooks.selected = {
        get: function (e) {
          e = e.parentNode;
          return (e && e.parentNode && e.parentNode.selectedIndex, null);
        },
        set: function (e) {
          e = e.parentNode;
          e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex);
        },
      }),
    C.each(
      [
        "tabIndex",
        "readOnly",
        "maxLength",
        "cellSpacing",
        "cellPadding",
        "rowSpan",
        "colSpan",
        "useMap",
        "frameBorder",
        "contentEditable",
      ],
      function () {
        C.propFix[this.toLowerCase()] = this;
      },
    ),
    C.fn.extend({
      addClass: function (t) {
        var e,
          i,
          n,
          r,
          o,
          s,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            C(this).addClass(t.call(this, e, kt(this)));
          });
        if ((e = Ct(t)).length)
          for (; (i = this[a++]); )
            if (((s = kt(i)), (n = 1 === i.nodeType && " " + xt(s) + " "))) {
              for (o = 0; (r = e[o++]); )
                n.indexOf(" " + r + " ") < 0 && (n += r + " ");
              s !== (s = xt(n)) && i.setAttribute("class", s);
            }
        return this;
      },
      removeClass: function (t) {
        var e,
          i,
          n,
          r,
          o,
          s,
          a = 0;
        if (g(t))
          return this.each(function (e) {
            C(this).removeClass(t.call(this, e, kt(this)));
          });
        if (!arguments.length) return this.attr("class", "");
        if ((e = Ct(t)).length)
          for (; (i = this[a++]); )
            if (((s = kt(i)), (n = 1 === i.nodeType && " " + xt(s) + " "))) {
              for (o = 0; (r = e[o++]); )
                for (; -1 < n.indexOf(" " + r + " "); )
                  n = n.replace(" " + r + " ", " ");
              s !== (s = xt(n)) && i.setAttribute("class", s);
            }
        return this;
      },
      toggleClass: function (r, t) {
        var o = typeof r,
          s = "string" == o || Array.isArray(r);
        return "boolean" == typeof t && s
          ? t
            ? this.addClass(r)
            : this.removeClass(r)
          : g(r)
            ? this.each(function (e) {
                C(this).toggleClass(r.call(this, e, kt(this), t), t);
              })
            : this.each(function () {
                var e, t, i, n;
                if (s)
                  for (t = 0, i = C(this), n = Ct(r); (e = n[t++]); )
                    i.hasClass(e) ? i.removeClass(e) : i.addClass(e);
                else
                  (void 0 !== r && "boolean" != o) ||
                    ((e = kt(this)) && X.set(this, "__className__", e),
                    this.setAttribute &&
                      this.setAttribute(
                        "class",
                        (!e && !1 !== r && X.get(this, "__className__")) || "",
                      ));
              });
      },
      hasClass: function (e) {
        for (var t, i = 0, n = " " + e + " "; (t = this[i++]); )
          if (1 === t.nodeType && -1 < (" " + xt(kt(t)) + " ").indexOf(n))
            return !0;
        return !1;
      },
    }));
  var Pt = /\r/g;
  (C.fn.extend({
    val: function (t) {
      var i,
        e,
        n,
        r = this[0];
      return arguments.length
        ? ((n = g(t)),
          this.each(function (e) {
            1 === this.nodeType &&
              (null == (e = n ? t.call(this, e, C(this).val()) : t)
                ? (e = "")
                : "number" == typeof e
                  ? (e += "")
                  : Array.isArray(e) &&
                    (e = C.map(e, function (e) {
                      return null == e ? "" : e + "";
                    })),
              ((i =
                C.valHooks[this.type] ||
                C.valHooks[this.nodeName.toLowerCase()]) &&
                "set" in i &&
                void 0 !== i.set(this, e, "value")) ||
                (this.value = e));
          }))
        : r
          ? (i = C.valHooks[r.type] || C.valHooks[r.nodeName.toLowerCase()]) &&
            "get" in i &&
            void 0 !== (e = i.get(r, "value"))
            ? e
            : "string" == typeof (e = r.value)
              ? e.replace(Pt, "")
              : null == e
                ? ""
                : e
          : void 0;
    },
  }),
    C.extend({
      valHooks: {
        option: {
          get: function (e) {
            var t = C.find.attr(e, "value");
            return null != t ? t : xt(C.text(e));
          },
        },
        select: {
          get: function (e) {
            for (
              var t,
                i = e.options,
                n = e.selectedIndex,
                r = "select-one" === e.type,
                o = r ? null : [],
                s = r ? n + 1 : i.length,
                a = n < 0 ? s : r ? n : 0;
              a < s;
              a++
            )
              if (
                ((t = i[a]).selected || a === n) &&
                !t.disabled &&
                (!t.parentNode.disabled || !S(t.parentNode, "optgroup"))
              ) {
                if (((t = C(t).val()), r)) return t;
                o.push(t);
              }
            return o;
          },
          set: function (e, t) {
            for (
              var i, n, r = e.options, o = C.makeArray(t), s = r.length;
              s--;

            )
              ((n = r[s]).selected =
                -1 < C.inArray(C.valHooks.option.get(n), o)) && (i = !0);
            return (i || (e.selectedIndex = -1), o);
          },
        },
      },
    }),
    C.each(["radio", "checkbox"], function () {
      ((C.valHooks[this] = {
        set: function (e, t) {
          if (Array.isArray(t))
            return (e.checked = -1 < C.inArray(C(e).val(), t));
        },
      }),
        y.checkOn ||
          (C.valHooks[this].get = function (e) {
            return null === e.getAttribute("value") ? "on" : e.value;
          }));
    }),
    (y.focusin = "onfocusin" in x));
  function Tt(e) {
    e.stopPropagation();
  }
  var St = /^(?:focusinfocus|focusoutblur)$/;
  (C.extend(C.event, {
    trigger: function (e, t, i, n) {
      var r,
        o,
        s,
        a,
        l,
        c,
        u,
        h = [i || k],
        d = b.call(e, "type") ? e.type : e,
        p = b.call(e, "namespace") ? e.namespace.split(".") : [],
        f = (u = o = i = i || k);
      if (
        3 !== i.nodeType &&
        8 !== i.nodeType &&
        !St.test(d + C.event.triggered) &&
        (-1 < d.indexOf(".") && ((d = (p = d.split(".")).shift()), p.sort()),
        (a = d.indexOf(":") < 0 && "on" + d),
        ((e = e[C.expando]
          ? e
          : new C.Event(d, "object" == typeof e && e)).isTrigger = n ? 2 : 3),
        (e.namespace = p.join(".")),
        (e.rnamespace = e.namespace
          ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")
          : null),
        (e.result = void 0),
        e.target || (e.target = i),
        (t = null == t ? [e] : C.makeArray(t, [e])),
        (c = C.event.special[d] || {}),
        n || !c.trigger || !1 !== c.trigger.apply(i, t))
      ) {
        if (!n && !c.noBubble && !m(i)) {
          for (
            s = c.delegateType || d, St.test(s + d) || (f = f.parentNode);
            f;
            f = f.parentNode
          )
            (h.push(f), (o = f));
          o === (i.ownerDocument || k) &&
            h.push(o.defaultView || o.parentWindow || x);
        }
        for (r = 0; (f = h[r++]) && !e.isPropagationStopped(); )
          ((u = f),
            (e.type = 1 < r ? s : c.bindType || d),
            (l =
              (X.get(f, "events") || Object.create(null))[e.type] &&
              X.get(f, "handle")) && l.apply(f, t),
            (l = a && f[a]) &&
              l.apply &&
              Y(f) &&
              ((e.result = l.apply(f, t)),
              !1 === e.result && e.preventDefault()));
        return (
          (e.type = d),
          n ||
            e.isDefaultPrevented() ||
            (c._default && !1 !== c._default.apply(h.pop(), t)) ||
            !Y(i) ||
            (a &&
              g(i[d]) &&
              !m(i) &&
              ((o = i[a]) && (i[a] = null),
              (C.event.triggered = d),
              e.isPropagationStopped() && u.addEventListener(d, Tt),
              i[d](),
              e.isPropagationStopped() && u.removeEventListener(d, Tt),
              (C.event.triggered = void 0),
              o && (i[a] = o))),
          e.result
        );
      }
    },
    simulate: function (e, t, i) {
      e = C.extend(new C.Event(), i, { type: e, isSimulated: !0 });
      C.event.trigger(e, null, t);
    },
  }),
    C.fn.extend({
      trigger: function (e, t) {
        return this.each(function () {
          C.event.trigger(e, t, this);
        });
      },
      triggerHandler: function (e, t) {
        var i = this[0];
        if (i) return C.event.trigger(e, t, i, !0);
      },
    }),
    y.focusin ||
      C.each({ focus: "focusin", blur: "focusout" }, function (i, n) {
        function r(e) {
          C.event.simulate(n, e.target, C.event.fix(e));
        }
        C.event.special[n] = {
          setup: function () {
            var e = this.ownerDocument || this.document || this,
              t = X.access(e, n);
            (t || e.addEventListener(i, r, !0), X.access(e, n, (t || 0) + 1));
          },
          teardown: function () {
            var e = this.ownerDocument || this.document || this,
              t = X.access(e, n) - 1;
            t
              ? X.access(e, n, t)
              : (e.removeEventListener(i, r, !0), X.remove(e, n));
          },
        };
      }));
  var Ht = x.location,
    Dt = { guid: Date.now() },
    Et = /\?/;
  C.parseXML = function (e) {
    var t;
    if (!e || "string" != typeof e) return null;
    try {
      t = new x.DOMParser().parseFromString(e, "text/xml");
    } catch (e) {
      t = void 0;
    }
    return (
      (t && !t.getElementsByTagName("parsererror").length) ||
        C.error("Invalid XML: " + e),
      t
    );
  };
  var It = /\[\]$/,
    At = /\r?\n/g,
    Ot = /^(?:submit|button|image|reset|file)$/i,
    Mt = /^(?:input|select|textarea|keygen)/i;
  ((C.param = function (e, t) {
    function i(e, t) {
      ((t = g(t) ? t() : t),
        (r[r.length] =
          encodeURIComponent(e) +
          "=" +
          encodeURIComponent(null == t ? "" : t)));
    }
    var n,
      r = [];
    if (null == e) return "";
    if (Array.isArray(e) || (e.jquery && !C.isPlainObject(e)))
      C.each(e, function () {
        i(this.name, this.value);
      });
    else
      for (n in e)
        !(function i(n, e, r, o) {
          if (Array.isArray(e))
            C.each(e, function (e, t) {
              r || It.test(n)
                ? o(n, t)
                : i(
                    n +
                      "[" +
                      ("object" == typeof t && null != t ? e : "") +
                      "]",
                    t,
                    r,
                    o,
                  );
            });
          else if (r || "object" !== f(e)) o(n, e);
          else for (var t in e) i(n + "[" + t + "]", e[t], r, o);
        })(n, e[n], t, i);
    return r.join("&");
  }),
    C.fn.extend({
      serialize: function () {
        return C.param(this.serializeArray());
      },
      serializeArray: function () {
        return this.map(function () {
          var e = C.prop(this, "elements");
          return e ? C.makeArray(e) : this;
        })
          .filter(function () {
            var e = this.type;
            return (
              this.name &&
              !C(this).is(":disabled") &&
              Mt.test(this.nodeName) &&
              !Ot.test(e) &&
              (this.checked || !ue.test(e))
            );
          })
          .map(function (e, t) {
            var i = C(this).val();
            return null == i
              ? null
              : Array.isArray(i)
                ? C.map(i, function (e) {
                    return { name: t.name, value: e.replace(At, "\r\n") };
                  })
                : { name: t.name, value: i.replace(At, "\r\n") };
          })
          .get();
      },
    }));
  var Lt = /%20/g,
    jt = /#.*$/,
    Nt = /([?&])_=[^&]*/,
    Ft = /^(.*?):[ \t]*([^\r\n]*)$/gm,
    zt = /^(?:GET|HEAD)$/,
    Rt = /^\/\//,
    Bt = {},
    qt = {},
    $t = "*/".concat("*"),
    Wt = k.createElement("a");
  function Ut(o) {
    return function (e, t) {
      "string" != typeof e && ((t = e), (e = "*"));
      var i,
        n = 0,
        r = e.toLowerCase().match(L) || [];
      if (g(t))
        for (; (i = r[n++]); )
          "+" === i[0]
            ? ((i = i.slice(1) || "*"), (o[i] = o[i] || []).unshift(t))
            : (o[i] = o[i] || []).push(t);
    };
  }
  function Vt(t, n, r, o) {
    var s = {},
      a = t === qt;
    function l(e) {
      var i;
      return (
        (s[e] = !0),
        C.each(t[e] || [], function (e, t) {
          t = t(n, r, o);
          return "string" != typeof t || a || s[t]
            ? a
              ? !(i = t)
              : void 0
            : (n.dataTypes.unshift(t), l(t), !1);
        }),
        i
      );
    }
    return l(n.dataTypes[0]) || (!s["*"] && l("*"));
  }
  function Yt(e, t) {
    var i,
      n,
      r = C.ajaxSettings.flatOptions || {};
    for (i in t) void 0 !== t[i] && ((r[i] ? e : (n = n || {}))[i] = t[i]);
    return (n && C.extend(!0, e, n), e);
  }
  ((Wt.href = Ht.href),
    C.extend({
      active: 0,
      lastModified: {},
      etag: {},
      ajaxSettings: {
        url: Ht.href,
        type: "GET",
        isLocal:
          /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(
            Ht.protocol,
          ),
        global: !0,
        processData: !0,
        async: !0,
        contentType: "application/x-www-form-urlencoded; charset=UTF-8",
        accepts: {
          "*": $t,
          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": C.parseXML,
        },
        flatOptions: { url: !0, context: !0 },
      },
      ajaxSetup: function (e, t) {
        return t ? Yt(Yt(e, C.ajaxSettings), t) : Yt(C.ajaxSettings, e);
      },
      ajaxPrefilter: Ut(Bt),
      ajaxTransport: Ut(qt),
      ajax: function (e, t) {
        "object" == typeof e && ((t = e), (e = void 0));
        var l,
          c,
          u,
          i,
          h,
          d,
          p,
          n,
          r,
          f = C.ajaxSetup({}, (t = t || {})),
          g = f.context || f,
          m = f.context && (g.nodeType || g.jquery) ? C(g) : C.event,
          v = C.Deferred(),
          b = C.Callbacks("once memory"),
          y = f.statusCode || {},
          o = {},
          s = {},
          a = "canceled",
          _ = {
            readyState: 0,
            getResponseHeader: function (e) {
              var t;
              if (d) {
                if (!i)
                  for (i = {}; (t = Ft.exec(u)); )
                    i[t[1].toLowerCase() + " "] = (
                      i[t[1].toLowerCase() + " "] || []
                    ).concat(t[2]);
                t = i[e.toLowerCase() + " "];
              }
              return null == t ? null : t.join(", ");
            },
            getAllResponseHeaders: function () {
              return d ? u : null;
            },
            setRequestHeader: function (e, t) {
              return (
                null == d &&
                  ((e = s[e.toLowerCase()] = s[e.toLowerCase()] || e),
                  (o[e] = t)),
                this
              );
            },
            overrideMimeType: function (e) {
              return (null == d && (f.mimeType = e), this);
            },
            statusCode: function (e) {
              if (e)
                if (d) _.always(e[_.status]);
                else for (var t in e) y[t] = [y[t], e[t]];
              return this;
            },
            abort: function (e) {
              e = e || a;
              return (l && l.abort(e), w(0, e), this);
            },
          };
        if (
          (v.promise(_),
          (f.url = ((e || f.url || Ht.href) + "").replace(
            Rt,
            Ht.protocol + "//",
          )),
          (f.type = t.method || t.type || f.method || f.type),
          (f.dataTypes = (f.dataType || "*").toLowerCase().match(L) || [""]),
          null == f.crossDomain)
        ) {
          r = k.createElement("a");
          try {
            ((r.href = f.url),
              (r.href = r.href),
              (f.crossDomain =
                Wt.protocol + "//" + Wt.host != r.protocol + "//" + r.host));
          } catch (e) {
            f.crossDomain = !0;
          }
        }
        if (
          (f.data &&
            f.processData &&
            "string" != typeof f.data &&
            (f.data = C.param(f.data, f.traditional)),
          Vt(Bt, f, t, _),
          d)
        )
          return _;
        for (n in ((p = C.event && f.global) &&
          0 == C.active++ &&
          C.event.trigger("ajaxStart"),
        (f.type = f.type.toUpperCase()),
        (f.hasContent = !zt.test(f.type)),
        (c = f.url.replace(jt, "")),
        f.hasContent
          ? f.data &&
            f.processData &&
            0 ===
              (f.contentType || "").indexOf(
                "application/x-www-form-urlencoded",
              ) &&
            (f.data = f.data.replace(Lt, "+"))
          : ((r = f.url.slice(c.length)),
            f.data &&
              (f.processData || "string" == typeof f.data) &&
              ((c += (Et.test(c) ? "&" : "?") + f.data), delete f.data),
            !1 === f.cache &&
              ((c = c.replace(Nt, "$1")),
              (r = (Et.test(c) ? "&" : "?") + "_=" + Dt.guid++ + r)),
            (f.url = c + r)),
        f.ifModified &&
          (C.lastModified[c] &&
            _.setRequestHeader("If-Modified-Since", C.lastModified[c]),
          C.etag[c] && _.setRequestHeader("If-None-Match", C.etag[c])),
        ((f.data && f.hasContent && !1 !== f.contentType) || t.contentType) &&
          _.setRequestHeader("Content-Type", f.contentType),
        _.setRequestHeader(
          "Accept",
          f.dataTypes[0] && f.accepts[f.dataTypes[0]]
            ? f.accepts[f.dataTypes[0]] +
                ("*" !== f.dataTypes[0] ? ", " + $t + "; q=0.01" : "")
            : f.accepts["*"],
        ),
        f.headers))
          _.setRequestHeader(n, f.headers[n]);
        if (f.beforeSend && (!1 === f.beforeSend.call(g, _, f) || d))
          return _.abort();
        if (
          ((a = "abort"),
          b.add(f.complete),
          _.done(f.success),
          _.fail(f.error),
          (l = Vt(qt, f, t, _)))
        ) {
          if (((_.readyState = 1), p && m.trigger("ajaxSend", [_, f]), d))
            return _;
          f.async &&
            0 < f.timeout &&
            (h = x.setTimeout(function () {
              _.abort("timeout");
            }, f.timeout));
          try {
            ((d = !1), l.send(o, w));
          } catch (e) {
            if (d) throw e;
            w(-1, e);
          }
        } else w(-1, "No Transport");
        function w(e, t, i, n) {
          var r,
            o,
            s,
            a = t;
          d ||
            ((d = !0),
            h && x.clearTimeout(h),
            (l = void 0),
            (u = n || ""),
            (_.readyState = 0 < e ? 4 : 0),
            (n = (200 <= e && e < 300) || 304 === e),
            i &&
              (s = (function (e, t, i) {
                for (
                  var n, r, o, s, a = e.contents, l = e.dataTypes;
                  "*" === l[0];

                )
                  (l.shift(),
                    void 0 === n &&
                      (n = e.mimeType || t.getResponseHeader("Content-Type")));
                if (n)
                  for (r in a)
                    if (a[r] && a[r].test(n)) {
                      l.unshift(r);
                      break;
                    }
                if (l[0] in i) o = l[0];
                else {
                  for (r in i) {
                    if (!l[0] || e.converters[r + " " + l[0]]) {
                      o = r;
                      break;
                    }
                    s = s || r;
                  }
                  o = o || s;
                }
                if (o) return (o !== l[0] && l.unshift(o), i[o]);
              })(f, _, i)),
            !n &&
              -1 < C.inArray("script", f.dataTypes) &&
              (f.converters["text script"] = function () {}),
            (s = (function (e, t, i, n) {
              var r,
                o,
                s,
                a,
                l,
                c = {},
                u = e.dataTypes.slice();
              if (u[1])
                for (s in e.converters) c[s.toLowerCase()] = e.converters[s];
              for (o = u.shift(); o; )
                if (
                  (e.responseFields[o] && (i[e.responseFields[o]] = t),
                  !l && n && e.dataFilter && (t = e.dataFilter(t, e.dataType)),
                  (l = o),
                  (o = u.shift()))
                )
                  if ("*" === o) o = l;
                  else if ("*" !== l && l !== o) {
                    if (!(s = c[l + " " + o] || c["* " + o]))
                      for (r in c)
                        if (
                          (a = r.split(" "))[1] === o &&
                          (s = c[l + " " + a[0]] || c["* " + a[0]])
                        ) {
                          !0 === s
                            ? (s = c[r])
                            : !0 !== c[r] && ((o = a[0]), u.unshift(a[1]));
                          break;
                        }
                    if (!0 !== s)
                      if (s && e.throws) t = s(t);
                      else
                        try {
                          t = s(t);
                        } catch (e) {
                          return {
                            state: "parsererror",
                            error: s
                              ? e
                              : "No conversion from " + l + " to " + o,
                          };
                        }
                  }
              return { state: "success", data: t };
            })(f, s, _, n)),
            n
              ? (f.ifModified &&
                  ((i = _.getResponseHeader("Last-Modified")) &&
                    (C.lastModified[c] = i),
                  (i = _.getResponseHeader("etag")) && (C.etag[c] = i)),
                204 === e || "HEAD" === f.type
                  ? (a = "nocontent")
                  : 304 === e
                    ? (a = "notmodified")
                    : ((a = s.state), (r = s.data), (n = !(o = s.error))))
              : ((o = a), (!e && a) || ((a = "error"), e < 0 && (e = 0))),
            (_.status = e),
            (_.statusText = (t || a) + ""),
            n ? v.resolveWith(g, [r, a, _]) : v.rejectWith(g, [_, a, o]),
            _.statusCode(y),
            (y = void 0),
            p && m.trigger(n ? "ajaxSuccess" : "ajaxError", [_, f, n ? r : o]),
            b.fireWith(g, [_, a]),
            p &&
              (m.trigger("ajaxComplete", [_, f]),
              --C.active || C.event.trigger("ajaxStop")));
        }
        return _;
      },
      getJSON: function (e, t, i) {
        return C.get(e, t, i, "json");
      },
      getScript: function (e, t) {
        return C.get(e, void 0, t, "script");
      },
    }),
    C.each(["get", "post"], function (e, r) {
      C[r] = function (e, t, i, n) {
        return (
          g(t) && ((n = n || i), (i = t), (t = void 0)),
          C.ajax(
            C.extend(
              { url: e, type: r, dataType: n, data: t, success: i },
              C.isPlainObject(e) && e,
            ),
          )
        );
      };
    }),
    C.ajaxPrefilter(function (e) {
      for (var t in e.headers)
        "content-type" === t.toLowerCase() &&
          (e.contentType = e.headers[t] || "");
    }),
    (C._evalUrl = function (e, t, i) {
      return C.ajax({
        url: e,
        type: "GET",
        dataType: "script",
        cache: !0,
        async: !1,
        global: !1,
        converters: { "text script": function () {} },
        dataFilter: function (e) {
          C.globalEval(e, t, i);
        },
      });
    }),
    C.fn.extend({
      wrapAll: function (e) {
        return (
          this[0] &&
            (g(e) && (e = e.call(this[0])),
            (e = C(e, this[0].ownerDocument).eq(0).clone(!0)),
            this[0].parentNode && e.insertBefore(this[0]),
            e
              .map(function () {
                for (var e = this; e.firstElementChild; )
                  e = e.firstElementChild;
                return e;
              })
              .append(this)),
          this
        );
      },
      wrapInner: function (i) {
        return g(i)
          ? this.each(function (e) {
              C(this).wrapInner(i.call(this, e));
            })
          : this.each(function () {
              var e = C(this),
                t = e.contents();
              t.length ? t.wrapAll(i) : e.append(i);
            });
      },
      wrap: function (t) {
        var i = g(t);
        return this.each(function (e) {
          C(this).wrapAll(i ? t.call(this, e) : t);
        });
      },
      unwrap: function (e) {
        return (
          this.parent(e)
            .not("body")
            .each(function () {
              C(this).replaceWith(this.childNodes);
            }),
          this
        );
      },
    }),
    (C.expr.pseudos.hidden = function (e) {
      return !C.expr.pseudos.visible(e);
    }),
    (C.expr.pseudos.visible = function (e) {
      return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
    }),
    (C.ajaxSettings.xhr = function () {
      try {
        return new x.XMLHttpRequest();
      } catch (e) {}
    }));
  var Qt = { 0: 200, 1223: 204 },
    Xt = C.ajaxSettings.xhr();
  ((y.cors = !!Xt && "withCredentials" in Xt),
    (y.ajax = Xt = !!Xt),
    C.ajaxTransport(function (r) {
      var o, s;
      if (y.cors || (Xt && !r.crossDomain))
        return {
          send: function (e, t) {
            var i,
              n = r.xhr();
            if (
              (n.open(r.type, r.url, r.async, r.username, r.password),
              r.xhrFields)
            )
              for (i in r.xhrFields) n[i] = r.xhrFields[i];
            for (i in (r.mimeType &&
              n.overrideMimeType &&
              n.overrideMimeType(r.mimeType),
            r.crossDomain ||
              e["X-Requested-With"] ||
              (e["X-Requested-With"] = "XMLHttpRequest"),
            e))
              n.setRequestHeader(i, e[i]);
            ((o = function (e) {
              return function () {
                o &&
                  ((o =
                    s =
                    n.onload =
                    n.onerror =
                    n.onabort =
                    n.ontimeout =
                    n.onreadystatechange =
                      null),
                  "abort" === e
                    ? n.abort()
                    : "error" === e
                      ? "number" != typeof n.status
                        ? t(0, "error")
                        : t(n.status, n.statusText)
                      : t(
                          Qt[n.status] || n.status,
                          n.statusText,
                          "text" !== (n.responseType || "text") ||
                            "string" != typeof n.responseText
                            ? { binary: n.response }
                            : { text: n.responseText },
                          n.getAllResponseHeaders(),
                        ));
              };
            }),
              (n.onload = o()),
              (s = n.onerror = n.ontimeout = o("error")),
              void 0 !== n.onabort
                ? (n.onabort = s)
                : (n.onreadystatechange = function () {
                    4 === n.readyState &&
                      x.setTimeout(function () {
                        o && s();
                      });
                  }),
              (o = o("abort")));
            try {
              n.send((r.hasContent && r.data) || null);
            } catch (e) {
              if (o) throw e;
            }
          },
          abort: function () {
            o && o();
          },
        };
    }),
    C.ajaxPrefilter(function (e) {
      e.crossDomain && (e.contents.script = !1);
    }),
    C.ajaxSetup({
      accepts: {
        script:
          "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",
      },
      contents: { script: /\b(?:java|ecma)script\b/ },
      converters: {
        "text script": function (e) {
          return (C.globalEval(e), e);
        },
      },
    }),
    C.ajaxPrefilter("script", function (e) {
      (void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET"));
    }),
    C.ajaxTransport("script", function (i) {
      var n, r;
      if (i.crossDomain || i.scriptAttrs)
        return {
          send: function (e, t) {
            ((n = C("<script>")
              .attr(i.scriptAttrs || {})
              .prop({ charset: i.scriptCharset, src: i.url })
              .on(
                "load error",
                (r = function (e) {
                  (n.remove(),
                    (r = null),
                    e && t("error" === e.type ? 404 : 200, e.type));
                }),
              )),
              k.head.appendChild(n[0]));
          },
          abort: function () {
            r && r();
          },
        };
    }));
  var Zt = [],
    Kt = /(=)\?(?=&|$)|\?\?/;
  (C.ajaxSetup({
    jsonp: "callback",
    jsonpCallback: function () {
      var e = Zt.pop() || C.expando + "_" + Dt.guid++;
      return ((this[e] = !0), e);
    },
  }),
    C.ajaxPrefilter("json jsonp", function (e, t, i) {
      var n,
        r,
        o,
        s =
          !1 !== e.jsonp &&
          (Kt.test(e.url)
            ? "url"
            : "string" == typeof e.data &&
              0 ===
                (e.contentType || "").indexOf(
                  "application/x-www-form-urlencoded",
                ) &&
              Kt.test(e.data) &&
              "data");
      if (s || "jsonp" === e.dataTypes[0])
        return (
          (n = e.jsonpCallback =
            g(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback),
          s
            ? (e[s] = e[s].replace(Kt, "$1" + n))
            : !1 !== e.jsonp &&
              (e.url += (Et.test(e.url) ? "&" : "?") + e.jsonp + "=" + n),
          (e.converters["script json"] = function () {
            return (o || C.error(n + " was not called"), o[0]);
          }),
          (e.dataTypes[0] = "json"),
          (r = x[n]),
          (x[n] = function () {
            o = arguments;
          }),
          i.always(function () {
            (void 0 === r ? C(x).removeProp(n) : (x[n] = r),
              e[n] && ((e.jsonpCallback = t.jsonpCallback), Zt.push(n)),
              o && g(r) && r(o[0]),
              (o = r = void 0));
          }),
          "script"
        );
    }),
    (y.createHTMLDocument =
      (((h = k.implementation.createHTMLDocument("").body).innerHTML =
        "<form></form><form></form>"),
      2 === h.childNodes.length)),
    (C.parseHTML = function (e, t, i) {
      return "string" != typeof e
        ? []
        : ("boolean" == typeof t && ((i = t), (t = !1)),
          t ||
            (y.createHTMLDocument
              ? (((n = (t =
                  k.implementation.createHTMLDocument("")).createElement(
                  "base",
                )).href = k.location.href),
                t.head.appendChild(n))
              : (t = k)),
          (n = !i && []),
          (i = H.exec(e))
            ? [t.createElement(i[1])]
            : ((i = ve([e], t, n)),
              n && n.length && C(n).remove(),
              C.merge([], i.childNodes)));
      var n;
    }),
    (C.fn.load = function (e, t, i) {
      var n,
        r,
        o,
        s = this,
        a = e.indexOf(" ");
      return (
        -1 < a && ((n = xt(e.slice(a))), (e = e.slice(0, a))),
        g(t)
          ? ((i = t), (t = void 0))
          : t && "object" == typeof t && (r = "POST"),
        0 < s.length &&
          C.ajax({ url: e, type: r || "GET", dataType: "html", data: t })
            .done(function (e) {
              ((o = arguments),
                s.html(n ? C("<div>").append(C.parseHTML(e)).find(n) : e));
            })
            .always(
              i &&
                function (e, t) {
                  s.each(function () {
                    i.apply(this, o || [e.responseText, t, e]);
                  });
                },
            ),
        this
      );
    }),
    (C.expr.pseudos.animated = function (t) {
      return C.grep(C.timers, function (e) {
        return t === e.elem;
      }).length;
    }),
    (C.offset = {
      setOffset: function (e, t, i) {
        var n,
          r,
          o,
          s,
          a = C.css(e, "position"),
          l = C(e),
          c = {};
        ("static" === a && (e.style.position = "relative"),
          (o = l.offset()),
          (n = C.css(e, "top")),
          (s = C.css(e, "left")),
          (s =
            ("absolute" === a || "fixed" === a) && -1 < (n + s).indexOf("auto")
              ? ((r = (a = l.position()).top), a.left)
              : ((r = parseFloat(n) || 0), parseFloat(s) || 0)),
          null != (t = g(t) ? t.call(e, i, C.extend({}, o)) : t).top &&
            (c.top = t.top - o.top + r),
          null != t.left && (c.left = t.left - o.left + s),
          "using" in t
            ? t.using.call(e, c)
            : ("number" == typeof c.top && (c.top += "px"),
              "number" == typeof c.left && (c.left += "px"),
              l.css(c)));
      },
    }),
    C.fn.extend({
      offset: function (t) {
        if (arguments.length)
          return void 0 === t
            ? this
            : this.each(function (e) {
                C.offset.setOffset(this, t, e);
              });
        var e,
          i = this[0];
        return i
          ? i.getClientRects().length
            ? ((e = i.getBoundingClientRect()),
              (i = i.ownerDocument.defaultView),
              {
                top: e.top + i.pageYOffset,
                left: e.left + i.pageXOffset,
              })
            : { top: 0, left: 0 }
          : void 0;
      },
      position: function () {
        if (this[0]) {
          var e,
            t,
            i,
            n = this[0],
            r = { top: 0, left: 0 };
          if ("fixed" === C.css(n, "position")) t = n.getBoundingClientRect();
          else {
            for (
              t = this.offset(),
                i = n.ownerDocument,
                e = n.offsetParent || i.documentElement;
              e &&
              (e === i.body || e === i.documentElement) &&
              "static" === C.css(e, "position");

            )
              e = e.parentNode;
            e &&
              e !== n &&
              1 === e.nodeType &&
              (((r = C(e).offset()).top += C.css(e, "borderTopWidth", !0)),
              (r.left += C.css(e, "borderLeftWidth", !0)));
          }
          return {
            top: t.top - r.top - C.css(n, "marginTop", !0),
            left: t.left - r.left - C.css(n, "marginLeft", !0),
          };
        }
      },
      offsetParent: function () {
        return this.map(function () {
          for (
            var e = this.offsetParent;
            e && "static" === C.css(e, "position");

          )
            e = e.offsetParent;
          return e || ne;
        });
      },
    }),
    C.each(
      { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
      function (t, r) {
        var o = "pageYOffset" === r;
        C.fn[t] = function (e) {
          return q(
            this,
            function (e, t, i) {
              var n;
              return (
                m(e) ? (n = e) : 9 === e.nodeType && (n = e.defaultView),
                void 0 === i
                  ? n
                    ? n[r]
                    : e[t]
                  : void (n
                      ? n.scrollTo(o ? n.pageXOffset : i, o ? i : n.pageYOffset)
                      : (e[t] = i))
              );
            },
            t,
            e,
            arguments.length,
          );
        };
      },
    ),
    C.each(["top", "left"], function (e, i) {
      C.cssHooks[i] = Qe(y.pixelPosition, function (e, t) {
        if (t)
          return ((t = Ye(e, i)), Ue.test(t) ? C(e).position()[i] + "px" : t);
      });
    }),
    C.each({ Height: "height", Width: "width" }, function (s, a) {
      C.each(
        { padding: "inner" + s, content: a, "": "outer" + s },
        function (n, o) {
          C.fn[o] = function (e, t) {
            var i = arguments.length && (n || "boolean" != typeof e),
              r = n || (!0 === e || !0 === t ? "margin" : "border");
            return q(
              this,
              function (e, t, i) {
                var n;
                return m(e)
                  ? 0 === o.indexOf("outer")
                    ? e["inner" + s]
                    : e.document.documentElement["client" + s]
                  : 9 === e.nodeType
                    ? ((n = e.documentElement),
                      Math.max(
                        e.body["scroll" + s],
                        n["scroll" + s],
                        e.body["offset" + s],
                        n["offset" + s],
                        n["client" + s],
                      ))
                    : void 0 === i
                      ? C.css(e, t, r)
                      : C.style(e, t, i, r);
              },
              a,
              i ? e : void 0,
              i,
            );
          };
        },
      );
    }),
    C.each(
      [
        "ajaxStart",
        "ajaxStop",
        "ajaxComplete",
        "ajaxError",
        "ajaxSuccess",
        "ajaxSend",
      ],
      function (e, t) {
        C.fn[t] = function (e) {
          return this.on(t, e);
        };
      },
    ),
    C.fn.extend({
      bind: function (e, t, i) {
        return this.on(e, null, t, i);
      },
      unbind: function (e, t) {
        return this.off(e, null, t);
      },
      delegate: function (e, t, i, n) {
        return this.on(t, e, i, n);
      },
      undelegate: function (e, t, i) {
        return 1 === arguments.length
          ? this.off(e, "**")
          : this.off(t, e || "**", i);
      },
      hover: function (e, t) {
        return this.mouseenter(e).mouseleave(t || e);
      },
    }),
    C.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 (e, i) {
        C.fn[i] = function (e, t) {
          return 0 < arguments.length
            ? this.on(i, null, e, t)
            : this.trigger(i);
        };
      },
    ));
  var Gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  ((C.proxy = function (e, t) {
    var i, n;
    if (("string" == typeof t && ((n = e[t]), (t = e), (e = n)), g(e)))
      return (
        (i = a.call(arguments, 2)),
        ((n = function () {
          return e.apply(t || this, i.concat(a.call(arguments)));
        }).guid = e.guid =
          e.guid || C.guid++),
        n
      );
  }),
    (C.holdReady = function (e) {
      e ? C.readyWait++ : C.ready(!0);
    }),
    (C.isArray = Array.isArray),
    (C.parseJSON = JSON.parse),
    (C.nodeName = S),
    (C.isFunction = g),
    (C.isWindow = m),
    (C.camelCase = V),
    (C.type = f),
    (C.now = Date.now),
    (C.isNumeric = function (e) {
      var t = C.type(e);
      return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e));
    }),
    (C.trim = function (e) {
      return null == e ? "" : (e + "").replace(Gt, "");
    }),
    "function" == typeof define &&
      define.amd &&
      define("jquery", [], function () {
        return C;
      }));
  var Jt = x.jQuery,
    ei = x.$;
  return (
    (C.noConflict = function (e) {
      return (
        x.$ === C && (x.$ = ei),
        e && x.jQuery === C && (x.jQuery = Jt),
        C
      );
    }),
    void 0 === e && (x.jQuery = x.$ = C),
    C
  );
});
var H5P = (window.H5P = window.H5P || {});
((H5P.jQuery = jQuery.noConflict(!0)),
  (H5P.jQuery.fn.__originalLoad = H5P.jQuery.load),
  (H5P.jQuery.fn.load = function (e, t, i) {
    if ("function" != typeof e)
      return H5P.jQuery.fn.__originalLoad.apply(this, arguments);
    {
      console.warn("You are using a deprecated H5P library. Please upgrade!");
      let e = Array.prototype.slice.call(arguments);
      return (e.unshift("load"), H5P.jQuery.fn.on.apply(this, e));
    }
  }),
  ((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 (e) {
    (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)", e).each(function () {
        var t = H5P.jQuery(this).addClass("h5p-initialized"),
          i = H5P.jQuery('<div class="h5p-container"></div>').appendTo(t),
          r = t.data("content-id"),
          o = H5PIntegration.contents["cid-" + r];
        if (void 0 === o)
          return H5P.error(
            "No data for content id " + r + ". Perhaps the library is gone?",
          );
        var s = {
          library: o.library,
          params: JSON.parse(o.jsonContent),
          metadata: o.metadata,
        };
        H5P.getUserData(r, "state", function (e, t) {
          var n;
          t
            ? (s.userDatas = { state: t })
            : null === t &&
              H5PIntegration.saveFreq &&
              (delete o.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 (e, t) {
                  function i(e) {
                    ("click" !== e.type && 32 !== e.which) ||
                      (n.close(), H5P.deleteUserData(r, "state", 0));
                  }
                  (t.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, r, i, !0, { standalone: !0 });
        ((H5P.offlineRequestQueue = new H5P.OfflineRequestQueue({
          instance: a,
        })),
          1 == o.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 (e) {
                if (32 === e.which || 13 === e.which)
                  return (H5P.fullScreen(i, a), !1);
              }));
        var e,
          n,
          l,
          c,
          u,
          h,
          d,
          p = o.displayOptions,
          f = !1;
        (p.frame &&
          (p.copyright &&
            ((e = H5P.getCopyrights(a, s.params, r, s.metadata)) ||
              (p.copyright = !1)),
          (p = new H5P.ActionBar(p)),
          (n = p.getDOMElement()),
          p.on("reuse", function () {
            (H5P.openReuseDialog(n, o, s, a, r),
              a.triggerXAPI("accessed-reuse"));
          }),
          p.on("copyrights", function () {
            (new H5P.Dialog(
              "copyrights",
              H5P.t("copyrightInformation"),
              e,
              i,
            ).open(!0),
              a.triggerXAPI("accessed-copyright"));
          }),
          p.on("embed", function () {
            (H5P.openEmbedDialog(
              n,
              o.embedCode,
              o.resizeCode,
              { width: t.width(), height: t.height() },
              a,
            ),
              a.triggerXAPI("accessed-embed"));
          }),
          p.hasActions() && ((f = !0), n.insertAfter(i))),
          t.addClass(f ? "h5p-frame" : "h5p-no-frame"),
          (H5P.opened[r] = new Date()),
          H5P.on(a, "finish", function (e) {
            void 0 !== e.data &&
              H5P.setFinished(r, e.data.score, e.data.maxScore, e.data.time);
          }),
          H5P.on(a, "xAPI", H5P.xAPICompletedListener),
          !1 !== H5PIntegration.saveFreq &&
            (a.getCurrentState instanceof Function ||
              "function" == typeof a.getCurrentState) &&
            ((c = function () {
              var e = a.getCurrentState();
              (void 0 !== e &&
                H5P.setUserData(r, "state", e, { deleteOnChange: !0 }),
                H5PIntegration.saveFreq &&
                  (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)));
            }),
            H5PIntegration.saveFreq &&
              (l = setTimeout(c, 1e3 * H5PIntegration.saveFreq)),
            H5P.on(a, "xAPI", function (e) {
              e = e.getVerb();
              ("completed" !== e && "progressed" !== e) ||
                (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 e;
                      window.parent.H5P.isFullscreen ||
                        ((e = 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 = e));
                    }, 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"),
          t.addClass("using-mouse"),
          t.on("mousedown keydown keyup", function (e) {
            t.toggleClass("using-mouse", "mousedown" === e.type);
          }),
          H5P.externalDispatcher &&
            H5P.externalDispatcher.trigger("initialized"));
      }),
      H5P.jQuery("iframe.h5p-iframe:not(.h5p-initialized)", e).each(
        function () {
          var e = H5P.jQuery(this)
              .addClass("h5p-initialized")
              .data("content-id"),
            t = H5PIntegration.contents["cid-" + e],
            t =
              t && t.metadata && t.metadata.defaultLanguage
                ? t.metadata.defaultLanguage
                : "en";
          (this.contentDocument.open(),
            this.contentDocument.write(
              '<!doctype html><html class="h5p-iframe" lang="' +
                t +
                '"><head>' +
                H5P.getHeadTags(e) +
                '</head><body><div class="h5p-content" data-content-id="' +
                e +
                '"/></body></html>',
            ),
            this.contentDocument.close());
        },
      ));
  }),
  (H5P.getHeadTags = function (e) {
    function t(e) {
      for (var t = "", i = 0; i < e.length; i++)
        t += '<link rel="stylesheet" href="' + e[i] + '">';
      return t;
    }
    function i(e) {
      for (var t = "", i = 0; i < e.length; i++)
        t += '<script src="' + e[i] + '"><\/script>';
      return t;
    }
    return (
      '<base target="_parent">' +
      t(H5PIntegration.core.styles) +
      t(H5PIntegration.contents["cid-" + e].styles) +
      i(H5PIntegration.core.scripts) +
      i(H5PIntegration.contents["cid-" + e].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 (e) {
              window.parent === e.source &&
                "h5p" === e.data.context &&
                void 0 !== i[e.data.action] &&
                i[e.data.action](e.data);
            },
            !1,
          ),
            (this.on = function (e, t) {
              i[e] = t;
            }),
            (this.send = function (e, t) {
              (((t = void 0 === t ? {} : t).context = "h5p"),
                (t.action = e),
                window.parent.postMessage(t, "*"));
            }));
        })()
      : void 0),
  (H5P.semiFullScreen = function (e, t, i, n) {
    H5P.fullScreen(e, t, i, n, !0);
  }),
  (H5P.fullScreen = function (e, t, i, n, r) {
    if (void 0 === H5P.exitFullScreen) {
      if (H5P.isFramed && !1 === H5P.externalEmbed)
        return (
          window.parent.H5P.fullScreen(e, t, i, H5P.$body.get(), r),
          (H5P.isFullscreen = !0),
          (H5P.exitFullScreen = function () {
            window.parent.H5P.exitFullScreen();
          }),
          void H5P.on(t, "exitFullScreen", function () {
            ((H5P.isFullscreen = !1), (H5P.exitFullScreen = void 0));
          })
        );
      var o,
        s,
        a,
        l = e;
      (void 0 === n
        ? (o = H5P.$body)
        : ((s = (o = H5P.jQuery(n)).add(e.get())),
          (n = "#h5p-iframe-" + e.parent().data("content-id")),
          (e = (a = H5P.jQuery(n)).parent())),
        (s = e.add(H5P.$body).add(s)));
      function c(e) {
        (s.addClass(e), void 0 !== a && a.css("height", ""));
      }
      function u() {
        (H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          H5P.trigger(t, "enterFullScreen"));
      }
      function h(e) {
        ((H5P.isFullscreen = !1),
          s.removeClass(e),
          H5P.trigger(t, "resize"),
          H5P.trigger(t, "focus"),
          (H5P.exitFullScreen = void 0) !== i && i(),
          H5P.trigger(t, "exitFullScreen"));
      }
      if (
        ((H5P.isFullscreen = !0),
        void 0 === H5P.fullScreenBrowserPrefix || !0 === r)
      ) {
        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")),
            g = (H5P.exitFullScreen = function () {
              (d ? (p.content = d) : v.removeChild(p),
                f.remove(),
                o.unbind("keyup", m),
                h("h5p-semi-fullscreen"));
            }),
            m = function (e) {
              27 === e.keyCode && g();
            };
          (f.click(g), o.keyup(m));
          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 =
            "ms" === H5P.fullScreenBrowserPrefix
              ? "MSFullscreenChange"
              : H5P.fullScreenBrowserPrefix + "fullscreenchange";
        (document.addEventListener(w, function () {
          return void 0 === _
            ? ((_ = !1), void u())
            : (h("h5p-fullscreen"),
              void document.removeEventListener(w, arguments.callee, !1));
        }),
          "" === H5P.fullScreenBrowserPrefix
            ? e[0].requestFullScreen()
            : ((r =
                "ms" === H5P.fullScreenBrowserPrefix
                  ? "msRequestFullscreen"
                  : H5P.fullScreenBrowserPrefix + "RequestFullScreen"),
              (l =
                "webkit" === H5P.fullScreenBrowserPrefix &&
                0 === H5P.safariBrowser
                  ? Element.ALLOW_KEYBOARD_INPUT
                  : void 0),
              e[0][r](l)),
          (H5P.exitFullScreen = function () {
            "" === H5P.fullScreenBrowserPrefix
              ? document.exitFullscreen()
              : "moz" === H5P.fullScreenBrowserPrefix
                ? document.mozCancelFullScreen()
                : document[H5P.fullScreenBrowserPrefix + "ExitFullscreen"]();
          }));
      }
    }
  }),
  (function () {
    ((H5P.addQueryParameter = function (e, t) {
      let i, n;
      const r = e.split("?");
      return (
        (i = r[1]
          ? ((n = r[1].split("#")), r[0] + "?" + n[0] + "&")
          : ((n = r[0].split("#")), n[0] + "?")),
        (i += t),
        n[1] && (i += "#" + n[1]),
        i
      );
    }),
      (H5P.setSource = function (e, t, i) {
        let n = t.path;
        t = H5P.getCrossOrigin(t);
        (t
          ? ((e.crossOrigin = t),
            H5PIntegration.crossoriginCacheBuster &&
              (n = H5P.addQueryParameter(
                n,
                H5PIntegration.crossoriginCacheBuster,
              )))
          : e.removeAttribute("crossorigin"),
          (e.src = H5P.getPath(n, i)));
      }));
    function r(e) {
      return e.match(/^[a-z0-9]+:\/\//i);
    }
    ((H5P.getCrossOrigin = function (e) {
      return "object" != typeof e
        ? H5PIntegration.crossorigin &&
          H5PIntegration.crossoriginRegex &&
          e.match(H5PIntegration.crossoriginRegex)
          ? H5PIntegration.crossorigin
          : null
        : H5PIntegration.crossorigin && !r(e.path)
          ? H5PIntegration.crossorigin
          : void 0;
    }),
      (H5P.getPath = function (e, t) {
        if (r(e)) return e;
        var i,
          n = "#tmp" === e.substr(-4, 4);
        if (void 0 === t || n) {
          if (void 0 === window.H5PEditor) return;
          i = H5PEditor.filesPath;
        } else
          i =
            (i =
              void 0 !== H5PIntegration.contents &&
              H5PIntegration.contents["cid-" + t]
                ? H5PIntegration.contents["cid-" + t].contentUrl
                : i) || H5PIntegration.url + "/content/" + t;
        return (
          (i = !r(i)
            ? window.location.protocol + "//" + window.location.host + i
            : i) +
          "/" +
          e
        );
      }));
  })(),
  (H5P.getContentPath = function (e) {
    return H5PIntegration.url + "/content/" + e;
  }),
  (H5P.classFromName = function (e) {
    e = e.split(".");
    return this[e[e.length - 1]];
  }),
  (H5P.newRunnable = function (t, e, i, n, r) {
    var o, s;
    try {
      ((s = (a = t.library.split(" ", 2))[0]), (o = a[1].split(".", 2)));
    } catch (e) {
      return H5P.error("Invalid library string: " + t.library);
    }
    if (t.params instanceof Object != !0 || t.params instanceof Array == !0)
      return (
        H5P.error("Invalid library params for: " + t.library),
        H5P.error(t.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 (e) {
      return H5P.error("Unable to find constructor for: " + t.library);
    }
    (void 0 === r && (r = {}),
      t.subContentId && (r.subContentId = t.subContentId),
      t.userDatas &&
        t.userDatas.state &&
        H5PIntegration.saveFreq &&
        (r.previousState = t.userDatas.state),
      t.metadata && (r.metadata = t.metadata));
    var u,
      h = r.standalone || !1;
    return (
      (l.prototype = H5P.jQuery.extend(
        {},
        H5P.ContentType(h).prototype,
        l.prototype,
      )),
      void 0 ===
        (u =
          -1 <
          H5P.jQuery.inArray(t.library, [
            "H5P.CoursePresentation 1.0",
            "H5P.CoursePresentation 1.1",
            "H5P.CoursePresentation 1.2",
            "H5P.CoursePresentation 1.3",
          ])
            ? new l(t.params, e)
            : new l(t.params, e, r)).$ && (u.$ = H5P.jQuery(u)),
      void 0 === u.contentId && (u.contentId = e),
      void 0 === u.subContentId &&
        t.subContentId &&
        (u.subContentId = t.subContentId),
      void 0 === u.parent && r && r.parent && (u.parent = r.parent),
      void 0 === u.libraryInfo &&
        (u.libraryInfo = {
          versionedName: t.library,
          versionedNameNoSpaces: s + "-" + o[0] + "." + o[1],
          machineName: s,
          majorVersion: o[0],
          minorVersion: o[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 (e) {
    void 0 !== window.console &&
      void 0 !== console.error &&
      console.error(e.stack || e);
  }),
  (H5P.t = function (e, t, i) {
    if ((void 0 === i && (i = "H5P"), void 0 === H5PIntegration.l10n[i]))
      return '[Missing translation namespace "' + i + '"]';
    if (void 0 === H5PIntegration.l10n[i][e])
      return '[Missing translation "' + e + '" in "' + i + '"]';
    var n = H5PIntegration.l10n[i][e];
    if (void 0 !== t) for (var r in t) n = n.replace(r, t[r]);
    return n;
  }),
  (H5P.Dialog = function (e, t, i, n) {
    var r = this,
      o = H5P.jQuery(
        '<div class="h5p-popup-dialog h5p-' +
          e +
          '-dialog" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2>' +
          t +
          '</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 (e) {
          (e && e.originalEvent && e.originalEvent.preventClosing) || r.close();
        })
        .children(".h5p-inner")
        .click(function (e) {
          e.originalEvent.preventClosing = !0;
        })
        .find(".h5p-close")
        .click(function () {
          r.close();
        })
        .keypress(function (e) {
          if (13 === e.which || 32 === e.which) return (r.close(), !1);
        })
        .end()
        .find("a")
        .click(function (e) {
          e.stopPropagation();
        })
        .end()
        .end();
    ((r.open = function (e) {
      (e && o.css("height", "100%"),
        setTimeout(function () {
          (o.addClass("h5p-open"),
            H5P.jQuery(r).trigger("dialog-opened", [o]),
            o.focus());
        }, 1));
    }),
      (r.close = function () {
        (o.removeClass("h5p-open"),
          setTimeout(function () {
            (o.remove(),
              H5P.jQuery(r).trigger("dialog-closed", [o]),
              n.attr("tabindex", "-1"),
              n.focus());
          }, 200));
      }));
  }),
  (H5P.getCopyrights = function (e, t, i, n) {
    var r;
    if (void 0 !== e.getCopyrights)
      try {
        r = e.getCopyrights();
      } catch (e) {}
    void 0 === r &&
      ((r = new H5P.ContentCopyrights()), H5P.findCopyrights(r, t, i));
    e = H5P.buildMetadataCopyrights(n, e.libraryInfo.machineName);
    return (
      void 0 !== e && r.addMediaInFront(e),
      (r = void 0 !== r ? r.toString() : r)
    );
  }),
  (H5P.findCopyrights = function (o, e, t, i) {
    var n, r, s, a;
    for (r in (i && ((i.params = e), l(i, i.machineName, t)), e))
      e.hasOwnProperty(r) &&
        ("overrideSettings" !== r
          ? ((s = e[r]) && 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(o, s, t)
              : s instanceof Object &&
                (l(s, n, t),
                void 0 === s.copyright ||
                void 0 === s.copyright.license ||
                void 0 === s.path ||
                void 0 === s.mime
                  ? H5P.findCopyrights(o, s, t)
                  : ((a = new H5P.MediaCopyright(s.copyright)),
                    void 0 !== s.width &&
                      void 0 !== s.height &&
                      a.setThumbnail(
                        new H5P.Thumbnail(
                          H5P.getPath(s.path, t),
                          s.width,
                          s.height,
                        ),
                      ),
                    o.addMedia(a))))
          : (console.warn(
              "The semantics field 'overrideSettings' is DEPRECATED and should not be used.",
            ),
            console.warn(e)));
    function l(e, t, i) {
      if (e.metadata) {
        const r = H5P.buildMetadataCopyrights(e.metadata, t);
        var n;
        void 0 !== r &&
          (e.params &&
            "Image" === e.params.contentName &&
            e.params.file &&
            ((n = e.params.file.path),
            (t = e.params.file.width),
            (e = e.params.file.height),
            r.setThumbnail(new H5P.Thumbnail(H5P.getPath(n, i), t, e))),
          o.addMedia(r));
      }
    }
  }),
  (H5P.buildMetadataCopyrights = function (e) {
    if (e && void 0 !== e.license && "U" !== e.license) {
      e = {
        contentType: e.contentType,
        title: e.title,
        author:
          e.authors && 0 < e.authors.length
            ? e.authors
                .map(function (e) {
                  return e.role ? e.name + " (" + e.role + ")" : e.name;
                })
                .join(", ")
            : void 0,
        source: e.source,
        year: e.yearFrom
          ? e.yearFrom + (e.yearTo ? "-" + e.yearTo : "")
          : void 0,
        license: e.license,
        version: e.licenseVersion,
        licenseExtras: e.licenseExtras,
        changes:
          e.changes && 0 < e.changes.length
            ? e.changes
                .map(function (e) {
                  return (
                    e.log +
                    (e.author ? ", " + e.author : "") +
                    (e.date ? ", " + e.date : "")
                  );
                })
                .join(" / ")
            : void 0,
      };
      return new H5P.MediaCopyright(e);
    }
  }),
  (H5P.openReuseDialog = function (e, i, n, r, o) {
    let t = "";
    (i.displayOptions.export &&
      (t +=
        '<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 &&
        (t += '<div class="h5p-horizontal-line-text"><span>or</span></div>'),
      i.displayOptions.copy &&
        (t +=
          '<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"), t, e);
    (H5P.jQuery(s)
      .on("dialog-opened", function (e, t) {
        (H5P.jQuery(
          '<a href="https://h5p.org/node/442225" target="_blank">More Info</a>',
        )
          .click(function (e) {
            e.stopPropagation();
          })
          .appendTo(t.find("h2")),
          t.find(".h5p-download-button").click(function () {
            ((window.location.href = i.exportUrl),
              r.triggerXAPI("downloaded"),
              s.close());
          }),
          t.find(".h5p-copy-button").click(function () {
            const e = new H5P.ClipboardItem(n);
            ((e.contentId = o),
              H5P.setClipboard(e),
              r.triggerXAPI("copied"),
              s.close(),
              H5P.attachToastTo(
                H5P.jQuery(".h5p-content:first")[0],
                H5P.t("contentCopied"),
                {
                  position: {
                    horizontal: "centered",
                    vertical: "centered",
                    noOverflowX: !0,
                  },
                },
              ));
          }),
          H5P.trigger(r, "resize"));
      })
      .on("dialog-closed", function () {
        H5P.trigger(r, "resize");
      }),
      s.open());
  }),
  (H5P.openEmbedDialog = function (e, t, i, c, u) {
    var h = t + i,
      e = 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>",
        e,
      );
    (H5P.jQuery(e)
      .on("dialog-opened", function (e, i) {
        function n() {
          H5P.trigger(u, "resize");
        }
        function t(e, t) {
          return ((e = parseFloat(e.val())), isNaN(e) ? t : Math.ceil(e));
        }
        function r() {
          i.find(".h5p-embed-code-container:first").val(
            h.replace(":w", t(s, c.width)).replace(":h", t(a, c.height)),
          );
        }
        var o = i.find(".h5p-inner").find(".h5p-scroll-content"),
          s =
            (o.outerHeight(), o.innerHeight(), i.find(".h5p-embed-size:eq(0)")),
          a = i.find(".h5p-embed-size:eq(1)");
        (s.change(r),
          a.change(r),
          r(),
          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 e = H5P.jQuery(this),
            t = e.next();
          (t.is(":visible")
            ? (e
                .removeClass("h5p-open")
                .text(H5P.t("showAdvanced"))
                .attr("aria-expanded", "true"),
              t.hide())
            : (e
                .addClass("h5p-open")
                .text(H5P.t("hideAdvanced"))
                .attr("aria-expanded", "false"),
              t.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 (e) {
            if (32 === e.keyCode) return (l.apply(this), !1);
          });
      })
      .on("dialog-closed", function () {
        H5P.trigger(u, "resize");
      }),
      e.open());
  }),
  (H5P.attachToastTo = function (t, e, i) {
    if (void 0 === t || void 0 === e) return;
    function n(e) {
      -1 === r(e).indexOf(t) && (clearTimeout(l), o());
    }
    const r = function (e) {
        var t = (e.composedPath && e.composedPath()) || e.path,
          e = e.target;
        return null != t
          ? t.indexOf(window) < 0
            ? t.concat(window)
            : t
          : e === window
            ? [window]
            : [e].concat(
                (function e(t, i) {
                  i = i || [];
                  t = t.parentNode;
                  return t ? e(t, i.concat(t)) : i;
                })(e),
                window,
              );
      },
      o = 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 = e), s.appendChild(a), document.body.appendChild(s));
    e = (function (e, t, i) {
      (((i = i || {}).offsetHorizontal = i.offsetHorizontal || 0),
        (i.offsetVertical = i.offsetVertical || 0));
      var n = t.getBoundingClientRect(),
        r = e.getBoundingClientRect();
      let o = 0,
        s = 0;
      switch (i.horizontal) {
        case "before":
          o = r.left - n.width - i.offsetHorizontal;
          break;
        case "after":
          o = r.left + r.width + i.offsetHorizontal;
          break;
        case "left":
          o = r.left + i.offsetHorizontal;
          break;
        case "right":
          o = r.left + r.width - n.width - i.offsetHorizontal;
          break;
        default:
          o = r.left + r.width / 2 - n.width / 2 + i.offsetHorizontal;
      }
      switch (i.vertical) {
        case "above":
          s = r.top - n.height - i.offsetVertical;
          break;
        case "below":
          s = r.top + r.height + i.offsetVertical;
          break;
        case "top":
          s = r.top + i.offsetVertical;
          break;
        case "bottom":
          s = r.top + r.height - n.height - i.offsetVertical;
          break;
        case "centered":
          s = r.top + r.height / 2 - n.height / 2 + i.offsetVertical;
          break;
        default:
          s = r.top + r.height + i.offsetVertical;
      }
      const a = document.body;
      e = a.getBoundingClientRect();
      return (
        (i.noOverflowLeft || i.noOverflowX) && o < e.x && (o = e.x),
        (i.noOverflowRight || i.noOverflowX) &&
          o + n.width > e.x + e.width &&
          (o = e.x + e.width - n.width),
        (i.noOverflowTop || i.noOverflowY) && s < e.y && (s = e.y),
        (i.noOverflowBottom || i.noOverflowY) &&
          s + n.height > e.y + e.height &&
          (o = e.y + e.height - n.height),
        { left: o, top: s }
      );
    })(t, s, i.position);
    ((s.style.left = Math.round(e.left) + "px"),
      (s.style.top = Math.round(e.top) + "px"),
      s.classList.remove("h5p-toast-disabled"));
    const l = setTimeout(o, i.duration);
    document.addEventListener("click", n);
  }),
  (H5P.ContentCopyrights = function () {
    var i,
      n = [],
      r = [];
    ((this.setLabel = function (e) {
      i = e;
    }),
      (this.addMedia = function (e) {
        void 0 !== e && n.push(e);
      }),
      (this.addMediaInFront = function (e) {
        void 0 !== e && n.unshift(e);
      }),
      (this.addContent = function (e) {
        void 0 !== e && r.push(e);
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < n.length; t++) e += n[t];
        for (t = 0; t < r.length; t++) e += r[t];
        return (e =
          "" !== e
            ? '<div class="h5p-content-copyrights">' +
              (e = void 0 !== i ? "<h3>" + i + "</h3>" + e : e) +
              "</div>"
            : e);
      }));
  }),
  (H5P.MediaCopyright = function (e, t, i, n) {
    function r(e) {
      return void 0 === t || void 0 === t[e] ? H5P.t(e) : t[e];
    }
    function o(e, t) {
      var i,
        n = H5P.copyrightLicenses[e],
        r = "";
      (("PD" === e && t) || (r += n.hasOwnProperty("label") ? n.label : n),
        (i =
          n.versions &&
          (t =
            !n.versions.default || (t && n.versions[t])
              ? t
              : n.versions.default) &&
          n.versions[t]
            ? n.versions[t]
            : i) &&
          (r && (r += " "), (r += i.hasOwnProperty("label") ? i.label : i)),
        n.hasOwnProperty("link")
          ? (o = n.link.replace(
              ":version",
              n.linkVersions ? n.linkVersions[t] : t,
            ))
          : i && n.hasOwnProperty("link") && (o = i.link),
        o && (r = '<a href="' + o + '" target="_blank">' + r + "</a>"));
      var o = "";
      return (
        "PD" !== e && "C" !== e && (o += e),
        t && "CC0 1.0" !== t && (o && "GNU GPL" !== e && (o += " "), (o += t)),
        o && (r += " (" + o + ")"),
        "C" === e && (r += " &copy;"),
        r
      );
    }
    var s,
      a = new H5P.DefinitionList();
    if (void 0 !== e) {
      for (var l in n) n.hasOwnProperty(l) && (e[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 !== e[h] &&
          "" !== e[h] &&
          ((u = e[h]),
          "license" === h && (u = o(e.license, e.version)),
          "source" === h &&
            (u = u
              ? '<a href="' + u + '" target="_blank">' + u + "</a>"
              : void 0),
          a.add(new H5P.Field(r(h), u)));
      }
    }
    ((this.setThumbnail = function (e) {
      s = e;
    }),
      (this.undisclosed = function () {
        if (1 === a.size()) {
          var e = a.get(0);
          if (e.getLabel() === r("license") && e.getValue() === o("U"))
            return !0;
        }
        return !1;
      }),
      (this.toString = function () {
        var e = "";
        return this.undisclosed()
          ? e
          : (void 0 !== s && (e += s),
            "" !== (e += a)
              ? '<div class="h5p-media-copyright">' + e + "</div>"
              : e);
      }));
  }),
  (H5P.Thumbnail = function (e, t, i) {
    var n;
    (void 0 !== t && (n = Math.round((t / i) * 100)),
      (this.toString = function () {
        return (
          '<img src="' +
          e +
          '" alt="' +
          H5P.t("thumbnail") +
          '" class="h5p-thumbnail" height="100"' +
          (void 0 === n ? "" : ' width="' + n + '"') +
          "/>"
        );
      }));
  }),
  (H5P.Field = function (e, t) {
    ((this.getLabel = function () {
      return e;
    }),
      (this.getValue = function () {
        return t;
      }));
  }),
  (H5P.DefinitionList = function () {
    var n = [];
    ((this.add = function (e) {
      n.push(e);
    }),
      (this.size = function () {
        return n.length;
      }),
      (this.get = function (e) {
        return n[e];
      }),
      (this.toString = function () {
        for (var e = "", t = 0; t < n.length; t++) {
          var i = n[t];
          e += "<dt>" + i.getLabel() + "</dt><dd>" + i.getValue() + "</dd>";
        }
        return "" === e ? e : '<dl class="h5p-definition-list">' + e + "</dl>";
      }));
  }),
  (H5P.Coords = function (e, t, i, n) {
    return this instanceof H5P.Coords
      ? ((this.x = 0),
        (this.y = 0),
        (this.w = 1),
        (this.h = 1),
        "object" == typeof e
          ? ((this.x = e.x), (this.y = e.y), (this.w = e.w), (this.h = e.h))
          : (void 0 !== e && (this.x = e),
            void 0 !== t && (this.y = t),
            void 0 !== i && (this.w = i),
            void 0 !== n && (this.h = n)),
        this)
      : new H5P.Coords(e, t, i, n);
  }),
  (H5P.libraryFromString = function (e) {
    e = /(.+)\s(\d+)\.(\d+)$/g.exec(e);
    return (
      null !== e && {
        machineName: e[1],
        majorVersion: parseInt(e[2]),
        minorVersion: parseInt(e[3]),
      }
    );
  }),
  (H5P.getLibraryPath = function (e) {
    return void 0 !== H5PIntegration.urlLibraries
      ? H5PIntegration.urlLibraries + "/" + e
      : H5PIntegration.url + "/libraries/" + e;
  }),
  (H5P.cloneObject = function (e, t) {
    var i,
      n = e instanceof Array ? [] : {};
    for (i in e)
      e.hasOwnProperty(i) &&
        (void 0 !== t && t && "object" == typeof e[i]
          ? (n[i] = H5P.cloneObject(e[i], t))
          : (n[i] = e[i]));
    return n;
  }),
  (H5P.trim = function (e) {
    return e.replace(/^\s+|\s+$/g, "");
  }),
  (H5P.jsLoaded = function (e) {
    return (
      (H5PIntegration.loadedJs = H5PIntegration.loadedJs || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedJs)
    );
  }),
  (H5P.cssLoaded = function (e) {
    return (
      (H5PIntegration.loadedCss = H5PIntegration.loadedCss || []),
      -1 !== H5P.jQuery.inArray(e, H5PIntegration.loadedCss)
    );
  }),
  (H5P.shuffleArray = function (e) {
    if (e instanceof Array) {
      var t,
        i,
        n,
        r = e.length;
      if (0 === r) return !1;
      for (; --r; )
        ((t = Math.floor(Math.random() * (r + 1))),
          (i = e[r]),
          (n = e[t]),
          (e[r] = n),
          (e[t] = i));
      return e;
    }
  }),
  (H5P.setFinished = function (e, t, i, n) {
    if (
      ("number" == typeof t || t instanceof Number) &&
      !0 === H5PIntegration.postUserStatistics
    ) {
      function r(e) {
        return Math.round(e.getTime() / 1e3);
      }
      const o = {
        contentId: e,
        score: t,
        maxScore: i,
        opened: r(H5P.opened[e]),
        finished: r(new Date()),
        time: n,
      };
      H5P.jQuery.post(H5PIntegration.ajax.setFinished, o).fail(function () {
        H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished, o);
      });
    }
  }),
  Array.prototype.indexOf ||
    (Array.prototype.indexOf = function (e) {
      for (var t = 0; t < this.length; t++) if (this[t] === e) return t;
      return -1;
    }),
  void 0 === String.prototype.trim &&
    (String.prototype.trim = function () {
      return H5P.trim(this);
    }),
  (H5P.trigger = function (e, t, i, n) {
    void 0 !== e.trigger
      ? e.trigger(t, i, n)
      : void 0 !== e.$ && void 0 !== e.$.trigger && e.$.trigger(t);
  }),
  (H5P.on = function (e, t, i) {
    void 0 !== e.on
      ? e.on(t, i)
      : void 0 !== e.$ && void 0 !== e.$.on && e.$.on(t, i);
  }),
  (H5P.createUUID = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (e) {
        var t = (16 * Math.random()) | 0;
        return ("x" === e ? t : (3 & t) | 8).toString(16);
      },
    );
  }),
  (H5P.createTitle = function (e, t) {
    if (!e) return "";
    void 0 === t && (t = 60);
    e = H5P.jQuery("<div></div>")
      .text(e.replace(/(<([^>]+)>)/gi, ""))
      .text();
    return (e = e.length > t ? e.substr(0, t - 3) + "..." : e);
  }),
  (function (l) {
    function a(e, t, i, n, r, o, s, a) {
      void 0 !== H5PIntegration.user
        ? ((a = {
            url: H5PIntegration.ajax.contentUserData
              .replace(":contentId", e)
              .replace(":dataType", t)
              .replace(":subContentId", i || 0),
            dataType: "json",
            async: void 0 === a || a,
          }),
          void 0 !== r
            ? ((a.type = "POST"),
              (a.data = {
                data: null === r ? 0 : r,
                preload: o ? 1 : 0,
                invalidate: s ? 1 : 0,
              }))
            : (a.type = "GET"),
          void 0 !== n &&
            ((a.error = function (e, t) {
              n(t);
            }),
            (a.success = function (e) {
              e.success
                ? !1 !== e.data && void 0 !== e.data
                  ? n(void 0, e.data)
                  : n()
                : n(e.message);
            })),
          l.ajax(a))
        : n("Not signed in.");
    }
    ((H5P.getUserData = function (e, i, n, r) {
      ((r = r || 0), (H5PIntegration.contents = H5PIntegration.contents || {}));
      var o = H5PIntegration.contents["cid-" + e] || {},
        s = o.contentUserData;
      if (s && s[r] && void 0 !== s[r][i])
        if ("RESET" !== s[r][i])
          try {
            n(void 0, JSON.parse(s[r][i]));
          } catch (e) {
            n(e);
          }
        else n(void 0, null);
      else
        a(e, i, r, function (e, t) {
          if (e || void 0 === t) n(e, t);
          else {
            (void 0 === o.contentUserData && (o.contentUserData = s = {}),
              void 0 === s[r] && (s[r] = {}),
              (s[r][i] = t));
            try {
              n(void 0, JSON.parse(t));
            } catch (e) {
              n(e);
            }
          }
        });
    }),
      (H5P.setUserData = function (e, t, i, n) {
        var r = H5P.jQuery.extend(
          !0,
          {},
          {
            subContentId: 0,
            preloaded: !0,
            deleteOnChange: !1,
            async: !0,
          },
          n,
        );
        try {
          i = JSON.stringify(i);
        } catch (e) {
          return void (r.errorCallback && r.errorCallback(e));
        }
        n = H5PIntegration.contents["cid-" + e];
        (n = void 0 === n ? (H5PIntegration.contents["cid-" + e] = {}) : n)
          .contentUserData || (n.contentUserData = {});
        n = n.contentUserData;
        (void 0 === n[r.subContentId] && (n[r.subContentId] = {}),
          i !== n[r.subContentId][t] &&
            ((n[r.subContentId][t] = i),
            a(
              e,
              t,
              r.subContentId,
              function (e) {
                r.errorCallback && e && r.errorCallback(e);
              },
              i,
              r.preloaded,
              r.deleteOnChange,
              r.async,
            )));
      }),
      (H5P.deleteUserData = function (e, t, i) {
        i = i || 0;
        var n = H5PIntegration.contents["cid-" + e].contentUserData;
        (n && n[i] && n[i][t] && delete n[i][t], a(e, t, i, void 0, null));
      }),
      (H5P.getContentForInstance = function (e) {
        e = "cid-" + e;
        return H5PIntegration &&
          H5PIntegration.contents &&
          H5PIntegration.contents[e]
          ? H5PIntegration.contents[e]
          : void 0;
      }),
      (H5P.ClipboardItem = function (e, t, i) {
        var n = this;
        (t || ((t = "action"), (e = { action: e })),
          (n.specific = e),
          t && e[t] && (n.generic = t),
          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 (e) {
        (e instanceof H5P.ClipboardItem || (e = new H5P.ClipboardItem(e)),
          H5P.setClipboard(e));
      }),
      (H5P.getClipboard = function () {
        return e();
      }),
      (H5P.setClipboard = function (e) {
        (localStorage.setItem("h5pClipboard", JSON.stringify(e)),
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: !1,
          }));
      }),
      (H5P.getLibraryConfig = function (e) {
        return H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[e]
          ? H5PIntegration.libraryConfig[e]
          : {};
      }));
    var e = function () {
        var t = localStorage.getItem("h5pClipboard");
        if (t) {
          try {
            t = JSON.parse(t);
          } catch (e) {
            return void console.error(
              "Unable to parse JSON from clipboard.",
              e,
            );
          }
          return (
            n(t.specific, function (e) {
              return "#tmp" === e.substr(-4, 4) ||
                !t.contentId ||
                e.match(/^https?:\/\//i)
                ? e
                : H5PEditor.contentId
                  ? "../" + t.contentId + "/" + e
                  : (H5PEditor.contentRelUrl || "../content/") +
                    t.contentId +
                    "/" +
                    e;
            }),
            t.generic && (t.generic = t.specific[t.generic]),
            t
          );
        }
      },
      n = function (e, t) {
        for (var i in e)
          e.hasOwnProperty(i) &&
            e[i] instanceof Object &&
            (void 0 !== (i = e[i]).path && void 0 !== i.mime
              ? (i.path = t(i.path))
              : (void 0 !== i.library &&
                  void 0 !== i.subContentId &&
                  delete i.subContentId,
                n(i, t)));
      };
    l(document).ready(function () {
      window.addEventListener("storage", function (e) {
        "h5pClipboard" === e.key &&
          H5P.externalDispatcher.trigger("datainclipboard", {
            reset: null === e.newValue,
          });
      });
      var r,
        e,
        t = {
          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: t,
        },
        "CC BY-SA": {
          label: H5P.t("licenseCCBYSA"),
          link: "http://creativecommons.org/licenses/by-sa/:version",
          versions: t,
        },
        "CC BY-ND": {
          label: H5P.t("licenseCCBYND"),
          link: "http://creativecommons.org/licenses/by-nd/:version",
          versions: t,
        },
        "CC BY-NC": {
          label: H5P.t("licenseCCBYNC"),
          link: "http://creativecommons.org/licenses/by-nc/:version",
          versions: t,
        },
        "CC BY-NC-SA": {
          label: H5P.t("licenseCCBYNCSA"),
          link: "http://creativecommons.org/licenses/by-nc-sa/:version",
          versions: t,
        },
        "CC BY-NC-ND": {
          label: H5P.t("licenseCCBYNCND"),
          link: "http://creativecommons.org/licenses/by-nc-nd/:version",
          versions: t,
        },
        "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 (e) {
            window.parent.H5P.externalDispatcher.trigger.call(this, e);
          }),
        H5P.preventInit || H5P.init(document.body),
        !1 !== H5PIntegration.saveFreq &&
          ((r = 0),
          (e = function () {
            var e = new Date().getTime();
            if (250 < e - r) {
              r = e;
              for (var t = 0; t < H5P.instances.length; t++) {
                var i,
                  n = H5P.instances[t];
                !(
                  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"), e());
          }),
          H5P.$window.on("pagehide", e)));
    });
  })(H5P.jQuery),
  ((H5P = window.H5P = window.H5P || {}).Event = function (e, t, i) {
    ((this.type = e), (this.data = t));
    var n = !1,
      r = !1,
      o = !1;
    (!0 === (i = void 0 === i ? {} : i).bubbles && (n = !0),
      !0 === i.external && (r = !0),
      (this.preventBubbling = function () {
        n = !1;
      }),
      (this.getBubbles = function () {
        return n;
      }),
      (this.scheduleForExternal = function () {
        return !(!r || o) && (o = !0);
      }));
  }),
  (H5P.EventDispatcher = function () {
    var r = this,
      s = {};
    function n(e, t) {
      if (void 0 !== s[e])
        for (var i = s[e].slice(), n = 0; n < i.length; n++) {
          var r = i[n],
            o = r.thisArg || this;
          r.listener.call(o, t);
        }
    }
    ((this.on = function (e, t, i) {
      if ("function" != typeof t)
        throw TypeError("listener must be a function");
      r.trigger("newListener", { type: e, listener: t });
      i = { listener: t, thisArg: i };
      s[e] ? s[e].push(i) : (s[e] = [i]);
    }),
      (this.once = function (e, t, i) {
        if (!(t instanceof Function))
          throw TypeError("listener must be a function");
        var n = function (e) {
          (r.off(e.type, n), t.call(this, e));
        };
        r.on(e, n, i);
      }),
      (this.off = function (e, t) {
        if (void 0 !== t && !(t instanceof Function))
          throw TypeError("listener must be a function");
        if (void 0 !== s[e]) {
          if (void 0 === t)
            return (delete s[e], void r.trigger("removeListener", e));
          for (var i = 0; i < s[e].length; i++)
            if (s[e][i].listener === t) {
              (s[e].splice(i, 1),
                r.trigger("removeListener", e, { listener: t }));
              break;
            }
          s[e].length || delete s[e];
        }
      }),
      (this.trigger = function (e, t, i) {
        void 0 !== e &&
          (e instanceof String || "string" == typeof e
            ? (e = new H5P.Event(e, t, i))
            : void 0 !== t && (e.data = t),
          (t = e.scheduleForExternal()),
          n.call(this, e.type, e),
          n.call(this, "*", e),
          e.getBubbles() &&
            r.parent instanceof H5P.EventDispatcher &&
            (r.parent.trigger instanceof Function ||
              "function" == typeof r.parent.trigger) &&
            r.parent.trigger(e),
          t && H5P.externalDispatcher.trigger.call(this, e));
      }));
  }),
  ((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 (e, t, i, n, r) {
    ((this.data.statement.result = {}),
      void 0 !== e &&
        (void 0 === t
          ? (this.data.statement.result.score = { raw: e })
          : ((this.data.statement.result.score = {
              min: 0,
              max: t,
              raw: e,
            }),
            0 < t &&
              (this.data.statement.result.score.scaled =
                Math.round((e / t) * 1e4) / 1e4))),
      (this.data.statement.result.completion =
        void 0 === n
          ? "completed" === this.getVerb() || "answered" === this.getVerb()
          : n),
      void 0 !== r && (this.data.statement.result.success = r),
      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 (e) {
    -1 !== H5P.jQuery.inArray(e, H5P.XAPIEvent.allowedXAPIVerbs)
      ? (this.data.statement.verb = {
          id: "http://adlnet.gov/expapi/verbs/" + e,
          display: { "en-US": e },
        })
      : void 0 !== e.id && (this.data.statement.verb = e);
  }),
  (H5P.XAPIEvent.prototype.getVerb = function (e) {
    var t = this.data.statement;
    return "verb" in t ? (!0 === e ? t.verb : t.verb.id.slice(31)) : null;
  }),
  (H5P.XAPIEvent.prototype.setObject = function (e) {
    e.contentId
      ? ((this.data.statement.object = {
          id: this.getContentXAPIId(e),
          objectType: "Activity",
          definition: {
            extensions: {
              "http://h5p.org/x-api/h5p-local-content-id": e.contentId,
            },
          },
        }),
        e.subContentId
          ? ((this.data.statement.object.definition.extensions[
              "http://h5p.org/x-api/h5p-subContentId"
            ] = e.subContentId),
            "function" == typeof e.getTitle &&
              (this.data.statement.object.definition.name = {
                "en-US": e.getTitle(),
              }))
          : (e = H5P.getContentForInstance(e.contentId)) &&
            e.metadata &&
            e.metadata.title &&
            (this.data.statement.object.definition.name = {
              "en-US": H5P.createTitle(e.metadata.title),
            }))
      : (this.data.statement.object = { definition: {} });
  }),
  (H5P.XAPIEvent.prototype.setContext = function (e) {
    (e.parent &&
      (e.parent.contentId || e.parent.subContentId) &&
      (this.data.statement.context = {
        contextActivities: {
          parent: [
            {
              id: this.getContentXAPIId(e.parent),
              objectType: "Activity",
            },
          ],
        },
      }),
      e.libraryInfo &&
        (void 0 === this.data.statement.context &&
          (this.data.statement.context = { contextActivities: {} }),
        (this.data.statement.context.contextActivities.category = [
          {
            id:
              "http://h5p.org/libraries/" + e.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 t;
      try {
        localStorage.H5PUserUUID
          ? (t = localStorage.H5PUserUUID)
          : ((t = H5P.createUUID()), (localStorage.H5PUserUUID = t));
      } catch (e) {
        t = "not-trackable-" + H5P.createUUID();
      }
      this.data.statement.actor = {
        account: { name: t, 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 (e) {
    var t;
    return (
      e.contentId &&
        H5PIntegration &&
        H5PIntegration.contents &&
        H5PIntegration.contents["cid-" + e.contentId] &&
        ((t = H5PIntegration.contents["cid-" + e.contentId].url),
        e.subContentId && (t += "?subContentId=" + e.subContentId)),
      t
    );
  }),
  (H5P.XAPIEvent.prototype.isFromChild = function () {
    var e = this.getVerifiedStatementValue([
      "context",
      "contextActivities",
      "parent",
      0,
      "id",
    ]);
    return !e || -1 === e.indexOf("subContentId");
  }),
  (H5P.XAPIEvent.prototype.getVerifiedStatementValue = function (e) {
    for (var t = this.data.statement, i = 0; i < e.length; i++) {
      if (void 0 === t[e[i]]) return null;
      t = t[e[i]];
    }
    return t;
  }),
  (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 (e, t) {
    this.trigger(this.createXAPIEventTemplate(e, t));
  }),
  (H5P.EventDispatcher.prototype.createXAPIEventTemplate = function (e, t) {
    var i = new H5P.XAPIEvent();
    if ((i.setActor(), i.setVerb(e), void 0 !== t))
      for (var n in t) i.data.statement[n] = t[n];
    return (
      "object" in i.data.statement || i.setObject(this),
      "context" in i.data.statement || i.setContext(this),
      i
    );
  }),
  (H5P.EventDispatcher.prototype.triggerXAPICompleted = function (e, t, i) {
    this.triggerXAPIScored(e, t, "completed", !0, i);
  }),
  (H5P.EventDispatcher.prototype.triggerXAPIScored = function (e, t, i, n, r) {
    i = this.createXAPIEventTemplate(i);
    (i.setScoredResult(e, t, this, n, r), 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 (e) {
    var t, i;
    ("completed" !== e.getVerb() && "answered" !== e.getVerb()) ||
      e.getVerifiedStatementValue(["context", "contextActivities", "parent"]) ||
      ((t = e.getScore()),
      (i = e.getMaxScore()),
      (e = e.getVerifiedStatementValue([
        "object",
        "definition",
        "extensions",
        "http://h5p.org/x-api/h5p-local-content-id",
      ])),
      H5P.setFinished(e, t, i));
  }) /*!@license js/h5p-content-type.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ContentType = function (e) {
    function t() {}
    return (
      ((t.prototype = new H5P.EventDispatcher()).isRoot = function () {
        return e;
      }),
      (t.prototype.getLibraryFilePath = function (e) {
        return (
          H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces) + "/" + e
        );
      }),
      t
    );
  }) /*!@license js/h5p-confirmation-dialog.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/,
  (H5P.ConfirmationDialog = (function (k) {
    "use strict";
    function e(i) {
      k.call(this);
      var n = this;
      H5P.ConfirmationDialog.uniqueId += 1;
      var e = H5P.ConfirmationDialog.uniqueId;
      function t(e) {
        (n.hide(), n.trigger("confirmed"), e.preventDefault());
      }
      function r(e) {
        (n.hide(), n.trigger("canceled"), e.preventDefault());
      }
      function o(e, t) {
        (e.focus(), t.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 (e) {
            u.classList.add(e);
          }),
        u.setAttribute("role", "dialog"),
        u.setAttribute(
          "aria-labelledby",
          "h5p-confirmation-dialog-dialog-text-" + e,
        ),
        c.appendChild(u),
        u.addEventListener("keydown", function (e) {
          27 === e.which && r(e);
        }));
      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-" + e),
        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 g,
        m,
        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", r),
        p.addEventListener("keydown", function (e) {
          32 === e.which ? r(e) : 9 === e.which && e.shiftKey && o(f, e);
        }),
        i.hideCancel ? d.classList.add("center") : d.appendChild(p),
        f.addEventListener("click", t),
        f.addEventListener("keydown", function (e) {
          32 === e.which
            ? t(e)
            : 9 !== e.which || e.shiftKey || o(i.hideCancel ? f : p, e);
        }),
        d.appendChild(f),
        h.addEventListener("click", r),
        h.addEventListener("keydown", function (e) {
          32 === e.which && r(e);
        }),
        i.hideExit || u.appendChild(h));
      var v,
        b = [],
        y = [];
      this.appendTo = function (e) {
        return ((g = e), this);
      };
      var _ = function (e) {
          c.contains(e.target) || (e.preventDefault(), f.focus());
        },
        w = function (e) {
          for (
            var t = [], i = e.parentNode.children, n = 0;
            n < i.length;
            n += 1
          )
            ((t[n] = !!i[n].getAttribute("aria-hidden")),
              i[n] !== e && i[n].setAttribute("aria-hidden", !0));
          return t;
        },
        x = function (e, t) {
          for (var i = e.parentNode.children, n = 0; n < i.length; n += 1)
            i[n] === e || t[n] || i[n].removeAttribute("aria-hidden");
        };
      ((this.show = function (e) {
        var t;
        return (
          (v = document.activeElement),
          g.appendChild(c),
          (m = g.parentNode || g).addEventListener("focus", _, !0),
          (b = w(g)),
          (y = w(c)),
          c.classList.remove("hidden"),
          (t = e),
          (e = parseInt(u.style.top, 10)),
          (e =
            (e = (e = void 0 !== t ? t : e) || 0) + u.offsetHeight >
            g.offsetHeight
              ? g.offsetHeight - u.offsetHeight - a
              : e) -
            s <=
            0 && ((e = s + a), (l = !0)),
          (u.style.top = e + "px"),
          setTimeout(function () {
            (u.classList.remove("hidden"),
              c.classList.remove("hiding"),
              setTimeout(function () {
                var e;
                (f.focus(),
                  l &&
                    i.instance &&
                    ((e = parseInt(u.offsetHeight, 10) + s + 2 * a),
                    n.setViewPortMinimumHeight(e),
                    i.instance.trigger("resize"),
                    (l = !1)));
              }, 100));
          }, 0),
          this
        );
      }),
        (this.hide = function () {
          return (
            c.classList.add("hiding"),
            u.classList.add("hidden"),
            m.removeAttribute("aria-hidden"),
            m.removeEventListener("focus", _, !0),
            i.skipRestoreFocus || v.focus(),
            x(g, b),
            x(c, y),
            setTimeout(function () {
              (c.classList.add("hidden"),
                g.removeChild(c),
                n.setViewPortMinimumHeight(null));
            }, 100),
            this
          );
        }),
        (this.getElement = function () {
          return u;
        }),
        (this.getPreviouslyFocused = function () {
          return v;
        }),
        (this.setViewPortMinimumHeight = function (e) {
          (
            document.querySelector(".h5p-container") || document.body
          ).style.minHeight = "number" == typeof e ? e + "px" : e;
        }));
    }
    return ((e.prototype = Object.create(k.prototype)).constructor = e);
  })(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 e(e) {
      i.call(this);
      function t(e, t) {
        function i() {
          n.trigger(e);
        }
        (H5P.jQuery("<li/>", {
          class: "h5p-button h5p-noselect h5p-" + (t || e),
          role: "button",
          tabindex: 0,
          title: H5P.t(e + "Description"),
          html: H5P.t(e),
          on: {
            click: i,
            keypress: function (e) {
              32 === e.which && (i(), e.preventDefault());
            },
          },
          appendTo: o,
        }),
          (r = !0));
      }
      var n = this,
        r = !1,
        o = H5P.jQuery('<ul class="h5p-actions"></ul>');
      ((e.export || e.copy) && t("reuse", "export"),
        e.copyright && t("copyrights"),
        e.embed && t("embed"),
        e.icon &&
          (H5P.jQuery(
            '<li><a class="h5p-link" href="http://h5p.org" target="_blank" title="' +
              H5P.t("h5pDescription") +
              '"></a></li>',
          ).appendTo(o),
          (r = !0)),
        (n.getDOMElement = function () {
          return o;
        }),
        (n.hasActions = function () {
          return r;
        }));
    }
    return ((e.prototype = Object.create(i.prototype)).constructor = e);
  })(
    (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, t) {
    function e(e) {
      (t.call(this),
        (this.processingQueue = !1),
        (this.showToast = (e = e || {}).showToast),
        (this.itemName = "requestQueue"));
    }
    return (
      (e.prototype.add = function (e, t) {
        if (!window.localStorage) return !1;
        let i = this.getStoredRequests();
        return (
          (i = i || []),
          i.push({ url: e, data: t }),
          window.localStorage.setItem(this.itemName, JSON.stringify(i)),
          this.trigger("requestQueued", {
            storedStatements: i,
            processingQueue: this.processingQueue,
          }),
          !0
        );
      }),
      (e.prototype.getStoredRequests = function () {
        if (!window.localStorage) return !1;
        var e = window.localStorage.getItem(this.itemName);
        return e ? JSON.parse(e) : [];
      }),
      (e.prototype.clearQueue = function () {
        return (
          !!window.localStorage &&
          (window.localStorage.removeItem(this.itemName), !0)
        );
      }),
      (e.prototype.resumeQueue = function () {
        if (!H5PIntegration || !window.navigator || !window.localStorage)
          return !1;
        if (this.processingQueue) return !1;
        var e = this.getStoredRequests(),
          t = e.length;
        return (
          this.clearQueue(),
          t
            ? ((this.processingQueue = !0), this.processQueue(e))
            : this.trigger("emptiedQueue", e),
          !0
        );
      }),
      (e.prototype.processQueue = function (e) {
        var t;
        e.length &&
          (this.trigger("processingQueue"),
          (t = e.shift()),
          i
            .post(t.url, t.data)
            .fail(this.onQueuedRequestFail.bind(this, t))
            .always(this.onQueuedRequestProcessed.bind(this, e)));
      }),
      (e.prototype.onQueuedRequestFail = function (e) {
        window.navigator.onLine || this.add(e.url, e.data);
      }),
      (e.prototype.onQueuedRequestProcessed = function (e) {
        e.length
          ? this.processQueue(e)
          : ((this.processingQueue = !1),
            (e = this.getStoredRequests()),
            this.trigger("queueEmptied", e));
      }),
      (e.prototype.displayToastMessage = function (e, t, i) {
        (this.showToast || t) &&
          ((i = H5P.jQuery.extend(
            !0,
            {},
            {
              position: {
                horizontal: "centered",
                vertical: "centered",
                noOverflowX: !0,
              },
            },
            i,
          )),
          H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0], e, i));
      }),
      e
    );
  })(H5P.jQuery, H5P.EventDispatcher)),
  (H5P.OfflineRequestQueue = (function (_, w) {
    return function (e) {
      const i = new _();
      i.clearQueue();
      let n = null;
      const r = [10, 20, 40, 60, 120, 300, 600];
      let o = -1,
        t = null,
        s = !1,
        a = !1,
        l = !1;
      e = e.instance;
      const c = new w({
          headerText: H5P.t("offlineDialogHeader"),
          dialogText: H5P.t("offlineDialogBody"),
          confirmText: H5P.t("offlineDialogRetryButtonLabel"),
          hideCancel: !0,
          hideExit: !0,
          classes: ["offline"],
          instance: e,
          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 (e) {
            if (!e.data || !e.data.processingQueue) {
              if (!s) {
                const t = document.body.querySelector(".h5p-content");
                if (!t) return;
                (c.appendTo(t), t.appendChild(p), (s = !0));
              }
              b();
            }
          }.bind(this),
        ),
        i.on(
          "queueEmptied",
          function (e) {
            e.data && e.data.length
              ? b(!0)
              : (clearInterval(t),
                g(!1),
                (o = -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 () {
                m();
              }, 100));
          }.bind(this),
        ),
        window.addEventListener(
          "online",
          function () {
            m();
          }.bind(this),
        ),
        window.addEventListener(
          "message",
          function (e) {
            window.parent === e.source &&
              "h5p" === e.data.context &&
              "queueRequest" === e.data.action &&
              this.add(e.data.url, e.data.data);
          }.bind(this),
        ));
      const g = function (e) {
          ((l = !l),
            void 0 !== e && (l = e),
            l && a && (c.hide(), (a = !1)),
            l ? p.classList.add("show") : p.classList.remove("show"));
        },
        m = function () {
          (clearInterval(t), g(!0), i.resumeQueue());
        },
        v = function () {
          ((o += 1), o >= r.length && (o = r.length - 1));
        },
        b = function (e) {
          a ||
            (g(!1),
            a ||
              (e
                ? setTimeout(function () {
                    c.show(0);
                  }, 100)
                : c.show(0)),
            (a = !0),
            (n = new Date().getTime()),
            v(),
            clearInterval(t),
            (t = setInterval(y, 100)));
        },
        y = function () {
          var e = new Date().getTime(),
            e = Math.floor((e - n) / 1e3);
          const t = r[o] - e;
          ((d.textContent = t.toString()), t <= 0 && m());
        };
      this.add = function (e, t) {
        if (window.navigator.onLine) return !1;
        i.add(e, t);
      };
    };
  })(H5P.RequestQueue, H5P.ConfirmationDialog)),
  /*!@license H5P.AdvancedText-1.1/text.js by Joubel licensed under unknown license*/ (H5P.AdvancedText =
    (function (n) {
      function e(e, t) {
        n.call(this);
        var i = void 0 === e.text ? "<em>New text</em>" : e.text;
        this.attach = function (e) {
          e.addClass("h5p-advanced-text").html(i);
        };
      }
      return ((e.prototype = Object.create(n.prototype)).constructor = e);
    })((H5P.jQuery, H5P.EventDispatcher))),
  /*!@license H5P.Column-1.16/scripts/h5p-column.js by Joubel licensed under MIT*/ (H5P.Column =
    (function (e) {
      function C(i, s, n) {
        var a,
          l = this;
        (e.call(l),
          void 0 === (i = i || {}).useSeparators && (i.useSeparators = !0),
          (this.contentData = n));
        function t() {
          a = document.createElement("div");
          for (var e = 0; e < i.content.length; e++) {
            var t = i.content[e];
            void 0 !== t.content &&
              (i.useSeparators &&
                v(t.content.library.split(" ")[0], t.useSeparator),
              g(t.content, m(e)));
          }
        }
        var r,
          c = [],
          u = [],
          h = 0,
          o = 0,
          d = [],
          p = function () {
            for (var e = 0, t = 0, i = 0; i < d.length; i++) {
              var n = d[i];
              ((e += n.getScore()), (t += n.getMaxScore()));
            }
            l.triggerXAPIScored(e, t, "completed");
          },
          f = function (t) {
            return function (e) {
              null !== e.getScore() &&
                (void 0 === d[t] && o++,
                (d[t] = e),
                ((e =
                  l.createXAPIEventTemplate(
                    "progressed",
                  )).data.statement.object.definition.extensions[
                  "http://id.tincanapi.com/extension/ending-point"
                ] = t + 1),
                l.trigger(e),
                o === h &&
                  setTimeout(function () {
                    p();
                  }, 0));
            };
          },
          g = function (e, t) {
            var i = document.createElement("div");
            i.classList.add("h5p-column-content");
            var n = e.library.split(" ")[0];
            "H5P.Video" === n && (e.params.visuals.fit = !1);
            var r,
              o,
              t = H5P.newRunnable(e, s, void 0, !0, t);
            ((r = "resize"),
              (o = l),
              t.on(r, function (e) {
                ((o.bubblingUpwards = !0),
                  o.trigger(r, e),
                  (o.bubblingUpwards = !1));
              }),
              C.isTask(t) && (t.on("xAPI", f(h)), h++),
              "H5P.Image" === n &&
                t.on("loaded", function () {
                  l.trigger("resize");
                }),
              c.push(t),
              u.push({
                hasAttached: !1,
                container: i,
                instanceIndex: c.length - 1,
              }),
              a.appendChild(i));
          },
          m = function (e) {
            var t = { parent: l };
            return (
              n.previousState &&
                n.previousState.instances &&
                n.previousState.instances[e] &&
                (t.previousState = n.previousState.instances[e]),
              t
            );
          },
          v = function (e, t) {
            var i,
              n = -1 !== P.indexOf(e);
            (void 0 !== r &&
              ((i = document.createElement("div")),
              n || -1 !== T.indexOf(e)
                ? r
                  ? "disabled" !== t && i.classList.add("h5p-column-ruler")
                  : "enabled" === t &&
                    (i.classList.add("h5p-column-ruler"),
                    i.classList.add("h5p-column-space-before"))
                : r
                  ? "enabled" === t &&
                    (i.classList.add("h5p-column-ruler"),
                    i.classList.add("h5p-column-space-after"))
                  : "enabled" === t
                    ? (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)),
              (r = n || -1 !== S.indexOf(e)));
          };
        ((l.attach = function (e) {
          (void 0 === a && t(),
            u
              .filter(function (e) {
                return !e.hasAttached;
              })
              .forEach(function (e) {
                (c[e.instanceIndex].attach(H5P.jQuery(e.container)),
                  (function (e) {
                    switch (e.libraryInfo.machineName) {
                      case "H5P.CoursePresentation":
                        e.$fullScreenButton && e.$fullScreenButton.remove();
                        break;
                      case "H5P.InteractiveVideo":
                        e.on("controls", function () {
                          e.controls.$fullscreen &&
                            e.controls.$fullscreen.remove();
                        });
                    }
                  })(c[e.instanceIndex]));
              }),
            e.addClass("h5p-column").html("").append(a));
        }),
          (l.getCurrentState = function () {
            var e = n.previousState || {};
            e.instances || (e.instances = []);
            for (var t = 0; t < c.length; t++) {
              var i = c[t];
              (i.getCurrentState instanceof Function ||
                "function" == typeof i.getCurrentState) &&
                (e.instances[t] = i.getCurrentState());
            }
            return e;
          }),
          (l.getXAPIData = function () {
            var e = l.createXAPIEventTemplate("answered");
            return (
              w(e),
              e.setScoredResult(
                l.getScore(),
                l.getMaxScore(),
                l,
                !0,
                l.getScore() === l.getMaxScore(),
              ),
              { statement: e.data.statement, children: k(c) }
            );
          }),
          (l.getScore = function () {
            return c.reduce(function (e, t) {
              return e + (t.getScore ? t.getScore() : 0);
            }, 0);
          }),
          (l.getMaxScore = function () {
            return c.reduce(function (e, t) {
              return e + (t.getMaxScore ? t.getMaxScore() : 0);
            }, 0);
          }),
          (l.getAnswerGiven = function () {
            return c.reduce(function (e, t) {
              return e && (t.getAnswerGiven ? t.getAnswerGiven() : e);
            }, !0);
          }),
          (l.showSolutions = function () {
            c.forEach(function (e) {
              (e.toggleReadSpeaker && e.toggleReadSpeaker(!0),
                e.showSolutions && e.showSolutions(),
                e.toggleReadSpeaker && e.toggleReadSpeaker(!1));
            });
          }),
          (l.resetTask = function () {
            c.forEach(function (e) {
              e.resetTask && e.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 = function (e) {
            e = e.getVerifiedStatementValue(["object", "definition"]);
            H5P.jQuery.extend(e, x());
          },
          x = function () {
            var e = {
              interactionType: "compound",
              type: "http://adlnet.gov/expapi/activities/cmi.interaction",
              description: { "en-US": "" },
            };
            return e;
          },
          k = function (e) {
            return e
              .map(function (e) {
                if ("function" == typeof e.getXAPIData) return e.getXAPIData();
              })
              .filter(function (e) {
                return !!e;
              });
          };
        ((y = "resize"),
          (_ = c),
          (b = l).on(y, function (e) {
            if (!b.bubblingUpwards)
              for (var t = 0; t < _.length; t++) _[t].trigger(y, e);
          }),
          void 0 === a && t(),
          l.setActivityStarted());
      }
      C.prototype = Object.create(e.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",
      ];
      (C.prototype.constructor = C).isTask = function (e) {
        if (void 0 !== e.isTask) return e.isTask;
        for (var t = 0; t < i.length; t++)
          if (e.libraryInfo.machineName === i[t]) return !0;
        return !1;
      };
      var P = [
          "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",
        ],
        T = ["H5P.SingleChoiceSet"],
        S = [
          "H5P.CoursePresentation",
          "H5P.Dialogcards",
          "H5P.GuessTheAnswer",
          "H5P.ImageSlider",
        ];
      return C;
    })(H5P.EventDispatcher)),
  (function (n) {
    ((H5P.Image = function (e, t, i) {
      (H5P.EventDispatcher.call(this),
        (this.extras = i),
        void 0 !== e.file && e.file instanceof Object
          ? ((this.source = H5P.getPath(e.file.path, t)),
            (this.width = e.file.width),
            (this.height = e.file.height))
          : (this.placeholder = !0),
        (this.alt =
          e.decorative || void 0 === e.alt
            ? ""
            : this.stripHTML(this.htmlDecode(e.alt))),
        void 0 !== e.title &&
          (this.title = this.stripHTML(this.htmlDecode(e.title))));
    }),
      (H5P.Image.prototype = Object.create(H5P.EventDispatcher.prototype)),
      (H5P.Image.prototype.constructor = H5P.Image),
      (H5P.Image.prototype.attach = function (e) {
        var t = this,
          i = this.source;
        (void 0 === t.$img &&
          (t.placeholder
            ? (t.$img = n("<div>", {
                width: "100%",
                height: "100%",
                class: "h5p-placeholder",
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))
            : (t.$img = n("<img>", {
                width: "100%",
                height: "100%",
                src: i,
                alt: this.alt,
                title: void 0 === this.title ? "" : this.title,
                on: {
                  load: function () {
                    t.trigger("loaded");
                  },
                },
              }))),
          e.addClass("h5p-image").html(t.$img));
      }),
      (H5P.Image.prototype.htmlDecode = function (e) {
        return new DOMParser().parseFromString(e, "text/html").documentElement
          .textContent;
      }),
      (H5P.Image.prototype.stripHTML = function (e) {
        const t = document.createElement("div");
        return ((t.innerHTML = e), t.textContent || t.innerText || "");
      }),
      H5P.Image);
  })((H5P = H5P || {}).jQuery));
/*!@license jQuery.ui-1.10/h5p-jquery-ui.js by Jupiter licensed under MIT*/ var oldJQuery =
    jQuery,
  jQuery = H5P.jQuery;
(!(function (e) {
  "use strict";
  "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery);
})(function (Y) {
  "use strict";
  Y.ui = Y.ui || {};
  Y.ui.version = "1.13.0";
  var r,
    i = 0,
    s = Array.prototype.hasOwnProperty,
    a = Array.prototype.slice;
  ((Y.cleanData =
    ((r = Y.cleanData),
    function (e) {
      for (var t, i, n = 0; null != (i = e[n]); n++)
        (t = Y._data(i, "events")) && t.remove && Y(i).triggerHandler("remove");
      r(e);
    })),
    (Y.widget = function (e, i, t) {
      var n,
        r,
        o,
        s = {},
        a = e.split(".")[0],
        l = a + "-" + (e = e.split(".")[1]);
      return (
        t || ((t = i), (i = Y.Widget)),
        Array.isArray(t) && (t = Y.extend.apply(null, [{}].concat(t))),
        (Y.expr.pseudos[l.toLowerCase()] = function (e) {
          return !!Y.data(e, l);
        }),
        (Y[a] = Y[a] || {}),
        (n = Y[a][e]),
        (r = Y[a][e] =
          function (e, t) {
            if (!this._createWidget) return new r(e, t);
            arguments.length && this._createWidget(e, t);
          }),
        Y.extend(r, n, {
          version: t.version,
          _proto: Y.extend({}, t),
          _childConstructors: [],
        }),
        ((o = new i()).options = Y.widget.extend({}, o.options)),
        Y.each(t, function (t, n) {
          function r() {
            return i.prototype[t].apply(this, arguments);
          }
          function o(e) {
            return i.prototype[t].apply(this, e);
          }
          s[t] =
            "function" == typeof n
              ? function () {
                  var e,
                    t = this._super,
                    i = this._superApply;
                  return (
                    (this._super = r),
                    (this._superApply = o),
                    (e = n.apply(this, arguments)),
                    (this._super = t),
                    (this._superApply = i),
                    e
                  );
                }
              : n;
        }),
        (r.prototype = Y.widget.extend(
          o,
          { widgetEventPrefix: (n && o.widgetEventPrefix) || e },
          s,
          {
            constructor: r,
            namespace: a,
            widgetName: e,
            widgetFullName: l,
          },
        )),
        n
          ? (Y.each(n._childConstructors, function (e, t) {
              var i = t.prototype;
              Y.widget(i.namespace + "." + i.widgetName, r, t._proto);
            }),
            delete n._childConstructors)
          : i._childConstructors.push(r),
        Y.widget.bridge(e, r),
        r
      );
    }),
    (Y.widget.extend = function (e) {
      for (var t, i, n = a.call(arguments, 1), r = 0, o = n.length; r < o; r++)
        for (t in n[r])
          ((i = n[r][t]),
            s.call(n[r], t) &&
              void 0 !== i &&
              (Y.isPlainObject(i)
                ? (e[t] = Y.isPlainObject(e[t])
                    ? Y.widget.extend({}, e[t], i)
                    : Y.widget.extend({}, i))
                : (e[t] = i)));
      return e;
    }),
    (Y.widget.bridge = function (o, t) {
      var s = t.prototype.widgetFullName || o;
      Y.fn[o] = function (i) {
        var e = "string" == typeof i,
          n = a.call(arguments, 1),
          r = this;
        return (
          e
            ? this.length || "instance" !== i
              ? this.each(function () {
                  var e,
                    t = Y.data(this, s);
                  return "instance" === i
                    ? ((r = t), !1)
                    : t
                      ? "function" != typeof t[i] || "_" === i.charAt(0)
                        ? Y.error(
                            "no such method '" +
                              i +
                              "' for " +
                              o +
                              " widget instance",
                          )
                        : (e = t[i].apply(t, n)) !== t && void 0 !== e
                          ? ((r = e && e.jquery ? r.pushStack(e.get()) : e), !1)
                          : void 0
                      : Y.error(
                          "cannot call methods on " +
                            o +
                            " prior to initialization; attempted to call method '" +
                            i +
                            "'",
                        );
                })
              : (r = void 0)
            : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
              this.each(function () {
                var e = Y.data(this, s);
                e
                  ? (e.option(i || {}), e._init && e._init())
                  : Y.data(this, s, new t(i, this));
              })),
          r
        );
      };
    }),
    (Y.Widget = function () {}),
    (Y.Widget._childConstructors = []),
    (Y.Widget.prototype = {
      widgetName: "widget",
      widgetEventPrefix: "",
      defaultElement: "<div>",
      options: { classes: {}, disabled: !1, create: null },
      _createWidget: function (e, t) {
        ((t = Y(t || this.defaultElement || this)[0]),
          (this.element = Y(t)),
          (this.uuid = i++),
          (this.eventNamespace = "." + this.widgetName + this.uuid),
          (this.bindings = Y()),
          (this.hoverable = Y()),
          (this.focusable = Y()),
          (this.classesElementLookup = {}),
          t !== this &&
            (Y.data(t, this.widgetFullName, this),
            this._on(!0, this.element, {
              remove: function (e) {
                e.target === t && this.destroy();
              },
            }),
            (this.document = Y(t.style ? t.ownerDocument : t.document || t)),
            (this.window = Y(
              this.document[0].defaultView || this.document[0].parentWindow,
            ))),
          (this.options = Y.widget.extend(
            {},
            this.options,
            this._getCreateOptions(),
            e,
          )),
          this._create(),
          this.options.disabled &&
            this._setOptionDisabled(this.options.disabled),
          this._trigger("create", null, this._getCreateEventData()),
          this._init());
      },
      _getCreateOptions: function () {
        return {};
      },
      _getCreateEventData: Y.noop,
      _create: Y.noop,
      _init: Y.noop,
      destroy: function () {
        var i = this;
        (this._destroy(),
          Y.each(this.classesElementLookup, function (e, t) {
            i._removeClass(t, e);
          }),
          this.element.off(this.eventNamespace).removeData(this.widgetFullName),
          this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),
          this.bindings.off(this.eventNamespace));
      },
      _destroy: Y.noop,
      widget: function () {
        return this.element;
      },
      option: function (e, t) {
        var i,
          n,
          r,
          o = e;
        if (0 === arguments.length) return Y.widget.extend({}, this.options);
        if ("string" == typeof e)
          if (((o = {}), (e = (i = e.split(".")).shift()), i.length)) {
            for (
              n = o[e] = Y.widget.extend({}, this.options[e]), r = 0;
              r < i.length - 1;
              r++
            )
              ((n[i[r]] = n[i[r]] || {}), (n = n[i[r]]));
            if (((e = i.pop()), 1 === arguments.length))
              return void 0 === n[e] ? null : n[e];
            n[e] = t;
          } else {
            if (1 === arguments.length)
              return void 0 === this.options[e] ? null : this.options[e];
            o[e] = t;
          }
        return (this._setOptions(o), this);
      },
      _setOptions: function (e) {
        for (var t in e) this._setOption(t, e[t]);
        return this;
      },
      _setOption: function (e, t) {
        return (
          "classes" === e && this._setOptionClasses(t),
          (this.options[e] = t),
          "disabled" === e && this._setOptionDisabled(t),
          this
        );
      },
      _setOptionClasses: function (e) {
        var t, i, n;
        for (t in e)
          ((n = this.classesElementLookup[t]),
            e[t] !== this.options.classes[t] &&
              n &&
              n.length &&
              ((i = Y(n.get())),
              this._removeClass(n, t),
              i.addClass(
                this._classes({
                  element: i,
                  keys: t,
                  classes: e,
                  add: !0,
                }),
              )));
      },
      _setOptionDisabled: function (e) {
        (this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !!e,
        ),
          e &&
            (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 (r) {
        var o = [],
          s = this;
        function e(e, t) {
          for (var i, n = 0; n < e.length; n++)
            ((i = s.classesElementLookup[e[n]] || Y()),
              (i = r.add
                ? (r.element.each(function (e, t) {
                    Y.map(s.classesElementLookup, function (e) {
                      return e;
                    }).some(function (e) {
                      return e.is(t);
                    }) || s._on(Y(t), { remove: "_untrackClassesElement" });
                  }),
                  Y(Y.uniqueSort(i.get().concat(r.element.get()))))
                : Y(i.not(r.element).get())),
              (s.classesElementLookup[e[n]] = i),
              o.push(e[n]),
              t && r.classes[e[n]] && o.push(r.classes[e[n]]));
        }
        return (
          (r = Y.extend(
            {
              element: this.element,
              classes: this.options.classes || {},
            },
            r,
          )).keys && e(r.keys.match(/\S+/g) || [], !0),
          r.extra && e(r.extra.match(/\S+/g) || []),
          o.join(" ")
        );
      },
      _untrackClassesElement: function (i) {
        var n = this;
        (Y.each(n.classesElementLookup, function (e, t) {
          -1 !== Y.inArray(i.target, t) &&
            (n.classesElementLookup[e] = Y(t.not(i.target).get()));
        }),
          this._off(Y(i.target)));
      },
      _removeClass: function (e, t, i) {
        return this._toggleClass(e, t, i, !1);
      },
      _addClass: function (e, t, i) {
        return this._toggleClass(e, t, i, !0);
      },
      _toggleClass: function (e, t, i, n) {
        var r = "string" == typeof e || null === e,
          i = {
            extra: r ? t : i,
            keys: r ? e : t,
            element: r ? this.element : e,
            add: (n = "boolean" == typeof n ? n : i),
          };
        return (i.element.toggleClass(this._classes(i), n), this);
      },
      _on: function (r, o, e) {
        var s,
          a = this;
        ("boolean" != typeof r && ((e = o), (o = r), (r = !1)),
          e
            ? ((o = s = Y(o)), (this.bindings = this.bindings.add(o)))
            : ((e = o), (o = this.element), (s = this.widget())),
          Y.each(e, function (e, t) {
            function i() {
              if (
                r ||
                (!0 !== a.options.disabled &&
                  !Y(this).hasClass("ui-state-disabled"))
              )
                return ("string" == typeof t ? a[t] : t).apply(a, arguments);
            }
            "string" != typeof t &&
              (i.guid = t.guid = t.guid || i.guid || Y.guid++);
            var n = e.match(/^([\w:-]*)\s*(.*)$/),
              e = n[1] + a.eventNamespace,
              n = n[2];
            n ? s.on(e, n, i) : o.on(e, i);
          }));
      },
      _off: function (e, t) {
        ((t =
          (t || "").split(" ").join(this.eventNamespace + " ") +
          this.eventNamespace),
          e.off(t),
          (this.bindings = Y(this.bindings.not(e).get())),
          (this.focusable = Y(this.focusable.not(e).get())),
          (this.hoverable = Y(this.hoverable.not(e).get())));
      },
      _delay: function (e, t) {
        var i = this;
        return setTimeout(function () {
          return ("string" == typeof e ? i[e] : e).apply(i, arguments);
        }, t || 0);
      },
      _hoverable: function (e) {
        ((this.hoverable = this.hoverable.add(e)),
          this._on(e, {
            mouseenter: function (e) {
              this._addClass(Y(e.currentTarget), null, "ui-state-hover");
            },
            mouseleave: function (e) {
              this._removeClass(Y(e.currentTarget), null, "ui-state-hover");
            },
          }));
      },
      _focusable: function (e) {
        ((this.focusable = this.focusable.add(e)),
          this._on(e, {
            focusin: function (e) {
              this._addClass(Y(e.currentTarget), null, "ui-state-focus");
            },
            focusout: function (e) {
              this._removeClass(Y(e.currentTarget), null, "ui-state-focus");
            },
          }));
      },
      _trigger: function (e, t, i) {
        var n,
          r,
          o = this.options[e];
        if (
          ((i = i || {}),
          ((t = Y.Event(t)).type = (
            e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e
          ).toLowerCase()),
          (t.target = this.element[0]),
          (r = t.originalEvent))
        )
          for (n in r) n in t || (t[n] = r[n]);
        return (
          this.element.trigger(t, i),
          !(
            ("function" == typeof o &&
              !1 === o.apply(this.element[0], [t].concat(i))) ||
            t.isDefaultPrevented()
          )
        );
      },
    }),
    Y.each({ show: "fadeIn", hide: "fadeOut" }, function (o, s) {
      Y.Widget.prototype["_" + o] = function (t, e, i) {
        var n,
          r = (e = "string" == typeof e ? { effect: e } : e)
            ? (!0 !== e && "number" != typeof e && e.effect) || s
            : o;
        ("number" == typeof (e = e || {})
          ? (e = { duration: e })
          : !0 === e && (e = {}),
          (n = !Y.isEmptyObject(e)),
          (e.complete = i),
          e.delay && t.delay(e.delay),
          n && Y.effects && Y.effects.effect[r]
            ? t[o](e)
            : r !== o && t[r]
              ? t[r](e.duration, e.easing, i)
              : t.queue(function (e) {
                  (Y(this)[o](), i && i.call(t[0]), e());
                }));
      };
    }));
  var n, x, k, o, l, c, u, h, C;
  Y.widget;
  function P(e, t, i) {
    return [
      parseFloat(e[0]) * (h.test(e[0]) ? t / 100 : 1),
      parseFloat(e[1]) * (h.test(e[1]) ? i / 100 : 1),
    ];
  }
  function T(e, t) {
    return parseInt(Y.css(e, t), 10) || 0;
  }
  function S(e) {
    return null != e && e === e.window;
  }
  ((x = Math.max),
    (k = Math.abs),
    (o = /left|center|right/),
    (l = /top|center|bottom/),
    (c = /[\+\-]\d+(\.[\d]+)?%?/),
    (u = /^\w+/),
    (h = /%$/),
    (C = Y.fn.position),
    (Y.position = {
      scrollbarWidth: function () {
        if (void 0 !== n) return n;
        var e,
          t = Y(
            "<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>",
          ),
          i = t.children()[0];
        return (
          Y("body").append(t),
          (e = i.offsetWidth),
          t.css("overflow", "scroll"),
          e === (i = i.offsetWidth) && (i = t[0].clientWidth),
          t.remove(),
          (n = e - i)
        );
      },
      getScrollInfo: function (e) {
        var t = e.isWindow || e.isDocument ? "" : e.element.css("overflow-x"),
          i = e.isWindow || e.isDocument ? "" : e.element.css("overflow-y"),
          t =
            "scroll" === t ||
            ("auto" === t && e.width < e.element[0].scrollWidth);
        return {
          width:
            "scroll" === i ||
            ("auto" === i && e.height < e.element[0].scrollHeight)
              ? Y.position.scrollbarWidth()
              : 0,
          height: t ? Y.position.scrollbarWidth() : 0,
        };
      },
      getWithinInfo: function (e) {
        var t = Y(e || window),
          i = S(t[0]),
          n = !!t[0] && 9 === t[0].nodeType;
        return {
          element: t,
          isWindow: i,
          isDocument: n,
          offset: !i && !n ? Y(e).offset() : { left: 0, top: 0 },
          scrollLeft: t.scrollLeft(),
          scrollTop: t.scrollTop(),
          width: t.outerWidth(),
          height: t.outerHeight(),
        };
      },
    }),
    (Y.fn.position = function (h) {
      if (!h || !h.of) return C.apply(this, arguments);
      var d,
        p,
        f,
        g,
        m,
        e,
        v =
          "string" == typeof (h = Y.extend({}, h)).of
            ? Y(document).find(h.of)
            : Y(h.of),
        b = Y.position.getWithinInfo(h.within),
        y = Y.position.getScrollInfo(b),
        _ = (h.collision || "flip").split(" "),
        w = {},
        t =
          9 === (e = (t = v)[0]).nodeType
            ? {
                width: t.width(),
                height: t.height(),
                offset: { top: 0, left: 0 },
              }
            : S(e)
              ? {
                  width: t.width(),
                  height: t.height(),
                  offset: { top: t.scrollTop(), left: t.scrollLeft() },
                }
              : e.preventDefault
                ? {
                    width: 0,
                    height: 0,
                    offset: { top: e.pageY, left: e.pageX },
                  }
                : {
                    width: t.outerWidth(),
                    height: t.outerHeight(),
                    offset: t.offset(),
                  };
      return (
        v[0].preventDefault && (h.at = "left top"),
        (p = t.width),
        (f = t.height),
        (m = Y.extend({}, (g = t.offset))),
        Y.each(["my", "at"], function () {
          var e,
            t,
            i = (h[this] || "").split(" ");
          (((i =
            1 === i.length
              ? o.test(i[0])
                ? i.concat(["center"])
                : l.test(i[0])
                  ? ["center"].concat(i)
                  : ["center", "center"]
              : i)[0] = o.test(i[0]) ? i[0] : "center"),
            (i[1] = l.test(i[1]) ? i[1] : "center"),
            (e = c.exec(i[0])),
            (t = c.exec(i[1])),
            (w[this] = [e ? e[0] : 0, t ? t[0] : 0]),
            (h[this] = [u.exec(i[0])[0], u.exec(i[1])[0]]));
        }),
        1 === _.length && (_[1] = _[0]),
        "right" === h.at[0]
          ? (m.left += p)
          : "center" === h.at[0] && (m.left += p / 2),
        "bottom" === h.at[1]
          ? (m.top += f)
          : "center" === h.at[1] && (m.top += f / 2),
        (d = P(w.at, p, f)),
        (m.left += d[0]),
        (m.top += d[1]),
        this.each(function () {
          var i,
            e,
            s = Y(this),
            a = s.outerWidth(),
            l = s.outerHeight(),
            t = T(this, "marginLeft"),
            n = T(this, "marginTop"),
            r = a + t + T(this, "marginRight") + y.width,
            o = l + n + T(this, "marginBottom") + y.height,
            c = Y.extend({}, m),
            u = P(w.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: t, marginTop: n }),
            Y.each(["left", "top"], function (e, t) {
              Y.ui.position[_[e]] &&
                Y.ui.position[_[e]][t](c, {
                  targetWidth: p,
                  targetHeight: f,
                  elemWidth: a,
                  elemHeight: l,
                  collisionPosition: i,
                  collisionWidth: r,
                  collisionHeight: o,
                  offset: [d[0] + u[0], d[1] + u[1]],
                  my: h.my,
                  at: h.at,
                  within: b,
                  elem: s,
                });
            }),
            h.using &&
              (e = function (e) {
                var t = g.left - c.left,
                  i = t + p - a,
                  n = g.top - c.top,
                  r = n + f - l,
                  o = {
                    target: {
                      element: v,
                      left: g.left,
                      top: g.top,
                      width: p,
                      height: f,
                    },
                    element: {
                      element: s,
                      left: c.left,
                      top: c.top,
                      width: a,
                      height: l,
                    },
                    horizontal: i < 0 ? "left" : 0 < t ? "right" : "center",
                    vertical: r < 0 ? "top" : 0 < n ? "bottom" : "middle",
                  };
                (p < a && k(t + i) < p && (o.horizontal = "center"),
                  f < l && k(n + r) < f && (o.vertical = "middle"),
                  x(k(t), k(i)) > x(k(n), k(r))
                    ? (o.important = "horizontal")
                    : (o.important = "vertical"),
                  h.using.call(this, e, o));
              }),
            s.offset(Y.extend(c, { using: e })));
        })
      );
    }),
    (Y.ui.position = {
      fit: {
        left: function (e, t) {
          var i = t.within,
            n = i.isWindow ? i.scrollLeft : i.offset.left,
            r = i.width,
            o = e.left - t.collisionPosition.marginLeft,
            s = n - o,
            a = o + t.collisionWidth - r - n;
          t.collisionWidth > r
            ? 0 < s && a <= 0
              ? ((i = e.left + s + t.collisionWidth - r - n), (e.left += s - i))
              : (e.left =
                  !(0 < a && s <= 0) && a < s ? n + r - t.collisionWidth : n)
            : 0 < s
              ? (e.left += s)
              : 0 < a
                ? (e.left -= a)
                : (e.left = x(e.left - o, e.left));
        },
        top: function (e, t) {
          var i = t.within,
            n = i.isWindow ? i.scrollTop : i.offset.top,
            r = t.within.height,
            o = e.top - t.collisionPosition.marginTop,
            s = n - o,
            a = o + t.collisionHeight - r - n;
          t.collisionHeight > r
            ? 0 < s && a <= 0
              ? ((i = e.top + s + t.collisionHeight - r - n), (e.top += s - i))
              : (e.top =
                  !(0 < a && s <= 0) && a < s ? n + r - t.collisionHeight : n)
            : 0 < s
              ? (e.top += s)
              : 0 < a
                ? (e.top -= a)
                : (e.top = x(e.top - o, e.top));
        },
      },
      flip: {
        left: function (e, t) {
          var i = t.within,
            n = i.offset.left + i.scrollLeft,
            r = i.width,
            o = i.isWindow ? i.scrollLeft : i.offset.left,
            s = e.left - t.collisionPosition.marginLeft,
            a = s - o,
            l = s + t.collisionWidth - r - o,
            c =
              "left" === t.my[0]
                ? -t.elemWidth
                : "right" === t.my[0]
                  ? t.elemWidth
                  : 0,
            i =
              "left" === t.at[0]
                ? t.targetWidth
                : "right" === t.at[0]
                  ? -t.targetWidth
                  : 0,
            s = -2 * t.offset[0];
          a < 0
            ? ((n = e.left + c + i + s + t.collisionWidth - r - n) < 0 ||
                n < k(a)) &&
              (e.left += c + i + s)
            : 0 < l &&
              (0 <
                (o = e.left - t.collisionPosition.marginLeft + c + i + s - o) ||
                k(o) < l) &&
              (e.left += c + i + s);
        },
        top: function (e, t) {
          var i = t.within,
            n = i.offset.top + i.scrollTop,
            r = i.height,
            o = i.isWindow ? i.scrollTop : i.offset.top,
            s = e.top - t.collisionPosition.marginTop,
            a = s - o,
            l = s + t.collisionHeight - r - o,
            c =
              "top" === t.my[1]
                ? -t.elemHeight
                : "bottom" === t.my[1]
                  ? t.elemHeight
                  : 0,
            i =
              "top" === t.at[1]
                ? t.targetHeight
                : "bottom" === t.at[1]
                  ? -t.targetHeight
                  : 0,
            s = -2 * t.offset[1];
          a < 0
            ? ((n = e.top + c + i + s + t.collisionHeight - r - n) < 0 ||
                n < k(a)) &&
              (e.top += c + i + s)
            : 0 < l &&
              (0 <
                (o = e.top - t.collisionPosition.marginTop + c + i + s - o) ||
                k(o) < l) &&
              (e.top += c + i + s);
        },
      },
      flipfit: {
        left: function () {
          (Y.ui.position.flip.left.apply(this, arguments),
            Y.ui.position.fit.left.apply(this, arguments));
        },
        top: function () {
          (Y.ui.position.flip.top.apply(this, arguments),
            Y.ui.position.fit.top.apply(this, arguments));
        },
      },
    }));
  (Y.ui.position,
    Y.extend(Y.expr.pseudos, {
      data: Y.expr.createPseudo
        ? Y.expr.createPseudo(function (t) {
            return function (e) {
              return !!Y.data(e, t);
            };
          })
        : function (e, t, i) {
            return !!Y.data(e, i[3]);
          },
    }),
    Y.fn.extend({
      disableSelection:
        ((e =
          "onselectstart" in document.createElement("div")
            ? "selectstart"
            : "mousedown"),
        function () {
          return this.on(e + ".ui-disableSelection", function (e) {
            e.preventDefault();
          });
        }),
      enableSelection: function () {
        return this.off(".ui-disableSelection");
      },
    }));
  var e,
    d = Y,
    p = {},
    t = p.toString,
    f = /^([\-+])=\s*(\d+\.?\d*)/,
    g = [
      {
        re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (e) {
          return [e[1], e[2], e[3], e[4]];
        },
      },
      {
        re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
        parse: function (e) {
          return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]];
        },
      },
      {
        re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
        parse: function (e) {
          return [
            parseInt(e[1], 16),
            parseInt(e[2], 16),
            parseInt(e[3], 16),
            e[4] ? (parseInt(e[4], 16) / 255).toFixed(2) : 1,
          ];
        },
      },
      {
        re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
        parse: function (e) {
          return [
            parseInt(e[1] + e[1], 16),
            parseInt(e[2] + e[2], 16),
            parseInt(e[3] + e[3], 16),
            e[4] ? (parseInt(e[4] + e[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 (e) {
          return [e[1], e[2] / 100, e[3] / 100, e[4]];
        },
      },
    ],
    m = (d.Color = function (e, t, i, n) {
      return new d.Color.fn.parse(e, t, 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 = (m.support = {}),
    _ = d("<p>")[0],
    w = d.each;
  function H(e) {
    return null == e
      ? e + ""
      : "object" == typeof e
        ? p[t.call(e)] || "object"
        : typeof e;
  }
  function D(e, t, i) {
    var n = b[t.type] || {};
    return null == e
      ? i || !t.def
        ? null
        : t.def
      : ((e = n.floor ? ~~e : parseFloat(e)),
        isNaN(e)
          ? t.def
          : n.mod
            ? (e + n.mod) % n.mod
            : Math.min(n.max, Math.max(0, e)));
  }
  function E(n) {
    var r = m(),
      o = (r._rgba = []);
    return (
      (n = n.toLowerCase()),
      w(g, function (e, t) {
        var i = t.re.exec(n),
          i = i && t.parse(i),
          t = t.space || "rgba";
        if (i)
          return (
            (i = r[t](i)),
            (r[v[t].cache] = i[v[t].cache]),
            (o = r._rgba = i._rgba),
            !1
          );
      }),
      o.length
        ? ("0,0,0,0" === o.join() && d.extend(o, q.transparent), r)
        : q[n]
    );
  }
  function I(e, t, i) {
    return 6 * (i = (i + 1) % 1) < 1
      ? e + (t - e) * i * 6
      : 2 * i < 1
        ? t
        : 3 * i < 2
          ? e + (t - e) * (2 / 3 - i) * 6
          : e;
  }
  ((_.style.cssText = "background-color:rgba(1,1,1,.5)"),
    (y.rgba = -1 < _.style.backgroundColor.indexOf("rgba")),
    w(v, function (e, t) {
      ((t.cache = "_" + e),
        (t.props.alpha = { idx: 3, type: "percent", def: 1 }));
    }),
    d.each(
      "Boolean Number String Function Array Date RegExp Object Error Symbol".split(
        " ",
      ),
      function (e, t) {
        p["[object " + t + "]"] = t.toLowerCase();
      },
    ),
    ((m.fn = d.extend(m.prototype, {
      parse: function (r, e, t, i) {
        if (void 0 === r)
          return ((this._rgba = [null, null, null, null]), this);
        (r.jquery || r.nodeType) && ((r = d(r).css(e)), (e = void 0));
        var o = this,
          n = H(r),
          s = (this._rgba = []);
        return (
          void 0 !== e && ((r = [r, e, t, i]), (n = "array")),
          "string" === n
            ? this.parse(E(r) || q._default)
            : "array" === n
              ? (w(v.rgba.props, function (e, t) {
                  s[t.idx] = D(r[t.idx], t);
                }),
                this)
              : "object" === n
                ? (w(
                    v,
                    r instanceof m
                      ? function (e, t) {
                          r[t.cache] && (o[t.cache] = r[t.cache].slice());
                        }
                      : function (e, i) {
                          var n = i.cache;
                          (w(i.props, function (e, t) {
                            if (!o[n] && i.to) {
                              if ("alpha" === e || null == r[e]) return;
                              o[n] = i.to(o._rgba);
                            }
                            o[n][t.idx] = D(r[e], t, !0);
                          }),
                            o[n] &&
                              d.inArray(null, o[n].slice(0, 3)) < 0 &&
                              (null == o[n][3] && (o[n][3] = 1),
                              i.from && (o._rgba = i.from(o[n]))));
                        },
                  ),
                  this)
                : void 0
        );
      },
      is: function (e) {
        var r = m(e),
          o = !0,
          s = this;
        return (
          w(v, function (e, t) {
            var i,
              n = r[t.cache];
            return (
              n &&
                ((i = s[t.cache] || (t.to && t.to(s._rgba)) || []),
                w(t.props, function (e, t) {
                  if (null != n[t.idx]) return (o = n[t.idx] === i[t.idx]);
                })),
              o
            );
          }),
          o
        );
      },
      _space: function () {
        var i = [],
          n = this;
        return (
          w(v, function (e, t) {
            n[t.cache] && i.push(e);
          }),
          i.pop()
        );
      },
      transition: function (e, s) {
        var t = (c = m(e))._space(),
          i = v[t],
          e = 0 === this.alpha() ? m("transparent") : this,
          a = e[i.cache] || i.to(e._rgba),
          l = a.slice(),
          c = c[i.cache];
        return (
          w(i.props, function (e, t) {
            var i = t.idx,
              n = a[i],
              r = c[i],
              o = b[t.type] || {};
            null !== r &&
              (null === n
                ? (l[i] = r)
                : (o.mod &&
                    (r - n > o.mod / 2
                      ? (n += o.mod)
                      : n - r > o.mod / 2 && (n -= o.mod)),
                  (l[i] = D((r - n) * s + n, t))));
          }),
          this[t](l)
        );
      },
      blend: function (e) {
        if (1 === this._rgba[3]) return this;
        var t = this._rgba.slice(),
          i = t.pop(),
          n = m(e)._rgba;
        return m(
          d.map(t, function (e, t) {
            return (1 - i) * n[t] + i * e;
          }),
        );
      },
      toRgbaString: function () {
        var e = "rgba(",
          t = d.map(this._rgba, function (e, t) {
            return null != e ? e : 2 < t ? 1 : 0;
          });
        return (1 === t[3] && (t.pop(), (e = "rgb(")), e + t.join() + ")");
      },
      toHslaString: function () {
        var e = "hsla(",
          t = d.map(this.hsla(), function (e, t) {
            return (
              null == e && (e = 2 < t ? 1 : 0),
              (e = t && t < 3 ? Math.round(100 * e) + "%" : e)
            );
          });
        return (1 === t[3] && (t.pop(), (e = "hsl(")), e + t.join() + ")");
      },
      toHexString: function (e) {
        var t = this._rgba.slice(),
          i = t.pop();
        return (
          e && t.push(~~(255 * i)),
          "#" +
            d
              .map(t, function (e) {
                return 1 === (e = (e || 0).toString(16)).length ? "0" + e : e;
              })
              .join("")
        );
      },
      toString: function () {
        return 0 === this._rgba[3] ? "transparent" : this.toRgbaString();
      },
    })).parse.prototype = m.fn),
    (v.hsla.to = function (e) {
      if (null == e[0] || null == e[1] || null == e[2])
        return [null, null, null, e[3]];
      var t = e[0] / 255,
        i = e[1] / 255,
        n = e[2] / 255,
        r = e[3],
        o = Math.max(t, i, n),
        s = Math.min(t, i, n),
        a = o - s,
        l = o + s,
        e = 0.5 * l,
        i =
          s === o
            ? 0
            : t === o
              ? (60 * (i - n)) / a + 360
              : i === o
                ? (60 * (n - t)) / a + 120
                : (60 * (t - i)) / a + 240,
        l = 0 == a ? 0 : e <= 0.5 ? a / l : a / (2 - l);
      return [Math.round(i) % 360, l, e, null == r ? 1 : r];
    }),
    (v.hsla.from = function (e) {
      if (null == e[0] || null == e[1] || null == e[2])
        return [null, null, null, e[3]];
      var t = e[0] / 360,
        i = e[1],
        n = e[2],
        e = e[3],
        i = n <= 0.5 ? n * (1 + i) : n + i - n * i,
        n = 2 * n - i;
      return [
        Math.round(255 * I(n, i, t + 1 / 3)),
        Math.round(255 * I(n, i, t)),
        Math.round(255 * I(n, i, t - 1 / 3)),
        e,
      ];
    }),
    w(v, function (l, e) {
      var t = e.props,
        o = e.cache,
        s = e.to,
        a = e.from;
      ((m.fn[l] = function (e) {
        if ((s && !this[o] && (this[o] = s(this._rgba)), void 0 === e))
          return this[o].slice();
        var i = H(e),
          n = "array" === i || "object" === i ? e : arguments,
          r = this[o].slice();
        return (
          w(t, function (e, t) {
            e = n["object" === i ? e : t.idx];
            (null == e && (e = r[t.idx]), (r[t.idx] = D(e, t)));
          }),
          a ? (((e = m(a(r)))[o] = r), e) : m(r)
        );
      }),
        w(t, function (s, a) {
          m.fn[s] ||
            (m.fn[s] = function (e) {
              var t,
                i = H(e),
                n = "alpha" === s ? (this._hsla ? "hsla" : "rgba") : l,
                r = this[n](),
                o = r[a.idx];
              return "undefined" === i
                ? o
                : ("function" === i && (i = H((e = e.call(this, o)))),
                  null == e && a.empty
                    ? this
                    : ("string" === i &&
                        (t = f.exec(e)) &&
                        (e = o + parseFloat(t[2]) * ("+" === t[1] ? 1 : -1)),
                      (r[a.idx] = e),
                      this[n](r)));
            });
        }));
    }),
    (m.hook = function (e) {
      e = e.split(" ");
      w(e, function (e, o) {
        ((d.cssHooks[o] = {
          set: function (e, t) {
            var i,
              n,
              r = "";
            if ("transparent" !== t && ("string" !== H(t) || (i = E(t)))) {
              if (((t = m(i || t)), !y.rgba && 1 !== t._rgba[3])) {
                for (
                  n = "backgroundColor" === o ? e.parentNode : e;
                  ("" === r || "transparent" === r) && n && n.style;

                )
                  try {
                    ((r = d.css(n, "backgroundColor")), (n = n.parentNode));
                  } catch (e) {}
                t = t.blend(r && "transparent" !== r ? r : "_default");
              }
              t = t.toRgbaString();
            }
            try {
              e.style[o] = t;
            } catch (e) {}
          },
        }),
          (d.fx.step[o] = function (e) {
            (e.colorInit ||
              ((e.start = m(e.elem, o)),
              (e.end = m(e.end)),
              (e.colorInit = !0)),
              d.cssHooks[o].set(e.elem, e.start.transition(e.end, e.pos)));
          }));
      });
    })(
      "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
    ),
    (d.cssHooks.borderColor = {
      expand: function (i) {
        var n = {};
        return (
          w(["Top", "Right", "Bottom", "Left"], function (e, t) {
            n["border" + t + "Color"] = i;
          }),
          n
        );
      },
    }));
  var A,
    O,
    M,
    L,
    j,
    N,
    F,
    z,
    R,
    B,
    q = (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",
    }),
    $ = "ui-effects-",
    W = "ui-effects-style",
    U = "ui-effects-animated";
  function V(e) {
    var t,
      i,
      n = e.ownerDocument.defaultView
        ? e.ownerDocument.defaultView.getComputedStyle(e, null)
        : e.currentStyle,
      r = {};
    if (n && n.length && n[0] && n[n[0]])
      for (i = n.length; i--; )
        "string" == typeof n[(t = n[i])] &&
          (r[
            t.replace(/-([\da-z])/gi, function (e, t) {
              return t.toUpperCase();
            })
          ] = n[t]);
    else for (t in n) "string" == typeof n[t] && (r[t] = n[t]);
    return r;
  }
  function Q(e, t, i, n) {
    return (
      (e = { effect: (e = Y.isPlainObject(e) ? (t = e).effect : e) }),
      "function" == typeof (t = null == t ? {} : t) &&
        ((n = t), (i = null), (t = {})),
      ("number" != typeof t && !Y.fx.speeds[t]) || ((n = i), (i = t), (t = {})),
      "function" == typeof i && ((n = i), (i = null)),
      t && Y.extend(e, t),
      (i = i || t.duration),
      (e.duration = Y.fx.off
        ? 0
        : "number" == typeof i
          ? i
          : i in Y.fx.speeds
            ? Y.fx.speeds[i]
            : Y.fx.speeds._default),
      (e.complete = n || t.complete),
      e
    );
  }
  function X(e) {
    return (
      !e ||
      "number" == typeof e ||
      Y.fx.speeds[e] ||
      ("string" == typeof e && !Y.effects.effect[e]) ||
      "function" == typeof e ||
      ("object" == typeof e && !e.effect)
    );
  }
  function Z(e, t) {
    var i = t.outerWidth(),
      t = t.outerHeight(),
      e =
        /^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(
          e,
        ) || ["", 0, i, t, 0];
    return {
      top: parseFloat(e[1]) || 0,
      right: "auto" === e[2] ? i : parseFloat(e[2]),
      bottom: "auto" === e[3] ? t : parseFloat(e[3]),
      left: parseFloat(e[4]) || 0,
    };
  }
  ((Y.effects = { effect: {} }),
    (L = ["add", "remove", "toggle"]),
    (j = {
      border: 1,
      borderBottom: 1,
      borderColor: 1,
      borderLeft: 1,
      borderRight: 1,
      borderTop: 1,
      borderWidth: 1,
      margin: 1,
      padding: 1,
    }),
    Y.each(
      [
        "borderLeftStyle",
        "borderRightStyle",
        "borderBottomStyle",
        "borderTopStyle",
      ],
      function (e, t) {
        Y.fx.step[t] = function (e) {
          (("none" !== e.end && !e.setAttr) || (1 === e.pos && !e.setAttr)) &&
            (d.style(e.elem, t, e.end), (e.setAttr = !0));
        };
      },
    ),
    Y.fn.addBack ||
      (Y.fn.addBack = function (e) {
        return this.add(
          null == e ? this.prevObject : this.prevObject.filter(e),
        );
      }),
    (Y.effects.animateClass = function (r, e, t, i) {
      var o = Y.speed(e, t, i);
      return this.queue(function () {
        var i = Y(this),
          e = i.attr("class") || "",
          t = (t = o.children ? i.find("*").addBack() : i).map(function () {
            return { el: Y(this), start: V(this) };
          }),
          n = function () {
            Y.each(L, function (e, t) {
              r[t] && i[t + "Class"](r[t]);
            });
          };
        (n(),
          (t = t.map(function () {
            return (
              (this.end = V(this.el[0])),
              (this.diff = (function (e, t) {
                var i,
                  n,
                  r = {};
                for (i in t)
                  ((n = t[i]),
                    e[i] !== n &&
                      (j[i] ||
                        (!Y.fx.step[i] && isNaN(parseFloat(n))) ||
                        (r[i] = n)));
                return r;
              })(this.start, this.end)),
              this
            );
          })),
          i.attr("class", e),
          (t = t.map(function () {
            var e = this,
              t = Y.Deferred(),
              i = Y.extend({}, o, {
                queue: !1,
                complete: function () {
                  t.resolve(e);
                },
              });
            return (this.el.animate(this.diff, i), t.promise());
          })),
          Y.when.apply(Y, t.get()).done(function () {
            (n(),
              Y.each(arguments, function () {
                var t = this.el;
                Y.each(this.diff, function (e) {
                  t.css(e, "");
                });
              }),
              o.complete.call(i[0]));
          }));
      });
    }),
    Y.fn.extend({
      addClass:
        ((M = Y.fn.addClass),
        function (e, t, i, n) {
          return t
            ? Y.effects.animateClass.call(this, { add: e }, t, i, n)
            : M.apply(this, arguments);
        }),
      removeClass:
        ((O = Y.fn.removeClass),
        function (e, t, i, n) {
          return 1 < arguments.length
            ? Y.effects.animateClass.call(this, { remove: e }, t, i, n)
            : O.apply(this, arguments);
        }),
      toggleClass:
        ((A = Y.fn.toggleClass),
        function (e, t, i, n, r) {
          return "boolean" == typeof t || void 0 === t
            ? i
              ? Y.effects.animateClass.call(
                  this,
                  t ? { add: e } : { remove: e },
                  i,
                  n,
                  r,
                )
              : A.apply(this, arguments)
            : Y.effects.animateClass.call(this, { toggle: e }, t, i, n);
        }),
      switchClass: function (e, t, i, n, r) {
        return Y.effects.animateClass.call(
          this,
          { add: t, remove: e },
          i,
          n,
          r,
        );
      },
    }),
    Y.expr &&
      Y.expr.pseudos &&
      Y.expr.pseudos.animated &&
      (Y.expr.pseudos.animated =
        ((N = Y.expr.pseudos.animated),
        function (e) {
          return !!Y(e).data(U) || N(e);
        })),
    !1 !== Y.uiBackCompat &&
      Y.extend(Y.effects, {
        save: function (e, t) {
          for (var i = 0, n = t.length; i < n; i++)
            null !== t[i] && e.data($ + t[i], e[0].style[t[i]]);
        },
        restore: function (e, t) {
          for (var i, n = 0, r = t.length; n < r; n++)
            null !== t[n] && ((i = e.data($ + t[n])), e.css(t[n], i));
        },
        setMode: function (e, t) {
          return (t = "toggle" === t ? (e.is(":hidden") ? "show" : "hide") : t);
        },
        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"),
            },
            e = Y("<div></div>").addClass("ui-effects-wrapper").css({
              fontSize: "100%",
              background: "transparent",
              border: "none",
              margin: 0,
              padding: 0,
            }),
            t = { width: i.width(), height: i.height() },
            r = document.activeElement;
          try {
            r.id;
          } catch (e) {
            r = document.body;
          }
          return (
            i.wrap(e),
            (i[0] !== r && !Y.contains(i[0], r)) || Y(r).trigger("focus"),
            (e = i.parent()),
            "static" === i.css("position")
              ? (e.css({ position: "relative" }),
                i.css({ position: "relative" }))
              : (Y.extend(n, {
                  position: i.css("position"),
                  zIndex: i.css("z-index"),
                }),
                Y.each(["top", "left", "bottom", "right"], function (e, t) {
                  ((n[t] = i.css(t)),
                    isNaN(parseInt(n[t], 10)) && (n[t] = "auto"));
                }),
                i.css({
                  position: "relative",
                  top: 0,
                  left: 0,
                  right: "auto",
                  bottom: "auto",
                })),
            i.css(t),
            e.css(n).show()
          );
        },
        removeWrapper: function (e) {
          var t = document.activeElement;
          return (
            e.parent().is(".ui-effects-wrapper") &&
              (e.parent().replaceWith(e),
              (e[0] !== t && !Y.contains(e[0], t)) || Y(t).trigger("focus")),
            e
          );
        },
      }),
    Y.extend(Y.effects, {
      version: "1.13.0",
      define: function (e, t, i) {
        return (
          i || ((i = t), (t = "effect")),
          (Y.effects.effect[e] = i),
          (Y.effects.effect[e].mode = t),
          i
        );
      },
      scaledDimensions: function (e, t, i) {
        if (0 === t)
          return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };
        var n = "horizontal" !== i ? (t || 100) / 100 : 1,
          t = "vertical" !== i ? (t || 100) / 100 : 1;
        return {
          height: e.height() * t,
          width: e.width() * n,
          outerHeight: e.outerHeight() * t,
          outerWidth: e.outerWidth() * n,
        };
      },
      clipToBox: function (e) {
        return {
          width: e.clip.right - e.clip.left,
          height: e.clip.bottom - e.clip.top,
          left: e.clip.left,
          top: e.clip.top,
        };
      },
      unshift: function (e, t, i) {
        var n = e.queue();
        (1 < t && n.splice.apply(n, [1, 0].concat(n.splice(t, i))),
          e.dequeue());
      },
      saveStyle: function (e) {
        e.data(W, e[0].style.cssText);
      },
      restoreStyle: function (e) {
        ((e[0].style.cssText = e.data(W) || ""), e.removeData(W));
      },
      mode: function (e, t) {
        e = e.is(":hidden");
        return (
          "toggle" === t && (t = e ? "show" : "hide"),
          (t = (e ? "hide" === t : "show" === t) ? "none" : t)
        );
      },
      getBaseline: function (e, t) {
        var i, n;
        switch (e[0]) {
          case "top":
            i = 0;
            break;
          case "middle":
            i = 0.5;
            break;
          case "bottom":
            i = 1;
            break;
          default:
            i = e[0] / t.height;
        }
        switch (e[1]) {
          case "left":
            n = 0;
            break;
          case "center":
            n = 0.5;
            break;
          case "right":
            n = 1;
            break;
          default:
            n = e[1] / t.width;
        }
        return { x: n, y: i };
      },
      createPlaceholder: function (e) {
        var t,
          i = e.css("position"),
          n = e.position();
        return (
          e
            .css({
              marginTop: e.css("marginTop"),
              marginBottom: e.css("marginBottom"),
              marginLeft: e.css("marginLeft"),
              marginRight: e.css("marginRight"),
            })
            .outerWidth(e.outerWidth())
            .outerHeight(e.outerHeight()),
          /^(static|relative)/.test(i) &&
            ((i = "absolute"),
            (t = Y("<" + e[0].nodeName + ">")
              .insertAfter(e)
              .css({
                display: /^(inline|ruby)/.test(e.css("display"))
                  ? "inline-block"
                  : "block",
                visibility: "hidden",
                marginTop: e.css("marginTop"),
                marginBottom: e.css("marginBottom"),
                marginLeft: e.css("marginLeft"),
                marginRight: e.css("marginRight"),
                float: e.css("float"),
              })
              .outerWidth(e.outerWidth())
              .outerHeight(e.outerHeight())
              .addClass("ui-effects-placeholder")),
            e.data($ + "placeholder", t)),
          e.css({ position: i, left: n.left, top: n.top }),
          t
        );
      },
      removePlaceholder: function (e) {
        var t = $ + "placeholder",
          i = e.data(t);
        i && (i.remove(), e.removeData(t));
      },
      cleanUp: function (e) {
        (Y.effects.restoreStyle(e), Y.effects.removePlaceholder(e));
      },
      setTransition: function (n, e, r, o) {
        return (
          (o = o || {}),
          Y.each(e, function (e, t) {
            var i = n.cssUnit(t);
            0 < i[0] && (o[t] = i[0] * r + i[1]);
          }),
          o
        );
      },
    }),
    Y.fn.extend({
      effect: function () {
        function e(e) {
          var t = Y(this),
            i = Y.effects.mode(t, a) || o;
          (t.data(U, !0),
            l.push(i),
            o && ("show" === i || (i === o && "hide" === i)) && t.show(),
            (o && "none" === i) || Y.effects.saveStyle(t),
            "function" == typeof e && e());
        }
        var n = Q.apply(this, arguments),
          r = Y.effects.effect[n.effect],
          o = r.mode,
          t = n.queue,
          i = t || "fx",
          s = n.complete,
          a = n.mode,
          l = [];
        return Y.fx.off || !r
          ? a
            ? this[a](n.duration, s)
            : this.each(function () {
                s && s.call(this);
              })
          : !1 === t
            ? this.each(e).each(c)
            : this.queue(i, e).queue(i, c);
        function c(e) {
          var t = Y(this);
          function i() {
            ("function" == typeof s && s.call(t[0]),
              "function" == typeof e && e());
          }
          ((n.mode = l.shift()),
            !1 === Y.uiBackCompat || o
              ? "none" === n.mode
                ? (t[a](), i())
                : r.call(t[0], n, function () {
                    (t.removeData(U),
                      Y.effects.cleanUp(t),
                      "hide" === n.mode && t.hide(),
                      i());
                  })
              : (t.is(":hidden") ? "hide" === a : "show" === a)
                ? (t[a](), i())
                : r.call(t[0], n, i));
        }
      },
      show:
        ((R = Y.fn.show),
        function (e) {
          if (X(e)) return R.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "show"), this.effect.call(this, e));
        }),
      hide:
        ((z = Y.fn.hide),
        function (e) {
          if (X(e)) return z.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "hide"), this.effect.call(this, e));
        }),
      toggle:
        ((F = Y.fn.toggle),
        function (e) {
          if (X(e) || "boolean" == typeof e) return F.apply(this, arguments);
          e = Q.apply(this, arguments);
          return ((e.mode = "toggle"), this.effect.call(this, e));
        }),
      cssUnit: function (e) {
        var i = this.css(e),
          n = [];
        return (
          Y.each(["em", "px", "%", "pt"], function (e, t) {
            0 < i.indexOf(t) && (n = [parseFloat(i), t]);
          }),
          n
        );
      },
      cssClip: function (e) {
        return e
          ? this.css(
              "clip",
              "rect(" +
                e.top +
                "px " +
                e.right +
                "px " +
                e.bottom +
                "px " +
                e.left +
                "px)",
            )
          : Z(this.css("clip"), this);
      },
      transfer: function (e, t) {
        var i = Y(this),
          n = Y(e.to),
          r = "fixed" === n.css("position"),
          o = Y("body"),
          s = r ? o.scrollTop() : 0,
          a = r ? o.scrollLeft() : 0,
          o = n.offset(),
          o = {
            top: o.top - s,
            left: o.left - a,
            height: n.innerHeight(),
            width: n.innerWidth(),
          },
          n = i.offset(),
          l = Y("<div class='ui-effects-transfer'></div>");
        l.appendTo("body")
          .addClass(e.className)
          .css({
            top: n.top - s,
            left: n.left - a,
            height: i.innerHeight(),
            width: i.innerWidth(),
            position: r ? "fixed" : "absolute",
          })
          .animate(o, e.duration, e.easing, function () {
            (l.remove(), "function" == typeof t && t());
          });
      },
    }),
    (Y.fx.step.clip = function (e) {
      (e.clipInit ||
        ((e.start = Y(e.elem).cssClip()),
        "string" == typeof e.end && (e.end = Z(e.end, e.elem)),
        (e.clipInit = !0)),
        Y(e.elem).cssClip({
          top: e.pos * (e.end.top - e.start.top) + e.start.top,
          right: e.pos * (e.end.right - e.start.right) + e.start.right,
          bottom: e.pos * (e.end.bottom - e.start.bottom) + e.start.bottom,
          left: e.pos * (e.end.left - e.start.left) + e.start.left,
        }));
    }),
    (B = {}),
    Y.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, e) {
      B[e] = function (e) {
        return Math.pow(e, t + 2);
      };
    }),
    Y.extend(B, {
      Sine: function (e) {
        return 1 - Math.cos((e * Math.PI) / 2);
      },
      Circ: function (e) {
        return 1 - Math.sqrt(1 - e * e);
      },
      Elastic: function (e) {
        return 0 === e || 1 === e
          ? e
          : -Math.pow(2, 8 * (e - 1)) *
              Math.sin(((80 * (e - 1) - 7.5) * Math.PI) / 15);
      },
      Back: function (e) {
        return e * e * (3 * e - 2);
      },
      Bounce: function (e) {
        for (var t, i = 4; e < ((t = Math.pow(2, --i)) - 1) / 11; );
        return (
          1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2)
        );
      },
    }),
    Y.each(B, function (e, t) {
      ((Y.easing["easeIn" + e] = t),
        (Y.easing["easeOut" + e] = function (e) {
          return 1 - t(1 - e);
        }),
        (Y.easing["easeInOut" + e] = function (e) {
          return e < 0.5 ? t(2 * e) / 2 : 1 - t(-2 * e + 2) / 2;
        }));
    }));
  var _ = Y.effects;
  (Y.effects.define("blind", "hide", function (e, t) {
    var i = {
        up: ["bottom", "top"],
        vertical: ["bottom", "top"],
        down: ["top", "bottom"],
        left: ["right", "left"],
        horizontal: ["right", "left"],
        right: ["left", "right"],
      },
      n = Y(this),
      r = e.direction || "up",
      o = n.cssClip(),
      s = { clip: Y.extend({}, o) },
      a = Y.effects.createPlaceholder(n);
    ((s.clip[i[r][0]] = s.clip[i[r][1]]),
      "show" === e.mode &&
        (n.cssClip(s.clip), a && a.css(Y.effects.clipToBox(s)), (s.clip = o)),
      a && a.animate(Y.effects.clipToBox(s), e.duration, e.easing),
      n.animate(s, {
        queue: !1,
        duration: e.duration,
        easing: e.easing,
        complete: t,
      }));
  }),
    Y.effects.define("bounce", function (e, t) {
      var i,
        n,
        r = Y(this),
        o = e.mode,
        s = "hide" === o,
        a = "show" === o,
        l = e.direction || "up",
        c = e.distance,
        u = e.times || 5,
        o = 2 * u + (a || s ? 1 : 0),
        h = e.duration / o,
        d = e.easing,
        p = "up" === l || "down" === l ? "top" : "left",
        f = "up" === l || "left" === l,
        g = 0,
        e = r.queue().length;
      for (
        Y.effects.createPlaceholder(r),
          l = r.css(p),
          c = c || r["top" == p ? "outerHeight" : "outerWidth"]() / 3,
          a &&
            (((n = { opacity: 1 })[p] = l),
            r
              .css("opacity", 0)
              .css(p, f ? 2 * -c : 2 * c)
              .animate(n, h, d)),
          s && (c /= Math.pow(2, u - 1)),
          (n = {})[p] = l;
        g < u;
        g++
      )
        (((i = {})[p] = (f ? "-=" : "+=") + c),
          r.animate(i, h, d).animate(n, h, d),
          (c = s ? 2 * c : c / 2));
      (s &&
        (((i = { opacity: 0 })[p] = (f ? "-=" : "+=") + c), r.animate(i, h, d)),
        r.queue(t),
        Y.effects.unshift(r, e, 1 + o));
    }),
    Y.effects.define("clip", "hide", function (e, t) {
      var i = {},
        n = Y(this),
        r = e.direction || "vertical",
        o = "both" === r,
        s = o || "horizontal" === r,
        o = o || "vertical" === r,
        r = n.cssClip();
      ((i.clip = {
        top: o ? (r.bottom - r.top) / 2 : r.top,
        right: s ? (r.right - r.left) / 2 : r.right,
        bottom: o ? (r.bottom - r.top) / 2 : r.bottom,
        left: s ? (r.right - r.left) / 2 : r.left,
      }),
        Y.effects.createPlaceholder(n),
        "show" === e.mode && (n.cssClip(i.clip), (i.clip = r)),
        n.animate(i, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    Y.effects.define("drop", "hide", function (e, t) {
      var i = Y(this),
        n = "show" === e.mode,
        r = e.direction || "left",
        o = "up" === r || "down" === r ? "top" : "left",
        s = "up" === r || "left" === r ? "-=" : "+=",
        a = "+=" == s ? "-=" : "+=",
        l = { opacity: 0 };
      (Y.effects.createPlaceholder(i),
        (r =
          e.distance || i["top" == o ? "outerHeight" : "outerWidth"](!0) / 2),
        (l[o] = s + r),
        n && (i.css(l), (l[o] = a + r), (l.opacity = 1)),
        i.animate(l, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    Y.effects.define("explode", "hide", function (e, t) {
      var i,
        n,
        r,
        o,
        s,
        a,
        l = e.pieces ? Math.round(Math.sqrt(e.pieces)) : 3,
        c = l,
        u = Y(this),
        h = "show" === e.mode,
        d = u.show().css("visibility", "hidden").offset(),
        p = Math.ceil(u.outerWidth() / c),
        f = Math.ceil(u.outerHeight() / l),
        g = [];
      function m() {
        (g.push(this),
          g.length === l * c &&
            (u.css({ visibility: "visible" }), Y(g).remove(), t()));
      }
      for (i = 0; i < l; i++)
        for (o = d.top + i * f, a = i - (l - 1) / 2, n = 0; n < c; n++)
          ((r = 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: r + (h ? s * p : 0),
                top: o + (h ? a * f : 0),
                opacity: h ? 0 : 1,
              })
              .animate(
                {
                  left: r + (h ? 0 : s * p),
                  top: o + (h ? 0 : a * f),
                  opacity: h ? 1 : 0,
                },
                e.duration || 500,
                e.easing,
                m,
              ));
    }),
    Y.effects.define("fade", "toggle", function (e, t) {
      var i = "show" === e.mode;
      Y(this)
        .css("opacity", i ? 0 : 1)
        .animate(
          { opacity: i ? 1 : 0 },
          {
            queue: !1,
            duration: e.duration,
            easing: e.easing,
            complete: t,
          },
        );
    }),
    Y.effects.define("fold", "hide", function (t, e) {
      var i = Y(this),
        n = t.mode,
        r = "show" === n,
        o = "hide" === n,
        s = t.size || 15,
        a = /([0-9]+)%/.exec(s),
        l = !!t.horizFirst ? ["right", "bottom"] : ["bottom", "right"],
        c = t.duration / 2,
        u = Y.effects.createPlaceholder(i),
        h = i.cssClip(),
        d = { clip: Y.extend({}, h) },
        p = { clip: Y.extend({}, h) },
        f = [h[l[0]], h[l[1]]],
        n = i.queue().length;
      (a && (s = (parseInt(a[1], 10) / 100) * f[o ? 0 : 1]),
        (d.clip[l[0]] = s),
        (p.clip[l[0]] = s),
        (p.clip[l[1]] = 0),
        r &&
          (i.cssClip(p.clip), u && u.css(Y.effects.clipToBox(p)), (p.clip = h)),
        i
          .queue(function (e) {
            (u &&
              u
                .animate(Y.effects.clipToBox(d), c, t.easing)
                .animate(Y.effects.clipToBox(p), c, t.easing),
              e());
          })
          .animate(d, c, t.easing)
          .animate(p, c, t.easing)
          .queue(e),
        Y.effects.unshift(i, n, 4));
    }),
    Y.effects.define("highlight", "show", function (e, t) {
      var i = Y(this),
        n = { backgroundColor: i.css("backgroundColor") };
      ("hide" === e.mode && (n.opacity = 0),
        Y.effects.saveStyle(i),
        i
          .css({
            backgroundImage: "none",
            backgroundColor: e.color || "#ffff99",
          })
          .animate(n, {
            queue: !1,
            duration: e.duration,
            easing: e.easing,
            complete: t,
          }));
    }),
    Y.effects.define("size", function (n, t) {
      var r,
        i = Y(this),
        e = ["fontSize"],
        o = [
          "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 = Y.effects.scaledDimensions(i),
        f = n.from || p,
        g = n.to || Y.effects.scaledDimensions(i, 0);
      (Y.effects.createPlaceholder(i),
        "show" === a && ((a = f), (f = g), (g = a)),
        (r = {
          from: { y: f.height / p.height, x: f.width / p.width },
          to: { y: g.height / p.height, x: g.width / p.width },
        }),
        ("box" !== c && "both" !== c) ||
          (r.from.y !== r.to.y &&
            ((f = Y.effects.setTransition(i, o, r.from.y, f)),
            (g = Y.effects.setTransition(i, o, r.to.y, g))),
          r.from.x !== r.to.x &&
            ((f = Y.effects.setTransition(i, s, r.from.x, f)),
            (g = Y.effects.setTransition(i, s, r.to.x, g)))),
        ("content" !== c && "both" !== c) ||
          (r.from.y !== r.to.y &&
            ((f = Y.effects.setTransition(i, e, r.from.y, f)),
            (g = Y.effects.setTransition(i, e, r.to.y, g)))),
        u &&
          ((u = Y.effects.getBaseline(u, p)),
          (f.top = (p.outerHeight - f.outerHeight) * u.y + d.top),
          (f.left = (p.outerWidth - f.outerWidth) * u.x + d.left),
          (g.top = (p.outerHeight - g.outerHeight) * u.y + d.top),
          (g.left = (p.outerWidth - g.outerWidth) * u.x + d.left)),
        delete f.outerHeight,
        delete f.outerWidth,
        i.css(f),
        ("content" !== c && "both" !== c) ||
          ((o = o.concat(["marginTop", "marginBottom"]).concat(e)),
          (s = s.concat(["marginLeft", "marginRight"])),
          i.find("*[width]").each(function () {
            var e = Y(this),
              t = Y.effects.scaledDimensions(e),
              i = {
                height: t.height * r.from.y,
                width: t.width * r.from.x,
                outerHeight: t.outerHeight * r.from.y,
                outerWidth: t.outerWidth * r.from.x,
              },
              t = {
                height: t.height * r.to.y,
                width: t.width * r.to.x,
                outerHeight: t.height * r.to.y,
                outerWidth: t.width * r.to.x,
              };
            (r.from.y !== r.to.y &&
              ((i = Y.effects.setTransition(e, o, r.from.y, i)),
              (t = Y.effects.setTransition(e, o, r.to.y, t))),
              r.from.x !== r.to.x &&
                ((i = Y.effects.setTransition(e, s, r.from.x, i)),
                (t = Y.effects.setTransition(e, s, r.to.x, t))),
              l && Y.effects.saveStyle(e),
              e.css(i),
              e.animate(t, n.duration, n.easing, function () {
                l && Y.effects.restoreStyle(e);
              }));
          })),
        i.animate(g, {
          queue: !1,
          duration: n.duration,
          easing: n.easing,
          complete: function () {
            var e = i.offset();
            (0 === g.opacity && i.css("opacity", f.opacity),
              l ||
                (i.css("position", "static" === h ? "relative" : h).offset(e),
                Y.effects.saveStyle(i)),
              t());
          },
        }));
    }),
    Y.effects.define("scale", function (e, t) {
      var i = Y(this),
        n = e.mode,
        n =
          parseInt(e.percent, 10) ||
          (0 === parseInt(e.percent, 10) || "effect" !== n ? 0 : 100),
        n = Y.extend(
          !0,
          {
            from: Y.effects.scaledDimensions(i),
            to: Y.effects.scaledDimensions(i, n, e.direction || "both"),
            origin: e.origin || ["middle", "center"],
          },
          e,
        );
      (e.fade && ((n.from.opacity = 1), (n.to.opacity = 0)),
        Y.effects.effect.size.call(this, n, t));
    }),
    Y.effects.define("puff", "hide", function (e, t) {
      e = Y.extend(!0, {}, e, {
        fade: !0,
        percent: parseInt(e.percent, 10) || 150,
      });
      Y.effects.effect.scale.call(this, e, t);
    }),
    Y.effects.define("pulsate", "show", function (e, t) {
      var i = Y(this),
        n = e.mode,
        r = "show" === n,
        o = 2 * (e.times || 5) + (r || "hide" === n ? 1 : 0),
        s = e.duration / o,
        a = 0,
        l = 1,
        n = i.queue().length;
      for (
        (!r && i.is(":visible")) || (i.css("opacity", 0).show(), (a = 1));
        l < o;
        l++
      )
        (i.animate({ opacity: a }, s, e.easing), (a = 1 - a));
      (i.animate({ opacity: a }, s, e.easing),
        i.queue(t),
        Y.effects.unshift(i, n, 1 + o));
    }),
    Y.effects.define("shake", function (e, t) {
      var i = 1,
        n = Y(this),
        r = e.direction || "left",
        o = e.distance || 20,
        s = e.times || 3,
        a = 2 * s + 1,
        l = Math.round(e.duration / a),
        c = "up" === r || "down" === r ? "top" : "left",
        u = "up" === r || "left" === r,
        h = {},
        d = {},
        p = {},
        r = n.queue().length;
      for (
        Y.effects.createPlaceholder(n),
          h[c] = (u ? "-=" : "+=") + o,
          d[c] = (u ? "+=" : "-=") + 2 * o,
          p[c] = (u ? "-=" : "+=") + 2 * o,
          n.animate(h, l, e.easing);
        i < s;
        i++
      )
        n.animate(d, l, e.easing).animate(p, l, e.easing);
      (n
        .animate(d, l, e.easing)
        .animate(h, l / 2, e.easing)
        .queue(t),
        Y.effects.unshift(n, r, 1 + a));
    }),
    Y.effects.define("slide", "show", function (e, t) {
      var i,
        n,
        r = Y(this),
        o = {
          up: ["bottom", "top"],
          down: ["top", "bottom"],
          left: ["right", "left"],
          right: ["left", "right"],
        },
        s = e.mode,
        a = e.direction || "left",
        l = "up" === a || "down" === a ? "top" : "left",
        c = "up" === a || "left" === a,
        u = e.distance || r["top" == l ? "outerHeight" : "outerWidth"](!0),
        h = {};
      (Y.effects.createPlaceholder(r),
        (i = r.cssClip()),
        (n = r.position()[l]),
        (h[l] = (c ? -1 : 1) * u + n),
        (h.clip = r.cssClip()),
        (h.clip[o[a][1]] = h.clip[o[a][0]]),
        "show" === s &&
          (r.cssClip(h.clip), r.css(l, h[l]), (h.clip = i), (h[l] = n)),
        r.animate(h, {
          queue: !1,
          duration: e.duration,
          easing: e.easing,
          complete: t,
        }));
    }),
    (_ =
      !1 !== Y.uiBackCompat
        ? Y.effects.define("transfer", function (e, t) {
            Y(this).transfer(e, t);
          })
        : _));
  ((Y.ui.focusable = function (e, t) {
    var i,
      n,
      r,
      o,
      s = e.nodeName.toLowerCase();
    return "area" === s
      ? ((n = (i = e.parentNode).name),
        !(!e.href || !n || "map" !== i.nodeName.toLowerCase()) &&
          0 < (n = Y("img[usemap='#" + n + "']")).length &&
          n.is(":visible"))
      : (/^(input|select|textarea|button|object)$/.test(s)
          ? (r = !e.disabled) &&
            (o = Y(e).closest("fieldset")[0]) &&
            (r = !o.disabled)
          : (r = ("a" === s && e.href) || t),
        r &&
          Y(e).is(":visible") &&
          (function (e) {
            var t = e.css("visibility");
            for (; "inherit" === t; )
              ((e = e.parent()), (t = e.css("visibility")));
            return "visible" === t;
          })(Y(e)));
  }),
    Y.extend(Y.expr.pseudos, {
      focusable: function (e) {
        return Y.ui.focusable(e, null != Y.attr(e, "tabindex"));
      },
    }));
  var K, G;
  (Y.ui.focusable,
    (Y.fn._form = function () {
      return "string" == typeof this[0].form
        ? this.closest("form")
        : Y(this[0].form);
    }),
    (Y.ui.formResetMixin = {
      _formResetHandler: function () {
        var t = Y(this);
        setTimeout(function () {
          var e = t.data("ui-form-reset-instances");
          Y.each(e, function () {
            this.refresh();
          });
        });
      },
      _bindFormResetHandler: function () {
        var e;
        ((this.form = this.element._form()),
          this.form.length &&
            ((e = this.form.data("ui-form-reset-instances") || []).length ||
              this.form.on("reset.ui-form-reset", this._formResetHandler),
            e.push(this),
            this.form.data("ui-form-reset-instances", e)));
      },
      _unbindFormResetHandler: function () {
        var e;
        this.form.length &&
          ((e = this.form.data("ui-form-reset-instances")).splice(
            Y.inArray(this, e),
            1,
          ),
          e.length
            ? this.form.data("ui-form-reset-instances", e)
            : this.form
                .removeData("ui-form-reset-instances")
                .off("reset.ui-form-reset"));
      },
    }));
  (Y.expr.pseudos || (Y.expr.pseudos = Y.expr[":"]),
    Y.uniqueSort || (Y.uniqueSort = Y.unique),
    Y.escapeSelector ||
      ((K = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g),
      (G = function (e, t) {
        return t
          ? "\0" === e
            ? "�"
            : e.slice(0, -1) +
              "\\" +
              e.charCodeAt(e.length - 1).toString(16) +
              " "
          : "\\" + e;
      }),
      (Y.escapeSelector = function (e) {
        return (e + "").replace(K, G);
      })),
    (Y.fn.even && Y.fn.odd) ||
      Y.fn.extend({
        even: function () {
          return this.filter(function (e) {
            return e % 2 == 0;
          });
        },
        odd: function () {
          return this.filter(function (e) {
            return e % 2 == 1;
          });
        },
      }));
  var J;
  ((Y.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,
  }),
    (Y.fn.labels = function () {
      var e, t, i;
      return this.length
        ? this[0].labels && this[0].labels.length
          ? this.pushStack(this[0].labels)
          : ((t = this.eq(0).parents("label")),
            (e = this.attr("id")) &&
              ((i = (i = this.eq(0).parents().last()).add(
                (i.length ? i : this).siblings(),
              )),
              (e = "label[for='" + Y.escapeSelector(e) + "']"),
              (t = t.add(i.find(e).addBack(e)))),
            this.pushStack(t))
        : this.pushStack([]);
    }),
    (Y.fn.scrollParent = function (e) {
      var t = this.css("position"),
        i = "absolute" === t,
        n = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
        e = this.parents()
          .filter(function () {
            var e = Y(this);
            return (
              (!i || "static" !== e.css("position")) &&
              n.test(
                e.css("overflow") + e.css("overflow-y") + e.css("overflow-x"),
              )
            );
          })
          .eq(0);
      return "fixed" !== t && e.length
        ? e
        : Y(this[0].ownerDocument || document);
    }),
    Y.extend(Y.expr.pseudos, {
      tabbable: function (e) {
        var t = Y.attr(e, "tabindex"),
          i = null != t;
        return (!i || 0 <= t) && Y.ui.focusable(e, i);
      },
    }),
    Y.fn.extend({
      uniqueId:
        ((J = 0),
        function () {
          return this.each(function () {
            this.id || (this.id = "ui-id-" + ++J);
          });
        }),
      removeUniqueId: function () {
        return this.each(function () {
          /^ui-id-\d+$/.test(this.id) && Y(this).removeAttr("id");
        });
      },
    }),
    Y.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 (e) {
          return e.find("> li > :first-child").add(e.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 e = this.options;
        ((this.prevShow = this.prevHide = Y()),
          this._addClass("ui-accordion", "ui-widget ui-helper-reset"),
          this.element.attr("role", "tablist"),
          e.collapsible ||
            (!1 !== e.active && null != e.active) ||
            (e.active = 0),
          this._processPanels(),
          e.active < 0 && (e.active += this.headers.length),
          this._refresh());
      },
      _getCreateEventData: function () {
        return {
          header: this.active,
          panel: this.active.length ? this.active.next() : Y(),
        };
      },
      _createIcons: function () {
        var e,
          t = this.options.icons;
        t &&
          ((e = Y("<span>")),
          this._addClass(e, "ui-accordion-header-icon", "ui-icon " + t.header),
          e.prependTo(this.headers),
          (e = this.active.children(".ui-accordion-header-icon")),
          this._removeClass(e, t.header)
            ._addClass(e, null, t.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 e;
        (this.element.removeAttr("role"),
          this.headers
            .removeAttr(
              "role aria-expanded aria-selected aria-controls tabIndex",
            )
            .removeUniqueId(),
          this._destroyIcons(),
          (e = this.headers
            .next()
            .css("display", "")
            .removeAttr("role aria-hidden aria-labelledby")
            .removeUniqueId()),
          "content" !== this.options.heightStyle && e.css("height", ""));
      },
      _setOption: function (e, t) {
        "active" !== e
          ? ("event" === e &&
              (this.options.event &&
                this._off(this.headers, this.options.event),
              this._setupEvents(t)),
            this._super(e, t),
            "collapsible" !== e ||
              t ||
              !1 !== this.options.active ||
              this._activate(0),
            "icons" === e && (this._destroyIcons(), t && this._createIcons()))
          : this._activate(t);
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", e),
          this._toggleClass(null, "ui-state-disabled", !!e),
          this._toggleClass(
            this.headers.add(this.headers.next()),
            null,
            "ui-state-disabled",
            !!e,
          ));
      },
      _keydown: function (e) {
        if (!e.altKey && !e.ctrlKey) {
          var t = Y.ui.keyCode,
            i = this.headers.length,
            n = this.headers.index(e.target),
            r = !1;
          switch (e.keyCode) {
            case t.RIGHT:
            case t.DOWN:
              r = this.headers[(n + 1) % i];
              break;
            case t.LEFT:
            case t.UP:
              r = this.headers[(n - 1 + i) % i];
              break;
            case t.SPACE:
            case t.ENTER:
              this._eventHandler(e);
              break;
            case t.HOME:
              r = this.headers[0];
              break;
            case t.END:
              r = this.headers[i - 1];
          }
          r &&
            (Y(e.target).attr("tabIndex", -1),
            Y(r).attr("tabIndex", 0),
            Y(r).trigger("focus"),
            e.preventDefault());
        }
      },
      _panelKeyDown: function (e) {
        e.keyCode === Y.ui.keyCode.UP &&
          e.ctrlKey &&
          Y(e.currentTarget).prev().trigger("focus");
      },
      refresh: function () {
        var e = this.options;
        (this._processPanels(),
          (!1 === e.active && !0 === e.collapsible) || !this.headers.length
            ? ((e.active = !1), (this.active = Y()))
            : !1 === e.active
              ? this._activate(0)
              : this.active.length &&
                  !Y.contains(this.element[0], this.active[0])
                ? this.headers.length ===
                  this.headers.find(".ui-state-disabled").length
                  ? ((e.active = !1), (this.active = Y()))
                  : this._activate(Math.max(0, e.active - 1))
                : (e.active = this.headers.index(this.active)),
          this._destroyIcons(),
          this._refresh());
      },
      _processPanels: function () {
        var e = this.headers,
          t = 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",
          ),
          t && (this._off(e.not(this.headers)), this._off(t.not(this.panels))));
      },
      _refresh: function () {
        var i,
          e = this.options,
          t = e.heightStyle,
          n = this.element.parent();
        ((this.active = this._findActive(e.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 e = Y(this),
                t = e.uniqueId().attr("id"),
                i = e.next(),
                n = i.uniqueId().attr("id");
              (e.attr("aria-controls", n), i.attr("aria-labelledby", t));
            })
            .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(e.event),
          "fill" === t
            ? ((i = n.height()),
              this.element.siblings(":visible").each(function () {
                var e = Y(this),
                  t = e.css("position");
                "absolute" !== t && "fixed" !== t && (i -= e.outerHeight(!0));
              }),
              this.headers.each(function () {
                i -= Y(this).outerHeight(!0);
              }),
              this.headers
                .next()
                .each(function () {
                  Y(this).height(
                    Math.max(0, i - Y(this).innerHeight() + Y(this).height()),
                  );
                })
                .css("overflow", "auto"))
            : "auto" === t &&
              ((i = 0),
              this.headers
                .next()
                .each(function () {
                  var e = Y(this).is(":visible");
                  (e || Y(this).show(),
                    (i = Math.max(i, Y(this).css("height", "").height())),
                    e || Y(this).hide());
                })
                .height(i)));
      },
      _activate: function (e) {
        e = this._findActive(e)[0];
        e !== this.active[0] &&
          ((e = e || this.active[0]),
          this._eventHandler({
            target: e,
            currentTarget: e,
            preventDefault: Y.noop,
          }));
      },
      _findActive: function (e) {
        return "number" == typeof e ? this.headers.eq(e) : Y();
      },
      _setupEvents: function (e) {
        var i = { keydown: "_keydown" };
        (e &&
          Y.each(e.split(" "), function (e, t) {
            i[t] = "_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 (e) {
        var t = this.options,
          i = this.active,
          n = Y(e.currentTarget),
          r = n[0] === i[0],
          o = r && t.collapsible,
          s = o ? Y() : n.next(),
          a = i.next(),
          s = {
            oldHeader: i,
            oldPanel: a,
            newHeader: o ? Y() : n,
            newPanel: s,
          };
        (e.preventDefault(),
          (r && !t.collapsible) ||
            !1 === this._trigger("beforeActivate", e, s) ||
            ((t.active = !o && this.headers.index(n)),
            (this.active = r ? Y() : n),
            this._toggle(s),
            this._removeClass(
              i,
              "ui-accordion-header-active",
              "ui-state-active",
            ),
            t.icons &&
              ((i = i.children(".ui-accordion-header-icon")),
              this._removeClass(i, null, t.icons.activeHeader)._addClass(
                i,
                null,
                t.icons.header,
              )),
            r ||
              (this._removeClass(n, "ui-accordion-header-collapsed")._addClass(
                n,
                "ui-accordion-header-active",
                "ui-state-active",
              ),
              t.icons &&
                ((r = n.children(".ui-accordion-header-icon")),
                this._removeClass(r, null, t.icons.header)._addClass(
                  r,
                  null,
                  t.icons.activeHeader,
                )),
              this._addClass(n.next(), "ui-accordion-content-active"))));
      },
      _toggle: function (e) {
        var t = e.newPanel,
          i = this.prevShow.length ? this.prevShow : e.oldPanel;
        (this.prevShow.add(this.prevHide).stop(!0, !0),
          (this.prevShow = t),
          (this.prevHide = i),
          this.options.animate
            ? this._animate(t, i, e)
            : (i.hide(), t.show(), this._toggleComplete(e)),
          i.attr({ "aria-hidden": "true" }),
          i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }),
          t.length && i.length
            ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" })
            : t.length &&
              this.headers
                .filter(function () {
                  return 0 === parseInt(Y(this).attr("tabIndex"), 10);
                })
                .attr("tabIndex", -1),
          t.attr("aria-hidden", "false").prev().attr({
            "aria-selected": "true",
            "aria-expanded": "true",
            tabIndex: 0,
          }));
      },
      _animate: function (e, i, t) {
        function n() {
          a._toggleComplete(t);
        }
        var r,
          o,
          s,
          a = this,
          l = 0,
          c = e.css("box-sizing"),
          u = e.length && (!i.length || e.index() < i.index()),
          h = this.options.animate || {},
          u = (u && h.down) || h;
        return (
          (o = (o = "string" == typeof u ? u : o) || u.easing || h.easing),
          (s = (s = "number" == typeof u ? u : s) || u.duration || h.duration),
          i.length
            ? e.length
              ? ((r = e.show().outerHeight()),
                i.animate(this.hideProps, {
                  duration: s,
                  easing: o,
                  step: function (e, t) {
                    t.now = Math.round(e);
                  },
                }),
                void e.hide().animate(this.showProps, {
                  duration: s,
                  easing: o,
                  complete: n,
                  step: function (e, t) {
                    ((t.now = Math.round(e)),
                      "height" !== t.prop
                        ? "content-box" === c && (l += t.now)
                        : "content" !== a.options.heightStyle &&
                          ((t.now = Math.round(r - i.outerHeight() - l)),
                          (l = 0)));
                  },
                }))
              : i.animate(this.hideProps, s, o, n)
            : e.animate(this.showProps, s, o, n)
        );
      },
      _toggleComplete: function (e) {
        var t = e.oldPanel,
          i = t.prev();
        (this._removeClass(t, "ui-accordion-content-active"),
          this._removeClass(i, "ui-accordion-header-active")._addClass(
            i,
            "ui-accordion-header-collapsed",
          ),
          t.length && (t.parent()[0].className = t.parent()[0].className),
          this._trigger("activate", null, e));
      },
    }),
    (Y.ui.safeActiveElement = function (t) {
      var i;
      try {
        i = t.activeElement;
      } catch (e) {
        i = t.body;
      }
      return (i = !(i = i || t.body).nodeName ? t.body : i);
    }),
    Y.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 (e) {
              (e.preventDefault(), this._activateItem(e));
            },
            "click .ui-menu-item": function (e) {
              var t = Y(e.target),
                i = Y(Y.ui.safeActiveElement(this.document[0]));
              !this.mouseHandled &&
                t.not(".ui-state-disabled").length &&
                (this.select(e),
                e.isPropagationStopped() || (this.mouseHandled = !0),
                t.has(".ui-menu").length
                  ? this.expand(e)
                  : !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 (e, t) {
              var i = this.active || this._menuItems().first();
              t || this.focus(e, i);
            },
            blur: function (e) {
              this._delay(function () {
                Y.contains(
                  this.element[0],
                  Y.ui.safeActiveElement(this.document[0]),
                ) || this.collapseAll(e);
              });
            },
            keydown: "_keydown",
          }),
          this.refresh(),
          this._on(this.document, {
            click: function (e) {
              (this._closeOnDocumentClick(e) && this.collapseAll(e, !0),
                (this.mouseHandled = !1));
            },
          }));
      },
      _activateItem: function (e) {
        var t, i;
        this.previousFilter ||
          (e.clientX === this.lastMousePosition.x &&
            e.clientY === this.lastMousePosition.y) ||
          ((this.lastMousePosition = { x: e.clientX, y: e.clientY }),
          (t = Y(e.target).closest(".ui-menu-item")),
          (i = Y(e.currentTarget)),
          t[0] === i[0] &&
            (i.is(".ui-state-active") ||
              (this._removeClass(
                i.siblings().children(".ui-state-active"),
                null,
                "ui-state-active",
              ),
              this.focus(e, i))));
      },
      _destroy: function () {
        var e = 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(),
          e.children().each(function () {
            var e = Y(this);
            e.data("ui-menu-submenu-caret") && e.remove();
          }));
      },
      _keydown: function (e) {
        var t,
          i,
          n,
          r = !0;
        switch (e.keyCode) {
          case Y.ui.keyCode.PAGE_UP:
            this.previousPage(e);
            break;
          case Y.ui.keyCode.PAGE_DOWN:
            this.nextPage(e);
            break;
          case Y.ui.keyCode.HOME:
            this._move("first", "first", e);
            break;
          case Y.ui.keyCode.END:
            this._move("last", "last", e);
            break;
          case Y.ui.keyCode.UP:
            this.previous(e);
            break;
          case Y.ui.keyCode.DOWN:
            this.next(e);
            break;
          case Y.ui.keyCode.LEFT:
            this.collapse(e);
            break;
          case Y.ui.keyCode.RIGHT:
            this.active &&
              !this.active.is(".ui-state-disabled") &&
              this.expand(e);
            break;
          case Y.ui.keyCode.ENTER:
          case Y.ui.keyCode.SPACE:
            this._activate(e);
            break;
          case Y.ui.keyCode.ESCAPE:
            this.collapse(e);
            break;
          default:
            ((t = this.previousFilter || ""),
              (n = r = !1),
              (i =
                96 <= e.keyCode && e.keyCode <= 105
                  ? (e.keyCode - 96).toString()
                  : String.fromCharCode(e.keyCode)),
              clearTimeout(this.filterTimer),
              i === t ? (n = !0) : (i = t + i),
              (t = this._filterMenuItems(i)),
              (t =
                n && -1 !== t.index(this.active.next())
                  ? this.active.nextAll(".ui-menu-item")
                  : t).length ||
                ((i = String.fromCharCode(e.keyCode)),
                (t = this._filterMenuItems(i))),
              t.length
                ? (this.focus(e, t),
                  (this.previousFilter = i),
                  (this.filterTimer = this._delay(function () {
                    delete this.previousFilter;
                  }, 1e3)))
                : delete this.previousFilter);
        }
        r && e.preventDefault();
      },
      _activate: function (e) {
        this.active &&
          !this.active.is(".ui-state-disabled") &&
          (this.active.children("[aria-haspopup='true']").length
            ? this.expand(e)
            : this.select(e));
      },
      refresh: function () {
        var e,
          t,
          n = this,
          r = this.options.icons.submenu,
          i = this.element.find(this.options.menus);
        (this._toggleClass(
          "ui-menu-icons",
          null,
          !!this.element.find(".ui-icon").length,
        ),
          (t = i
            .filter(":not(.ui-menu)")
            .hide()
            .attr({
              role: this.options.role,
              "aria-hidden": "true",
              "aria-expanded": "false",
            })
            .each(function () {
              var e = Y(this),
                t = e.prev(),
                i = Y("<span>").data("ui-menu-submenu-caret", !0);
              (n._addClass(i, "ui-menu-icon", "ui-icon " + r),
                t.attr("aria-haspopup", "true").prepend(i),
                e.attr("aria-labelledby", t.attr("id")));
            })),
          this._addClass(t, "ui-menu", "ui-widget ui-widget-content ui-front"),
          (e = i.add(this.element).find(this.options.items))
            .not(".ui-menu-item")
            .each(function () {
              var e = Y(this);
              n._isDivider(e) &&
                n._addClass(e, "ui-menu-divider", "ui-widget-content");
            }),
          (i = (t = e.not(".ui-menu-item, .ui-menu-divider"))
            .children()
            .not(".ui-menu")
            .uniqueId()
            .attr({ tabIndex: -1, role: this._itemRole() })),
          this._addClass(t, "ui-menu-item")._addClass(
            i,
            "ui-menu-item-wrapper",
          ),
          e.filter(".ui-state-disabled").attr("aria-disabled", "true"),
          this.active &&
            !Y.contains(this.element[0], this.active[0]) &&
            this.blur());
      },
      _itemRole: function () {
        return { menu: "menuitem", listbox: "option" }[this.options.role];
      },
      _setOption: function (e, t) {
        var i;
        ("icons" === e &&
          ((i = this.element.find(".ui-menu-icon")),
          this._removeClass(i, null, this.options.icons.submenu)._addClass(
            i,
            null,
            t.submenu,
          )),
          this._super(e, t));
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", String(e)),
          this._toggleClass(null, "ui-state-disabled", !!e));
      },
      focus: function (e, t) {
        var i;
        (this.blur(e, e && "focus" === e.type),
          this._scrollIntoView(t),
          (this.active = t.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"),
          e && "keydown" === e.type
            ? this._close()
            : (this.timer = this._delay(function () {
                this._close();
              }, this.delay)),
          (i = t.children(".ui-menu")).length &&
            e &&
            /^mouse/.test(e.type) &&
            this._startOpening(i),
          (this.activeMenu = t.parent()),
          this._trigger("focus", e, { item: t }));
      },
      _scrollIntoView: function (e) {
        var t, i, n;
        this._hasScroll() &&
          ((i = parseFloat(Y.css(this.activeMenu[0], "borderTopWidth")) || 0),
          (n = parseFloat(Y.css(this.activeMenu[0], "paddingTop")) || 0),
          (t = e.offset().top - this.activeMenu.offset().top - i - n),
          (i = this.activeMenu.scrollTop()),
          (n = this.activeMenu.height()),
          (e = e.outerHeight()),
          t < 0
            ? this.activeMenu.scrollTop(i + t)
            : n < t + e && this.activeMenu.scrollTop(i + t - n + e));
      },
      blur: function (e, t) {
        (t || clearTimeout(this.timer),
          this.active &&
            (this._removeClass(
              this.active.children(".ui-menu-item-wrapper"),
              null,
              "ui-state-active",
            ),
            this._trigger("blur", e, { item: this.active }),
            (this.active = null)));
      },
      _startOpening: function (e) {
        (clearTimeout(this.timer),
          "true" === e.attr("aria-hidden") &&
            (this.timer = this._delay(function () {
              (this._close(), this._open(e));
            }, this.delay)));
      },
      _open: function (e) {
        var t = Y.extend({ of: this.active }, this.options.position);
        (clearTimeout(this.timer),
          this.element
            .find(".ui-menu")
            .not(e.parents(".ui-menu"))
            .hide()
            .attr("aria-hidden", "true"),
          e
            .show()
            .removeAttr("aria-hidden")
            .attr("aria-expanded", "true")
            .position(t));
      },
      collapseAll: function (t, i) {
        (clearTimeout(this.timer),
          (this.timer = this._delay(
            function () {
              var e = i
                ? this.element
                : Y(t && t.target).closest(this.element.find(".ui-menu"));
              (e.length || (e = this.element),
                this._close(e),
                this.blur(t),
                this._removeClass(
                  e.find(".ui-state-active"),
                  null,
                  "ui-state-active",
                ),
                (this.activeMenu = e));
            },
            i ? 0 : this.delay,
          )));
      },
      _close: function (e) {
        (e = e || (this.active ? this.active.parent() : this.element))
          .find(".ui-menu")
          .hide()
          .attr("aria-hidden", "true")
          .attr("aria-expanded", "false");
      },
      _closeOnDocumentClick: function (e) {
        return !Y(e.target).closest(".ui-menu").length;
      },
      _isDivider: function (e) {
        return !/[^\-\u2014\u2013\s]/.test(e.text());
      },
      collapse: function (e) {
        var t =
          this.active &&
          this.active.parent().closest(".ui-menu-item", this.element);
        t && t.length && (this._close(), this.focus(e, t));
      },
      expand: function (e) {
        var t =
          this.active &&
          this._menuItems(this.active.children(".ui-menu")).first();
        t &&
          t.length &&
          (this._open(t.parent()),
          this._delay(function () {
            this.focus(e, t);
          }));
      },
      next: function (e) {
        this._move("next", "first", e);
      },
      previous: function (e) {
        this._move("prev", "last", e);
      },
      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 (e) {
        return (e || this.element)
          .find(this.options.items)
          .filter(".ui-menu-item");
      },
      _move: function (e, t, i) {
        var n;
        (((n = this.active
          ? "first" === e || "last" === e
            ? this.active["first" === e ? "prevAll" : "nextAll"](
                ".ui-menu-item",
              ).last()
            : this.active[e + "All"](".ui-menu-item").first()
          : n) &&
          n.length &&
          this.active) ||
          (n = this._menuItems(this.activeMenu)[t]()),
          this.focus(i, n));
      },
      nextPage: function (e) {
        var t, i, n;
        this.active
          ? this.isLastItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.nextAll(".ui-menu-item").each(function () {
                  return (t = Y(this)).offset().top - i - n < 0;
                }),
                this.focus(e, t))
              : this.focus(
                  e,
                  this._menuItems(this.activeMenu)[
                    this.active ? "last" : "first"
                  ](),
                ))
          : this.next(e);
      },
      previousPage: function (e) {
        var t, i, n;
        this.active
          ? this.isFirstItem() ||
            (this._hasScroll()
              ? ((i = this.active.offset().top),
                (n = this.element.innerHeight()),
                0 === Y.fn.jquery.indexOf("3.2.") &&
                  (n +=
                    this.element[0].offsetHeight - this.element.outerHeight()),
                this.active.prevAll(".ui-menu-item").each(function () {
                  return 0 < (t = Y(this)).offset().top - i + n;
                }),
                this.focus(e, t))
              : this.focus(e, this._menuItems(this.activeMenu).first()))
          : this.next(e);
      },
      _hasScroll: function () {
        return this.element.outerHeight() < this.element.prop("scrollHeight");
      },
      select: function (e) {
        this.active = this.active || Y(e.target).closest(".ui-menu-item");
        var t = { item: this.active };
        (this.active.has(".ui-menu").length || this.collapseAll(e, !0),
          this._trigger("select", e, t));
      },
      _filterMenuItems: function (e) {
        var e = e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"),
          t = new RegExp("^" + e, "i");
        return this.activeMenu
          .find(this.options.items)
          .filter(".ui-menu-item")
          .filter(function () {
            return t.test(
              String.prototype.trim.call(
                Y(this).children(".ui-menu-item-wrapper").text(),
              ),
            );
          });
      },
    }));
  (Y.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,
        r,
        e = this.element[0].nodeName.toLowerCase(),
        t = "textarea" === e,
        e = "input" === e;
      ((this.isMultiLine = t || (!e && this._isContentEditable(this.element))),
        (this.valueMethod = this.element[t || e ? "val" : "text"]),
        (this.isNewMenu = !0),
        this._addClass("ui-autocomplete-input"),
        this.element.attr("autocomplete", "off"),
        this._on(this.element, {
          keydown: function (e) {
            if (this.element.prop("readOnly")) n = r = i = !0;
            else {
              n = r = i = !1;
              var t = Y.ui.keyCode;
              switch (e.keyCode) {
                case t.PAGE_UP:
                  ((i = !0), this._move("previousPage", e));
                  break;
                case t.PAGE_DOWN:
                  ((i = !0), this._move("nextPage", e));
                  break;
                case t.UP:
                  ((i = !0), this._keyEvent("previous", e));
                  break;
                case t.DOWN:
                  ((i = !0), this._keyEvent("next", e));
                  break;
                case t.ENTER:
                  this.menu.active &&
                    ((i = !0), e.preventDefault(), this.menu.select(e));
                  break;
                case t.TAB:
                  this.menu.active && this.menu.select(e);
                  break;
                case t.ESCAPE:
                  this.menu.element.is(":visible") &&
                    (this.isMultiLine || this._value(this.term),
                    this.close(e),
                    e.preventDefault());
                  break;
                default:
                  ((n = !0), this._searchTimeout(e));
              }
            }
          },
          keypress: function (e) {
            if (i)
              return (
                (i = !1),
                void (
                  (this.isMultiLine && !this.menu.element.is(":visible")) ||
                  e.preventDefault()
                )
              );
            if (!n) {
              var t = Y.ui.keyCode;
              switch (e.keyCode) {
                case t.PAGE_UP:
                  this._move("previousPage", e);
                  break;
                case t.PAGE_DOWN:
                  this._move("nextPage", e);
                  break;
                case t.UP:
                  this._keyEvent("previous", e);
                  break;
                case t.DOWN:
                  this._keyEvent("next", e);
              }
            }
          },
          input: function (e) {
            if (r) return ((r = !1), void e.preventDefault());
            this._searchTimeout(e);
          },
          focus: function () {
            ((this.selectedItem = null), (this.previous = this._value()));
          },
          blur: function (e) {
            (clearTimeout(this.searching), this.close(e), this._change(e));
          },
        }),
        this._initSource(),
        (this.menu = Y("<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 (e) {
            e.preventDefault();
          },
          menufocus: function (e, t) {
            var i;
            if (
              this.isNewMenu &&
              ((this.isNewMenu = !1),
              e.originalEvent && /^mouse/.test(e.originalEvent.type))
            )
              return (
                this.menu.blur(),
                void this.document.one("mousemove", function () {
                  Y(e.target).trigger(e.originalEvent);
                })
              );
            ((i = t.item.data("ui-autocomplete-item")),
              !1 !== this._trigger("focus", e, { item: i }) &&
                e.originalEvent &&
                /^key/.test(e.originalEvent.type) &&
                this._value(i.value),
              (i = t.item.attr("aria-label") || i.value) &&
                String.prototype.trim.call(i).length &&
                (this.liveRegion.children().hide(),
                Y("<div>").text(i).appendTo(this.liveRegion)));
          },
          menuselect: function (e, t) {
            var i = t.item.data("ui-autocomplete-item"),
              n = this.previous;
            (this.element[0] !== Y.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", e, { item: i }) &&
                this._value(i.value),
              (this.term = this._value()),
              this.close(e),
              (this.selectedItem = i));
          },
        }),
        (this.liveRegion = Y("<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 (e, t) {
      (this._super(e, t),
        "source" === e && this._initSource(),
        "appendTo" === e && this.menu.element.appendTo(this._appendTo()),
        "disabled" === e && t && this.xhr && this.xhr.abort());
    },
    _isEventTargetInWidget: function (e) {
      var t = this.menu.element[0];
      return (
        e.target === this.element[0] ||
        e.target === t ||
        Y.contains(t, e.target)
      );
    },
    _closeOnClickOutside: function (e) {
      this._isEventTargetInWidget(e) || this.close();
    },
    _appendTo: function () {
      var e = this.options.appendTo;
      return (e = !(e =
        !(e =
          e && (e.jquery || e.nodeType ? Y(e) : this.document.find(e).eq(0))) ||
        !e[0]
          ? this.element.closest(".ui-front, dialog")
          : e).length
        ? this.document[0].body
        : e);
    },
    _initSource: function () {
      var i,
        n,
        r = this;
      Array.isArray(this.options.source)
        ? ((i = this.options.source),
          (this.source = function (e, t) {
            t(Y.ui.autocomplete.filter(i, e.term));
          }))
        : "string" == typeof this.options.source
          ? ((n = this.options.source),
            (this.source = function (e, t) {
              (r.xhr && r.xhr.abort(),
                (r.xhr = Y.ajax({
                  url: n,
                  data: e,
                  dataType: "json",
                  success: function (e) {
                    t(e);
                  },
                  error: function () {
                    t([]);
                  },
                })));
            }))
          : (this.source = this.options.source);
    },
    _searchTimeout: function (n) {
      (clearTimeout(this.searching),
        (this.searching = this._delay(function () {
          var e = this.term === this._value(),
            t = this.menu.element.is(":visible"),
            i = n.altKey || n.ctrlKey || n.metaKey || n.shiftKey;
          (e && (t || i)) || ((this.selectedItem = null), this.search(null, n));
        }, this.options.delay)));
    },
    search: function (e, t) {
      return (
        (e = null != e ? e : this._value()),
        (this.term = this._value()),
        e.length < this.options.minLength
          ? this.close(t)
          : !1 !== this._trigger("search", t)
            ? this._search(e)
            : void 0
      );
    },
    _search: function (e) {
      (this.pending++,
        this._addClass("ui-autocomplete-loading"),
        (this.cancelSearch = !1),
        this.source({ term: e }, this._response()));
    },
    _response: function () {
      var t = ++this.requestIndex;
      return function (e) {
        (t === this.requestIndex && this.__response(e),
          this.pending--,
          this.pending || this._removeClass("ui-autocomplete-loading"));
      }.bind(this);
    },
    __response: function (e) {
      ((e = e && this._normalize(e)),
        this._trigger("response", null, { content: e }),
        !this.options.disabled && e && e.length && !this.cancelSearch
          ? (this._suggest(e), this._trigger("open"))
          : this._close());
    },
    close: function (e) {
      ((this.cancelSearch = !0), this._close(e));
    },
    _close: function (e) {
      (this._off(this.document, "mousedown"),
        this.menu.element.is(":visible") &&
          (this.menu.element.hide(),
          this.menu.blur(),
          (this.isNewMenu = !0),
          this._trigger("close", e)));
    },
    _change: function (e) {
      this.previous !== this._value() &&
        this._trigger("change", e, { item: this.selectedItem });
    },
    _normalize: function (e) {
      return e.length && e[0].label && e[0].value
        ? e
        : Y.map(e, function (e) {
            return "string" == typeof e
              ? { label: e, value: e }
              : Y.extend({}, e, {
                  label: e.label || e.value,
                  value: e.value || e.label,
                });
          });
    },
    _suggest: function (e) {
      var t = this.menu.element.empty();
      (this._renderMenu(t, e),
        (this.isNewMenu = !0),
        this.menu.refresh(),
        t.show(),
        this._resizeMenu(),
        t.position(Y.extend({ of: this.element }, this.options.position)),
        this.options.autoFocus && this.menu.next(),
        this._on(this.document, { mousedown: "_closeOnClickOutside" }));
    },
    _resizeMenu: function () {
      var e = this.menu.element;
      e.outerWidth(
        Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()),
      );
    },
    _renderMenu: function (i, e) {
      var n = this;
      Y.each(e, function (e, t) {
        n._renderItemData(i, t);
      });
    },
    _renderItemData: function (e, t) {
      return this._renderItem(e, t).data("ui-autocomplete-item", t);
    },
    _renderItem: function (e, t) {
      return Y("<li>").append(Y("<div>").text(t.label)).appendTo(e);
    },
    _move: function (e, t) {
      if (this.menu.element.is(":visible"))
        return (this.menu.isFirstItem() && /^previous/.test(e)) ||
          (this.menu.isLastItem() && /^next/.test(e))
          ? (this.isMultiLine || this._value(this.term), void this.menu.blur())
          : void this.menu[e](t);
      this.search(null, t);
    },
    widget: function () {
      return this.menu.element;
    },
    _value: function () {
      return this.valueMethod.apply(this.element, arguments);
    },
    _keyEvent: function (e, t) {
      (this.isMultiLine && !this.menu.element.is(":visible")) ||
        (this._move(e, t), t.preventDefault());
    },
    _isContentEditable: function (e) {
      if (!e.length) return !1;
      var t = e.prop("contentEditable");
      return "inherit" === t
        ? this._isContentEditable(e.parent())
        : "true" === t;
    },
  }),
    Y.extend(Y.ui.autocomplete, {
      escapeRegex: function (e) {
        return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
      },
      filter: function (e, t) {
        var i = new RegExp(Y.ui.autocomplete.escapeRegex(t), "i");
        return Y.grep(e, function (e) {
          return i.test(e.label || e.value || e);
        });
      },
    }),
    Y.widget("ui.autocomplete", Y.ui.autocomplete, {
      options: {
        messages: {
          noResults: "No search results.",
          results: function (e) {
            return (
              e +
              (1 < e ? " results are" : " result is") +
              " available, use up and down arrow keys to navigate."
            );
          },
        },
      },
      __response: function (e) {
        (this._superApply(arguments),
          this.options.disabled ||
            this.cancelSearch ||
            ((e =
              e && e.length
                ? this.options.messages.results(e.length)
                : this.options.messages.noResults),
            this.liveRegion.children().hide(),
            Y("<div>").text(e).appendTo(this.liveRegion)));
      },
    }));
  Y.ui.autocomplete;
  var ee = /ui-corner-([a-z]){2,6}/g;
  Y.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 o = this,
        s = [];
      (Y.each(this.options.items, function (n, e) {
        var t,
          r = {};
        if (e)
          return "controlgroupLabel" === n
            ? ((t = o.element.find(e)).each(function () {
                var e = Y(this);
                e.children(".ui-controlgroup-label-contents").length ||
                  e
                    .contents()
                    .wrapAll(
                      "<span class='ui-controlgroup-label-contents'></span>",
                    );
              }),
              o._addClass(
                t,
                null,
                "ui-widget ui-widget-content ui-state-default",
              ),
              void (s = s.concat(t.get())))
            : void (
                Y.fn[n] &&
                ((r = o["_" + n + "Options"]
                  ? o["_" + n + "Options"]("middle")
                  : { classes: {} }),
                o.element.find(e).each(function () {
                  var e = Y(this),
                    t = e[n]("instance"),
                    i = Y.widget.extend({}, r);
                  ("button" === n && e.parent(".ui-spinner").length) ||
                    ((t = t || e[n]()[n]("instance")) &&
                      (i.classes = o._resolveClassesValues(i.classes, t)),
                    e[n](i),
                    (i = e[n]("widget")),
                    Y.data(i[0], "ui-controlgroup-data", t || e[n]("instance")),
                    s.push(i[0]));
                }))
              );
      }),
        (this.childWidgets = Y(Y.uniqueSort(s))),
        this._addClass(this.childWidgets, "ui-controlgroup-item"));
    },
    _callChildMethod: function (t) {
      this.childWidgets.each(function () {
        var e = Y(this).data("ui-controlgroup-data");
        e && e[t] && e[t]();
      });
    },
    _updateCornerClass: function (e, t) {
      t = this._buildSimpleOptions(t, "label").classes.label;
      (this._removeClass(
        e,
        null,
        "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",
      ),
        this._addClass(e, null, t));
    },
    _buildSimpleOptions: function (e, t) {
      var i = "vertical" === this.options.direction,
        n = { classes: {} };
      return (
        (n.classes[t] = {
          middle: "",
          first: "ui-corner-" + (i ? "top" : "left"),
          last: "ui-corner-" + (i ? "bottom" : "right"),
          only: "ui-corner-all",
        }[e]),
        n
      );
    },
    _spinnerOptions: function (e) {
      e = this._buildSimpleOptions(e, "ui-spinner");
      return (
        (e.classes["ui-spinner-up"] = ""),
        (e.classes["ui-spinner-down"] = ""),
        e
      );
    },
    _buttonOptions: function (e) {
      return this._buildSimpleOptions(e, "ui-button");
    },
    _checkboxradioOptions: function (e) {
      return this._buildSimpleOptions(e, "ui-checkboxradio-label");
    },
    _selectmenuOptions: function (e) {
      var t = "vertical" === this.options.direction;
      return {
        width: t && "auto",
        classes: {
          middle: {
            "ui-selectmenu-button-open": "",
            "ui-selectmenu-button-closed": "",
          },
          first: {
            "ui-selectmenu-button-open": "ui-corner-" + (t ? "top" : "tl"),
            "ui-selectmenu-button-closed": "ui-corner-" + (t ? "top" : "left"),
          },
          last: {
            "ui-selectmenu-button-open": t ? "" : "ui-corner-tr",
            "ui-selectmenu-button-closed":
              "ui-corner-" + (t ? "bottom" : "right"),
          },
          only: {
            "ui-selectmenu-button-open": "ui-corner-top",
            "ui-selectmenu-button-closed": "ui-corner-all",
          },
        }[e],
      };
    },
    _resolveClassesValues: function (i, n) {
      var r = {};
      return (
        Y.each(i, function (e) {
          var t = n.options.classes[e] || "",
            t = String.prototype.trim.call(t.replace(ee, ""));
          r[e] = (t + " " + i[e]).replace(/\s+/g, " ");
        }),
        r
      );
    },
    _setOption: function (e, t) {
      ("direction" === e &&
        this._removeClass("ui-controlgroup-" + this.options.direction),
        this._super(e, t),
        "disabled" !== e
          ? this.refresh()
          : this._callChildMethod(t ? "disable" : "enable"));
    },
    refresh: function () {
      var r,
        o = this;
      (this._addClass(
        "ui-controlgroup ui-controlgroup-" + this.options.direction,
      ),
        "horizontal" === this.options.direction &&
          this._addClass(null, "ui-helper-clearfix"),
        this._initWidgets(),
        (r = this.childWidgets),
        (r = this.options.onlyVisible ? r.filter(":visible") : r).length &&
          (Y.each(["first", "last"], function (e, t) {
            var i,
              n = r[t]().data("ui-controlgroup-data");
            n && o["_" + n.widgetName + "Options"]
              ? (((i = o["_" + n.widgetName + "Options"](
                  1 === r.length ? "only" : t,
                )).classes = o._resolveClassesValues(i.classes, n)),
                n.element[n.widgetName](i))
              : o._updateCornerClass(r[t](), t);
          }),
          this._callChildMethod("refresh")));
    },
  });
  Y.widget("ui.checkboxradio", [
    Y.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 e,
          t = this,
          i = this._super() || {};
        return (
          this._readType(),
          (e = this.element.labels()),
          (this.label = Y(e[e.length - 1])),
          this.label.length ||
            Y.error("No label found for checkboxradio widget"),
          (this.originalLabel = ""),
          this.label
            .contents()
            .not(this.element[0])
            .each(function () {
              t.originalLabel +=
                3 === this.nodeType ? Y(this).text() : this.outerHTML;
            }),
          this.originalLabel && (i.label = this.originalLabel),
          null != (e = this.element[0].disabled) && (i.disabled = e),
          i
        );
      },
      _create: function () {
        var e = 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(),
          e &&
            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 e = this.element[0].nodeName.toLowerCase();
        ((this.type = this.element[0].type),
          ("input" === e && /radio|checkbox/.test(this.type)) ||
            Y.error(
              "Can't create checkboxradio on element.nodeName=" +
                e +
                " and element.type=" +
                this.type,
            ));
      },
      _enhance: function () {
        this._updateIcon(this.element[0].checked);
      },
      widget: function () {
        return this.label;
      },
      _getRadioGroup: function () {
        var e = this.element[0].name,
          t = "input[name='" + Y.escapeSelector(e) + "']";
        return e
          ? (this.form.length
              ? Y(this.form[0].elements).filter(t)
              : Y(t).filter(function () {
                  return 0 === Y(this)._form().length;
                })
            ).not(this.element)
          : Y([]);
      },
      _toggleClasses: function () {
        var e = this.element[0].checked;
        (this._toggleClass(
          this.label,
          "ui-checkboxradio-checked",
          "ui-state-active",
          e,
        ),
          this.options.icon &&
            "checkbox" === this.type &&
            this._toggleClass(
              this.icon,
              null,
              "ui-icon-check ui-state-checked",
              e,
            )._toggleClass(this.icon, null, "ui-icon-blank", !e),
          "radio" === this.type &&
            this._getRadioGroup().each(function () {
              var e = Y(this).checkboxradio("instance");
              e &&
                e._removeClass(
                  e.label,
                  "ui-checkboxradio-checked",
                  "ui-state-active",
                );
            }));
      },
      _destroy: function () {
        (this._unbindFormResetHandler(),
          this.icon && (this.icon.remove(), this.iconSpace.remove()));
      },
      _setOption: function (e, t) {
        if ("label" !== e || t) {
          if ((this._super(e, t), "disabled" === e))
            return (
              this._toggleClass(this.label, null, "ui-state-disabled", t),
              void (this.element[0].disabled = t)
            );
          this.refresh();
        }
      },
      _updateIcon: function (e) {
        var t = "ui-icon ui-icon-background ";
        this.options.icon
          ? (this.icon ||
              ((this.icon = Y("<span>")),
              (this.iconSpace = Y("<span> </span>")),
              this._addClass(this.iconSpace, "ui-checkboxradio-icon-space")),
            "checkbox" === this.type
              ? ((t += e ? "ui-icon-check ui-state-checked" : "ui-icon-blank"),
                this._removeClass(
                  this.icon,
                  null,
                  e ? "ui-icon-blank" : "ui-icon-check",
                ))
              : (t += "ui-icon-blank"),
            this._addClass(this.icon, "ui-checkboxradio-icon", t),
            e ||
              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 e = this.label.contents().not(this.element[0]);
        (this.icon && (e = e.not(this.icon[0])),
          (e = this.iconSpace ? e.not(this.iconSpace[0]) : e).remove(),
          this.label.append(this.options.label));
      },
      refresh: function () {
        var e = this.element[0].checked,
          t = this.element[0].disabled;
        (this._updateIcon(e),
          this._toggleClass(
            this.label,
            "ui-checkboxradio-checked",
            "ui-state-active",
            e,
          ),
          null !== this.options.label && this._updateLabel(),
          t !== this.options.disabled && this._setOptions({ disabled: t }));
      },
    },
  ]);
  var te;
  Y.ui.checkboxradio;
  (Y.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 e,
        t = this._super() || {};
      return (
        (this.isInput = this.element.is("input")),
        null != (e = this.element[0].disabled) && (t.disabled = e),
        (this.originalLabel = this.isInput
          ? this.element.val()
          : this.element.html()),
        this.originalLabel && (t.label = this.originalLabel),
        t
      );
    },
    _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 (e) {
              e.keyCode === Y.ui.keyCode.SPACE &&
                (e.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 (e, t) {
      var i = "iconPosition" !== e,
        n = i ? this.options.iconPosition : t,
        e = "top" === n || "bottom" === n;
      (this.icon
        ? i && this._removeClass(this.icon, null, this.options.icon)
        : ((this.icon = Y("<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, t),
        this._attachIcon(n),
        e
          ? (this._addClass(this.icon, null, "ui-widget-icon-block"),
            this.iconSpace && this.iconSpace.remove())
          : (this.iconSpace ||
              ((this.iconSpace = Y("<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 (e) {
      this.icon[/^(?:end|bottom)/.test(e) ? "before" : "after"](this.iconSpace);
    },
    _attachIcon: function (e) {
      this.element[/^(?:end|bottom)/.test(e) ? "append" : "prepend"](this.icon);
    },
    _setOptions: function (e) {
      var t = (void 0 === e.showLabel ? this.options : e).showLabel,
        i = (void 0 === e.icon ? this.options : e).icon;
      (t || i || (e.showLabel = !0), this._super(e));
    },
    _setOption: function (e, t) {
      ("icon" === e &&
        (t
          ? this._updateIcon(e, t)
          : this.icon &&
            (this.icon.remove(), this.iconSpace && this.iconSpace.remove())),
        "iconPosition" === e && this._updateIcon(e, t),
        "showLabel" === e &&
          (this._toggleClass("ui-button-icon-only", null, !t),
          this._updateTooltip()),
        "label" === e &&
          (this.isInput
            ? this.element.val(t)
            : (this.element.html(t),
              this.icon &&
                (this._attachIcon(this.options.iconPosition),
                this._attachIconSpace(this.options.iconPosition)))),
        this._super(e, t),
        "disabled" === e &&
          (this._toggleClass(null, "ui-state-disabled", t),
          (this.element[0].disabled = t) && this.element.trigger("blur")));
    },
    refresh: function () {
      var e = this.element.is("input, button")
        ? this.element[0].disabled
        : this.element.hasClass("ui-button-disabled");
      (e !== this.options.disabled && this._setOptions({ disabled: e }),
        this._updateTooltip());
    },
  }),
    !1 !== Y.uiBackCompat &&
      (Y.widget("ui.button", Y.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 (e, t) {
          "text" !== e
            ? ("showLabel" === e && (this.options.text = t),
              "icon" === e && (this.options.icons.primary = t),
              "icons" === e &&
                (t.primary
                  ? (this._super("icon", t.primary),
                    this._super("iconPosition", "beginning"))
                  : t.secondary &&
                    (this._super("icon", t.secondary),
                    this._super("iconPosition", "end"))),
              this._superApply(arguments))
            : this._super("showLabel", t);
        },
      }),
      (Y.fn.button =
        ((te = Y.fn.button),
        function (i) {
          var e = "string" == typeof i,
            n = Array.prototype.slice.call(arguments, 1),
            r = this;
          return (
            e
              ? this.length || "instance" !== i
                ? this.each(function () {
                    var e = Y(this).attr("type"),
                      t = Y.data(
                        this,
                        "ui-" +
                          ("checkbox" !== e && "radio" !== e
                            ? "button"
                            : "checkboxradio"),
                      );
                    return "instance" === i
                      ? ((r = t), !1)
                      : t
                        ? "function" != typeof t[i] || "_" === i.charAt(0)
                          ? Y.error(
                              "no such method '" +
                                i +
                                "' for button widget instance",
                            )
                          : (e = t[i].apply(t, n)) !== t && void 0 !== e
                            ? ((r = e && e.jquery ? r.pushStack(e.get()) : e),
                              !1)
                            : void 0
                        : Y.error(
                            "cannot call methods on button prior to initialization; attempted to call method '" +
                              i +
                              "'",
                          );
                  })
                : (r = void 0)
              : (n.length && (i = Y.widget.extend.apply(null, [i].concat(n))),
                this.each(function () {
                  var e = Y(this).attr("type"),
                    t =
                      "checkbox" !== e && "radio" !== e
                        ? "button"
                        : "checkboxradio",
                    e = Y.data(this, "ui-" + t);
                  e
                    ? (e.option(i || {}), e._init && e._init())
                    : "button" != t
                      ? Y(this).checkboxradio(Y.extend({ icon: !1 }, i))
                      : te.call(Y(this), i);
                })),
            r
          );
        })),
      (Y.fn.buttonset = function () {
        return (
          Y.ui.controlgroup || Y.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 ie;
  Y.ui.button;
  function ne() {
    ((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,
      }),
      Y.extend(this._defaults, this.regional[""]),
      (this.regional.en = Y.extend(!0, {}, this.regional[""])),
      (this.regional["en-US"] = Y.extend(!0, {}, this.regional.en)),
      (this.dpDiv = re(
        Y(
          "<div id='" +
            this._mainDivId +
            "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
        ),
      )));
  }
  function re(e) {
    var t =
      "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
    return e
      .on("mouseout", t, function () {
        (Y(this).removeClass("ui-state-hover"),
          -1 !== this.className.indexOf("ui-datepicker-prev") &&
            Y(this).removeClass("ui-datepicker-prev-hover"),
          -1 !== this.className.indexOf("ui-datepicker-next") &&
            Y(this).removeClass("ui-datepicker-next-hover"));
      })
      .on("mouseover", t, oe);
  }
  function oe() {
    Y.datepicker._isDisabledDatepicker(
      (ie.inline ? ie.dpDiv.parent() : ie.input)[0],
    ) ||
      (Y(this)
        .parents(".ui-datepicker-calendar")
        .find("a")
        .removeClass("ui-state-hover"),
      Y(this).addClass("ui-state-hover"),
      -1 !== this.className.indexOf("ui-datepicker-prev") &&
        Y(this).addClass("ui-datepicker-prev-hover"),
      -1 !== this.className.indexOf("ui-datepicker-next") &&
        Y(this).addClass("ui-datepicker-next-hover"));
  }
  function se(e, t) {
    for (var i in (Y.extend(e, t), t)) null == t[i] && (e[i] = t[i]);
    return e;
  }
  (Y.extend(Y.ui, { datepicker: { version: "1.13.0" } }),
    Y.extend(ne.prototype, {
      markerClassName: "hasDatepicker",
      maxRows: 4,
      _widgetDatepicker: function () {
        return this.dpDiv;
      },
      setDefaults: function (e) {
        return (se(this._defaults, e || {}), this);
      },
      _attachDatepicker: function (e, t) {
        var i,
          n = e.nodeName.toLowerCase(),
          r = "div" === n || "span" === n;
        (e.id || ((this.uuid += 1), (e.id = "dp" + this.uuid)),
          ((i = this._newInst(Y(e), r)).settings = Y.extend({}, t || {})),
          "input" === n
            ? this._connectDatepicker(e, i)
            : r && this._inlineDatepicker(e, i));
      },
      _newInst: function (e, t) {
        return {
          id: e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"),
          input: e,
          selectedDay: 0,
          selectedMonth: 0,
          selectedYear: 0,
          drawMonth: 0,
          drawYear: 0,
          inline: t,
          dpDiv: t
            ? re(
                Y(
                  "<div class='" +
                    this._inlineClass +
                    " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>",
                ),
              )
            : this.dpDiv,
        };
      },
      _connectDatepicker: function (e, t) {
        var i = Y(e);
        ((t.append = Y([])),
          (t.trigger = Y([])),
          i.hasClass(this.markerClassName) ||
            (this._attachments(i, t),
            i
              .addClass(this.markerClassName)
              .on("keydown", this._doKeyDown)
              .on("keypress", this._doKeyPress)
              .on("keyup", this._doKeyUp),
            this._autoSize(t),
            Y.data(e, "datepicker", t),
            t.settings.disabled && this._disableDatepicker(e)));
      },
      _attachments: function (e, t) {
        var i,
          n = this._get(t, "appendText"),
          r = this._get(t, "isRTL");
        (t.append && t.append.remove(),
          n &&
            ((t.append = Y("<span>").addClass(this._appendClass).text(n)),
            e[r ? "before" : "after"](t.append)),
          e.off("focus", this._showDatepicker),
          t.trigger && t.trigger.remove(),
          ("focus" !== (i = this._get(t, "showOn")) && "both" !== i) ||
            e.on("focus", this._showDatepicker),
          ("button" !== i && "both" !== i) ||
            ((n = this._get(t, "buttonText")),
            (i = this._get(t, "buttonImage")),
            this._get(t, "buttonImageOnly")
              ? (t.trigger = Y("<img>")
                  .addClass(this._triggerClass)
                  .attr({ src: i, alt: n, title: n }))
              : ((t.trigger = Y("<button type='button'>").addClass(
                  this._triggerClass,
                )),
                i
                  ? t.trigger.html(
                      Y("<img>").attr({ src: i, alt: n, title: n }),
                    )
                  : t.trigger.text(n)),
            e[r ? "before" : "after"](t.trigger),
            t.trigger.on("click", function () {
              return (
                Y.datepicker._datepickerShowing &&
                Y.datepicker._lastInput === e[0]
                  ? Y.datepicker._hideDatepicker()
                  : (Y.datepicker._datepickerShowing &&
                      Y.datepicker._lastInput !== e[0] &&
                      Y.datepicker._hideDatepicker(),
                    Y.datepicker._showDatepicker(e[0])),
                !1
              );
            })));
      },
      _autoSize: function (e) {
        var t, i, n, r, o, s;
        this._get(e, "autoSize") &&
          !e.inline &&
          ((o = new Date(2009, 11, 20)),
          (s = this._get(e, "dateFormat")).match(/[DM]/) &&
            (o.setMonth(
              (t = function (e) {
                for (r = n = i = 0; r < e.length; r++)
                  e[r].length > i && ((i = e[r].length), (n = r));
                return n;
              })(
                this._get(e, s.match(/MM/) ? "monthNames" : "monthNamesShort"),
              ),
            ),
            o.setDate(
              t(this._get(e, s.match(/DD/) ? "dayNames" : "dayNamesShort")) +
                20 -
                o.getDay(),
            )),
          e.input.attr("size", this._formatDate(e, o).length));
      },
      _inlineDatepicker: function (e, t) {
        var i = Y(e);
        i.hasClass(this.markerClassName) ||
          (i.addClass(this.markerClassName).append(t.dpDiv),
          Y.data(e, "datepicker", t),
          this._setDate(t, this._getDefaultDate(t), !0),
          this._updateDatepicker(t),
          this._updateAlternate(t),
          t.settings.disabled && this._disableDatepicker(e),
          t.dpDiv.css("display", "block"));
      },
      _dialogDatepicker: function (e, t, i, n, r) {
        var o,
          s = this._dialogInst;
        return (
          s ||
            ((this.uuid += 1),
            (o = "dp" + this.uuid),
            (this._dialogInput = Y(
              "<input type='text' id='" +
                o +
                "' style='position: absolute; top: -100px; width: 0px;'/>",
            )),
            this._dialogInput.on("keydown", this._doKeyDown),
            Y("body").append(this._dialogInput),
            ((s = this._dialogInst =
              this._newInst(this._dialogInput, !1)).settings = {}),
            Y.data(this._dialogInput[0], "datepicker", s)),
          se(s.settings, n || {}),
          (t = t && t.constructor === Date ? this._formatDate(s, t) : t),
          this._dialogInput.val(t),
          (this._pos = r ? (r.length ? r : [r.pageX, r.pageY]) : null),
          this._pos ||
            ((o = document.documentElement.clientWidth),
            (n = document.documentElement.clientHeight),
            (t =
              document.documentElement.scrollLeft || document.body.scrollLeft),
            (r = document.documentElement.scrollTop || document.body.scrollTop),
            (this._pos = [o / 2 - 100 + t, n / 2 - 150 + r])),
          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]),
          Y.blockUI && Y.blockUI(this.dpDiv),
          Y.data(this._dialogInput[0], "datepicker", s),
          this
        );
      },
      _destroyDatepicker: function (e) {
        var t,
          i = Y(e),
          n = Y.data(e, "datepicker");
        i.hasClass(this.markerClassName) &&
          ((t = e.nodeName.toLowerCase()),
          Y.removeData(e, "datepicker"),
          "input" === t
            ? (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" !== t && "span" !== t) ||
              i.removeClass(this.markerClassName).empty(),
          ie === n && ((ie = null), (this._curInst = null)));
      },
      _enableDatepicker: function (t) {
        var e,
          i = Y(t),
          n = Y.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (e = t.nodeName.toLowerCase())
            ? ((t.disabled = !1),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !1;
                })
                .end()
                .filter("img")
                .css({ opacity: "1.0", cursor: "" }))
            : ("div" !== e && "span" !== e) ||
              ((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 = Y.map(this._disabledInputs, function (e) {
            return e === t ? null : e;
          })));
      },
      _disableDatepicker: function (t) {
        var e,
          i = Y(t),
          n = Y.data(t, "datepicker");
        i.hasClass(this.markerClassName) &&
          ("input" === (e = t.nodeName.toLowerCase())
            ? ((t.disabled = !0),
              n.trigger
                .filter("button")
                .each(function () {
                  this.disabled = !0;
                })
                .end()
                .filter("img")
                .css({ opacity: "0.5", cursor: "default" }))
            : ("div" !== e && "span" !== e) ||
              ((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 = Y.map(this._disabledInputs, function (e) {
            return e === t ? null : e;
          })),
          (this._disabledInputs[this._disabledInputs.length] = t));
      },
      _isDisabledDatepicker: function (e) {
        if (!e) return !1;
        for (var t = 0; t < this._disabledInputs.length; t++)
          if (this._disabledInputs[t] === e) return !0;
        return !1;
      },
      _getInst: function (e) {
        try {
          return Y.data(e, "datepicker");
        } catch (e) {
          throw "Missing instance data for this datepicker";
        }
      },
      _optionDatepicker: function (e, t, i) {
        var n,
          r,
          o = this._getInst(e);
        if (2 === arguments.length && "string" == typeof t)
          return "defaults" === t
            ? Y.extend({}, Y.datepicker._defaults)
            : o
              ? "all" === t
                ? Y.extend({}, o.settings)
                : this._get(o, t)
              : null;
        ((n = t || {}),
          "string" == typeof t && ((n = {})[t] = i),
          o &&
            (this._curInst === o && this._hideDatepicker(),
            (r = this._getDateDatepicker(e, !0)),
            (t = this._getMinMaxDate(o, "min")),
            (i = this._getMinMaxDate(o, "max")),
            se(o.settings, n),
            null !== t &&
              void 0 !== n.dateFormat &&
              void 0 === n.minDate &&
              (o.settings.minDate = this._formatDate(o, t)),
            null !== i &&
              void 0 !== n.dateFormat &&
              void 0 === n.maxDate &&
              (o.settings.maxDate = this._formatDate(o, i)),
            "disabled" in n &&
              (n.disabled
                ? this._disableDatepicker(e)
                : this._enableDatepicker(e)),
            this._attachments(Y(e), o),
            this._autoSize(o),
            this._setDate(o, r),
            this._updateAlternate(o),
            this._updateDatepicker(o)));
      },
      _changeDatepicker: function (e, t, i) {
        this._optionDatepicker(e, t, i);
      },
      _refreshDatepicker: function (e) {
        e = this._getInst(e);
        e && this._updateDatepicker(e);
      },
      _setDateDatepicker: function (e, t) {
        e = this._getInst(e);
        e &&
          (this._setDate(e, t),
          this._updateDatepicker(e),
          this._updateAlternate(e));
      },
      _getDateDatepicker: function (e, t) {
        e = this._getInst(e);
        return (
          e && !e.inline && this._setDateFromField(e, t),
          e ? this._getDate(e) : null
        );
      },
      _doKeyDown: function (e) {
        var t,
          i,
          n = Y.datepicker._getInst(e.target),
          r = !0,
          o = n.dpDiv.is(".ui-datepicker-rtl");
        if (((n._keyEvent = !0), Y.datepicker._datepickerShowing))
          switch (e.keyCode) {
            case 9:
              (Y.datepicker._hideDatepicker(), (r = !1));
              break;
            case 13:
              return (
                (i = Y(
                  "td." +
                    Y.datepicker._dayOverClass +
                    ":not(." +
                    Y.datepicker._currentClass +
                    ")",
                  n.dpDiv,
                ))[0] &&
                  Y.datepicker._selectDay(
                    e.target,
                    n.selectedMonth,
                    n.selectedYear,
                    i[0],
                  ),
                (t = Y.datepicker._get(n, "onSelect"))
                  ? ((i = Y.datepicker._formatDate(n)),
                    t.apply(n.input ? n.input[0] : null, [i, n]))
                  : Y.datepicker._hideDatepicker(),
                !1
              );
            case 27:
              Y.datepicker._hideDatepicker();
              break;
            case 33:
              Y.datepicker._adjustDate(
                e.target,
                e.ctrlKey
                  ? -Y.datepicker._get(n, "stepBigMonths")
                  : -Y.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 34:
              Y.datepicker._adjustDate(
                e.target,
                e.ctrlKey
                  ? +Y.datepicker._get(n, "stepBigMonths")
                  : +Y.datepicker._get(n, "stepMonths"),
                "M",
              );
              break;
            case 35:
              ((e.ctrlKey || e.metaKey) && Y.datepicker._clearDate(e.target),
                (r = e.ctrlKey || e.metaKey));
              break;
            case 36:
              ((e.ctrlKey || e.metaKey) && Y.datepicker._gotoToday(e.target),
                (r = e.ctrlKey || e.metaKey));
              break;
            case 37:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, o ? 1 : -1, "D"),
                (r = e.ctrlKey || e.metaKey),
                e.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    e.target,
                    e.ctrlKey
                      ? -Y.datepicker._get(n, "stepBigMonths")
                      : -Y.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 38:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, -7, "D"),
                (r = e.ctrlKey || e.metaKey));
              break;
            case 39:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, o ? -1 : 1, "D"),
                (r = e.ctrlKey || e.metaKey),
                e.originalEvent.altKey &&
                  Y.datepicker._adjustDate(
                    e.target,
                    e.ctrlKey
                      ? +Y.datepicker._get(n, "stepBigMonths")
                      : +Y.datepicker._get(n, "stepMonths"),
                    "M",
                  ));
              break;
            case 40:
              ((e.ctrlKey || e.metaKey) &&
                Y.datepicker._adjustDate(e.target, 7, "D"),
                (r = e.ctrlKey || e.metaKey));
              break;
            default:
              r = !1;
          }
        else
          36 === e.keyCode && e.ctrlKey
            ? Y.datepicker._showDatepicker(this)
            : (r = !1);
        r && (e.preventDefault(), e.stopPropagation());
      },
      _doKeyPress: function (e) {
        var t,
          i = Y.datepicker._getInst(e.target);
        if (Y.datepicker._get(i, "constrainInput"))
          return (
            (t = Y.datepicker._possibleChars(
              Y.datepicker._get(i, "dateFormat"),
            )),
            (i = String.fromCharCode(
              null == e.charCode ? e.keyCode : e.charCode,
            )),
            e.ctrlKey || e.metaKey || i < " " || !t || -1 < t.indexOf(i)
          );
      },
      _doKeyUp: function (e) {
        e = Y.datepicker._getInst(e.target);
        if (e.input.val() !== e.lastVal)
          try {
            Y.datepicker.parseDate(
              Y.datepicker._get(e, "dateFormat"),
              e.input ? e.input.val() : null,
              Y.datepicker._getFormatConfig(e),
            ) &&
              (Y.datepicker._setDateFromField(e),
              Y.datepicker._updateAlternate(e),
              Y.datepicker._updateDatepicker(e));
          } catch (e) {}
        return !0;
      },
      _showDatepicker: function (e) {
        var t, i, n, r;
        ("input" !== (e = e.target || e).nodeName.toLowerCase() &&
          (e = Y("input", e.parentNode)[0]),
          Y.datepicker._isDisabledDatepicker(e) ||
            Y.datepicker._lastInput === e ||
            ((r = Y.datepicker._getInst(e)),
            Y.datepicker._curInst &&
              Y.datepicker._curInst !== r &&
              (Y.datepicker._curInst.dpDiv.stop(!0, !0),
              r &&
                Y.datepicker._datepickerShowing &&
                Y.datepicker._hideDatepicker(Y.datepicker._curInst.input[0])),
            !1 !==
              (i = (n = Y.datepicker._get(r, "beforeShow"))
                ? n.apply(e, [e, r])
                : {}) &&
              (se(r.settings, i),
              (r.lastVal = null),
              (Y.datepicker._lastInput = e),
              Y.datepicker._setDateFromField(r),
              Y.datepicker._inDialog && (e.value = ""),
              Y.datepicker._pos ||
                ((Y.datepicker._pos = Y.datepicker._findPos(e)),
                (Y.datepicker._pos[1] += e.offsetHeight)),
              (t = !1),
              Y(e)
                .parents()
                .each(function () {
                  return !(t |= "fixed" === Y(this).css("position"));
                }),
              (n = {
                left: Y.datepicker._pos[0],
                top: Y.datepicker._pos[1],
              }),
              (Y.datepicker._pos = null),
              r.dpDiv.empty(),
              r.dpDiv.css({
                position: "absolute",
                display: "block",
                top: "-1000px",
              }),
              Y.datepicker._updateDatepicker(r),
              (n = Y.datepicker._checkOffset(r, n, t)),
              r.dpDiv.css({
                position:
                  Y.datepicker._inDialog && Y.blockUI
                    ? "static"
                    : t
                      ? "fixed"
                      : "absolute",
                display: "none",
                left: n.left + "px",
                top: n.top + "px",
              }),
              r.inline ||
                ((i = Y.datepicker._get(r, "showAnim")),
                (n = Y.datepicker._get(r, "duration")),
                r.dpDiv.css(
                  "z-index",
                  (function (e) {
                    for (var t, i; e.length && e[0] !== document; ) {
                      if (
                        ("absolute" === (t = e.css("position")) ||
                          "relative" === t ||
                          "fixed" === t) &&
                        ((i = parseInt(e.css("zIndex"), 10)),
                        !isNaN(i) && 0 !== i)
                      )
                        return i;
                      e = e.parent();
                    }
                    return 0;
                  })(Y(e)) + 1,
                ),
                (Y.datepicker._datepickerShowing = !0),
                Y.effects && Y.effects.effect[i]
                  ? r.dpDiv.show(i, Y.datepicker._get(r, "showOptions"), n)
                  : r.dpDiv[i || "show"](i ? n : null),
                Y.datepicker._shouldFocusInput(r) && r.input.trigger("focus"),
                (Y.datepicker._curInst = r)))));
      },
      _updateDatepicker: function (e) {
        ((this.maxRows = 4),
          (ie = e).dpDiv.empty().append(this._generateHTML(e)),
          this._attachHandlers(e));
        var t,
          i = this._getNumberOfMonths(e),
          n = i[1],
          r = e.dpDiv.find("." + this._dayOverClass + " a"),
          o = Y.datepicker._get(e, "onUpdateDatepicker");
        (0 < r.length && oe.apply(r.get(0)),
          e.dpDiv
            .removeClass(
              "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4",
            )
            .width(""),
          1 < n &&
            e.dpDiv
              .addClass("ui-datepicker-multi-" + n)
              .css("width", 17 * n + "em"),
          e.dpDiv[(1 !== i[0] || 1 !== i[1] ? "add" : "remove") + "Class"](
            "ui-datepicker-multi",
          ),
          e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"](
            "ui-datepicker-rtl",
          ),
          e === Y.datepicker._curInst &&
            Y.datepicker._datepickerShowing &&
            Y.datepicker._shouldFocusInput(e) &&
            e.input.trigger("focus"),
          e.yearshtml &&
            ((t = e.yearshtml),
            setTimeout(function () {
              (t === e.yearshtml &&
                e.yearshtml &&
                e.dpDiv
                  .find("select.ui-datepicker-year")
                  .first()
                  .replaceWith(e.yearshtml),
                (t = e.yearshtml = null));
            }, 0)),
          o && o.apply(e.input ? e.input[0] : null, [e]));
      },
      _shouldFocusInput: function (e) {
        return (
          e.input &&
          e.input.is(":visible") &&
          !e.input.is(":disabled") &&
          !e.input.is(":focus")
        );
      },
      _checkOffset: function (e, t, i) {
        var n = e.dpDiv.outerWidth(),
          r = e.dpDiv.outerHeight(),
          o = e.input ? e.input.outerWidth() : 0,
          s = e.input ? e.input.outerHeight() : 0,
          a =
            document.documentElement.clientWidth +
            (i ? 0 : Y(document).scrollLeft()),
          l =
            document.documentElement.clientHeight +
            (i ? 0 : Y(document).scrollTop());
        return (
          (t.left -= this._get(e, "isRTL") ? n - o : 0),
          (t.left -=
            i && t.left === e.input.offset().left
              ? Y(document).scrollLeft()
              : 0),
          (t.top -=
            i && t.top === e.input.offset().top + s
              ? Y(document).scrollTop()
              : 0),
          (t.left -= Math.min(
            t.left,
            t.left + n > a && n < a ? Math.abs(t.left + n - a) : 0,
          )),
          (t.top -= Math.min(
            t.top,
            t.top + r > l && r < l ? Math.abs(r + s) : 0,
          )),
          t
        );
      },
      _findPos: function (e) {
        for (
          var t = this._getInst(e), i = this._get(t, "isRTL");
          e &&
          ("hidden" === e.type || 1 !== e.nodeType || Y.expr.pseudos.hidden(e));

        )
          e = e[i ? "previousSibling" : "nextSibling"];
        return [(t = Y(e).offset()).left, t.top];
      },
      _hideDatepicker: function (e) {
        var t,
          i,
          n = this._curInst;
        !n ||
          (e && n !== Y.data(e, "datepicker")) ||
          (this._datepickerShowing &&
            ((t = this._get(n, "showAnim")),
            (i = this._get(n, "duration")),
            (e = function () {
              Y.datepicker._tidyDialog(n);
            }),
            Y.effects && (Y.effects.effect[t] || Y.effects[t])
              ? n.dpDiv.hide(t, Y.datepicker._get(n, "showOptions"), i, e)
              : n.dpDiv[
                  "slideDown" === t
                    ? "slideUp"
                    : "fadeIn" === t
                      ? "fadeOut"
                      : "hide"
                ](t ? i : null, e),
            t || e(),
            (this._datepickerShowing = !1),
            (e = this._get(n, "onClose")) &&
              e.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",
              }),
              Y.blockUI && (Y.unblockUI(), Y("body").append(this.dpDiv))),
            (this._inDialog = !1)));
      },
      _tidyDialog: function (e) {
        e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar");
      },
      _checkExternalClick: function (e) {
        var t;
        Y.datepicker._curInst &&
          ((t = Y(e.target)),
          (e = Y.datepicker._getInst(t[0])),
          ((t[0].id === Y.datepicker._mainDivId ||
            0 !== t.parents("#" + Y.datepicker._mainDivId).length ||
            t.hasClass(Y.datepicker.markerClassName) ||
            t.closest("." + Y.datepicker._triggerClass).length ||
            !Y.datepicker._datepickerShowing ||
            (Y.datepicker._inDialog && Y.blockUI)) &&
            (!t.hasClass(Y.datepicker.markerClassName) ||
              Y.datepicker._curInst === e)) ||
            Y.datepicker._hideDatepicker());
      },
      _adjustDate: function (e, t, i) {
        var n = Y(e),
          e = this._getInst(n[0]);
        this._isDisabledDatepicker(n[0]) ||
          (this._adjustInstDate(e, t, i), this._updateDatepicker(e));
      },
      _gotoToday: function (e) {
        var t = Y(e),
          i = this._getInst(t[0]);
        (this._get(i, "gotoCurrent") && i.currentDay
          ? ((i.selectedDay = i.currentDay),
            (i.drawMonth = i.selectedMonth = i.currentMonth),
            (i.drawYear = i.selectedYear = i.currentYear))
          : ((e = new Date()),
            (i.selectedDay = e.getDate()),
            (i.drawMonth = i.selectedMonth = e.getMonth()),
            (i.drawYear = i.selectedYear = e.getFullYear())),
          this._notifyChange(i),
          this._adjustDate(t));
      },
      _selectMonthYear: function (e, t, i) {
        var n = Y(e),
          e = this._getInst(n[0]);
        ((e["selected" + ("M" === i ? "Month" : "Year")] = e[
          "draw" + ("M" === i ? "Month" : "Year")
        ] =
          parseInt(t.options[t.selectedIndex].value, 10)),
          this._notifyChange(e),
          this._adjustDate(n));
      },
      _selectDay: function (e, t, i, n) {
        var r = Y(e);
        Y(n).hasClass(this._unselectableClass) ||
          this._isDisabledDatepicker(r[0]) ||
          (((r = this._getInst(r[0])).selectedDay = r.currentDay =
            parseInt(Y("a", n).attr("data-date"))),
          (r.selectedMonth = r.currentMonth = t),
          (r.selectedYear = r.currentYear = i),
          this._selectDate(
            e,
            this._formatDate(r, r.currentDay, r.currentMonth, r.currentYear),
          ));
      },
      _clearDate: function (e) {
        e = Y(e);
        this._selectDate(e, "");
      },
      _selectDate: function (e, t) {
        var i = Y(e),
          e = this._getInst(i[0]);
        ((t = null != t ? t : this._formatDate(e)),
          e.input && e.input.val(t),
          this._updateAlternate(e),
          (i = this._get(e, "onSelect"))
            ? i.apply(e.input ? e.input[0] : null, [t, e])
            : e.input && e.input.trigger("change"),
          e.inline
            ? this._updateDatepicker(e)
            : (this._hideDatepicker(),
              (this._lastInput = e.input[0]),
              "object" != typeof e.input[0] && e.input.trigger("focus"),
              (this._lastInput = null)));
      },
      _updateAlternate: function (e) {
        var t,
          i,
          n = this._get(e, "altField");
        n &&
          ((t = this._get(e, "altFormat") || this._get(e, "dateFormat")),
          (i = this._getDate(e)),
          (e = this.formatDate(t, i, this._getFormatConfig(e))),
          Y(document).find(n).val(e));
      },
      noWeekends: function (e) {
        e = e.getDay();
        return [0 < e && e < 6, ""];
      },
      iso8601Week: function (e) {
        var t = new Date(e.getTime());
        return (
          t.setDate(t.getDate() + 4 - (t.getDay() || 7)),
          (e = t.getTime()),
          t.setMonth(0),
          t.setDate(1),
          Math.floor(Math.round((e - t) / 864e5) / 7) + 1
        );
      },
      parseDate: function (t, r, e) {
        if (null == t || null == r) throw "Invalid arguments";
        if ("" === (r = "object" == typeof r ? r.toString() : r + ""))
          return null;
        for (
          var i,
            n,
            o,
            s = 0,
            a =
              (e ? e.shortYearCutoff : null) || this._defaults.shortYearCutoff,
            a =
              "string" != typeof a
                ? a
                : (new Date().getFullYear() % 100) + parseInt(a, 10),
            l = (e ? e.dayNamesShort : null) || this._defaults.dayNamesShort,
            c = (e ? e.dayNames : null) || this._defaults.dayNames,
            u =
              (e ? e.monthNamesShort : null) || this._defaults.monthNamesShort,
            h = (e ? e.monthNames : null) || this._defaults.monthNames,
            d = -1,
            p = -1,
            f = -1,
            g = -1,
            m = !1,
            v = function (e) {
              e = w + 1 < t.length && t.charAt(w + 1) === e;
              return (e && w++, e);
            },
            b = function (e) {
              var t = v(e),
                t =
                  "@" === e
                    ? 14
                    : "!" === e
                      ? 20
                      : "y" === e && t
                        ? 4
                        : "o" === e
                          ? 3
                          : 2,
                t = new RegExp("^\\d{" + ("y" === e ? t : 1) + "," + t + "}"),
                t = r.substring(s).match(t);
              if (!t) throw "Missing number at position " + s;
              return ((s += t[0].length), parseInt(t[0], 10));
            },
            y = function (e, t, i) {
              var n = -1,
                t = Y.map(v(e) ? i : t, function (e, t) {
                  return [[t, e]];
                }).sort(function (e, t) {
                  return -(e[1].length - t[1].length);
                });
              if (
                (Y.each(t, function (e, t) {
                  var i = t[1];
                  if (r.substr(s, i.length).toLowerCase() === i.toLowerCase())
                    return ((n = t[0]), (s += i.length), !1);
                }),
                -1 !== n)
              )
                return n + 1;
              throw "Unknown name at position " + s;
            },
            _ = function () {
              if (r.charAt(s) !== t.charAt(w))
                throw "Unexpected literal at position " + s;
              s++;
            },
            w = 0;
          w < t.length;
          w++
        )
          if (m) "'" !== t.charAt(w) || v("'") ? _() : (m = !1);
          else
            switch (t.charAt(w)) {
              case "d":
                f = b("d");
                break;
              case "D":
                y("D", l, c);
                break;
              case "o":
                g = 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 = (o = new Date(b("@"))).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate()));
                break;
              case "!":
                ((d = (o = new Date(
                  (b("!") - this._ticksTo1970) / 1e4,
                )).getFullYear()),
                  (p = o.getMonth() + 1),
                  (f = o.getDate()));
                break;
              case "'":
                v("'") ? _() : (m = !0);
                break;
              default:
                _();
            }
        if (s < r.length && ((n = r.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 < g)
        )
          for (p = 1, f = g; ; ) {
            if (f <= (i = this._getDaysInMonth(d, p - 1))) break;
            (p++, (f -= i));
          }
        if (
          (o = this._daylightSavingAdjust(
            new Date(d, p - 1, f),
          )).getFullYear() !== d ||
          o.getMonth() + 1 !== p ||
          o.getDate() !== f
        )
          throw "Invalid date";
        return o;
      },
      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 (t, e, i) {
        if (!e) return "";
        function n(e, t, i) {
          var n = "" + t;
          if (u(e)) for (; n.length < i; ) n = "0" + n;
          return n;
        }
        function r(e, t, i, n) {
          return (u(e) ? n : i)[t];
        }
        var o,
          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 (e) {
            e = o + 1 < t.length && t.charAt(o + 1) === e;
            return (e && o++, e);
          },
          h = "",
          d = !1;
        if (e)
          for (o = 0; o < t.length; o++)
            if (d)
              "'" !== t.charAt(o) || u("'") ? (h += t.charAt(o)) : (d = !1);
            else
              switch (t.charAt(o)) {
                case "d":
                  h += n("d", e.getDate(), 2);
                  break;
                case "D":
                  h += r("D", e.getDay(), s, a);
                  break;
                case "o":
                  h += n(
                    "o",
                    Math.round(
                      (new Date(
                        e.getFullYear(),
                        e.getMonth(),
                        e.getDate(),
                      ).getTime() -
                        new Date(e.getFullYear(), 0, 0).getTime()) /
                        864e5,
                    ),
                    3,
                  );
                  break;
                case "m":
                  h += n("m", e.getMonth() + 1, 2);
                  break;
                case "M":
                  h += r("M", e.getMonth(), l, c);
                  break;
                case "y":
                  h += u("y")
                    ? e.getFullYear()
                    : (e.getFullYear() % 100 < 10 ? "0" : "") +
                      (e.getFullYear() % 100);
                  break;
                case "@":
                  h += e.getTime();
                  break;
                case "!":
                  h += 1e4 * e.getTime() + this._ticksTo1970;
                  break;
                case "'":
                  u("'") ? (h += "'") : (d = !0);
                  break;
                default:
                  h += t.charAt(o);
              }
        return h;
      },
      _possibleChars: function (t) {
        for (
          var e = "",
            i = !1,
            n = function (e) {
              e = r + 1 < t.length && t.charAt(r + 1) === e;
              return (e && r++, e);
            },
            r = 0;
          r < t.length;
          r++
        )
          if (i) "'" !== t.charAt(r) || n("'") ? (e += t.charAt(r)) : (i = !1);
          else
            switch (t.charAt(r)) {
              case "d":
              case "m":
              case "y":
              case "@":
                e += "0123456789";
                break;
              case "D":
              case "M":
                return null;
              case "'":
                n("'") ? (e += "'") : (i = !0);
                break;
              default:
                e += t.charAt(r);
            }
        return e;
      },
      _get: function (e, t) {
        return (void 0 !== e.settings[t] ? e.settings : this._defaults)[t];
      },
      _setDateFromField: function (e, t) {
        if (e.input.val() !== e.lastVal) {
          var i = this._get(e, "dateFormat"),
            n = (e.lastVal = e.input ? e.input.val() : null),
            r = this._getDefaultDate(e),
            o = r,
            s = this._getFormatConfig(e);
          try {
            o = this.parseDate(i, n, s) || r;
          } catch (e) {
            n = t ? "" : n;
          }
          ((e.selectedDay = o.getDate()),
            (e.drawMonth = e.selectedMonth = o.getMonth()),
            (e.drawYear = e.selectedYear = o.getFullYear()),
            (e.currentDay = n ? o.getDate() : 0),
            (e.currentMonth = n ? o.getMonth() : 0),
            (e.currentYear = n ? o.getFullYear() : 0),
            this._adjustInstDate(e));
        }
      },
      _getDefaultDate: function (e) {
        return this._restrictMinMax(
          e,
          this._determineDate(e, this._get(e, "defaultDate"), new Date()),
        );
      },
      _determineDate: function (a, e, t) {
        var i,
          n,
          e =
            null == e || "" === e
              ? t
              : "string" == typeof e
                ? (function (e) {
                    try {
                      return Y.datepicker.parseDate(
                        Y.datepicker._get(a, "dateFormat"),
                        e,
                        Y.datepicker._getFormatConfig(a),
                      );
                    } catch (e) {}
                    for (
                      var t =
                          (e.toLowerCase().match(/^c/)
                            ? Y.datepicker._getDate(a)
                            : null) || new Date(),
                        i = t.getFullYear(),
                        n = t.getMonth(),
                        r = t.getDate(),
                        o = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
                        s = o.exec(e);
                      s;

                    ) {
                      switch (s[2] || "d") {
                        case "d":
                        case "D":
                          r += parseInt(s[1], 10);
                          break;
                        case "w":
                        case "W":
                          r += 7 * parseInt(s[1], 10);
                          break;
                        case "m":
                        case "M":
                          ((n += parseInt(s[1], 10)),
                            (r = Math.min(
                              r,
                              Y.datepicker._getDaysInMonth(i, n),
                            )));
                          break;
                        case "y":
                        case "Y":
                          ((i += parseInt(s[1], 10)),
                            (r = Math.min(
                              r,
                              Y.datepicker._getDaysInMonth(i, n),
                            )));
                      }
                      s = o.exec(e);
                    }
                    return new Date(i, n, r);
                  })(e)
                : "number" == typeof e
                  ? isNaN(e)
                    ? t
                    : ((i = e), (n = new Date()).setDate(n.getDate() + i), n)
                  : new Date(e.getTime());
        return (
          (e = e && "Invalid Date" === e.toString() ? t : e) &&
            (e.setHours(0),
            e.setMinutes(0),
            e.setSeconds(0),
            e.setMilliseconds(0)),
          this._daylightSavingAdjust(e)
        );
      },
      _daylightSavingAdjust: function (e) {
        return e
          ? (e.setHours(12 < e.getHours() ? e.getHours() + 2 : 0), e)
          : null;
      },
      _setDate: function (e, t, i) {
        var n = !t,
          r = e.selectedMonth,
          o = e.selectedYear,
          t = this._restrictMinMax(e, this._determineDate(e, t, new Date()));
        ((e.selectedDay = e.currentDay = t.getDate()),
          (e.drawMonth = e.selectedMonth = e.currentMonth = t.getMonth()),
          (e.drawYear = e.selectedYear = e.currentYear = t.getFullYear()),
          (r === e.selectedMonth && o === e.selectedYear) ||
            i ||
            this._notifyChange(e),
          this._adjustInstDate(e),
          e.input && e.input.val(n ? "" : this._formatDate(e)));
      },
      _getDate: function (e) {
        return !e.currentYear || (e.input && "" === e.input.val())
          ? null
          : this._daylightSavingAdjust(
              new Date(e.currentYear, e.currentMonth, e.currentDay),
            );
      },
      _attachHandlers: function (e) {
        var t = this._get(e, "stepMonths"),
          i = "#" + e.id.replace(/\\\\/g, "\\");
        e.dpDiv.find("[data-handler]").map(function () {
          var e = {
            prev: function () {
              Y.datepicker._adjustDate(i, -t, "M");
            },
            next: function () {
              Y.datepicker._adjustDate(i, +t, "M");
            },
            hide: function () {
              Y.datepicker._hideDatepicker();
            },
            today: function () {
              Y.datepicker._gotoToday(i);
            },
            selectDay: function () {
              return (
                Y.datepicker._selectDay(
                  i,
                  +this.getAttribute("data-month"),
                  +this.getAttribute("data-year"),
                  this,
                ),
                !1
              );
            },
            selectMonth: function () {
              return (Y.datepicker._selectMonthYear(i, this, "M"), !1);
            },
            selectYear: function () {
              return (Y.datepicker._selectMonthYear(i, this, "Y"), !1);
            },
          };
          Y(this).on(
            this.getAttribute("data-event"),
            e[this.getAttribute("data-handler")],
          );
        });
      },
      _generateHTML: function (e) {
        var t,
          i,
          n,
          r,
          o,
          s,
          a,
          l,
          c,
          u,
          h,
          d,
          p,
          f,
          g,
          m,
          v,
          b,
          y,
          _,
          w,
          x,
          k,
          C,
          P,
          T,
          S,
          H,
          D,
          E,
          I,
          A,
          O = new Date(),
          M = this._daylightSavingAdjust(
            new Date(O.getFullYear(), O.getMonth(), O.getDate()),
          ),
          L = this._get(e, "isRTL"),
          j = this._get(e, "showButtonPanel"),
          N = this._get(e, "hideIfNoPrevNext"),
          F = this._get(e, "navigationAsDateFormat"),
          z = this._getNumberOfMonths(e),
          R = this._get(e, "showCurrentAtPos"),
          O = this._get(e, "stepMonths"),
          B = 1 !== z[0] || 1 !== z[1],
          q = this._daylightSavingAdjust(
            e.currentDay
              ? new Date(e.currentYear, e.currentMonth, e.currentDay)
              : new Date(9999, 9, 9),
          ),
          $ = this._getMinMaxDate(e, "min"),
          W = this._getMinMaxDate(e, "max"),
          U = e.drawMonth - R,
          V = e.drawYear;
        if ((U < 0 && ((U += 12), V--), W))
          for (
            t = this._daylightSavingAdjust(
              new Date(
                W.getFullYear(),
                W.getMonth() - z[0] * z[1] + 1,
                W.getDate(),
              ),
            ),
              t = $ && t < $ ? $ : t;
            this._daylightSavingAdjust(new Date(V, U, 1)) > t;

          )
            --U < 0 && ((U = 11), V--);
        for (
          e.drawMonth = U,
            e.drawYear = V,
            R = this._get(e, "prevText"),
            R = F
              ? this.formatDate(
                  R,
                  this._daylightSavingAdjust(new Date(V, U - O, 1)),
                  this._getFormatConfig(e),
                )
              : R,
            i = this._canAdjustMonth(e, -1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-prev ui-corner-all",
                    "data-handler": "prev",
                    "data-event": "click",
                    title: R,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (L ? "e" : "w"),
                      )
                      .text(R),
                  )[0].outerHTML
              : N
                ? ""
                : Y("<a>")
                    .attr({
                      class:
                        "ui-datepicker-prev ui-corner-all ui-state-disabled",
                      title: R,
                    })
                    .append(
                      Y("<span>")
                        .addClass(
                          "ui-icon ui-icon-circle-triangle-" + (L ? "e" : "w"),
                        )
                        .text(R),
                    )[0].outerHTML,
            R = this._get(e, "nextText"),
            R = F
              ? this.formatDate(
                  R,
                  this._daylightSavingAdjust(new Date(V, U + O, 1)),
                  this._getFormatConfig(e),
                )
              : R,
            n = this._canAdjustMonth(e, 1, V, U)
              ? Y("<a>")
                  .attr({
                    class: "ui-datepicker-next ui-corner-all",
                    "data-handler": "next",
                    "data-event": "click",
                    title: R,
                  })
                  .append(
                    Y("<span>")
                      .addClass(
                        "ui-icon ui-icon-circle-triangle-" + (L ? "w" : "e"),
                      )
                      .text(R),
                  )[0].outerHTML
              : N
                ? ""
                : Y("<a>")
                    .attr({
                      class:
                        "ui-datepicker-next ui-corner-all ui-state-disabled",
                      title: R,
                    })
                    .append(
                      Y("<span>")
                        .attr(
                          "class",
                          "ui-icon ui-icon-circle-triangle-" + (L ? "w" : "e"),
                        )
                        .text(R),
                    )[0].outerHTML,
            O = this._get(e, "currentText"),
            N = this._get(e, "gotoCurrent") && e.currentDay ? q : M,
            O = F ? this.formatDate(O, N, this._getFormatConfig(e)) : O,
            R = "",
            e.inline ||
              (R = Y("<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(e, "closeText"))[0].outerHTML),
            F = "",
            j &&
              (F = Y("<div class='ui-datepicker-buttonpane ui-widget-content'>")
                .append(L ? R : "")
                .append(
                  this._isInRange(e, N)
                    ? Y("<button>")
                        .attr({
                          type: "button",
                          class:
                            "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
                          "data-handler": "today",
                          "data-event": "click",
                        })
                        .text(O)
                    : "",
                )
                .append(L ? "" : R)[0].outerHTML),
            r = parseInt(this._get(e, "firstDay"), 10),
            r = isNaN(r) ? 0 : r,
            o = this._get(e, "showWeek"),
            s = this._get(e, "dayNames"),
            a = this._get(e, "dayNamesMin"),
            l = this._get(e, "monthNames"),
            c = this._get(e, "monthNamesShort"),
            u = this._get(e, "beforeShowDay"),
            h = this._get(e, "showOtherMonths"),
            d = this._get(e, "selectOtherMonths"),
            p = this._getDefaultDate(e),
            f = "",
            m = 0;
          m < z[0];
          m++
        ) {
          for (v = "", this.maxRows = 4, b = 0; b < z[1]; b++) {
            if (
              ((y = this._daylightSavingAdjust(new Date(V, U, e.selectedDay))),
              (_ = " ui-corner-all"),
              (w = ""),
              B)
            ) {
              if (((w += "<div class='ui-datepicker-group"), 1 < z[1]))
                switch (b) {
                  case 0:
                    ((w += " ui-datepicker-group-first"),
                      (_ = " ui-corner-" + (L ? "right" : "left")));
                    break;
                  case z[1] - 1:
                    ((w += " ui-datepicker-group-last"),
                      (_ = " ui-corner-" + (L ? "left" : "right")));
                    break;
                  default:
                    ((w += " ui-datepicker-group-middle"), (_ = ""));
                }
              w += "'>";
            }
            for (
              w +=
                "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" +
                _ +
                "'>" +
                (/all|left/.test(_) && 0 === m ? (L ? n : i) : "") +
                (/all|right/.test(_) && 0 === m ? (L ? i : n) : "") +
                this._generateMonthYearHeader(
                  e,
                  U,
                  V,
                  $,
                  W,
                  0 < m || 0 < b,
                  l,
                  c,
                ) +
                "</div><table class='ui-datepicker-calendar'><thead><tr>",
                x = o
                  ? "<th class='ui-datepicker-week-col'>" +
                    this._get(e, "weekHeader") +
                    "</th>"
                  : "",
                g = 0;
              g < 7;
              g++
            )
              x +=
                "<th scope='col'" +
                (5 <= (g + r + 6) % 7
                  ? " class='ui-datepicker-week-end'"
                  : "") +
                "><span title='" +
                s[(k = (g + r) % 7)] +
                "'>" +
                a[k] +
                "</span></th>";
            for (
              w += x + "</tr></thead><tbody>",
                P = this._getDaysInMonth(V, U),
                V === e.selectedYear &&
                  U === e.selectedMonth &&
                  (e.selectedDay = Math.min(e.selectedDay, P)),
                C = (this._getFirstDayOfMonth(V, U) - r + 7) % 7,
                P = Math.ceil((C + P) / 7),
                T = B && this.maxRows > P ? this.maxRows : P,
                this.maxRows = T,
                S = this._daylightSavingAdjust(new Date(V, U, 1 - C)),
                H = 0;
              H < T;
              H++
            ) {
              for (
                w += "<tr>",
                  D = o
                    ? "<td class='ui-datepicker-week-col'>" +
                      this._get(e, "calculateWeek")(S) +
                      "</td>"
                    : "",
                  g = 0;
                g < 7;
                g++
              )
                ((E = u ? u.apply(e.input ? e.input[0] : null, [S]) : [!0, ""]),
                  (A =
                    ((I = S.getMonth() !== U) && !d) ||
                    !E[0] ||
                    ($ && S < $) ||
                    (W && W < S)),
                  (D +=
                    "<td class='" +
                    (5 <= (g + r + 6) % 7 ? " ui-datepicker-week-end" : "") +
                    (I ? " ui-datepicker-other-month" : "") +
                    ((S.getTime() === y.getTime() &&
                      U === e.selectedMonth &&
                      e._keyEvent) ||
                    (p.getTime() === S.getTime() && p.getTime() === y.getTime())
                      ? " " + this._dayOverClass
                      : "") +
                    (A
                      ? " " + this._unselectableClass + " ui-state-disabled"
                      : "") +
                    (I && !h
                      ? ""
                      : " " +
                        E[1] +
                        (S.getTime() === q.getTime()
                          ? " " + this._currentClass
                          : "") +
                        (S.getTime() === M.getTime()
                          ? " ui-datepicker-today"
                          : "")) +
                    "'" +
                    ((I && !h) || !E[2]
                      ? ""
                      : " title='" + E[2].replace(/'/g, "&#39;") + "'") +
                    (A
                      ? ""
                      : " data-handler='selectDay' data-event='click' data-month='" +
                        S.getMonth() +
                        "' data-year='" +
                        S.getFullYear() +
                        "'") +
                    ">" +
                    (I && !h
                      ? "&#xa0;"
                      : A
                        ? "<span class='ui-state-default'>" +
                          S.getDate() +
                          "</span>"
                        : "<a class='ui-state-default" +
                          (S.getTime() === M.getTime()
                            ? " ui-state-highlight"
                            : "") +
                          (S.getTime() === q.getTime()
                            ? " ui-state-active"
                            : "") +
                          (I ? " ui-priority-secondary" : "") +
                          "' href='#' aria-current='" +
                          (S.getTime() === q.getTime() ? "true" : "false") +
                          "' data-date='" +
                          S.getDate() +
                          "'>" +
                          S.getDate() +
                          "</a>") +
                    "</td>"),
                  S.setDate(S.getDate() + 1),
                  (S = this._daylightSavingAdjust(S)));
              w += D + "</tr>";
            }
            (11 < ++U && ((U = 0), V++),
              (v += w +=
                "</tbody></table>" +
                (B
                  ? "</div>" +
                    (0 < z[0] && b === z[1] - 1
                      ? "<div class='ui-datepicker-row-break'></div>"
                      : "")
                  : "")));
          }
          f += v;
        }
        return ((f += F), (e._keyEvent = !1), f);
      },
      _generateMonthYearHeader: function (e, t, i, n, r, o, s, a) {
        var l,
          c,
          u,
          h,
          d,
          p,
          f = this._get(e, "changeMonth"),
          g = this._get(e, "changeYear"),
          m = this._get(e, "showMonthAfterYear"),
          v = this._get(e, "selectMonthLabel"),
          b = this._get(e, "selectYearLabel"),
          y = "<div class='ui-datepicker-title'>",
          _ = "";
        if (o || !f)
          _ += "<span class='ui-datepicker-month'>" + s[t] + "</span>";
        else {
          for (
            l = n && n.getFullYear() === i,
              c = r && r.getFullYear() === i,
              _ +=
                "<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 <= r.getMonth()) &&
              (_ +=
                "<option value='" +
                u +
                "'" +
                (u === t ? " selected='selected'" : "") +
                ">" +
                a[u] +
                "</option>");
          _ += "</select>";
        }
        if ((m || (y += _ + (!o && f && g ? "" : "&#xa0;")), !e.yearshtml))
          if (((e.yearshtml = ""), o || !g))
            y += "<span class='ui-datepicker-year'>" + i + "</span>";
          else {
            for (
              s = this._get(e, "yearRange").split(":"),
                h = new Date().getFullYear(),
                d = (v = function (e) {
                  e = e.match(/c[+\-].*/)
                    ? i + parseInt(e.substring(1), 10)
                    : e.match(/[+\-].*/)
                      ? h + parseInt(e, 10)
                      : parseInt(e, 10);
                  return isNaN(e) ? h : e;
                })(s[0]),
                p = Math.max(d, v(s[1] || "")),
                d = n ? Math.max(d, n.getFullYear()) : d,
                p = r ? Math.min(p, r.getFullYear()) : p,
                e.yearshtml +=
                  "<select class='ui-datepicker-year' aria-label='" +
                  b +
                  "' data-handler='selectYear' data-event='change'>";
              d <= p;
              d++
            )
              e.yearshtml +=
                "<option value='" +
                d +
                "'" +
                (d === i ? " selected='selected'" : "") +
                ">" +
                d +
                "</option>";
            ((e.yearshtml += "</select>"),
              (y += e.yearshtml),
              (e.yearshtml = null));
          }
        return (
          (y += this._get(e, "yearSuffix")),
          m && (y += (!o && f && g ? "" : "&#xa0;") + _),
          (y += "</div>")
        );
      },
      _adjustInstDate: function (e, t, i) {
        var n = e.selectedYear + ("Y" === i ? t : 0),
          r = e.selectedMonth + ("M" === i ? t : 0),
          t =
            Math.min(e.selectedDay, this._getDaysInMonth(n, r)) +
            ("D" === i ? t : 0),
          t = this._restrictMinMax(
            e,
            this._daylightSavingAdjust(new Date(n, r, t)),
          );
        ((e.selectedDay = t.getDate()),
          (e.drawMonth = e.selectedMonth = t.getMonth()),
          (e.drawYear = e.selectedYear = t.getFullYear()),
          ("M" !== i && "Y" !== i) || this._notifyChange(e));
      },
      _restrictMinMax: function (e, t) {
        var i = this._getMinMaxDate(e, "min"),
          e = this._getMinMaxDate(e, "max"),
          t = i && t < i ? i : t;
        return e && e < t ? e : t;
      },
      _notifyChange: function (e) {
        var t = this._get(e, "onChangeMonthYear");
        t &&
          t.apply(e.input ? e.input[0] : null, [
            e.selectedYear,
            e.selectedMonth + 1,
            e,
          ]);
      },
      _getNumberOfMonths: function (e) {
        e = this._get(e, "numberOfMonths");
        return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e;
      },
      _getMinMaxDate: function (e, t) {
        return this._determineDate(e, this._get(e, t + "Date"), null);
      },
      _getDaysInMonth: function (e, t) {
        return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate();
      },
      _getFirstDayOfMonth: function (e, t) {
        return new Date(e, t, 1).getDay();
      },
      _canAdjustMonth: function (e, t, i, n) {
        var r = this._getNumberOfMonths(e),
          r = this._daylightSavingAdjust(
            new Date(i, n + (t < 0 ? t : r[0] * r[1]), 1),
          );
        return (
          t < 0 &&
            r.setDate(this._getDaysInMonth(r.getFullYear(), r.getMonth())),
          this._isInRange(e, r)
        );
      },
      _isInRange: function (e, t) {
        var i = this._getMinMaxDate(e, "min"),
          n = this._getMinMaxDate(e, "max"),
          r = null,
          o = null,
          s = this._get(e, "yearRange");
        return (
          s &&
            ((e = s.split(":")),
            (s = new Date().getFullYear()),
            (r = parseInt(e[0], 10)),
            (o = parseInt(e[1], 10)),
            e[0].match(/[+\-].*/) && (r += s),
            e[1].match(/[+\-].*/) && (o += s)),
          (!i || t.getTime() >= i.getTime()) &&
            (!n || t.getTime() <= n.getTime()) &&
            (!r || t.getFullYear() >= r) &&
            (!o || t.getFullYear() <= o)
        );
      },
      _getFormatConfig: function (e) {
        var t = this._get(e, "shortYearCutoff");
        return {
          shortYearCutoff: (t =
            "string" != typeof t
              ? t
              : (new Date().getFullYear() % 100) + parseInt(t, 10)),
          dayNamesShort: this._get(e, "dayNamesShort"),
          dayNames: this._get(e, "dayNames"),
          monthNamesShort: this._get(e, "monthNamesShort"),
          monthNames: this._get(e, "monthNames"),
        };
      },
      _formatDate: function (e, t, i, n) {
        t ||
          ((e.currentDay = e.selectedDay),
          (e.currentMonth = e.selectedMonth),
          (e.currentYear = e.selectedYear));
        t = t
          ? "object" == typeof t
            ? t
            : this._daylightSavingAdjust(new Date(n, i, t))
          : this._daylightSavingAdjust(
              new Date(e.currentYear, e.currentMonth, e.currentDay),
            );
        return this.formatDate(
          this._get(e, "dateFormat"),
          t,
          this._getFormatConfig(e),
        );
      },
    }),
    (Y.fn.datepicker = function (e) {
      if (!this.length) return this;
      (Y.datepicker.initialized ||
        (Y(document).on("mousedown", Y.datepicker._checkExternalClick),
        (Y.datepicker.initialized = !0)),
        0 === Y("#" + Y.datepicker._mainDivId).length &&
          Y("body").append(Y.datepicker.dpDiv));
      var t = Array.prototype.slice.call(arguments, 1);
      return ("string" == typeof e &&
        ("isDisabled" === e || "getDate" === e || "widget" === e)) ||
        ("option" === e &&
          2 === arguments.length &&
          "string" == typeof arguments[1])
        ? Y.datepicker["_" + e + "Datepicker"].apply(
            Y.datepicker,
            [this[0]].concat(t),
          )
        : this.each(function () {
            "string" == typeof e
              ? Y.datepicker["_" + e + "Datepicker"].apply(
                  Y.datepicker,
                  [this].concat(t),
                )
              : Y.datepicker._attachDatepicker(this, e);
          });
    }),
    (Y.datepicker = new ne()),
    (Y.datepicker.initialized = !1),
    (Y.datepicker.uuid = new Date().getTime()),
    (Y.datepicker.version = "1.13.0"));
  (Y.datepicker,
    (Y.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())));
  var ae = !1;
  Y(document).on("mouseup", function () {
    ae = !1;
  });
  (Y.widget("ui.mouse", {
    version: "1.13.0",
    options: {
      cancel: "input, textarea, button, select, option",
      distance: 1,
      delay: 0,
    },
    _mouseInit: function () {
      var t = this;
      (this.element
        .on("mousedown." + this.widgetName, function (e) {
          return t._mouseDown(e);
        })
        .on("click." + this.widgetName, function (e) {
          if (!0 === Y.data(e.target, t.widgetName + ".preventClickEvent"))
            return (
              Y.removeData(e.target, t.widgetName + ".preventClickEvent"),
              e.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 (e) {
      if (!ae) {
        ((this._mouseMoved = !1),
          this._mouseStarted && this._mouseUp(e),
          (this._mouseDownEvent = e));
        var t = this,
          i = 1 === e.which,
          n =
            !("string" != typeof this.options.cancel || !e.target.nodeName) &&
            Y(e.target).closest(this.options.cancel).length;
        return i && !n && this._mouseCapture(e)
          ? ((this.mouseDelayMet = !this.options.delay),
            this.mouseDelayMet ||
              (this._mouseDelayTimer = setTimeout(function () {
                t.mouseDelayMet = !0;
              }, this.options.delay)),
            this._mouseDistanceMet(e) &&
            this._mouseDelayMet(e) &&
            ((this._mouseStarted = !1 !== this._mouseStart(e)),
            !this._mouseStarted)
              ? (e.preventDefault(), !0)
              : (!0 ===
                  Y.data(e.target, this.widgetName + ".preventClickEvent") &&
                  Y.removeData(
                    e.target,
                    this.widgetName + ".preventClickEvent",
                  ),
                (this._mouseMoveDelegate = function (e) {
                  return t._mouseMove(e);
                }),
                (this._mouseUpDelegate = function (e) {
                  return t._mouseUp(e);
                }),
                this.document
                  .on("mousemove." + this.widgetName, this._mouseMoveDelegate)
                  .on("mouseup." + this.widgetName, this._mouseUpDelegate),
                "slider" === this.widgetName && e.preventDefault(),
                (ae = !0)))
          : !0;
      }
    },
    _mouseMove: function (e) {
      if (this._mouseMoved) {
        if (
          Y.ui.ie &&
          (!document.documentMode || document.documentMode < 9) &&
          !e.button
        )
          return this._mouseUp(e);
        if (!e.which)
          if (
            e.originalEvent.altKey ||
            e.originalEvent.ctrlKey ||
            e.originalEvent.metaKey ||
            e.originalEvent.shiftKey
          )
            this.ignoreMissingWhich = !0;
          else if (!this.ignoreMissingWhich) return this._mouseUp(e);
      }
      return (
        (e.which || e.button) && (this._mouseMoved = !0),
        this._mouseStarted
          ? (this._mouseDrag(e), e.preventDefault())
          : (this._mouseDistanceMet(e) &&
              this._mouseDelayMet(e) &&
              ((this._mouseStarted =
                !1 !== this._mouseStart(this._mouseDownEvent, e)),
              this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)),
            !this._mouseStarted)
      );
    },
    _mouseUp: function (e) {
      (this.document
        .off("mousemove." + this.widgetName, this._mouseMoveDelegate)
        .off("mouseup." + this.widgetName, this._mouseUpDelegate),
        this._mouseStarted &&
          ((this._mouseStarted = !1),
          e.target === this._mouseDownEvent.target &&
            Y.data(e.target, this.widgetName + ".preventClickEvent", !0),
          this._mouseStop(e)),
        this._mouseDelayTimer &&
          (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer),
        (this.ignoreMissingWhich = !1),
        (ae = !1),
        e.preventDefault());
    },
    _mouseDistanceMet: function (e) {
      return (
        Math.max(
          Math.abs(this._mouseDownEvent.pageX - e.pageX),
          Math.abs(this._mouseDownEvent.pageY - e.pageY),
        ) >= this.options.distance
      );
    },
    _mouseDelayMet: function () {
      return this.mouseDelayMet;
    },
    _mouseStart: function () {},
    _mouseDrag: function () {},
    _mouseStop: function () {},
    _mouseCapture: function () {
      return !0;
    },
  }),
    (Y.ui.plugin = {
      add: function (e, t, i) {
        var n,
          r = Y.ui[e].prototype;
        for (n in i)
          ((r.plugins[n] = r.plugins[n] || []), r.plugins[n].push([t, i[n]]));
      },
      call: function (e, t, i, n) {
        var r,
          o = e.plugins[t];
        if (
          o &&
          (n ||
            (e.element[0].parentNode &&
              11 !== e.element[0].parentNode.nodeType))
        )
          for (r = 0; r < o.length; r++)
            e.options[o[r][0]] && o[r][1].apply(e.element, i);
      },
    }),
    (Y.ui.safeBlur = function (e) {
      e && "body" !== e.nodeName.toLowerCase() && Y(e).trigger("blur");
    }));
  (Y.widget("ui.draggable", Y.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 (e, t) {
      (this._super(e, t),
        "handle" === e &&
          (this._removeHandleClassName(), this._setHandleClassName()));
    },
    _destroy: function () {
      (this.helper || this.element).is(".ui-draggable-dragging")
        ? (this.destroyOnClear = !0)
        : (this._removeHandleClassName(), this._mouseDestroy());
    },
    _mouseCapture: function (e) {
      var t = this.options;
      return (
        !(
          this.helper ||
          t.disabled ||
          0 < Y(e.target).closest(".ui-resizable-handle").length
        ) &&
        ((this.handle = this._getHandle(e)),
        !!this.handle &&
          (this._blurActiveElement(e),
          this._blockFrames(!0 === t.iframeFix ? "iframe" : t.iframeFix),
          !0))
      );
    },
    _blockFrames: function (e) {
      this.iframeBlocks = this.document.find(e).map(function () {
        var e = Y(this);
        return Y("<div>")
          .css("position", "absolute")
          .appendTo(e.parent())
          .outerWidth(e.outerWidth())
          .outerHeight(e.outerHeight())
          .offset(e.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _blurActiveElement: function (e) {
      var t = Y.ui.safeActiveElement(this.document[0]);
      Y(e.target).closest(t).length || Y.ui.safeBlur(t);
    },
    _mouseStart: function (e) {
      var t = this.options;
      return (
        (this.helper = this._createHelper(e)),
        this._addClass(this.helper, "ui-draggable-dragging"),
        this._cacheHelperProportions(),
        Y.ui.ddmanager && (Y.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" === Y(this).css("position");
          }).length),
        (this.positionAbs = this.element.offset()),
        this._refreshOffsets(e),
        (this.originalPosition = this.position = this._generatePosition(e, !1)),
        (this.originalPageX = e.pageX),
        (this.originalPageY = e.pageY),
        t.cursorAt && this._adjustOffsetFromHelper(t.cursorAt),
        this._setContainment(),
        !1 === this._trigger("start", e)
          ? (this._clear(), !1)
          : (this._cacheHelperProportions(),
            Y.ui.ddmanager &&
              !t.dropBehaviour &&
              Y.ui.ddmanager.prepareOffsets(this, e),
            this._mouseDrag(e, !0),
            Y.ui.ddmanager && Y.ui.ddmanager.dragStart(this, e),
            !0)
      );
    },
    _refreshOffsets: function (e) {
      ((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: e.pageX - this.offset.left,
          top: e.pageY - this.offset.top,
        }));
    },
    _mouseDrag: function (e, t) {
      if (
        (this.hasFixedAncestor &&
          (this.offset.parent = this._getParentOffset()),
        (this.position = this._generatePosition(e, !0)),
        (this.positionAbs = this._convertPositionTo("absolute")),
        !t)
      ) {
        t = this._uiHash();
        if (!1 === this._trigger("drag", e, t))
          return (this._mouseUp(new Y.Event("mouseup", e)), !1);
        this.position = t.position;
      }
      return (
        (this.helper[0].style.left = this.position.left + "px"),
        (this.helper[0].style.top = this.position.top + "px"),
        Y.ui.ddmanager && Y.ui.ddmanager.drag(this, e),
        !1
      );
    },
    _mouseStop: function (e) {
      var t = this,
        i = !1;
      return (
        Y.ui.ddmanager &&
          !this.options.dropBehaviour &&
          (i = Y.ui.ddmanager.drop(this, e)),
        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))
          ? Y(this.helper).animate(
              this.originalPosition,
              parseInt(this.options.revertDuration, 10),
              function () {
                !1 !== t._trigger("stop", e) && t._clear();
              },
            )
          : !1 !== this._trigger("stop", e) && this._clear(),
        !1
      );
    },
    _mouseUp: function (e) {
      return (
        this._unblockFrames(),
        Y.ui.ddmanager && Y.ui.ddmanager.dragStop(this, e),
        this.handleElement.is(e.target) && this.element.trigger("focus"),
        Y.ui.mouse.prototype._mouseUp.call(this, e)
      );
    },
    cancel: function () {
      return (
        this.helper.is(".ui-draggable-dragging")
          ? this._mouseUp(new Y.Event("mouseup", { target: this.element[0] }))
          : this._clear(),
        this
      );
    },
    _getHandle: function (e) {
      return (
        !this.options.handle ||
        !!Y(e.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 (e) {
      var t = this.options,
        i = "function" == typeof t.helper,
        e = i
          ? Y(t.helper.apply(this.element[0], [e]))
          : "clone" === t.helper
            ? this.element.clone().removeAttr("id")
            : this.element;
      return (
        e.parents("body").length ||
          e.appendTo(
            "parent" === t.appendTo ? this.element[0].parentNode : t.appendTo,
          ),
        i && e[0] === this.element[0] && this._setPositionRelative(),
        e[0] === this.element[0] ||
          /(fixed|absolute)/.test(e.css("position")) ||
          e.css("position", "absolute"),
        e
      );
    },
    _setPositionRelative: function () {
      /^(?:r|a|f)/.test(this.element.css("position")) ||
        (this.element[0].style.position = "relative");
    },
    _adjustOffsetFromHelper: function (e) {
      ("string" == typeof e && (e = e.split(" ")),
        "left" in
          (e = Array.isArray(e) ? { left: +e[0], top: +e[1] || 0 } : e) &&
          (this.offset.click.left = e.left + this.margins.left),
        "right" in e &&
          (this.offset.click.left =
            this.helperProportions.width - e.right + this.margins.left),
        "top" in e && (this.offset.click.top = e.top + this.margins.top),
        "bottom" in e &&
          (this.offset.click.top =
            this.helperProportions.height - e.bottom + this.margins.top));
    },
    _isRootNode: function (e) {
      return /(html|body)/i.test(e.tagName) || e === this.document[0];
    },
    _getParentOffset: function () {
      var e = this.offsetParent.offset(),
        t = this.document[0];
      return (
        "absolute" === this.cssPosition &&
          this.scrollParent[0] !== t &&
          Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
          ((e.left += this.scrollParent.scrollLeft()),
          (e.top += this.scrollParent.scrollTop())),
        {
          top:
            (e = this._isRootNode(this.offsetParent[0])
              ? { top: 0, left: 0 }
              : e).top +
            (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
          left:
            e.left +
            (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
        }
      );
    },
    _getRelativeOffset: function () {
      if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
      var e = this.element.position(),
        t = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          e.top -
          (parseInt(this.helper.css("top"), 10) || 0) +
          (t ? 0 : this.scrollParent.scrollTop()),
        left:
          e.left -
          (parseInt(this.helper.css("left"), 10) || 0) +
          (t ? 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 e,
        t,
        i,
        n = this.options,
        r = 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 = (t = Y(n.containment))[0]) &&
                    ((e = /(scroll|auto)/.test(t.css("overflow"))),
                    (this.containment = [
                      (parseInt(t.css("borderLeftWidth"), 10) || 0) +
                        (parseInt(t.css("paddingLeft"), 10) || 0),
                      (parseInt(t.css("borderTopWidth"), 10) || 0) +
                        (parseInt(t.css("paddingTop"), 10) || 0),
                      (e
                        ? Math.max(i.scrollWidth, i.offsetWidth)
                        : i.offsetWidth) -
                        (parseInt(t.css("borderRightWidth"), 10) || 0) -
                        (parseInt(t.css("paddingRight"), 10) || 0) -
                        this.helperProportions.width -
                        this.margins.left -
                        this.margins.right,
                      (e
                        ? Math.max(i.scrollHeight, i.offsetHeight)
                        : i.offsetHeight) -
                        (parseInt(t.css("borderBottomWidth"), 10) || 0) -
                        (parseInt(t.css("paddingBottom"), 10) || 0) -
                        this.helperProportions.height -
                        this.margins.top -
                        this.margins.bottom,
                    ]),
                    (this.relativeContainer = t)))
                : (this.containment = n.containment)
              : (this.containment = [
                  0,
                  0,
                  Y(r).width() -
                    this.helperProportions.width -
                    this.margins.left,
                  (Y(r).height() || r.body.parentNode.scrollHeight) -
                    this.helperProportions.height -
                    this.margins.top,
                ])
            : (this.containment = [
                Y(window).scrollLeft() -
                  this.offset.relative.left -
                  this.offset.parent.left,
                Y(window).scrollTop() -
                  this.offset.relative.top -
                  this.offset.parent.top,
                Y(window).scrollLeft() +
                  Y(window).width() -
                  this.helperProportions.width -
                  this.margins.left,
                Y(window).scrollTop() +
                  (Y(window).height() || r.body.parentNode.scrollHeight) -
                  this.helperProportions.height -
                  this.margins.top,
              ])
          : (this.containment = null));
    },
    _convertPositionTo: function (e, t) {
      t = t || this.position;
      var i = "absolute" === e ? 1 : -1,
        e = this._isRootNode(this.scrollParent[0]);
      return {
        top:
          t.top +
          this.offset.relative.top * i +
          this.offset.parent.top * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.top
            : e
              ? 0
              : this.offset.scroll.top) *
            i,
        left:
          t.left +
          this.offset.relative.left * i +
          this.offset.parent.left * i -
          ("fixed" === this.cssPosition
            ? -this.offset.scroll.left
            : e
              ? 0
              : this.offset.scroll.left) *
            i,
      };
    },
    _generatePosition: function (e, t) {
      var i,
        n = this.options,
        r = this._isRootNode(this.scrollParent[0]),
        o = e.pageX,
        s = e.pageY;
      return (
        (r && this.offset.scroll) ||
          (this.offset.scroll = {
            top: this.scrollParent.scrollTop(),
            left: this.scrollParent.scrollLeft(),
          }),
        t &&
          (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),
            e.pageX - this.offset.click.left < i[0] &&
              (o = i[0] + this.offset.click.left),
            e.pageY - this.offset.click.top < i[1] &&
              (s = i[1] + this.offset.click.top),
            e.pageX - this.offset.click.left > i[2] &&
              (o = i[2] + this.offset.click.left),
            e.pageY - this.offset.click.top > i[3] &&
              (s = i[3] + this.offset.click.top)),
          n.grid &&
            ((e = n.grid[1]
              ? this.originalPageY +
                Math.round((s - this.originalPageY) / n.grid[1]) * n.grid[1]
              : this.originalPageY),
            (s =
              !i ||
              e - this.offset.click.top >= i[1] ||
              e - this.offset.click.top > i[3]
                ? e
                : e - this.offset.click.top >= i[1]
                  ? e - n.grid[1]
                  : e + n.grid[1]),
            (e = n.grid[0]
              ? this.originalPageX +
                Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0]
              : this.originalPageX),
            (o =
              !i ||
              e - this.offset.click.left >= i[0] ||
              e - this.offset.click.left > i[2]
                ? e
                : e - this.offset.click.left >= i[0]
                  ? e - n.grid[0]
                  : e + n.grid[0])),
          "y" === n.axis && (o = 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
              : r
                ? 0
                : this.offset.scroll.top),
          left:
            o -
            this.offset.click.left -
            this.offset.relative.left -
            this.offset.parent.left +
            ("fixed" === this.cssPosition
              ? -this.offset.scroll.left
              : r
                ? 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 (e, t, i) {
      return (
        (i = i || this._uiHash()),
        Y.ui.plugin.call(this, e, [t, i, this], !0),
        /^(drag|start|stop)/.test(e) &&
          ((this.positionAbs = this._convertPositionTo("absolute")),
          (i.offset = this.positionAbs)),
        Y.Widget.prototype._trigger.call(this, e, t, i)
      );
    },
    plugins: {},
    _uiHash: function () {
      return {
        helper: this.helper,
        position: this.position,
        originalPosition: this.originalPosition,
        offset: this.positionAbs,
      };
    },
  }),
    Y.ui.plugin.add("draggable", "connectToSortable", {
      start: function (t, e, i) {
        var n = Y.extend({}, e, { item: i.element });
        ((i.sortables = []),
          Y(i.options.connectToSortable).each(function () {
            var e = Y(this).sortable("instance");
            e &&
              !e.options.disabled &&
              (i.sortables.push(e),
              e.refreshPositions(),
              e._trigger("activate", t, n));
          }));
      },
      stop: function (t, e, i) {
        var n = Y.extend({}, e, { item: i.element });
        ((i.cancelHelperRemoval = !1),
          Y.each(i.sortables, function () {
            var e = this;
            e.isOver
              ? ((e.isOver = 0),
                (i.cancelHelperRemoval = !0),
                (e.cancelHelperRemoval = !1),
                (e._storedCSS = {
                  position: e.placeholder.css("position"),
                  top: e.placeholder.css("top"),
                  left: e.placeholder.css("left"),
                }),
                e._mouseStop(t),
                (e.options.helper = e.options._helper))
              : ((e.cancelHelperRemoval = !0), e._trigger("deactivate", t, n));
          }));
      },
      drag: function (i, n, r) {
        Y.each(r.sortables, function () {
          var e = !1,
            t = this;
          ((t.positionAbs = r.positionAbs),
            (t.helperProportions = r.helperProportions),
            (t.offset.click = r.offset.click),
            t._intersectsWith(t.containerCache) &&
              ((e = !0),
              Y.each(r.sortables, function () {
                return (
                  (this.positionAbs = r.positionAbs),
                  (this.helperProportions = r.helperProportions),
                  (this.offset.click = r.offset.click),
                  (e =
                    this !== t &&
                    this._intersectsWith(this.containerCache) &&
                    Y.contains(t.element[0], this.element[0])
                      ? !1
                      : e)
                );
              })),
            e
              ? (t.isOver ||
                  ((t.isOver = 1),
                  (r._parent = n.helper.parent()),
                  (t.currentItem = n.helper
                    .appendTo(t.element)
                    .data("ui-sortable-item", !0)),
                  (t.options._helper = t.options.helper),
                  (t.options.helper = function () {
                    return n.helper[0];
                  }),
                  (i.target = t.currentItem[0]),
                  t._mouseCapture(i, !0),
                  t._mouseStart(i, !0, !0),
                  (t.offset.click.top = r.offset.click.top),
                  (t.offset.click.left = r.offset.click.left),
                  (t.offset.parent.left -=
                    r.offset.parent.left - t.offset.parent.left),
                  (t.offset.parent.top -=
                    r.offset.parent.top - t.offset.parent.top),
                  r._trigger("toSortable", i),
                  (r.dropped = t.element),
                  Y.each(r.sortables, function () {
                    this.refreshPositions();
                  }),
                  (r.currentItem = r.element),
                  (t.fromOutside = r)),
                t.currentItem && (t._mouseDrag(i), (n.position = t.position)))
              : t.isOver &&
                ((t.isOver = 0),
                (t.cancelHelperRemoval = !0),
                (t.options._revert = t.options.revert),
                (t.options.revert = !1),
                t._trigger("out", i, t._uiHash(t)),
                t._mouseStop(i, !0),
                (t.options.revert = t.options._revert),
                (t.options.helper = t.options._helper),
                t.placeholder && t.placeholder.remove(),
                n.helper.appendTo(r._parent),
                r._refreshOffsets(i),
                (n.position = r._generatePosition(i, !0)),
                r._trigger("fromSortable", i),
                (r.dropped = !1),
                Y.each(r.sortables, function () {
                  this.refreshPositions();
                })));
        });
      },
    }),
    Y.ui.plugin.add("draggable", "cursor", {
      start: function (e, t, i) {
        var n = Y("body"),
          i = i.options;
        (n.css("cursor") && (i._cursor = n.css("cursor")),
          n.css("cursor", i.cursor));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._cursor && Y("body").css("cursor", i._cursor);
      },
    }),
    Y.ui.plugin.add("draggable", "opacity", {
      start: function (e, t, i) {
        ((t = Y(t.helper)), (i = i.options));
        (t.css("opacity") && (i._opacity = t.css("opacity")),
          t.css("opacity", i.opacity));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._opacity && Y(t.helper).css("opacity", i._opacity);
      },
    }),
    Y.ui.plugin.add("draggable", "scroll", {
      start: function (e, t, 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 (e, t, i) {
        var n = i.options,
          r = !1,
          o = i.scrollParentNotHidden[0],
          s = i.document[0];
        (o !== s && "HTML" !== o.tagName
          ? ((n.axis && "x" === n.axis) ||
              (i.overflowOffset.top + o.offsetHeight - e.pageY <
              n.scrollSensitivity
                ? (o.scrollTop = r = o.scrollTop + n.scrollSpeed)
                : e.pageY - i.overflowOffset.top < n.scrollSensitivity &&
                  (o.scrollTop = r = o.scrollTop - n.scrollSpeed)),
            (n.axis && "y" === n.axis) ||
              (i.overflowOffset.left + o.offsetWidth - e.pageX <
              n.scrollSensitivity
                ? (o.scrollLeft = r = o.scrollLeft + n.scrollSpeed)
                : e.pageX - i.overflowOffset.left < n.scrollSensitivity &&
                  (o.scrollLeft = r = o.scrollLeft - n.scrollSpeed)))
          : ((n.axis && "x" === n.axis) ||
              (e.pageY - Y(s).scrollTop() < n.scrollSensitivity
                ? (r = Y(s).scrollTop(Y(s).scrollTop() - n.scrollSpeed))
                : Y(window).height() - (e.pageY - Y(s).scrollTop()) <
                    n.scrollSensitivity &&
                  (r = Y(s).scrollTop(Y(s).scrollTop() + n.scrollSpeed))),
            (n.axis && "y" === n.axis) ||
              (e.pageX - Y(s).scrollLeft() < n.scrollSensitivity
                ? (r = Y(s).scrollLeft(Y(s).scrollLeft() - n.scrollSpeed))
                : Y(window).width() - (e.pageX - Y(s).scrollLeft()) <
                    n.scrollSensitivity &&
                  (r = Y(s).scrollLeft(Y(s).scrollLeft() + n.scrollSpeed)))),
          !1 !== r &&
            Y.ui.ddmanager &&
            !n.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(i, e));
      },
    }),
    Y.ui.plugin.add("draggable", "snap", {
      start: function (e, t, i) {
        var n = i.options;
        ((i.snapElements = []),
          Y(
            n.snap.constructor !== String
              ? n.snap.items || ":data(ui-draggable)"
              : n.snap,
          ).each(function () {
            var e = Y(this),
              t = e.offset();
            this !== i.element[0] &&
              i.snapElements.push({
                item: this,
                width: e.outerWidth(),
                height: e.outerHeight(),
                top: t.top,
                left: t.left,
              });
          }));
      },
      drag: function (e, t, i) {
        for (
          var n,
            r,
            o,
            s,
            a,
            l,
            c,
            u,
            h,
            d = i.options,
            p = d.snapTolerance,
            f = t.offset.left,
            g = f + i.helperProportions.width,
            m = t.offset.top,
            v = m + 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),
            g < a - p ||
            l + p < f ||
            v < c - p ||
            u + p < m ||
            !Y.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,
                    e,
                    Y.extend(i._uiHash(), {
                      snapItem: i.snapElements[b].item,
                    }),
                  ),
                (i.snapElements[b].snapping = !1))
              : ("inner" !== d.snapMode &&
                  ((n = Math.abs(c - v) <= p),
                  (r = Math.abs(u - m) <= p),
                  (o = Math.abs(a - g) <= p),
                  (s = Math.abs(l - f) <= p),
                  n &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: c - i.helperProportions.height,
                      left: 0,
                    }).top),
                  r &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: u,
                      left: 0,
                    }).top),
                  o &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a - i.helperProportions.width,
                    }).left),
                  s &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l,
                    }).left)),
                (h = n || r || o || s),
                "outer" !== d.snapMode &&
                  ((n = Math.abs(c - m) <= p),
                  (r = Math.abs(u - v) <= p),
                  (o = Math.abs(a - f) <= p),
                  (s = Math.abs(l - g) <= p),
                  n &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: c,
                      left: 0,
                    }).top),
                  r &&
                    (t.position.top = i._convertPositionTo("relative", {
                      top: u - i.helperProportions.height,
                      left: 0,
                    }).top),
                  o &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: a,
                    }).left),
                  s &&
                    (t.position.left = i._convertPositionTo("relative", {
                      top: 0,
                      left: l - i.helperProportions.width,
                    }).left)),
                !i.snapElements[b].snapping &&
                  (n || r || o || s || h) &&
                  i.options.snap.snap &&
                  i.options.snap.snap.call(
                    i.element,
                    e,
                    Y.extend(i._uiHash(), {
                      snapItem: i.snapElements[b].item,
                    }),
                  ),
                (i.snapElements[b].snapping = n || r || o || s || h)));
      },
    }),
    Y.ui.plugin.add("draggable", "stack", {
      start: function (e, t, i) {
        var n,
          i = i.options,
          i = Y.makeArray(Y(i.stack)).sort(function (e, t) {
            return (
              (parseInt(Y(e).css("zIndex"), 10) || 0) -
              (parseInt(Y(t).css("zIndex"), 10) || 0)
            );
          });
        i.length &&
          ((n = parseInt(Y(i[0]).css("zIndex"), 10) || 0),
          Y(i).each(function (e) {
            Y(this).css("zIndex", n + e);
          }),
          this.css("zIndex", n + i.length));
      },
    }),
    Y.ui.plugin.add("draggable", "zIndex", {
      start: function (e, t, i) {
        ((t = Y(t.helper)), (i = i.options));
        (t.css("zIndex") && (i._zIndex = t.css("zIndex")),
          t.css("zIndex", i.zIndex));
      },
      stop: function (e, t, i) {
        i = i.options;
        i._zIndex && Y(t.helper).css("zIndex", i._zIndex);
      },
    }));
  Y.ui.draggable;
  (Y.widget("ui.resizable", Y.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 (e) {
      return parseFloat(e) || 0;
    },
    _isNumber: function (e) {
      return !isNaN(parseFloat(e));
    },
    _hasScroll: function (e, t) {
      if ("hidden" === Y(e).css("overflow")) return !1;
      var i = t && "left" === t ? "scrollLeft" : "scrollTop",
        t = !1;
      if (0 < e[i]) return !0;
      try {
        ((e[i] = 1), (t = 0 < e[i]), (e[i] = 0));
      } catch (e) {}
      return t;
    },
    _create: function () {
      var e,
        t = this.options,
        i = this;
      (this._addClass("ui-resizable"),
        Y.extend(this, {
          _aspectRatio: !!t.aspectRatio,
          aspectRatio: t.aspectRatio,
          originalElement: this.element,
          _proportionallyResizeElements: [],
          _helper:
            t.helper || t.ghost || t.animate
              ? t.helper || "ui-resizable-helper"
              : null,
        }),
        this.element[0].nodeName.match(
          /^(canvas|textarea|input|select|button|img)$/i,
        ) &&
          (this.element.wrap(
            Y("<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),
          (e = {
            marginTop: this.originalElement.css("marginTop"),
            marginRight: this.originalElement.css("marginRight"),
            marginBottom: this.originalElement.css("marginBottom"),
            marginLeft: this.originalElement.css("marginLeft"),
          }),
          this.element.css(e),
          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(e),
          this._proportionallyResize()),
        this._setupHandles(),
        t.autoHide &&
          Y(this.element)
            .on("mouseenter", function () {
              t.disabled ||
                (i._removeClass("ui-resizable-autohide"), i._handles.show());
            })
            .on("mouseleave", function () {
              t.disabled ||
                i.resizing ||
                (i._addClass("ui-resizable-autohide"), i._handles.hide());
            }),
        this._mouseInit());
    },
    _destroy: function () {
      (this._mouseDestroy(), this._addedHandles.remove());
      function e(e) {
        Y(e)
          .removeData("resizable")
          .removeData("ui-resizable")
          .off(".resizable");
      }
      var t;
      return (
        this.elementIsWrapper &&
          (e(this.element),
          (t = this.element),
          this.originalElement
            .css({
              position: t.css("position"),
              width: t.outerWidth(),
              height: t.outerHeight(),
              top: t.css("top"),
              left: t.css("left"),
            })
            .insertAfter(t),
          t.remove()),
        this.originalElement.css("resize", this.originalResizeStyle),
        e(this.originalElement),
        this
      );
    },
    _setOption: function (e, t) {
      switch ((this._super(e, t), e)) {
        case "handles":
          (this._removeHandles(), this._setupHandles());
          break;
        case "aspectRatio":
          this._aspectRatio = !!t;
      }
    },
    _setupHandles: function () {
      var e,
        t,
        i,
        n,
        r,
        o = this.options,
        s = this;
      if (
        ((this.handles =
          o.handles ||
          (Y(".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 = Y()),
        (this._addedHandles = Y()),
        this.handles.constructor === String)
      )
        for (
          "all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"),
            i = this.handles.split(","),
            this.handles = {},
            t = 0;
          t < i.length;
          t++
        )
          ((n = "ui-resizable-" + (e = String.prototype.trim.call(i[t]))),
            (r = Y("<div>")),
            this._addClass(r, "ui-resizable-handle " + n),
            r.css({ zIndex: o.zIndex }),
            (this.handles[e] = ".ui-resizable-" + e),
            this.element.children(this.handles[e]).length ||
              (this.element.append(r),
              (this._addedHandles = this._addedHandles.add(r))));
      ((this._renderAxis = function (e) {
        var t, i, n;
        for (t in ((e = e || this.element), this.handles))
          (this.handles[t].constructor === String
            ? (this.handles[t] = this.element
                .children(this.handles[t])
                .first()
                .show())
            : (this.handles[t].jquery || this.handles[t].nodeType) &&
              ((this.handles[t] = Y(this.handles[t])),
              this._on(this.handles[t], { mousedown: s._mouseDown })),
            this.elementIsWrapper &&
              this.originalElement[0].nodeName.match(
                /^(textarea|input|select|button)$/i,
              ) &&
              ((i = Y(this.handles[t], this.element)),
              (n = /sw|ne|nw|se|n|s/.test(t)
                ? i.outerHeight()
                : i.outerWidth()),
              (i = [
                "padding",
                /ne|nw|n/.test(t)
                  ? "Top"
                  : /se|sw|s/.test(t)
                    ? "Bottom"
                    : /^e$/.test(t)
                      ? "Right"
                      : "Left",
              ].join("")),
              e.css(i, n),
              this._proportionallyResize()),
            (this._handles = this._handles.add(this.handles[t])));
      }),
        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 &&
              (r = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),
            (s.axis = r && r[1] ? r[1] : "se"));
        }),
        o.autoHide &&
          (this._handles.hide(), this._addClass("ui-resizable-autohide")));
    },
    _removeHandles: function () {
      this._addedHandles.remove();
    },
    _mouseCapture: function (e) {
      var t,
        i,
        n = !1;
      for (t in this.handles)
        ((i = Y(this.handles[t])[0]) !== e.target &&
          !Y.contains(i, e.target)) ||
          (n = !0);
      return !this.options.disabled && n;
    },
    _mouseStart: function (e) {
      var t,
        i,
        n = this.options,
        r = this.element;
      return (
        (this.resizing = !0),
        this._renderProxy(),
        (t = this._num(this.helper.css("left"))),
        (i = this._num(this.helper.css("top"))),
        n.containment &&
          ((t += Y(n.containment).scrollLeft() || 0),
          (i += Y(n.containment).scrollTop() || 0)),
        (this.offset = this.helper.offset()),
        (this.position = { left: t, top: i }),
        (this.size = this._helper
          ? { width: this.helper.width(), height: this.helper.height() }
          : { width: r.width(), height: r.height() }),
        (this.originalSize = this._helper
          ? { width: r.outerWidth(), height: r.outerHeight() }
          : { width: r.width(), height: r.height() }),
        (this.sizeDiff = {
          width: r.outerWidth() - r.width(),
          height: r.outerHeight() - r.height(),
        }),
        (this.originalPosition = { left: t, top: i }),
        (this.originalMousePosition = { left: e.pageX, top: e.pageY }),
        (this.aspectRatio =
          "number" == typeof n.aspectRatio
            ? n.aspectRatio
            : this.originalSize.width / this.originalSize.height || 1),
        (n = Y(".ui-resizable-" + this.axis).css("cursor")),
        Y("body").css("cursor", "auto" === n ? this.axis + "-resize" : n),
        this._addClass("ui-resizable-resizing"),
        this._propagate("start", e),
        !0
      );
    },
    _mouseDrag: function (e) {
      var t = this.originalMousePosition,
        i = this.axis,
        n = e.pageX - t.left || 0,
        t = e.pageY - t.top || 0,
        i = this._change[i];
      return (
        this._updatePrevProperties(),
        i &&
          ((t = i.apply(this, [e, n, t])),
          this._updateVirtualBoundaries(e.shiftKey),
          (this._aspectRatio || e.shiftKey) && (t = this._updateRatio(t, e)),
          (t = this._respectSize(t, e)),
          this._updateCache(t),
          this._propagate("resize", e),
          (t = this._applyChanges()),
          !this._helper &&
            this._proportionallyResizeElements.length &&
            this._proportionallyResize(),
          Y.isEmptyObject(t) ||
            (this._updatePrevProperties(),
            this._trigger("resize", e, this.ui()),
            this._applyChanges())),
        !1
      );
    },
    _mouseStop: function (e) {
      this.resizing = !1;
      var t,
        i,
        n,
        r = this.options,
        o = this;
      return (
        this._helper &&
          ((n =
            (t =
              (i = this._proportionallyResizeElements).length &&
              /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left")
              ? 0
              : o.sizeDiff.height),
          (i = t ? 0 : o.sizeDiff.width),
          (t = {
            width: o.helper.width() - i,
            height: o.helper.height() - n,
          }),
          (i =
            parseFloat(o.element.css("left")) +
              (o.position.left - o.originalPosition.left) || null),
          (n =
            parseFloat(o.element.css("top")) +
              (o.position.top - o.originalPosition.top) || null),
          r.animate || this.element.css(Y.extend(t, { top: n, left: i })),
          o.helper.height(o.size.height),
          o.helper.width(o.size.width),
          this._helper && !r.animate && this._proportionallyResize()),
        Y("body").css("cursor", "auto"),
        this._removeClass("ui-resizable-resizing"),
        this._propagate("stop", e),
        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 e = {};
      return (
        this.position.top !== this.prevPosition.top &&
          (e.top = this.position.top + "px"),
        this.position.left !== this.prevPosition.left &&
          (e.left = this.position.left + "px"),
        this.size.width !== this.prevSize.width &&
          (e.width = this.size.width + "px"),
        this.size.height !== this.prevSize.height &&
          (e.height = this.size.height + "px"),
        this.helper.css(e),
        e
      );
    },
    _updateVirtualBoundaries: function (e) {
      var t,
        i,
        n = this.options,
        r = {
          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 || e) &&
        ((t = r.minHeight * this.aspectRatio),
        (i = r.minWidth / this.aspectRatio),
        (n = r.maxHeight * this.aspectRatio),
        (e = r.maxWidth / this.aspectRatio),
        t > r.minWidth && (r.minWidth = t),
        i > r.minHeight && (r.minHeight = i),
        n < r.maxWidth && (r.maxWidth = n),
        e < r.maxHeight && (r.maxHeight = e)),
        (this._vBoundaries = r));
    },
    _updateCache: function (e) {
      ((this.offset = this.helper.offset()),
        this._isNumber(e.left) && (this.position.left = e.left),
        this._isNumber(e.top) && (this.position.top = e.top),
        this._isNumber(e.height) && (this.size.height = e.height),
        this._isNumber(e.width) && (this.size.width = e.width));
    },
    _updateRatio: function (e) {
      var t = this.position,
        i = this.size,
        n = this.axis;
      return (
        this._isNumber(e.height)
          ? (e.width = e.height * this.aspectRatio)
          : this._isNumber(e.width) && (e.height = e.width / this.aspectRatio),
        "sw" === n && ((e.left = t.left + (i.width - e.width)), (e.top = null)),
        "nw" === n &&
          ((e.top = t.top + (i.height - e.height)),
          (e.left = t.left + (i.width - e.width))),
        e
      );
    },
    _respectSize: function (e) {
      var t = this._vBoundaries,
        i = this.axis,
        n = this._isNumber(e.width) && t.maxWidth && t.maxWidth < e.width,
        r = this._isNumber(e.height) && t.maxHeight && t.maxHeight < e.height,
        o = this._isNumber(e.width) && t.minWidth && t.minWidth > e.width,
        s = this._isNumber(e.height) && t.minHeight && t.minHeight > e.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 (
        o && (e.width = t.minWidth),
        s && (e.height = t.minHeight),
        n && (e.width = t.maxWidth),
        r && (e.height = t.maxHeight),
        o && c && (e.left = a - t.minWidth),
        n && c && (e.left = a - t.maxWidth),
        s && i && (e.top = l - t.minHeight),
        r && i && (e.top = l - t.maxHeight),
        e.width || e.height || e.left || !e.top
          ? e.width || e.height || e.top || !e.left || (e.left = null)
          : (e.top = null),
        e
      );
    },
    _getPaddingPlusBorderDimensions: function (e) {
      for (
        var t = 0,
          i = [],
          n = [
            e.css("borderTopWidth"),
            e.css("borderRightWidth"),
            e.css("borderBottomWidth"),
            e.css("borderLeftWidth"),
          ],
          r = [
            e.css("paddingTop"),
            e.css("paddingRight"),
            e.css("paddingBottom"),
            e.css("paddingLeft"),
          ];
        t < 4;
        t++
      )
        ((i[t] = parseFloat(n[t]) || 0), (i[t] += parseFloat(r[t]) || 0));
      return { height: i[0] + i[2], width: i[1] + i[3] };
    },
    _proportionallyResize: function () {
      if (this._proportionallyResizeElements.length)
        for (
          var e, t = 0, i = this.helper || this.element;
          t < this._proportionallyResizeElements.length;
          t++
        )
          ((e = this._proportionallyResizeElements[t]),
            this.outerDimensions ||
              (this.outerDimensions = this._getPaddingPlusBorderDimensions(e)),
            e.css({
              height: i.height() - this.outerDimensions.height || 0,
              width: i.width() - this.outerDimensions.width || 0,
            }));
    },
    _renderProxy: function () {
      var e = this.element,
        t = this.options;
      ((this.elementOffset = e.offset()),
        this._helper
          ? ((this.helper =
              this.helper || Y("<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: ++t.zIndex,
            }),
            this.helper.appendTo("body").disableSelection())
          : (this.helper = this.element));
    },
    _change: {
      e: function (e, t) {
        return { width: this.originalSize.width + t };
      },
      w: function (e, t) {
        var i = this.originalSize;
        return {
          left: this.originalPosition.left + t,
          width: i.width - t,
        };
      },
      n: function (e, t, i) {
        var n = this.originalSize;
        return {
          top: this.originalPosition.top + i,
          height: n.height - i,
        };
      },
      s: function (e, t, i) {
        return { height: this.originalSize.height + i };
      },
      se: function (e, t, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.e.apply(this, [e, t, i]),
        );
      },
      sw: function (e, t, i) {
        return Y.extend(
          this._change.s.apply(this, arguments),
          this._change.w.apply(this, [e, t, i]),
        );
      },
      ne: function (e, t, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.e.apply(this, [e, t, i]),
        );
      },
      nw: function (e, t, i) {
        return Y.extend(
          this._change.n.apply(this, arguments),
          this._change.w.apply(this, [e, t, i]),
        );
      },
    },
    _propagate: function (e, t) {
      (Y.ui.plugin.call(this, e, [t, this.ui()]),
        "resize" !== e && this._trigger(e, t, 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,
      };
    },
  }),
    Y.ui.plugin.add("resizable", "animate", {
      stop: function (t) {
        var i = Y(this).resizable("instance"),
          e = i.options,
          n = i._proportionallyResizeElements,
          r = n.length && /textarea/i.test(n[0].nodeName),
          o = r && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height,
          s = r ? 0 : i.sizeDiff.width,
          r = { width: i.size.width - s, height: i.size.height - o },
          s =
            parseFloat(i.element.css("left")) +
              (i.position.left - i.originalPosition.left) || null,
          o =
            parseFloat(i.element.css("top")) +
              (i.position.top - i.originalPosition.top) || null;
        i.element.animate(Y.extend(r, o && s ? { top: o, left: s } : {}), {
          duration: e.animateDuration,
          easing: e.animateEasing,
          step: function () {
            var e = {
              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 && Y(n[0]).css({ width: e.width, height: e.height }),
              i._updateCache(e),
              i._propagate("resize", t));
          },
        });
      },
    }),
    Y.ui.plugin.add("resizable", "containment", {
      start: function () {
        var i,
          n,
          r = Y(this).resizable("instance"),
          e = r.options,
          t = r.element,
          o = e.containment,
          s =
            o instanceof Y
              ? o.get(0)
              : /parent/.test(o)
                ? t.parent().get(0)
                : o;
        s &&
          ((r.containerElement = Y(s)),
          /document/.test(o) || o === document
            ? ((r.containerOffset = { left: 0, top: 0 }),
              (r.containerPosition = { left: 0, top: 0 }),
              (r.parentData = {
                element: Y(document),
                left: 0,
                top: 0,
                width: Y(document).width(),
                height:
                  Y(document).height() || document.body.parentNode.scrollHeight,
              }))
            : ((i = Y(s)),
              (n = []),
              Y(["Top", "Right", "Left", "Bottom"]).each(function (e, t) {
                n[e] = r._num(i.css("padding" + t));
              }),
              (r.containerOffset = i.offset()),
              (r.containerPosition = i.position()),
              (r.containerSize = {
                height: i.innerHeight() - n[3],
                width: i.innerWidth() - n[1],
              }),
              (e = r.containerOffset),
              (t = r.containerSize.height),
              (o = r.containerSize.width),
              (o = r._hasScroll(s, "left") ? s.scrollWidth : o),
              (t = r._hasScroll(s) ? s.scrollHeight : t),
              (r.parentData = {
                element: s,
                left: e.left,
                top: e.top,
                width: o,
                height: t,
              })));
      },
      resize: function (e) {
        var t = Y(this).resizable("instance"),
          i = t.options,
          n = t.containerOffset,
          r = t.position,
          o = t._aspectRatio || e.shiftKey,
          s = { top: 0, left: 0 },
          a = t.containerElement,
          e = !0;
        (a[0] !== document && /static/.test(a.css("position")) && (s = n),
          r.left < (t._helper ? n.left : 0) &&
            ((t.size.width =
              t.size.width +
              (t._helper
                ? t.position.left - n.left
                : t.position.left - s.left)),
            o && ((t.size.height = t.size.width / t.aspectRatio), (e = !1)),
            (t.position.left = i.helper ? n.left : 0)),
          r.top < (t._helper ? n.top : 0) &&
            ((t.size.height =
              t.size.height +
              (t._helper ? t.position.top - n.top : t.position.top)),
            o && ((t.size.width = t.size.height * t.aspectRatio), (e = !1)),
            (t.position.top = t._helper ? n.top : 0)),
          (i = t.containerElement.get(0) === t.element.parent().get(0)),
          (r = /relative|absolute/.test(t.containerElement.css("position"))),
          i && r
            ? ((t.offset.left = t.parentData.left + t.position.left),
              (t.offset.top = t.parentData.top + t.position.top))
            : ((t.offset.left = t.element.offset().left),
              (t.offset.top = t.element.offset().top)),
          (r = Math.abs(
            t.sizeDiff.width +
              (t._helper ? t.offset.left - s.left : t.offset.left - n.left),
          )),
          (n = Math.abs(
            t.sizeDiff.height +
              (t._helper ? t.offset.top - s.top : t.offset.top - n.top),
          )),
          r + t.size.width >= t.parentData.width &&
            ((t.size.width = t.parentData.width - r),
            o && ((t.size.height = t.size.width / t.aspectRatio), (e = !1))),
          n + t.size.height >= t.parentData.height &&
            ((t.size.height = t.parentData.height - n),
            o && ((t.size.width = t.size.height * t.aspectRatio), (e = !1))),
          e ||
            ((t.position.left = t.prevPosition.left),
            (t.position.top = t.prevPosition.top),
            (t.size.width = t.prevSize.width),
            (t.size.height = t.prevSize.height)));
      },
      stop: function () {
        var e = Y(this).resizable("instance"),
          t = e.options,
          i = e.containerOffset,
          n = e.containerPosition,
          r = e.containerElement,
          o = Y(e.helper),
          s = o.offset(),
          a = o.outerWidth() - e.sizeDiff.width,
          o = o.outerHeight() - e.sizeDiff.height;
        (e._helper &&
          !t.animate &&
          /relative/.test(r.css("position")) &&
          Y(this).css({
            left: s.left - n.left - i.left,
            width: a,
            height: o,
          }),
          e._helper &&
            !t.animate &&
            /static/.test(r.css("position")) &&
            Y(this).css({
              left: s.left - n.left - i.left,
              width: a,
              height: o,
            }));
      },
    }),
    Y.ui.plugin.add("resizable", "alsoResize", {
      start: function () {
        var e = Y(this).resizable("instance").options;
        Y(e.alsoResize).each(function () {
          var e = Y(this);
          e.data("ui-resizable-alsoresize", {
            width: parseFloat(e.width()),
            height: parseFloat(e.height()),
            left: parseFloat(e.css("left")),
            top: parseFloat(e.css("top")),
          });
        });
      },
      resize: function (e, i) {
        var t = Y(this).resizable("instance"),
          n = t.options,
          r = t.originalSize,
          o = t.originalPosition,
          s = {
            height: t.size.height - r.height || 0,
            width: t.size.width - r.width || 0,
            top: t.position.top - o.top || 0,
            left: t.position.left - o.left || 0,
          };
        Y(n.alsoResize).each(function () {
          var e = Y(this),
            n = Y(this).data("ui-resizable-alsoresize"),
            r = {},
            t = e.parents(i.originalElement[0]).length
              ? ["width", "height"]
              : ["width", "height", "top", "left"];
          (Y.each(t, function (e, t) {
            var i = (n[t] || 0) + (s[t] || 0);
            i && 0 <= i && (r[t] = i || null);
          }),
            e.css(r));
        });
      },
      stop: function () {
        Y(this).removeData("ui-resizable-alsoresize");
      },
    }),
    Y.ui.plugin.add("resizable", "ghost", {
      start: function () {
        var e = Y(this).resizable("instance"),
          t = e.size;
        ((e.ghost = e.originalElement.clone()),
          e.ghost.css({
            opacity: 0.25,
            display: "block",
            position: "relative",
            height: t.height,
            width: t.width,
            margin: 0,
            left: 0,
            top: 0,
          }),
          e._addClass(e.ghost, "ui-resizable-ghost"),
          !1 !== Y.uiBackCompat &&
            "string" == typeof e.options.ghost &&
            e.ghost.addClass(this.options.ghost),
          e.ghost.appendTo(e.helper));
      },
      resize: function () {
        var e = Y(this).resizable("instance");
        e.ghost &&
          e.ghost.css({
            position: "relative",
            height: e.size.height,
            width: e.size.width,
          });
      },
      stop: function () {
        var e = Y(this).resizable("instance");
        e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0));
      },
    }),
    Y.ui.plugin.add("resizable", "grid", {
      resize: function () {
        var e,
          t = Y(this).resizable("instance"),
          i = t.options,
          n = t.size,
          r = t.originalSize,
          o = t.originalPosition,
          s = t.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 - r.width) / l) * l,
          h = Math.round((n.height - r.height) / c) * c,
          d = r.width + u,
          p = r.height + h,
          f = i.maxWidth && i.maxWidth < d,
          g = i.maxHeight && i.maxHeight < p,
          m = i.minWidth && i.minWidth > d,
          n = i.minHeight && i.minHeight > p;
        ((i.grid = a),
          m && (d += l),
          n && (p += c),
          f && (d -= l),
          g && (p -= c),
          /^(se|s|e)$/.test(s)
            ? ((t.size.width = d), (t.size.height = p))
            : /^(ne)$/.test(s)
              ? ((t.size.width = d),
                (t.size.height = p),
                (t.position.top = o.top - h))
              : /^(sw)$/.test(s)
                ? ((t.size.width = d),
                  (t.size.height = p),
                  (t.position.left = o.left - u))
                : ((p - c <= 0 || d - l <= 0) &&
                    (e = t._getPaddingPlusBorderDimensions(this)),
                  0 < p - c
                    ? ((t.size.height = p), (t.position.top = o.top - h))
                    : ((p = c - e.height),
                      (t.size.height = p),
                      (t.position.top = o.top + r.height - p)),
                  0 < d - l
                    ? ((t.size.width = d), (t.position.left = o.left - u))
                    : ((d = l - e.width),
                      (t.size.width = d),
                      (t.position.left = o.left + r.width - d))));
      },
    }));
  Y.ui.resizable;
  (Y.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 (e) {
          var t = Y(this).css(e).offset().top;
          t < 0 && Y(this).css("top", e.top - t);
        },
      },
      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 && Y.fn.draggable && this._makeDraggable(),
        this.options.resizable && Y.fn.resizable && this._makeResizable(),
        (this._isOpen = !1),
        this._trackFocus());
    },
    _init: function () {
      this.options.autoOpen && this.open();
    },
    _appendTo: function () {
      var e = this.options.appendTo;
      return e && (e.jquery || e.nodeType)
        ? Y(e)
        : this.document.find(e || "body").eq(0);
    },
    _destroy: function () {
      var e,
        t = this.originalPosition;
      (this._untrackInstance(),
        this._destroyOverlay(),
        this.element.removeUniqueId().css(this.originalCss).detach(),
        this.uiDialog.remove(),
        this.originalTitle && this.element.attr("title", this.originalTitle),
        (e = t.parent.children().eq(t.index)).length && e[0] !== this.element[0]
          ? e.before(this.element)
          : t.parent.append(this.element));
    },
    widget: function () {
      return this.uiDialog;
    },
    disable: Y.noop,
    enable: Y.noop,
    close: function (e) {
      var t = this;
      this._isOpen &&
        !1 !== this._trigger("beforeClose", e) &&
        ((this._isOpen = !1),
        (this._focusedElement = null),
        this._destroyOverlay(),
        this._untrackInstance(),
        this.opener.filter(":focusable").trigger("focus").length ||
          Y.ui.safeBlur(Y.ui.safeActiveElement(this.document[0])),
        this._hide(this.uiDialog, this.options.hide, function () {
          t._trigger("close", e);
        }));
    },
    isOpen: function () {
      return this._isOpen;
    },
    moveToTop: function () {
      this._moveToTop();
    },
    _moveToTop: function (e, t) {
      var i = !1,
        n = this.uiDialog
          .siblings(".ui-front:visible")
          .map(function () {
            return +Y(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 && !t && this._trigger("focus", e),
        i
      );
    },
    open: function () {
      var e = this;
      this._isOpen
        ? this._moveToTop() && this._focusTabbable()
        : ((this._isOpen = !0),
          (this.opener = Y(Y.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 () {
            (e._focusTabbable(), e._trigger("focus"));
          }),
          this._makeFocusTarget(),
          this._trigger("open"));
    },
    _focusTabbable: function () {
      var e = this._focusedElement;
      (e = !(e = !(e = !(e = !(e = e || this.element.find("[autofocus]")).length
        ? this.element.find(":tabbable")
        : e).length
        ? this.uiDialogButtonPane.find(":tabbable")
        : e).length
        ? this.uiDialogTitlebarClose.filter(":tabbable")
        : e).length
        ? this.uiDialog
        : e)
        .eq(0)
        .trigger("focus");
    },
    _restoreTabbableFocus: function () {
      var e = Y.ui.safeActiveElement(this.document[0]);
      this.uiDialog[0] === e ||
        Y.contains(this.uiDialog[0], e) ||
        this._focusTabbable();
    },
    _keepFocus: function (e) {
      (e.preventDefault(),
        this._restoreTabbableFocus(),
        this._delay(this._restoreTabbableFocus));
    },
    _createWrapper: function () {
      ((this.uiDialog = Y("<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 (e) {
            if (
              this.options.closeOnEscape &&
              !e.isDefaultPrevented() &&
              e.keyCode &&
              e.keyCode === Y.ui.keyCode.ESCAPE
            )
              return (e.preventDefault(), void this.close(e));
            var t, i, n;
            e.keyCode !== Y.ui.keyCode.TAB ||
              e.isDefaultPrevented() ||
              ((t = this.uiDialog.find(":tabbable")),
              (i = t.first()),
              (n = t.last()),
              (e.target !== n[0] && e.target !== this.uiDialog[0]) || e.shiftKey
                ? (e.target !== i[0] && e.target !== this.uiDialog[0]) ||
                  !e.shiftKey ||
                  (this._delay(function () {
                    n.trigger("focus");
                  }),
                  e.preventDefault())
                : (this._delay(function () {
                    i.trigger("focus");
                  }),
                  e.preventDefault()));
          },
          mousedown: function (e) {
            this._moveToTop(e) && this._focusTabbable();
          },
        }),
        this.element.find("[aria-describedby]").length ||
          this.uiDialog.attr({
            "aria-describedby": this.element.uniqueId().attr("id"),
          }));
    },
    _createTitlebar: function () {
      var e;
      ((this.uiDialogTitlebar = Y("<div>")),
        this._addClass(
          this.uiDialogTitlebar,
          "ui-dialog-titlebar",
          "ui-widget-header ui-helper-clearfix",
        ),
        this._on(this.uiDialogTitlebar, {
          mousedown: function (e) {
            Y(e.target).closest(".ui-dialog-titlebar-close") ||
              this.uiDialog.trigger("focus");
          },
        }),
        (this.uiDialogTitlebarClose = Y("<button type='button'></button>")
          .button({
            label: Y("<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 (e) {
            (e.preventDefault(), this.close(e));
          },
        }),
        (e = Y("<span>").uniqueId().prependTo(this.uiDialogTitlebar)),
        this._addClass(e, "ui-dialog-title"),
        this._title(e),
        this.uiDialogTitlebar.prependTo(this.uiDialog),
        this.uiDialog.attr({ "aria-labelledby": e.attr("id") }));
    },
    _title: function (e) {
      this.options.title ? e.text(this.options.title) : e.html("&#160;");
    },
    _createButtonPane: function () {
      ((this.uiDialogButtonPane = Y("<div>")),
        this._addClass(
          this.uiDialogButtonPane,
          "ui-dialog-buttonpane",
          "ui-widget-content ui-helper-clearfix",
        ),
        (this.uiButtonSet = Y("<div>").appendTo(this.uiDialogButtonPane)),
        this._addClass(this.uiButtonSet, "ui-dialog-buttonset"),
        this._createButtons());
    },
    _createButtons: function () {
      var n = this,
        e = this.options.buttons;
      (this.uiDialogButtonPane.remove(),
        this.uiButtonSet.empty(),
        Y.isEmptyObject(e) || (Array.isArray(e) && !e.length)
          ? this._removeClass(this.uiDialog, "ui-dialog-buttons")
          : (Y.each(e, function (e, t) {
              var i;
              ((t = Y.extend(
                { type: "button" },
                (t = "function" == typeof t ? { click: t, text: e } : t),
              )),
                (i = t.click),
                (e = {
                  icon: t.icon,
                  iconPosition: t.iconPosition,
                  showLabel: t.showLabel,
                  icons: t.icons,
                  text: t.text,
                }),
                delete t.click,
                delete t.icon,
                delete t.iconPosition,
                delete t.showLabel,
                delete t.icons,
                "boolean" == typeof t.text && delete t.text,
                Y("<button></button>", t)
                  .button(e)
                  .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 r = this,
        o = this.options;
      function s(e) {
        return { position: e.position, offset: e.offset };
      }
      this.uiDialog.draggable({
        cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
        handle: ".ui-dialog-titlebar",
        containment: "document",
        start: function (e, t) {
          (r._addClass(Y(this), "ui-dialog-dragging"),
            r._blockFrames(),
            r._trigger("dragStart", e, s(t)));
        },
        drag: function (e, t) {
          r._trigger("drag", e, s(t));
        },
        stop: function (e, t) {
          var i = t.offset.left - r.document.scrollLeft(),
            n = t.offset.top - r.document.scrollTop();
          ((o.position = {
            my: "left top",
            at:
              "left" +
              (0 <= i ? "+" : "") +
              i +
              " top" +
              (0 <= n ? "+" : "") +
              n,
            of: r.window,
          }),
            r._removeClass(Y(this), "ui-dialog-dragging"),
            r._unblockFrames(),
            r._trigger("dragStop", e, s(t)));
        },
      });
    },
    _makeResizable: function () {
      var r = this,
        o = this.options,
        e = o.resizable,
        t = this.uiDialog.css("position"),
        e = "string" == typeof e ? e : "n,e,s,w,se,sw,ne,nw";
      function s(e) {
        return {
          originalPosition: e.originalPosition,
          originalSize: e.originalSize,
          position: e.position,
          size: e.size,
        };
      }
      this.uiDialog
        .resizable({
          cancel: ".ui-dialog-content",
          containment: "document",
          alsoResize: this.element,
          maxWidth: o.maxWidth,
          maxHeight: o.maxHeight,
          minWidth: o.minWidth,
          minHeight: this._minHeight(),
          handles: e,
          start: function (e, t) {
            (r._addClass(Y(this), "ui-dialog-resizing"),
              r._blockFrames(),
              r._trigger("resizeStart", e, s(t)));
          },
          resize: function (e, t) {
            r._trigger("resize", e, s(t));
          },
          stop: function (e, t) {
            var i = r.uiDialog.offset(),
              n = i.left - r.document.scrollLeft(),
              i = i.top - r.document.scrollTop();
            ((o.height = r.uiDialog.height()),
              (o.width = r.uiDialog.width()),
              (o.position = {
                my: "left top",
                at:
                  "left" +
                  (0 <= n ? "+" : "") +
                  n +
                  " top" +
                  (0 <= i ? "+" : "") +
                  i,
                of: r.window,
              }),
              r._removeClass(Y(this), "ui-dialog-resizing"),
              r._unblockFrames(),
              r._trigger("resizeStop", e, s(t)));
          },
        })
        .css("position", t);
    },
    _trackFocus: function () {
      this._on(this.widget(), {
        focusin: function (e) {
          (this._makeFocusTarget(), (this._focusedElement = Y(e.target)));
        },
      });
    },
    _makeFocusTarget: function () {
      (this._untrackInstance(), this._trackingInstances().unshift(this));
    },
    _untrackInstance: function () {
      var e = this._trackingInstances(),
        t = Y.inArray(this, e);
      -1 !== t && e.splice(t, 1);
    },
    _trackingInstances: function () {
      var e = this.document.data("ui-dialog-instances");
      return (e || this.document.data("ui-dialog-instances", (e = [])), e);
    },
    _minHeight: function () {
      var e = this.options;
      return "auto" === e.height
        ? e.minHeight
        : Math.min(e.minHeight, e.height);
    },
    _position: function () {
      var e = this.uiDialog.is(":visible");
      (e || this.uiDialog.show(),
        this.uiDialog.position(this.options.position),
        e || this.uiDialog.hide());
    },
    _setOptions: function (e) {
      var i = this,
        n = !1,
        r = {};
      (Y.each(e, function (e, t) {
        (i._setOption(e, t),
          e in i.sizeRelatedOptions && (n = !0),
          e in i.resizableRelatedOptions && (r[e] = t));
      }),
        n && (this._size(), this._position()),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", r));
    },
    _setOption: function (e, t) {
      var i,
        n = this.uiDialog;
      "disabled" !== e &&
        (this._super(e, t),
        "appendTo" === e && this.uiDialog.appendTo(this._appendTo()),
        "buttons" === e && this._createButtons(),
        "closeText" === e &&
          this.uiDialogTitlebarClose.button({
            label: Y("<a>")
              .text("" + this.options.closeText)
              .html(),
          }),
        "draggable" === e &&
          ((i = n.is(":data(ui-draggable)")) && !t && n.draggable("destroy"),
          !i && t && this._makeDraggable()),
        "position" === e && this._position(),
        "resizable" === e &&
          ((i = n.is(":data(ui-resizable)")) && !t && n.resizable("destroy"),
          i && "string" == typeof t && n.resizable("option", "handles", t),
          i || !1 === t || this._makeResizable()),
        "title" === e &&
          this._title(this.uiDialogTitlebar.find(".ui-dialog-title")));
    },
    _size: function () {
      var e,
        t,
        i,
        n = this.options;
      (this.element.show().css({
        width: "auto",
        minHeight: 0,
        maxHeight: "none",
        height: 0,
      }),
        n.minWidth > n.width && (n.width = n.minWidth),
        (e = this.uiDialog
          .css({ height: "auto", width: n.width })
          .outerHeight()),
        (t = Math.max(0, n.minHeight - e)),
        (i =
          "number" == typeof n.maxHeight
            ? Math.max(0, n.maxHeight - e)
            : "none"),
        "auto" === n.height
          ? this.element.css({
              minHeight: t,
              maxHeight: i,
              height: "auto",
            })
          : this.element.height(Math.max(0, n.height - e)),
        this.uiDialog.is(":data(ui-resizable)") &&
          this.uiDialog.resizable("option", "minHeight", this._minHeight()));
    },
    _blockFrames: function () {
      this.iframeBlocks = this.document.find("iframe").map(function () {
        var e = Y(this);
        return Y("<div>")
          .css({
            position: "absolute",
            width: e.outerWidth(),
            height: e.outerHeight(),
          })
          .appendTo(e.parent())
          .offset(e.offset())[0];
      });
    },
    _unblockFrames: function () {
      this.iframeBlocks &&
        (this.iframeBlocks.remove(), delete this.iframeBlocks);
    },
    _allowInteraction: function (e) {
      return (
        !!Y(e.target).closest(".ui-dialog").length ||
        !!Y(e.target).closest(".ui-datepicker").length
      );
    },
    _createOverlay: function () {
      var i, n;
      this.options.modal &&
        ((i = Y.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 (e) {
              var t;
              n ||
                (t = this._trackingInstances()[0])._allowInteraction(e) ||
                (e.preventDefault(),
                t._focusTabbable(),
                ("3.4." !== i && "3.5." !== i) ||
                  t._delay(t._restoreTabbableFocus));
            }.bind(this),
          ),
        (this.overlay = Y("<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 e;
      this.options.modal &&
        this.overlay &&
        ((e = this.document.data("ui-dialog-overlays") - 1)
          ? this.document.data("ui-dialog-overlays", e)
          : (this.document.off("focusin.ui-dialog"),
            this.document.removeData("ui-dialog-overlays")),
        this.overlay.remove(),
        (this.overlay = null));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.dialog", Y.ui.dialog, {
        options: { dialogClass: "" },
        _createWrapper: function () {
          (this._super(), this.uiDialog.addClass(this.options.dialogClass));
        },
        _setOption: function (e, t) {
          ("dialogClass" === e &&
            this.uiDialog.removeClass(this.options.dialogClass).addClass(t),
            this._superApply(arguments));
        },
      }));
  Y.ui.dialog;
  function le(e, t, i) {
    return t <= e && e < t + i;
  }
  (Y.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 e,
        t = this.options,
        i = t.accept;
      ((this.isover = !1),
        (this.isout = !0),
        (this.accept =
          "function" == typeof i
            ? i
            : function (e) {
                return e.is(i);
              }),
        (this.proportions = function () {
          if (!arguments.length)
            return (e = e || {
              width: this.element[0].offsetWidth,
              height: this.element[0].offsetHeight,
            });
          e = arguments[0];
        }),
        this._addToManager(t.scope),
        t.addClasses && this._addClass("ui-droppable"));
    },
    _addToManager: function (e) {
      ((Y.ui.ddmanager.droppables[e] = Y.ui.ddmanager.droppables[e] || []),
        Y.ui.ddmanager.droppables[e].push(this));
    },
    _splice: function (e) {
      for (var t = 0; t < e.length; t++) e[t] === this && e.splice(t, 1);
    },
    _destroy: function () {
      var e = Y.ui.ddmanager.droppables[this.options.scope];
      this._splice(e);
    },
    _setOption: function (e, t) {
      var i;
      ("accept" === e
        ? (this.accept =
            "function" == typeof t
              ? t
              : function (e) {
                  return e.is(t);
                })
        : "scope" === e &&
          ((i = Y.ui.ddmanager.droppables[this.options.scope]),
          this._splice(i),
          this._addToManager(t)),
        this._super(e, t));
    },
    _activate: function (e) {
      var t = Y.ui.ddmanager.current;
      (this._addActiveClass(), t && this._trigger("activate", e, this.ui(t)));
    },
    _deactivate: function (e) {
      var t = Y.ui.ddmanager.current;
      (this._removeActiveClass(),
        t && this._trigger("deactivate", e, this.ui(t)));
    },
    _over: function (e) {
      var t = Y.ui.ddmanager.current;
      t &&
        (t.currentItem || t.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], t.currentItem || t.element) &&
        (this._addHoverClass(), this._trigger("over", e, this.ui(t)));
    },
    _out: function (e) {
      var t = Y.ui.ddmanager.current;
      t &&
        (t.currentItem || t.element)[0] !== this.element[0] &&
        this.accept.call(this.element[0], t.currentItem || t.element) &&
        (this._removeHoverClass(), this._trigger("out", e, this.ui(t)));
    },
    _drop: function (t, e) {
      var i = e || Y.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 e = Y(this).droppable("instance");
            if (
              e.options.greedy &&
              !e.options.disabled &&
              e.options.scope === i.options.scope &&
              e.accept.call(e.element[0], i.currentItem || i.element) &&
              Y.ui.intersect(
                i,
                Y.extend(e, { offset: e.element.offset() }),
                e.options.tolerance,
                t,
              )
            )
              return !(n = !0);
          }),
        !n &&
          !!this.accept.call(this.element[0], i.currentItem || i.element) &&
          (this._removeActiveClass(),
          this._removeHoverClass(),
          this._trigger("drop", t, this.ui(i)),
          this.element))
      );
    },
    ui: function (e) {
      return {
        draggable: e.currentItem || e.element,
        helper: e.helper,
        position: e.position,
        offset: e.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");
    },
  }),
    (Y.ui.intersect = function (e, t, i, n) {
      if (!t.offset) return !1;
      var r = (e.positionAbs || e.position.absolute).left + e.margins.left,
        o = (e.positionAbs || e.position.absolute).top + e.margins.top,
        s = r + e.helperProportions.width,
        a = o + e.helperProportions.height,
        l = t.offset.left,
        c = t.offset.top,
        u = l + t.proportions().width,
        h = c + t.proportions().height;
      switch (i) {
        case "fit":
          return l <= r && s <= u && c <= o && a <= h;
        case "intersect":
          return (
            l < r + e.helperProportions.width / 2 &&
            s - e.helperProportions.width / 2 < u &&
            c < o + e.helperProportions.height / 2 &&
            a - e.helperProportions.height / 2 < h
          );
        case "pointer":
          return (
            le(n.pageY, c, t.proportions().height) &&
            le(n.pageX, l, t.proportions().width)
          );
        case "touch":
          return (
            ((c <= o && o <= h) || (c <= a && a <= h) || (o < c && h < a)) &&
            ((l <= r && r <= u) || (l <= s && s <= u) || (r < l && u < s))
          );
        default:
          return !1;
      }
    }),
    !(Y.ui.ddmanager = {
      current: null,
      droppables: { default: [] },
      prepareOffsets: function (e, t) {
        var i,
          n,
          r = Y.ui.ddmanager.droppables[e.options.scope] || [],
          o = t ? t.type : null,
          s = (e.currentItem || e.element)
            .find(":data(ui-droppable)")
            .addBack();
        e: for (i = 0; i < r.length; i++)
          if (
            !(
              r[i].options.disabled ||
              (e &&
                !r[i].accept.call(r[i].element[0], e.currentItem || e.element))
            )
          ) {
            for (n = 0; n < s.length; n++)
              if (s[n] === r[i].element[0]) {
                r[i].proportions().height = 0;
                continue e;
              }
            ((r[i].visible = "none" !== r[i].element.css("display")),
              r[i].visible &&
                ("mousedown" === o && r[i]._activate.call(r[i], t),
                (r[i].offset = r[i].element.offset()),
                r[i].proportions({
                  width: r[i].element[0].offsetWidth,
                  height: r[i].element[0].offsetHeight,
                })));
          }
      },
      drop: function (e, t) {
        var i = !1;
        return (
          Y.each(
            (Y.ui.ddmanager.droppables[e.options.scope] || []).slice(),
            function () {
              this.options &&
                (!this.options.disabled &&
                  this.visible &&
                  Y.ui.intersect(e, this, this.options.tolerance, t) &&
                  (i = this._drop.call(this, t) || i),
                !this.options.disabled &&
                  this.visible &&
                  this.accept.call(
                    this.element[0],
                    e.currentItem || e.element,
                  ) &&
                  ((this.isout = !0),
                  (this.isover = !1),
                  this._deactivate.call(this, t)));
            },
          ),
          i
        );
      },
      dragStart: function (e, t) {
        e.element.parentsUntil("body").on("scroll.droppable", function () {
          e.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(e, t);
        });
      },
      drag: function (r, o) {
        (r.options.refreshPositions && Y.ui.ddmanager.prepareOffsets(r, o),
          Y.each(Y.ui.ddmanager.droppables[r.options.scope] || [], function () {
            var e, t, i, n;
            this.options.disabled ||
              this.greedyChild ||
              !this.visible ||
              ((n =
                !(i = Y.ui.intersect(r, this, this.options.tolerance, o)) &&
                this.isover
                  ? "isout"
                  : i && !this.isover
                    ? "isover"
                    : null) &&
                (this.options.greedy &&
                  ((t = this.options.scope),
                  (i = this.element
                    .parents(":data(ui-droppable)")
                    .filter(function () {
                      return Y(this).droppable("instance").options.scope === t;
                    })).length &&
                    ((e = Y(i[0]).droppable("instance")).greedyChild =
                      "isover" === n)),
                e &&
                  "isover" === n &&
                  ((e.isover = !1), (e.isout = !0), e._out.call(e, o)),
                (this[n] = !0),
                (this["isout" === n ? "isover" : "isout"] = !1),
                this["isover" === n ? "_over" : "_out"].call(this, o),
                e &&
                  "isout" === n &&
                  ((e.isout = !1), (e.isover = !0), e._over.call(e, o))));
          }));
      },
      dragStop: function (e, t) {
        (e.element.parentsUntil("body").off("scroll.droppable"),
          e.options.refreshPositions || Y.ui.ddmanager.prepareOffsets(e, t));
      },
    }) !== Y.uiBackCompat &&
      Y.widget("ui.droppable", Y.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));
        },
      }));
  (Y.ui.droppable,
    Y.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 = Y("<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 (e) {
        if (void 0 === e) return this.options.value;
        ((this.options.value = this._constrainedValue(e)),
          this._refreshValue());
      },
      _constrainedValue: function (e) {
        return (
          void 0 === e && (e = this.options.value),
          (this.indeterminate = !1 === e),
          "number" != typeof e && (e = 0),
          !this.indeterminate &&
            Math.min(this.options.max, Math.max(this.min, e))
        );
      },
      _setOptions: function (e) {
        var t = e.value;
        (delete e.value,
          this._super(e),
          (this.options.value = this._constrainedValue(t)),
          this._refreshValue());
      },
      _setOption: function (e, t) {
        ("max" === e && (t = Math.max(this.min, t)), this._super(e, t));
      },
      _setOptionDisabled: function (e) {
        (this._super(e),
          this.element.attr("aria-disabled", e),
          this._toggleClass(null, "ui-state-disabled", !!e));
      },
      _percentage: function () {
        return this.indeterminate
          ? 100
          : (100 * (this.options.value - this.min)) /
              (this.options.max - this.min);
      },
      _refreshValue: function () {
        var e = this.options.value,
          t = this._percentage();
        (this.valueDiv
          .toggle(this.indeterminate || e > this.min)
          .width(t.toFixed(0) + "%"),
          this._toggleClass(
            this.valueDiv,
            "ui-progressbar-complete",
            null,
            e === this.options.max,
          )._toggleClass(
            "ui-progressbar-indeterminate",
            null,
            this.indeterminate,
          ),
          this.indeterminate
            ? (this.element.removeAttr("aria-valuenow"),
              this.overlayDiv ||
                ((this.overlayDiv = Y("<div>").appendTo(this.valueDiv)),
                this._addClass(this.overlayDiv, "ui-progressbar-overlay")))
            : (this.element.attr({
                "aria-valuemax": this.options.max,
                "aria-valuenow": e,
              }),
              this.overlayDiv &&
                (this.overlayDiv.remove(), (this.overlayDiv = null))),
          this.oldValue !== e && ((this.oldValue = e), this._trigger("change")),
          e === this.options.max && this._trigger("complete"));
      },
    }),
    Y.widget("ui.selectable", Y.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 = Y(i.element[0]).offset()),
              (i.selectees = Y(i.options.filter, i.element[0])),
              i._addClass(i.selectees, "ui-selectee"),
              i.selectees.each(function () {
                var e = Y(this),
                  t = e.offset(),
                  t = {
                    left: t.left - i.elementPos.left,
                    top: t.top - i.elementPos.top,
                  };
                Y.data(this, "selectable-item", {
                  element: this,
                  $element: e,
                  left: t.left,
                  top: t.top,
                  right: t.left + e.outerWidth(),
                  bottom: t.top + e.outerHeight(),
                  startselected: !1,
                  selected: e.hasClass("ui-selected"),
                  selecting: e.hasClass("ui-selecting"),
                  unselecting: e.hasClass("ui-unselecting"),
                });
              }));
          }),
          this.refresh(),
          this._mouseInit(),
          (this.helper = Y("<div>")),
          this._addClass(this.helper, "ui-selectable-helper"));
      },
      _destroy: function () {
        (this.selectees.removeData("selectable-item"), this._mouseDestroy());
      },
      _mouseStart: function (i) {
        var n = this,
          e = this.options;
        ((this.opos = [i.pageX, i.pageY]),
          (this.elementPos = Y(this.element[0]).offset()),
          this.options.disabled ||
            ((this.selectees = Y(e.filter, this.element[0])),
            this._trigger("start", i),
            Y(e.appendTo).append(this.helper),
            this.helper.css({
              left: i.pageX,
              top: i.pageY,
              width: 0,
              height: 0,
            }),
            e.autoRefresh && this.refresh(),
            this.selectees.filter(".ui-selected").each(function () {
              var e = Y.data(this, "selectable-item");
              ((e.startselected = !0),
                i.metaKey ||
                  i.ctrlKey ||
                  (n._removeClass(e.$element, "ui-selected"),
                  (e.selected = !1),
                  n._addClass(e.$element, "ui-unselecting"),
                  (e.unselecting = !0),
                  n._trigger("unselecting", i, {
                    unselecting: e.element,
                  })));
            }),
            Y(i.target)
              .parents()
              .addBack()
              .each(function () {
                var e,
                  t = Y.data(this, "selectable-item");
                if (t)
                  return (
                    (e =
                      (!i.metaKey && !i.ctrlKey) ||
                      !t.$element.hasClass("ui-selected")),
                    n
                      ._removeClass(
                        t.$element,
                        e ? "ui-unselecting" : "ui-selected",
                      )
                      ._addClass(
                        t.$element,
                        e ? "ui-selecting" : "ui-unselecting",
                      ),
                    (t.unselecting = !e),
                    (t.selecting = e),
                    (t.selected = e)
                      ? n._trigger("selecting", i, {
                          selecting: t.element,
                        })
                      : n._trigger("unselecting", i, {
                          unselecting: t.element,
                        }),
                    !1
                  );
              })));
      },
      _mouseDrag: function (n) {
        if (((this.dragged = !0), !this.options.disabled)) {
          var e,
            r = this,
            o = this.options,
            s = this.opos[0],
            a = this.opos[1],
            l = n.pageX,
            c = n.pageY;
          return (
            l < s && ((e = l), (l = s), (s = e)),
            c < a && ((e = c), (c = a), (a = e)),
            this.helper.css({
              left: s,
              top: a,
              width: l - s,
              height: c - a,
            }),
            this.selectees.each(function () {
              var e = Y.data(this, "selectable-item"),
                t = !1,
                i = {};
              e &&
                e.element !== r.element[0] &&
                ((i.left = e.left + r.elementPos.left),
                (i.right = e.right + r.elementPos.left),
                (i.top = e.top + r.elementPos.top),
                (i.bottom = e.bottom + r.elementPos.top),
                "touch" === o.tolerance
                  ? (t = !(
                      i.left > l ||
                      i.right < s ||
                      i.top > c ||
                      i.bottom < a
                    ))
                  : "fit" === o.tolerance &&
                    (t =
                      i.left > s && i.right < l && i.top > a && i.bottom < c),
                t
                  ? (e.selected &&
                      (r._removeClass(e.$element, "ui-selected"),
                      (e.selected = !1)),
                    e.unselecting &&
                      (r._removeClass(e.$element, "ui-unselecting"),
                      (e.unselecting = !1)),
                    e.selecting ||
                      (r._addClass(e.$element, "ui-selecting"),
                      (e.selecting = !0),
                      r._trigger("selecting", n, {
                        selecting: e.element,
                      })))
                  : (e.selecting &&
                      ((n.metaKey || n.ctrlKey) && e.startselected
                        ? (r._removeClass(e.$element, "ui-selecting"),
                          (e.selecting = !1),
                          r._addClass(e.$element, "ui-selected"),
                          (e.selected = !0))
                        : (r._removeClass(e.$element, "ui-selecting"),
                          (e.selecting = !1),
                          e.startselected &&
                            (r._addClass(e.$element, "ui-unselecting"),
                            (e.unselecting = !0)),
                          r._trigger("unselecting", n, {
                            unselecting: e.element,
                          }))),
                    e.selected &&
                      (n.metaKey ||
                        n.ctrlKey ||
                        e.startselected ||
                        (r._removeClass(e.$element, "ui-selected"),
                        (e.selected = !1),
                        r._addClass(e.$element, "ui-unselecting"),
                        (e.unselecting = !0),
                        r._trigger("unselecting", n, {
                          unselecting: e.element,
                        })))));
            }),
            !1
          );
        }
      },
      _mouseStop: function (t) {
        var i = this;
        return (
          (this.dragged = !1),
          Y(".ui-unselecting", this.element[0]).each(function () {
            var e = Y.data(this, "selectable-item");
            (i._removeClass(e.$element, "ui-unselecting"),
              (e.unselecting = !1),
              (e.startselected = !1),
              i._trigger("unselected", t, { unselected: e.element }));
          }),
          Y(".ui-selecting", this.element[0]).each(function () {
            var e = Y.data(this, "selectable-item");
            (i
              ._removeClass(e.$element, "ui-selecting")
              ._addClass(e.$element, "ui-selected"),
              (e.selecting = !1),
              (e.selected = !0),
              (e.startselected = !0),
              i._trigger("selected", t, { selected: e.element }));
          }),
          this._trigger("stop", t),
          this.helper.remove(),
          !1
        );
      },
    }),
    Y.widget("ui.selectmenu", [
      Y.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 e = this.element.uniqueId().attr("id");
          ((this.ids = {
            element: e,
            button: e + "-button",
            menu: e + "-menu",
          }),
            this._drawButton(),
            this._drawMenu(),
            this._bindFormResetHandler(),
            (this._rendered = !1),
            (this.menuItems = Y()));
        },
        _drawButton: function () {
          var e,
            t = 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 (e) {
                (this.button.trigger("focus"), e.preventDefault());
              },
            }),
            this.element.hide(),
            (this.button = Y("<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",
            ),
            (e = Y("<span>").appendTo(this.button)),
            this._addClass(
              e,
              "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 () {
              t._rendered || t._refreshMenu();
            }));
        },
        _drawMenu: function () {
          var i = this;
          ((this.menu = Y("<ul>", {
            "aria-hidden": "true",
            "aria-labelledby": this.ids.button,
            id: this.ids.menu,
          })),
            (this.menuWrap = Y("<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 (e, t) {
                  (e.preventDefault(),
                    i._setSelection(),
                    i._select(t.item.data("ui-selectmenu-item"), e));
                },
                focus: function (e, t) {
                  t = t.item.data("ui-selectmenu-item");
                  (null != i.focusIndex &&
                    t.index !== i.focusIndex &&
                    (i._trigger("focus", e, { item: t }),
                    i.isOpen || i._select(t, e)),
                    (i.focusIndex = t.index),
                    i.button.attr(
                      "aria-activedescendant",
                      i.menuItems.eq(t.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 e = this.element.find("option");
          (this.menu.empty(),
            this._parseOptions(e),
            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),
            e.length &&
              ((e = this._getSelectedItem()),
              this.menuInstance.focus(null, e),
              this._setAria(e.data("ui-selectmenu-item")),
              this._setOption("disabled", this.element.prop("disabled"))));
        },
        open: function (e) {
          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", e)));
        },
        _position: function () {
          this.menuWrap.position(
            Y.extend({ of: this.button }, this.options.position),
          );
        },
        close: function (e) {
          this.isOpen &&
            ((this.isOpen = !1),
            this._toggleAttr(),
            (this.range = null),
            this._off(this.document),
            this._trigger("close", e));
        },
        widget: function () {
          return this.button;
        },
        menuWidget: function () {
          return this.menu;
        },
        _renderButtonItem: function (e) {
          var t = Y("<span>");
          return (
            this._setText(t, e.label),
            this._addClass(t, "ui-selectmenu-text"),
            t
          );
        },
        _renderMenu: function (n, e) {
          var r = this,
            o = "";
          Y.each(e, function (e, t) {
            var i;
            (t.optgroup !== o &&
              ((i = Y("<li>", { text: t.optgroup })),
              r._addClass(
                i,
                "ui-selectmenu-optgroup",
                "ui-menu-divider" +
                  (t.element.parent("optgroup").prop("disabled")
                    ? " ui-state-disabled"
                    : ""),
              ),
              i.appendTo(n),
              (o = t.optgroup)),
              r._renderItemData(n, t));
          });
        },
        _renderItemData: function (e, t) {
          return this._renderItem(e, t).data("ui-selectmenu-item", t);
        },
        _renderItem: function (e, t) {
          var i = Y("<li>"),
            n = Y("<div>", { title: t.element.attr("title") });
          return (
            t.disabled && this._addClass(i, null, "ui-state-disabled"),
            this._setText(n, t.label),
            i.append(n).appendTo(e)
          );
        },
        _setText: function (e, t) {
          t ? e.text(t) : e.html("&#160;");
        },
        _move: function (e, t) {
          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" === e || "last" === e
                ? i["first" === e ? "prevAll" : "nextAll"](n).eq(-1)
                : i[e + "All"](n).eq(0)).length &&
              this.menuInstance.focus(t, n));
        },
        _getSelectedItem: function () {
          return this.menuItems.eq(this.element[0].selectedIndex).parent("li");
        },
        _toggle: function (e) {
          this[this.isOpen ? "close" : "open"](e);
        },
        _setSelection: function () {
          var e;
          this.range &&
            (window.getSelection
              ? ((e = window.getSelection()).removeAllRanges(),
                e.addRange(this.range))
              : this.range.select(),
            this.button.focus());
        },
        _documentClick: {
          mousedown: function (e) {
            this.isOpen &&
              (Y(e.target).closest(
                ".ui-selectmenu-menu, #" + Y.escapeSelector(this.ids.button),
              ).length ||
                this.close(e));
          },
        },
        _buttonEvents: {
          mousedown: function () {
            var e;
            window.getSelection
              ? (e = window.getSelection()).rangeCount &&
                (this.range = e.getRangeAt(0))
              : (this.range = document.selection.createRange());
          },
          click: function (e) {
            (this._setSelection(), this._toggle(e));
          },
          keydown: function (e) {
            var t = !0;
            switch (e.keyCode) {
              case Y.ui.keyCode.TAB:
              case Y.ui.keyCode.ESCAPE:
                (this.close(e), (t = !1));
                break;
              case Y.ui.keyCode.ENTER:
                this.isOpen && this._selectFocusedItem(e);
                break;
              case Y.ui.keyCode.UP:
                e.altKey ? this._toggle(e) : this._move("prev", e);
                break;
              case Y.ui.keyCode.DOWN:
                e.altKey ? this._toggle(e) : this._move("next", e);
                break;
              case Y.ui.keyCode.SPACE:
                this.isOpen ? this._selectFocusedItem(e) : this._toggle(e);
                break;
              case Y.ui.keyCode.LEFT:
                this._move("prev", e);
                break;
              case Y.ui.keyCode.RIGHT:
                this._move("next", e);
                break;
              case Y.ui.keyCode.HOME:
              case Y.ui.keyCode.PAGE_UP:
                this._move("first", e);
                break;
              case Y.ui.keyCode.END:
              case Y.ui.keyCode.PAGE_DOWN:
                this._move("last", e);
                break;
              default:
                (this.menu.trigger(e), (t = !1));
            }
            t && e.preventDefault();
          },
        },
        _selectFocusedItem: function (e) {
          var t = this.menuItems.eq(this.focusIndex).parent("li");
          t.hasClass("ui-state-disabled") ||
            this._select(t.data("ui-selectmenu-item"), e);
        },
        _select: function (e, t) {
          var i = this.element[0].selectedIndex;
          ((this.element[0].selectedIndex = e.index),
            this.buttonItem.replaceWith(
              (this.buttonItem = this._renderButtonItem(e)),
            ),
            this._setAria(e),
            this._trigger("select", t, { item: e }),
            e.index !== i && this._trigger("change", t, { item: e }),
            this.close(t));
        },
        _setAria: function (e) {
          e = this.menuItems.eq(e.index).attr("id");
          (this.button.attr({
            "aria-labelledby": e,
            "aria-activedescendant": e,
          }),
            this.menu.attr("aria-activedescendant", e));
        },
        _setOption: function (e, t) {
          var i;
          ("icons" === e &&
            ((i = this.button.find("span.ui-icon")),
            this._removeClass(i, null, this.options.icons.button)._addClass(
              i,
              null,
              t.button,
            )),
            this._super(e, t),
            "appendTo" === e && this.menuWrap.appendTo(this._appendTo()),
            "width" === e && this._resizeButton());
        },
        _setOptionDisabled: function (e) {
          (this._super(e),
            this.menuInstance.option("disabled", e),
            this.button.attr("aria-disabled", e),
            this._toggleClass(this.button, null, "ui-state-disabled", e),
            this.element.prop("disabled", e),
            e
              ? (this.button.attr("tabindex", -1), this.close())
              : this.button.attr("tabindex", 0));
        },
        _appendTo: function () {
          var e = this.options.appendTo;
          return (e = !(e =
            !(e =
              e &&
              (e.jquery || e.nodeType ? Y(e) : this.document.find(e).eq(0))) ||
            !e[0]
              ? this.element.closest(".ui-front, dialog")
              : e).length
            ? this.document[0].body
            : e);
        },
        _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 e = this.options.width;
          !1 !== e
            ? (null === e &&
                ((e = this.element.show().outerWidth()), this.element.hide()),
              this.button.outerWidth(e))
            : this.button.css("width", "");
        },
        _resizeMenu: function () {
          this.menu.outerWidth(
            Math.max(
              this.button.outerWidth(),
              this.menu.width("").outerWidth() + 1,
            ),
          );
        },
        _getCreateOptions: function () {
          var e = this._super();
          return ((e.disabled = this.element.prop("disabled")), e);
        },
        _parseOptions: function (e) {
          var i = this,
            n = [];
          (e.each(function (e, t) {
            t.hidden || n.push(i._parseOption(Y(t), e));
          }),
            (this.items = n));
        },
        _parseOption: function (e, t) {
          var i = e.parent("optgroup");
          return {
            element: e,
            index: t,
            value: e.val(),
            label: e.text(),
            optgroup: i.attr("label") || "",
            disabled: i.prop("disabled") || e.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));
        },
      },
    ]),
    Y.widget("ui.slider", Y.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 e,
          t = this.options,
          i = this.element.find(".ui-slider-handle"),
          n = [],
          r = (t.values && t.values.length) || 1;
        for (
          i.length > r && (i.slice(r).remove(), (i = i.slice(0, r))),
            e = i.length;
          e < r;
          e++
        )
          n.push("<span tabindex='0'></span>");
        ((this.handles = i.add(Y(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 (e) {
            Y(this).data("ui-slider-handle-index", e).attr("tabIndex", 0);
          }));
      },
      _createRange: function () {
        var e = this.options;
        e.range
          ? (!0 === e.range &&
              (e.values
                ? e.values.length && 2 !== e.values.length
                  ? (e.values = [e.values[0], e.values[0]])
                  : Array.isArray(e.values) && (e.values = e.values.slice(0))
                : (e.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 = Y("<div>").appendTo(this.element)),
                this._addClass(this.range, "ui-slider-range")),
            ("min" !== e.range && "max" !== e.range) ||
              this._addClass(this.range, "ui-slider-range-" + e.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 (e) {
        var i,
          n,
          r,
          o,
          t,
          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: e.pageX, y: e.pageY }),
          (i = this._normValueFromMouse(s)),
          (n = this._valueMax() - this._valueMin() + 1),
          this.handles.each(function (e) {
            var t = Math.abs(i - a.values(e));
            (t < n ||
              (n === t &&
                (e === a._lastChangedValue || a.values(e) === l.min))) &&
              ((n = t), (r = Y(this)), (o = e));
          }),
          !1 !== this._start(e, o) &&
            ((this._mouseSliding = !0),
            (this._handleIndex = o),
            this._addClass(r, null, "ui-state-active"),
            r.trigger("focus"),
            (t = r.offset()),
            (s = !Y(e.target).parents().addBack().is(".ui-slider-handle")),
            (this._clickOffset = s
              ? { left: 0, top: 0 }
              : {
                  left: e.pageX - t.left - r.width() / 2,
                  top:
                    e.pageY -
                    t.top -
                    r.height() / 2 -
                    (parseInt(r.css("borderTopWidth"), 10) || 0) -
                    (parseInt(r.css("borderBottomWidth"), 10) || 0) +
                    (parseInt(r.css("marginTop"), 10) || 0),
                }),
            this.handles.hasClass("ui-state-hover") || this._slide(e, o, i),
            (this._animateOff = !0)))
        );
      },
      _mouseStart: function () {
        return !0;
      },
      _mouseDrag: function (e) {
        var t = { x: e.pageX, y: e.pageY },
          t = this._normValueFromMouse(t);
        return (this._slide(e, this._handleIndex, t), !1);
      },
      _mouseStop: function (e) {
        return (
          this._removeClass(this.handles, null, "ui-state-active"),
          (this._mouseSliding = !1),
          this._stop(e, this._handleIndex),
          this._change(e, this._handleIndex),
          (this._handleIndex = null),
          (this._clickOffset = null),
          (this._animateOff = !1)
        );
      },
      _detectOrientation: function () {
        this.orientation =
          "vertical" === this.options.orientation ? "vertical" : "horizontal";
      },
      _normValueFromMouse: function (e) {
        var t,
          e =
            "horizontal" === this.orientation
              ? ((t = this.elementSize.width),
                e.x -
                  this.elementOffset.left -
                  (this._clickOffset ? this._clickOffset.left : 0))
              : ((t = this.elementSize.height),
                e.y -
                  this.elementOffset.top -
                  (this._clickOffset ? this._clickOffset.top : 0)),
          e = e / t;
        return (
          (e = 1 < e ? 1 : e) < 0 && (e = 0),
          "vertical" === this.orientation && (e = 1 - e),
          (t = this._valueMax() - this._valueMin()),
          (t = this._valueMin() + e * t),
          this._trimAlignValue(t)
        );
      },
      _uiHash: function (e, t, i) {
        var n = {
          handle: this.handles[e],
          handleIndex: e,
          value: void 0 !== t ? t : this.value(),
        };
        return (
          this._hasMultipleValues() &&
            ((n.value = void 0 !== t ? t : this.values(e)),
            (n.values = i || this.values())),
          n
        );
      },
      _hasMultipleValues: function () {
        return this.options.values && this.options.values.length;
      },
      _start: function (e, t) {
        return this._trigger("start", e, this._uiHash(t));
      },
      _slide: function (e, t, i) {
        var n,
          r = this.value(),
          o = this.values();
        (this._hasMultipleValues() &&
          ((n = this.values(t ? 0 : 1)),
          (r = this.values(t)),
          2 === this.options.values.length &&
            !0 === this.options.range &&
            (i = 0 === t ? Math.min(n, i) : Math.max(n, i)),
          (o[t] = i)),
          i !== r &&
            !1 !== this._trigger("slide", e, this._uiHash(t, i, o)) &&
            (this._hasMultipleValues() ? this.values(t, i) : this.value(i)));
      },
      _stop: function (e, t) {
        this._trigger("stop", e, this._uiHash(t));
      },
      _change: function (e, t) {
        this._keySliding ||
          this._mouseSliding ||
          ((this._lastChangedValue = t),
          this._trigger("change", e, this._uiHash(t)));
      },
      value: function (e) {
        return arguments.length
          ? ((this.options.value = this._trimAlignValue(e)),
            this._refreshValue(),
            void this._change(null, 0))
          : this._value();
      },
      values: function (e, t) {
        var i, n, r;
        if (1 < arguments.length)
          return (
            (this.options.values[e] = this._trimAlignValue(t)),
            this._refreshValue(),
            void this._change(null, e)
          );
        if (!arguments.length) return this._values();
        if (!Array.isArray(e))
          return this._hasMultipleValues() ? this._values(e) : this.value();
        for (i = this.options.values, n = e, r = 0; r < i.length; r += 1)
          ((i[r] = this._trimAlignValue(n[r])), this._change(null, r));
        this._refreshValue();
      },
      _setOption: function (e, t) {
        var i,
          n = 0;
        switch (
          ("range" === e &&
            !0 === this.options.range &&
            ("min" === t
              ? ((this.options.value = this._values(0)),
                (this.options.values = null))
              : "max" === t &&
                ((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(e, t),
          e)
        ) {
          case "orientation":
            (this._detectOrientation(),
              this._removeClass(
                "ui-slider-horizontal ui-slider-vertical",
              )._addClass("ui-slider-" + this.orientation),
              this._refreshValue(),
              this.options.range && this._refreshRange(t),
              this.handles.css("horizontal" === t ? "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 (e) {
        (this._super(e), this._toggleClass(null, "ui-state-disabled", !!e));
      },
      _value: function () {
        var e = this.options.value;
        return (e = this._trimAlignValue(e));
      },
      _values: function (e) {
        var t, i;
        if (arguments.length)
          return ((e = this.options.values[e]), this._trimAlignValue(e));
        if (this._hasMultipleValues()) {
          for (t = this.options.values.slice(), i = 0; i < t.length; i += 1)
            t[i] = this._trimAlignValue(t[i]);
          return t;
        }
        return [];
      },
      _trimAlignValue: function (e) {
        if (e <= this._valueMin()) return this._valueMin();
        if (e >= this._valueMax()) return this._valueMax();
        var t = 0 < this.options.step ? this.options.step : 1,
          i = (e - this._valueMin()) % t,
          e = e - i;
        return (
          2 * Math.abs(i) >= t && (e += 0 < i ? t : -t),
          parseFloat(e.toFixed(5))
        );
      },
      _calculateNewMax: function () {
        var e = this.options.max,
          t = this._valueMin(),
          i = this.options.step;
        ((e = Math.round((e - t) / i) * i + t) > this.options.max && (e -= i),
          (this.max = parseFloat(e.toFixed(this._precision()))));
      },
      _precision: function () {
        var e = this._precisionOf(this.options.step);
        return (e =
          null !== this.options.min
            ? Math.max(e, this._precisionOf(this.options.min))
            : e);
      },
      _precisionOf: function (e) {
        var t = e.toString(),
          e = t.indexOf(".");
        return -1 === e ? 0 : t.length - e - 1;
      },
      _valueMin: function () {
        return this.options.min;
      },
      _valueMax: function () {
        return this.max;
      },
      _refreshRange: function (e) {
        ("vertical" === e && this.range.css({ width: "", left: "" }),
          "horizontal" === e && this.range.css({ height: "", bottom: "" }));
      },
      _refreshValue: function () {
        var t,
          i,
          e,
          n,
          r,
          o = this.options.range,
          s = this.options,
          a = this,
          l = !this._animateOff && s.animate,
          c = {};
        this._hasMultipleValues()
          ? this.handles.each(function (e) {
              ((i =
                ((a.values(e) - a._valueMin()) /
                  (a._valueMax() - a._valueMin())) *
                100),
                (c["horizontal" === a.orientation ? "left" : "bottom"] =
                  i + "%"),
                Y(this).stop(1, 1)[l ? "animate" : "css"](c, s.animate),
                !0 === a.options.range &&
                  ("horizontal" === a.orientation
                    ? (0 === e &&
                        a.range
                          .stop(1, 1)
                          [l ? "animate" : "css"]({ left: i + "%" }, s.animate),
                      1 === e &&
                        a.range[l ? "animate" : "css"](
                          { width: i - t + "%" },
                          { queue: !1, duration: s.animate },
                        ))
                    : (0 === e &&
                        a.range
                          .stop(1, 1)
                          [
                            l ? "animate" : "css"
                          ]({ bottom: i + "%" }, s.animate),
                      1 === e &&
                        a.range[l ? "animate" : "css"](
                          { height: i - t + "%" },
                          { queue: !1, duration: s.animate },
                        ))),
                (t = i));
            })
          : ((e = this.value()),
            (n = this._valueMin()),
            (r = this._valueMax()),
            (i = r !== n ? ((e - n) / (r - n)) * 100 : 0),
            (c["horizontal" === this.orientation ? "left" : "bottom"] =
              i + "%"),
            this.handle.stop(1, 1)[l ? "animate" : "css"](c, s.animate),
            "min" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: i + "%" }, s.animate),
            "max" === o &&
              "horizontal" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ width: 100 - i + "%" }, s.animate),
            "min" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: i + "%" }, s.animate),
            "max" === o &&
              "vertical" === this.orientation &&
              this.range
                .stop(1, 1)
                [l ? "animate" : "css"]({ height: 100 - i + "%" }, s.animate));
      },
      _handleEvents: {
        keydown: function (e) {
          var t,
            i,
            n,
            r = Y(e.target).data("ui-slider-handle-index");
          switch (e.keyCode) {
            case Y.ui.keyCode.HOME:
            case Y.ui.keyCode.END:
            case Y.ui.keyCode.PAGE_UP:
            case Y.ui.keyCode.PAGE_DOWN:
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (
                (e.preventDefault(),
                !this._keySliding &&
                  ((this._keySliding = !0),
                  this._addClass(Y(e.target), null, "ui-state-active"),
                  !1 === this._start(e, r)))
              )
                return;
          }
          switch (
            ((n = this.options.step),
            (t = i = this._hasMultipleValues() ? this.values(r) : this.value()),
            e.keyCode)
          ) {
            case Y.ui.keyCode.HOME:
              i = this._valueMin();
              break;
            case Y.ui.keyCode.END:
              i = this._valueMax();
              break;
            case Y.ui.keyCode.PAGE_UP:
              i = this._trimAlignValue(
                t + (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Y.ui.keyCode.PAGE_DOWN:
              i = this._trimAlignValue(
                t - (this._valueMax() - this._valueMin()) / this.numPages,
              );
              break;
            case Y.ui.keyCode.UP:
            case Y.ui.keyCode.RIGHT:
              if (t === this._valueMax()) return;
              i = this._trimAlignValue(t + n);
              break;
            case Y.ui.keyCode.DOWN:
            case Y.ui.keyCode.LEFT:
              if (t === this._valueMin()) return;
              i = this._trimAlignValue(t - n);
          }
          this._slide(e, r, i);
        },
        keyup: function (e) {
          var t = Y(e.target).data("ui-slider-handle-index");
          this._keySliding &&
            ((this._keySliding = !1),
            this._stop(e, t),
            this._change(e, t),
            this._removeClass(Y(e.target), null, "ui-state-active"));
        },
      },
    }),
    Y.widget("ui.sortable", Y.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 (e, t, i) {
        return t <= e && e < t + i;
      },
      _isFloating: function (e) {
        return (
          /left|right/.test(e.css("float")) ||
          /inline|table-cell/.test(e.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 (e, t) {
        (this._super(e, t), "handle" === e && this._setHandleClassName());
      },
      _setHandleClassName: function () {
        var e = this;
        (this._removeClass(
          this.element.find(".ui-sortable-handle"),
          "ui-sortable-handle",
        ),
          Y.each(this.items, function () {
            e._addClass(
              this.instance.options.handle
                ? this.item.find(this.instance.options.handle)
                : this.item,
              "ui-sortable-handle",
            );
          }));
      },
      _destroy: function () {
        this._mouseDestroy();
        for (var e = this.items.length - 1; 0 <= e; e--)
          this.items[e].item.removeData(this.widgetName + "-item");
        return this;
      },
      _mouseCapture: function (e, t) {
        var i = null,
          n = !1,
          r = this;
        return (
          !this.reverting &&
          !this.options.disabled &&
          "static" !== this.options.type &&
          (this._refreshItems(e),
          Y(e.target)
            .parents()
            .each(function () {
              if (Y.data(this, r.widgetName + "-item") === r)
                return ((i = Y(this)), !1);
            }),
          !!(i =
            Y.data(e.target, r.widgetName + "-item") === r ? Y(e.target) : i) &&
            !(
              this.options.handle &&
              !t &&
              (Y(this.options.handle, i)
                .find("*")
                .addBack()
                .each(function () {
                  this === e.target && (n = !0);
                }),
              !n)
            ) &&
            ((this.currentItem = i), this._removeCurrentsFromItems(), !0))
        );
      },
      _mouseStart: function (e, t, i) {
        var n,
          r,
          o = this.options;
        if (
          ((this.currentContainer = this).refreshPositions(),
          (this.appendTo = Y(
            "parent" !== o.appendTo ? o.appendTo : this.currentItem.parent(),
          )),
          (this.helper = this._createHelper(e)),
          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,
          }),
          Y.extend(this.offset, {
            click: {
              left: e.pageX - this.offset.left,
              top: e.pageY - this.offset.top,
            },
            relative: this._getRelativeOffset(),
          }),
          this.helper.css("position", "absolute"),
          (this.cssPosition = this.helper.css("position")),
          o.cursorAt && this._adjustOffsetFromHelper(o.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()),
          Y.extend(this.offset, { parent: this._getParentOffset() }),
          o.containment && this._setContainment(),
          o.cursor &&
            "auto" !== o.cursor &&
            ((r = this.document.find("body")),
            (this.storedCursor = r.css("cursor")),
            r.css("cursor", o.cursor),
            (this.storedStylesheet = Y(
              "<style>*{ cursor: " + o.cursor + " !important; }</style>",
            ).appendTo(r))),
          o.zIndex &&
            (this.helper.css("zIndex") &&
              (this._storedZIndex = this.helper.css("zIndex")),
            this.helper.css("zIndex", o.zIndex)),
          o.opacity &&
            (this.helper.css("opacity") &&
              (this._storedOpacity = this.helper.css("opacity")),
            this.helper.css("opacity", o.opacity)),
          this.scrollParent[0] !== this.document[0] &&
            "HTML" !== this.scrollParent[0].tagName &&
            (this.overflowOffset = this.scrollParent.offset()),
          this._trigger("start", e, this._uiHash()),
          this._preserveHelperProportions || this._cacheHelperProportions(),
          !i)
        )
          for (n = this.containers.length - 1; 0 <= n; n--)
            this.containers[n]._trigger("activate", e, this._uiHash(this));
        return (
          Y.ui.ddmanager && (Y.ui.ddmanager.current = this),
          Y.ui.ddmanager &&
            !o.dropBehaviour &&
            Y.ui.ddmanager.prepareOffsets(this, e),
          (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(e)),
          (this.originalPageX = e.pageX),
          (this.originalPageY = e.pageY),
          (this.lastPositionAbs = this.positionAbs =
            this._convertPositionTo("absolute")),
          this._mouseDrag(e),
          !0
        );
      },
      _scroll: function (e) {
        var t = this.options,
          i = !1;
        return (
          this.scrollParent[0] !== this.document[0] &&
          "HTML" !== this.scrollParent[0].tagName
            ? (this.overflowOffset.top +
                this.scrollParent[0].offsetHeight -
                e.pageY <
              t.scrollSensitivity
                ? (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop + t.scrollSpeed)
                : e.pageY - this.overflowOffset.top < t.scrollSensitivity &&
                  (this.scrollParent[0].scrollTop = i =
                    this.scrollParent[0].scrollTop - t.scrollSpeed),
              this.overflowOffset.left +
                this.scrollParent[0].offsetWidth -
                e.pageX <
              t.scrollSensitivity
                ? (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft + t.scrollSpeed)
                : e.pageX - this.overflowOffset.left < t.scrollSensitivity &&
                  (this.scrollParent[0].scrollLeft = i =
                    this.scrollParent[0].scrollLeft - t.scrollSpeed))
            : (e.pageY - this.document.scrollTop() < t.scrollSensitivity
                ? (i = this.document.scrollTop(
                    this.document.scrollTop() - t.scrollSpeed,
                  ))
                : this.window.height() - (e.pageY - this.document.scrollTop()) <
                    t.scrollSensitivity &&
                  (i = this.document.scrollTop(
                    this.document.scrollTop() + t.scrollSpeed,
                  )),
              e.pageX - this.document.scrollLeft() < t.scrollSensitivity
                ? (i = this.document.scrollLeft(
                    this.document.scrollLeft() - t.scrollSpeed,
                  ))
                : this.window.width() - (e.pageX - this.document.scrollLeft()) <
                    t.scrollSensitivity &&
                  (i = this.document.scrollLeft(
                    this.document.scrollLeft() + t.scrollSpeed,
                  ))),
          i
        );
      },
      _mouseDrag: function (e) {
        var t,
          i,
          n,
          r,
          o = this.options;
        if (
          ((this.position = this._generatePosition(e)),
          (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(e),
          null !== this.innermostContainer)
        )
          for (
            o.scroll &&
              !1 !== this._scroll(e) &&
              (this._refreshItemPositions(!0),
              Y.ui.ddmanager &&
                !o.dropBehaviour &&
                Y.ui.ddmanager.prepareOffsets(this, e)),
              this.dragDirection = {
                vertical: this._getDragVerticalDirection(),
                horizontal: this._getDragHorizontalDirection(),
              },
              t = this.items.length - 1;
            0 <= t;
            t--
          )
            if (
              ((n = (i = this.items[t]).item[0]),
              (r = this._intersectsWithPointer(i)) &&
                i.instance === this.currentContainer &&
                !(
                  n === this.currentItem[0] ||
                  this.placeholder[1 === r ? "next" : "prev"]()[0] === n ||
                  Y.contains(this.placeholder[0], n) ||
                  ("semi-dynamic" === this.options.type &&
                    Y.contains(this.element[0], n))
                ))
            ) {
              if (
                ((this.direction = 1 === r ? "down" : "up"),
                "pointer" !== this.options.tolerance &&
                  !this._intersectsWithSides(i))
              )
                break;
              (this._rearrange(e, i),
                this._trigger("change", e, this._uiHash()));
              break;
            }
        return (
          Y.ui.ddmanager && Y.ui.ddmanager.drag(this, e),
          this._trigger("sort", e, this._uiHash()),
          (this.lastPositionAbs = this.positionAbs),
          !1
        );
      },
      _mouseStop: function (e, t) {
        var i, n, r, o;
        if (e)
          return (
            Y.ui.ddmanager &&
              !this.options.dropBehaviour &&
              Y.ui.ddmanager.drop(this, e),
            this.options.revert
              ? ((n = (i = this).placeholder.offset()),
                (o = {}),
                ((r = this.options.axis) && "x" !== r) ||
                  (o.left =
                    n.left -
                    this.offset.parent.left -
                    this.margins.left +
                    (this.offsetParent[0] === this.document[0].body
                      ? 0
                      : this.offsetParent[0].scrollLeft)),
                (r && "y" !== r) ||
                  (o.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),
                Y(this.helper).animate(
                  o,
                  parseInt(this.options.revert, 10) || 500,
                  function () {
                    i._clear(e);
                  },
                ))
              : this._clear(e, t),
            !1
          );
      },
      cancel: function () {
        if (this.dragging) {
          (this._mouseUp(new Y.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 e = this.containers.length - 1; 0 <= e; e--)
            (this.containers[e]._trigger(
              "deactivate",
              null,
              this._uiHash(this),
            ),
              this.containers[e].containerCache.over &&
                (this.containers[e]._trigger("out", null, this._uiHash(this)),
                (this.containers[e].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(),
            Y.extend(this, {
              helper: null,
              dragging: !1,
              reverting: !1,
              _noFinalSort: null,
            }),
            this.domPosition.prev
              ? Y(this.domPosition.prev).after(this.currentItem)
              : Y(this.domPosition.parent).prepend(this.currentItem)),
          this
        );
      },
      serialize: function (t) {
        var e = this._getItemsAsjQuery(t && t.connected),
          i = [];
        return (
          (t = t || {}),
          Y(e).each(function () {
            var e = (Y(t.item || this).attr(t.attribute || "id") || "").match(
              t.expression || /(.+)[\-=_](.+)/,
            );
            e &&
              i.push(
                (t.key || e[1] + "[]") +
                  "=" +
                  (t.key && t.expression ? e[1] : e[2]),
              );
          }),
          !i.length && t.key && i.push(t.key + "="),
          i.join("&")
        );
      },
      toArray: function (e) {
        var t = this._getItemsAsjQuery(e && e.connected),
          i = [];
        return (
          (e = e || {}),
          t.each(function () {
            i.push(Y(e.item || this).attr(e.attribute || "id") || "");
          }),
          i
        );
      },
      _intersectsWith: function (e) {
        var t = this.positionAbs.left,
          i = t + this.helperProportions.width,
          n = this.positionAbs.top,
          r = n + this.helperProportions.height,
          o = e.left,
          s = o + e.width,
          a = e.top,
          l = a + e.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 || (o < t + u && t + u < s);
        return "pointer" === this.options.tolerance ||
          this.options.forcePointerForContainers ||
          ("pointer" !== this.options.tolerance &&
            this.helperProportions[this.floating ? "width" : "height"] >
              e[this.floating ? "width" : "height"])
          ? c && u
          : o < t + this.helperProportions.width / 2 &&
              i - this.helperProportions.width / 2 < s &&
              a < n + this.helperProportions.height / 2 &&
              r - this.helperProportions.height / 2 < l;
      },
      _intersectsWithPointer: function (e) {
        var t =
            "x" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.top + this.offset.click.top,
              e.top,
              e.height,
            ),
          e =
            "y" === this.options.axis ||
            this._isOverAxis(
              this.positionAbs.left + this.offset.click.left,
              e.left,
              e.width,
            );
        return (
          !(!t || !e) &&
          ((t = this.dragDirection.vertical),
          (e = this.dragDirection.horizontal),
          this.floating
            ? "right" === e || "down" === t
              ? 2
              : 1
            : t && ("down" === t ? 2 : 1))
        );
      },
      _intersectsWithSides: function (e) {
        var t = this._isOverAxis(
            this.positionAbs.top + this.offset.click.top,
            e.top + e.height / 2,
            e.height,
          ),
          i = this._isOverAxis(
            this.positionAbs.left + this.offset.click.left,
            e.left + e.width / 2,
            e.width,
          ),
          n = this.dragDirection.vertical,
          e = this.dragDirection.horizontal;
        return this.floating && e
          ? ("right" === e && i) || ("left" === e && !i)
          : n && (("down" === n && t) || ("up" === n && !t));
      },
      _getDragVerticalDirection: function () {
        var e = this.positionAbs.top - this.lastPositionAbs.top;
        return 0 != e && (0 < e ? "down" : "up");
      },
      _getDragHorizontalDirection: function () {
        var e = this.positionAbs.left - this.lastPositionAbs.left;
        return 0 != e && (0 < e ? "right" : "left");
      },
      refresh: function (e) {
        return (
          this._refreshItems(e),
          this._setHandleClassName(),
          this.refreshPositions(),
          this
        );
      },
      _connectWith: function () {
        var e = this.options;
        return e.connectWith.constructor === String
          ? [e.connectWith]
          : e.connectWith;
      },
      _getItemsAsjQuery: function (e) {
        var t,
          i,
          n,
          r,
          o = [],
          s = [],
          a = this._connectWith();
        if (a && e)
          for (t = a.length - 1; 0 <= t; t--)
            for (i = (n = Y(a[t], this.document[0])).length - 1; 0 <= i; i--)
              (r = Y.data(n[i], this.widgetFullName)) &&
                r !== this &&
                !r.options.disabled &&
                s.push([
                  "function" == typeof r.options.items
                    ? r.options.items.call(r.element)
                    : Y(r.options.items, r.element)
                        .not(".ui-sortable-helper")
                        .not(".ui-sortable-placeholder"),
                  r,
                ]);
        function l() {
          o.push(this);
        }
        for (
          s.push([
            "function" == typeof this.options.items
              ? this.options.items.call(this.element, null, {
                  options: this.options,
                  item: this.currentItem,
                })
              : Y(this.options.items, this.element)
                  .not(".ui-sortable-helper")
                  .not(".ui-sortable-placeholder"),
            this,
          ]),
            t = s.length - 1;
          0 <= t;
          t--
        )
          s[t][0].each(l);
        return Y(o);
      },
      _removeCurrentsFromItems: function () {
        var i = this.currentItem.find(":data(" + this.widgetName + "-item)");
        this.items = Y.grep(this.items, function (e) {
          for (var t = 0; t < i.length; t++) if (i[t] === e.item[0]) return !1;
          return !0;
        });
      },
      _refreshItems: function (e) {
        ((this.items = []), (this.containers = [this]));
        var t,
          i,
          n,
          r,
          o,
          s,
          a,
          l,
          c = this.items,
          u = [
            [
              "function" == typeof this.options.items
                ? this.options.items.call(this.element[0], e, {
                    item: this.currentItem,
                  })
                : Y(this.options.items, this.element),
              this,
            ],
          ],
          h = this._connectWith();
        if (h && this.ready)
          for (t = h.length - 1; 0 <= t; t--)
            for (i = (n = Y(h[t], this.document[0])).length - 1; 0 <= i; i--)
              (r = Y.data(n[i], this.widgetFullName)) &&
                r !== this &&
                !r.options.disabled &&
                (u.push([
                  "function" == typeof r.options.items
                    ? r.options.items.call(r.element[0], e, {
                        item: this.currentItem,
                      })
                    : Y(r.options.items, r.element),
                  r,
                ]),
                this.containers.push(r));
        for (t = u.length - 1; 0 <= t; t--)
          for (o = u[t][1], l = (s = u[t][(i = 0)]).length; i < l; i++)
            ((a = Y(s[i])).data(this.widgetName + "-item", o),
              c.push({
                item: a,
                instance: o,
                width: 0,
                height: 0,
                left: 0,
                top: 0,
              }));
      },
      _refreshItemPositions: function (e) {
        for (var t, i, n = this.items.length - 1; 0 <= n; n--)
          ((t = this.items[n]),
            (this.currentContainer &&
              t.instance !== this.currentContainer &&
              t.item[0] !== this.currentItem[0]) ||
              ((i = this.options.toleranceElement
                ? Y(this.options.toleranceElement, t.item)
                : t.item),
              e || ((t.width = i.outerWidth()), (t.height = i.outerHeight())),
              (i = i.offset()),
              (t.left = i.left),
              (t.top = i.top)));
      },
      refreshPositions: function (e) {
        var t, i;
        if (
          ((this.floating =
            !!this.items.length &&
            ("x" === this.options.axis ||
              this._isFloating(this.items[0].item))),
          null !== this.innermostContainer && this._refreshItemPositions(e),
          this.options.custom && this.options.custom.refreshContainers)
        )
          this.options.custom.refreshContainers.call(this);
        else
          for (t = this.containers.length - 1; 0 <= t; t--)
            ((i = this.containers[t].element.offset()),
              (this.containers[t].containerCache.left = i.left),
              (this.containers[t].containerCache.top = i.top),
              (this.containers[t].containerCache.width =
                this.containers[t].element.outerWidth()),
              (this.containers[t].containerCache.height =
                this.containers[t].element.outerHeight()));
        return this;
      },
      _createPlaceholder: function (i) {
        var n,
          r,
          o = (i = i || this).options;
        ((o.placeholder && o.placeholder.constructor !== String) ||
          ((n = o.placeholder),
          (r = i.currentItem[0].nodeName.toLowerCase()),
          (o.placeholder = {
            element: function () {
              var e = Y("<" + r + ">", i.document[0]);
              return (
                i
                  ._addClass(
                    e,
                    "ui-sortable-placeholder",
                    n || i.currentItem[0].className,
                  )
                  ._removeClass(e, "ui-sortable-helper"),
                "tbody" === r
                  ? i._createTrPlaceholder(
                      i.currentItem.find("tr").eq(0),
                      Y("<tr>", i.document[0]).appendTo(e),
                    )
                  : "tr" === r
                    ? i._createTrPlaceholder(i.currentItem, e)
                    : "img" === r && e.attr("src", i.currentItem.attr("src")),
                n || e.css("visibility", "hidden"),
                e
              );
            },
            update: function (e, t) {
              (n && !o.forcePlaceholderSize) ||
                ((t.height() &&
                  (!o.forcePlaceholderSize || ("tbody" !== r && "tr" !== r))) ||
                  t.height(
                    i.currentItem.innerHeight() -
                      parseInt(i.currentItem.css("paddingTop") || 0, 10) -
                      parseInt(i.currentItem.css("paddingBottom") || 0, 10),
                  ),
                t.width() ||
                  t.width(
                    i.currentItem.innerWidth() -
                      parseInt(i.currentItem.css("paddingLeft") || 0, 10) -
                      parseInt(i.currentItem.css("paddingRight") || 0, 10),
                  ));
            },
          })),
          (i.placeholder = Y(
            o.placeholder.element.call(i.element, i.currentItem),
          )),
          i.currentItem.after(i.placeholder),
          o.placeholder.update(i, i.placeholder));
      },
      _createTrPlaceholder: function (e, t) {
        var i = this;
        e.children().each(function () {
          Y("<td>&#160;</td>", i.document[0])
            .attr("colspan", Y(this).attr("colspan") || 1)
            .appendTo(t);
        });
      },
      _contactContainers: function (e) {
        for (
          var t,
            i,
            n,
            r,
            o,
            s,
            a,
            l,
            c,
            u = null,
            h = null,
            d = this.containers.length - 1;
          0 <= d;
          d--
        )
          Y.contains(this.currentItem[0], this.containers[d].element[0]) ||
            (this._intersectsWith(this.containers[d].containerCache)
              ? (u &&
                  Y.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", e, 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", e, this._uiHash(this)),
              (this.containers[h].containerCache.over = 1));
          else {
            for (
              i = 1e4,
                n = null,
                r = (l = u.floating || this._isFloating(this.currentItem))
                  ? "left"
                  : "top",
                o = l ? "width" : "height",
                c = l ? "pageX" : "pageY",
                t = this.items.length - 1;
              0 <= t;
              t--
            )
              Y.contains(
                this.containers[h].element[0],
                this.items[t].item[0],
              ) &&
                this.items[t].item[0] !== this.currentItem[0] &&
                ((s = this.items[t].item.offset()[r]),
                (a = !1),
                e[c] - s > this.items[t][o] / 2 && (a = !0),
                Math.abs(e[c] - s) < i &&
                  ((i = Math.abs(e[c] - s)),
                  (n = this.items[t]),
                  (this.direction = a ? "up" : "down")));
            (n || this.options.dropOnEmpty) &&
              (this.currentContainer !== this.containers[h]
                ? (n
                    ? this._rearrange(e, n, null, !0)
                    : this._rearrange(e, null, this.containers[h].element, !0),
                  this._trigger("change", e, this._uiHash()),
                  this.containers[h]._trigger("change", e, 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", e, this._uiHash(this)),
                  (this.containers[h].containerCache.over = 1))
                : this.currentContainer.containerCache.over ||
                  (this.containers[h]._trigger("over", e, this._uiHash()),
                  (this.currentContainer.containerCache.over = 1)));
          }
      },
      _createHelper: function (e) {
        var t = this.options,
          e =
            "function" == typeof t.helper
              ? Y(t.helper.apply(this.element[0], [e, this.currentItem]))
              : "clone" === t.helper
                ? this.currentItem.clone()
                : this.currentItem;
        return (
          e.parents("body").length || this.appendTo[0].appendChild(e[0]),
          e[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"),
            }),
          (e[0].style.width && !t.forceHelperSize) ||
            e.width(this.currentItem.width()),
          (e[0].style.height && !t.forceHelperSize) ||
            e.height(this.currentItem.height()),
          e
        );
      },
      _adjustOffsetFromHelper: function (e) {
        ("string" == typeof e && (e = e.split(" ")),
          "left" in
            (e = Array.isArray(e) ? { left: +e[0], top: +e[1] || 0 } : e) &&
            (this.offset.click.left = e.left + this.margins.left),
          "right" in e &&
            (this.offset.click.left =
              this.helperProportions.width - e.right + this.margins.left),
          "top" in e && (this.offset.click.top = e.top + this.margins.top),
          "bottom" in e &&
            (this.offset.click.top =
              this.helperProportions.height - e.bottom + this.margins.top));
      },
      _getParentOffset: function () {
        this.offsetParent = this.helper.offsetParent();
        var e = this.offsetParent.offset();
        return (
          "absolute" === this.cssPosition &&
            this.scrollParent[0] !== this.document[0] &&
            Y.contains(this.scrollParent[0], this.offsetParent[0]) &&
            ((e.left += this.scrollParent.scrollLeft()),
            (e.top += this.scrollParent.scrollTop())),
          {
            top:
              (e =
                this.offsetParent[0] === this.document[0].body ||
                (this.offsetParent[0].tagName &&
                  "html" === this.offsetParent[0].tagName.toLowerCase() &&
                  Y.ui.ie)
                  ? { top: 0, left: 0 }
                  : e).top +
              (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
            left:
              e.left +
              (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0),
          }
        );
      },
      _getRelativeOffset: function () {
        if ("relative" !== this.cssPosition) return { top: 0, left: 0 };
        var e = this.currentItem.position();
        return {
          top:
            e.top -
            (parseInt(this.helper.css("top"), 10) || 0) +
            this.scrollParent.scrollTop(),
          left:
            e.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 e,
          t,
          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) ||
            ((e = Y(i.containment)[0]),
            (t = Y(i.containment).offset()),
            (i = "hidden" !== Y(e).css("overflow")),
            (this.containment = [
              t.left +
                (parseInt(Y(e).css("borderLeftWidth"), 10) || 0) +
                (parseInt(Y(e).css("paddingLeft"), 10) || 0) -
                this.margins.left,
              t.top +
                (parseInt(Y(e).css("borderTopWidth"), 10) || 0) +
                (parseInt(Y(e).css("paddingTop"), 10) || 0) -
                this.margins.top,
              t.left +
                (i ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) -
                (parseInt(Y(e).css("borderLeftWidth"), 10) || 0) -
                (parseInt(Y(e).css("paddingRight"), 10) || 0) -
                this.helperProportions.width -
                this.margins.left,
              t.top +
                (i
                  ? Math.max(e.scrollHeight, e.offsetHeight)
                  : e.offsetHeight) -
                (parseInt(Y(e).css("borderTopWidth"), 10) || 0) -
                (parseInt(Y(e).css("paddingBottom"), 10) || 0) -
                this.helperProportions.height -
                this.margins.top,
            ])));
      },
      _convertPositionTo: function (e, t) {
        t = t || this.position;
        var i = "absolute" === e ? 1 : -1,
          n =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          e = /(html|body)/i.test(n[0].tagName);
        return {
          top:
            t.top +
            this.offset.relative.top * i +
            this.offset.parent.top * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollTop()
              : e
                ? 0
                : n.scrollTop()) *
              i,
          left:
            t.left +
            this.offset.relative.left * i +
            this.offset.parent.left * i -
            ("fixed" === this.cssPosition
              ? -this.scrollParent.scrollLeft()
              : e
                ? 0
                : n.scrollLeft()) *
              i,
        };
      },
      _generatePosition: function (e) {
        var t = this.options,
          i = e.pageX,
          n = e.pageY,
          r =
            "absolute" !== this.cssPosition ||
            (this.scrollParent[0] !== this.document[0] &&
              Y.contains(this.scrollParent[0], this.offsetParent[0]))
              ? this.scrollParent
              : this.offsetParent,
          o = /(html|body)/i.test(r[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 &&
              (e.pageX - this.offset.click.left < this.containment[0] &&
                (i = this.containment[0] + this.offset.click.left),
              e.pageY - this.offset.click.top < this.containment[1] &&
                (n = this.containment[1] + this.offset.click.top),
              e.pageX - this.offset.click.left > this.containment[2] &&
                (i = this.containment[2] + this.offset.click.left),
              e.pageY - this.offset.click.top > this.containment[3] &&
                (n = this.containment[3] + this.offset.click.top)),
            t.grid &&
              ((e =
                this.originalPageY +
                Math.round((n - this.originalPageY) / t.grid[1]) * t.grid[1]),
              (n =
                !this.containment ||
                (e - this.offset.click.top >= this.containment[1] &&
                  e - this.offset.click.top <= this.containment[3])
                  ? e
                  : e - this.offset.click.top >= this.containment[1]
                    ? e - t.grid[1]
                    : e + t.grid[1]),
              (e =
                this.originalPageX +
                Math.round((i - this.originalPageX) / t.grid[0]) * t.grid[0]),
              (i =
                !this.containment ||
                (e - this.offset.click.left >= this.containment[0] &&
                  e - this.offset.click.left <= this.containment[2])
                  ? e
                  : e - this.offset.click.left >= this.containment[0]
                    ? e - t.grid[0]
                    : e + t.grid[0]))),
          {
            top:
              n -
              this.offset.click.top -
              this.offset.relative.top -
              this.offset.parent.top +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollTop()
                : o
                  ? 0
                  : r.scrollTop()),
            left:
              i -
              this.offset.click.left -
              this.offset.relative.left -
              this.offset.parent.left +
              ("fixed" === this.cssPosition
                ? -this.scrollParent.scrollLeft()
                : o
                  ? 0
                  : r.scrollLeft()),
          }
        );
      },
      _rearrange: function (e, t, i, n) {
        (i
          ? i[0].appendChild(this.placeholder[0])
          : t.item[0].parentNode.insertBefore(
              this.placeholder[0],
              "down" === this.direction ? t.item[0] : t.item[0].nextSibling,
            ),
          (this.counter = this.counter ? ++this.counter : 1));
        var r = this.counter;
        this._delay(function () {
          r === this.counter && this.refreshPositions(!n);
        });
      },
      _clear: function (e, t) {
        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 r(t, i, n) {
          return function (e) {
            n._trigger(t, e, i._uiHash(i));
          };
        }
        for (
          this.fromOutside &&
            !t &&
            n.push(function (e) {
              this._trigger("receive", e, this._uiHash(this.fromOutside));
            }),
            (!this.fromOutside &&
              this.domPosition.prev ===
                this.currentItem.prev().not(".ui-sortable-helper")[0] &&
              this.domPosition.parent === this.currentItem.parent()[0]) ||
              t ||
              n.push(function (e) {
                this._trigger("update", e, this._uiHash());
              }),
            this !== this.currentContainer &&
              (t ||
                (n.push(function (e) {
                  this._trigger("remove", e, this._uiHash());
                }),
                n.push(
                  function (t) {
                    return function (e) {
                      t._trigger("receive", e, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ),
                n.push(
                  function (t) {
                    return function (e) {
                      t._trigger("update", e, this._uiHash(this));
                    };
                  }.call(this, this.currentContainer),
                ))),
            i = this.containers.length - 1;
          0 <= i;
          i--
        )
          (t || n.push(r("deactivate", this, this.containers[i])),
            this.containers[i].containerCache.over &&
              (n.push(r("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),
          t || this._trigger("beforeStop", e, this._uiHash()),
          this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
          this.cancelHelperRemoval ||
            (this.helper[0] !== this.currentItem[0] && this.helper.remove(),
            (this.helper = null)),
          !t)
        ) {
          for (i = 0; i < n.length; i++) n[i].call(this, e);
          this._trigger("stop", e, this._uiHash());
        }
        return ((this.fromOutside = !1), !this.cancelHelperRemoval);
      },
      _trigger: function () {
        !1 === Y.Widget.prototype._trigger.apply(this, arguments) &&
          this.cancel();
      },
      _uiHash: function (e) {
        var t = e || this;
        return {
          helper: t.helper,
          placeholder: t.placeholder || Y([]),
          position: t.position,
          originalPosition: t.originalPosition,
          offset: t.positionAbs,
          item: t.currentItem,
          sender: e ? e.element : null,
        };
      },
    }));
  function ce(t) {
    return function () {
      var e = this.element.val();
      (t.apply(this, arguments),
        this._refresh(),
        e !== this.element.val() && this._trigger("change"));
    };
  }
  (Y.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(),
        r = this.element;
      return (
        Y.each(["min", "max", "step"], function (e, t) {
          var i = r.attr(t);
          null != i && i.length && (n[t] = i);
        }),
        n
      );
    },
    _events: {
      keydown: function (e) {
        this._start(e) && this._keydown(e) && e.preventDefault();
      },
      keyup: "_stop",
      focus: function () {
        this.previous = this.element.val();
      },
      blur: function (e) {
        this.cancelBlur
          ? delete this.cancelBlur
          : (this._stop(),
            this._refresh(),
            this.previous !== this.element.val() && this._trigger("change", e));
      },
      mousewheel: function (e, t) {
        var i = Y.ui.safeActiveElement(this.document[0]);
        if (this.element[0] === i && t) {
          if (!this.spinning && !this._start(e)) return !1;
          (this._spin((0 < t ? 1 : -1) * this.options.step, e),
            clearTimeout(this.mousewheelTimer),
            (this.mousewheelTimer = this._delay(function () {
              this.spinning && this._stop(e);
            }, 100)),
            e.preventDefault());
        }
      },
      "mousedown .ui-spinner-button": function (e) {
        var t;
        function i() {
          this.element[0] === Y.ui.safeActiveElement(this.document[0]) ||
            (this.element.trigger("focus"),
            (this.previous = t),
            this._delay(function () {
              this.previous = t;
            }));
        }
        ((t =
          this.element[0] === Y.ui.safeActiveElement(this.document[0])
            ? this.previous
            : this.element.val()),
          e.preventDefault(),
          i.call(this),
          (this.cancelBlur = !0),
          this._delay(function () {
            (delete this.cancelBlur, i.call(this));
          }),
          !1 !== this._start(e) &&
            this._repeat(
              null,
              Y(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              e,
            ));
      },
      "mouseup .ui-spinner-button": "_stop",
      "mouseenter .ui-spinner-button": function (e) {
        if (Y(e.currentTarget).hasClass("ui-state-active"))
          return (
            !1 !== this._start(e) &&
            void this._repeat(
              null,
              Y(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1,
              e,
            )
          );
      },
      "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 (e) {
      var t = this.options,
        i = Y.ui.keyCode;
      switch (e.keyCode) {
        case i.UP:
          return (this._repeat(null, 1, e), !0);
        case i.DOWN:
          return (this._repeat(null, -1, e), !0);
        case i.PAGE_UP:
          return (this._repeat(null, t.page, e), !0);
        case i.PAGE_DOWN:
          return (this._repeat(null, -t.page, e), !0);
      }
      return !1;
    },
    _start: function (e) {
      return (
        !(!this.spinning && !1 === this._trigger("start", e)) &&
        (this.counter || (this.counter = 1), (this.spinning = !0))
      );
    },
    _repeat: function (e, t, i) {
      ((e = e || 500),
        clearTimeout(this.timer),
        (this.timer = this._delay(function () {
          this._repeat(40, t, i);
        }, e)),
        this._spin(t * this.options.step, i));
    },
    _spin: function (e, t) {
      var i = this.value() || 0;
      (this.counter || (this.counter = 1),
        (i = this._adjustValue(i + e * this._increment(this.counter))),
        (this.spinning && !1 === this._trigger("spin", t, { value: i })) ||
          (this._value(i), this.counter++));
    },
    _increment: function (e) {
      var t = this.options.incremental;
      return t
        ? "function" == typeof t
          ? t(e)
          : Math.floor((e * e * e) / 5e4 - (e * e) / 500 + (17 * e) / 200 + 1)
        : 1;
    },
    _precision: function () {
      var e = this._precisionOf(this.options.step);
      return (e =
        null !== this.options.min
          ? Math.max(e, this._precisionOf(this.options.min))
          : e);
    },
    _precisionOf: function (e) {
      var t = e.toString(),
        e = t.indexOf(".");
      return -1 === e ? 0 : t.length - e - 1;
    },
    _adjustValue: function (e) {
      var t = this.options,
        i = null !== t.min ? t.min : 0,
        n = e - i;
      return (
        (e = i + Math.round(n / t.step) * t.step),
        (e = parseFloat(e.toFixed(this._precision()))),
        null !== t.max && e > t.max
          ? t.max
          : null !== t.min && e < t.min
            ? t.min
            : e
      );
    },
    _stop: function (e) {
      this.spinning &&
        (clearTimeout(this.timer),
        clearTimeout(this.mousewheelTimer),
        (this.counter = 0),
        (this.spinning = !1),
        this._trigger("stop", e));
    },
    _setOption: function (e, t) {
      var i;
      if ("culture" === e || "numberFormat" === e)
        return (
          (i = this._parse(this.element.val())),
          (this.options[e] = t),
          void this.element.val(this._format(i))
        );
      (("max" !== e && "min" !== e && "step" !== e) ||
        ("string" == typeof t && (t = this._parse(t))),
        "icons" === e &&
          ((i = this.buttons.first().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.up),
          this._addClass(i, null, t.up),
          (i = this.buttons.last().find(".ui-icon")),
          this._removeClass(i, null, this.options.icons.down),
          this._addClass(i, null, t.down)),
        this._super(e, t));
    },
    _setOptionDisabled: function (e) {
      (this._super(e),
        this._toggleClass(this.uiSpinner, null, "ui-state-disabled", !!e),
        this.element.prop("disabled", !!e),
        this.buttons.button(e ? "disable" : "enable"));
    },
    _setOptions: ce(function (e) {
      this._super(e);
    }),
    _parse: function (e) {
      return "" ===
        (e =
          "string" == typeof e && "" !== e
            ? window.Globalize && this.options.numberFormat
              ? Globalize.parseFloat(e, 10, this.options.culture)
              : +e
            : e) || isNaN(e)
        ? null
        : e;
    },
    _format: function (e) {
      return "" === e
        ? ""
        : window.Globalize && this.options.numberFormat
          ? Globalize.format(e, this.options.numberFormat, this.options.culture)
          : e;
    },
    _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 e = this.value();
      return null !== e && e === this._adjustValue(e);
    },
    _value: function (e, t) {
      var i;
      ("" !== e &&
        null !== (i = this._parse(e)) &&
        (t || (i = this._adjustValue(i)), (e = this._format(i))),
        this.element.val(e),
        this._refresh());
    },
    _destroy: function () {
      (this.element
        .prop("disabled", !1)
        .removeAttr(
          "autocomplete role aria-valuemin aria-valuemax aria-valuenow",
        ),
        this.uiSpinner.replaceWith(this.element));
    },
    stepUp: ce(function (e) {
      this._stepUp(e);
    }),
    _stepUp: function (e) {
      this._start() && (this._spin((e || 1) * this.options.step), this._stop());
    },
    stepDown: ce(function (e) {
      this._stepDown(e);
    }),
    _stepDown: function (e) {
      this._start() &&
        (this._spin((e || 1) * -this.options.step), this._stop());
    },
    pageUp: ce(function (e) {
      this._stepUp((e || 1) * this.options.page);
    }),
    pageDown: ce(function (e) {
      this._stepDown((e || 1) * this.options.page);
    }),
    value: function (e) {
      if (!arguments.length) return this._parse(this.element.val());
      ce(this._value).call(this, e);
    },
    widget: function () {
      return this.uiSpinner;
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.spinner", Y.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 ue;
  Y.ui.spinner;
  (Y.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:
      ((ue = /#.*$/),
      function (e) {
        var t = e.href.replace(ue, ""),
          i = location.href.replace(ue, "");
        try {
          t = decodeURIComponent(t);
        } catch (e) {}
        try {
          i = decodeURIComponent(i);
        } catch (e) {}
        return 1 < e.hash.length && t === i;
      }),
    _create: function () {
      var t = this,
        e = this.options;
      ((this.running = !1),
        this._addClass("ui-tabs", "ui-widget ui-widget-content"),
        this._toggleClass("ui-tabs-collapsible", null, e.collapsible),
        this._processTabs(),
        (e.active = this._initialActive()),
        Array.isArray(e.disabled) &&
          (e.disabled = Y.uniqueSort(
            e.disabled.concat(
              Y.map(this.tabs.filter(".ui-state-disabled"), function (e) {
                return t.tabs.index(e);
              }),
            ),
          ).sort()),
        !1 !== this.options.active && this.anchors.length
          ? (this.active = this._findActive(e.active))
          : (this.active = Y()),
        this._refresh(),
        this.active.length && this.load(e.active));
    },
    _initialActive: function () {
      var i = this.options.active,
        e = this.options.collapsible,
        n = location.hash.substring(1);
      return (
        null === i &&
          (n &&
            this.tabs.each(function (e, t) {
              if (Y(t).attr("aria-controls") === n) return ((i = e), !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 = !e && 0),
        (i = !e && !1 === i && this.anchors.length ? 0 : i)
      );
    },
    _getCreateEventData: function () {
      return {
        tab: this.active,
        panel: this.active.length ? this._getPanelForTab(this.active) : Y(),
      };
    },
    _tabKeydown: function (e) {
      var t = Y(Y.ui.safeActiveElement(this.document[0])).closest("li"),
        i = this.tabs.index(t),
        n = !0;
      if (!this._handlePageNav(e)) {
        switch (e.keyCode) {
          case Y.ui.keyCode.RIGHT:
          case Y.ui.keyCode.DOWN:
            i++;
            break;
          case Y.ui.keyCode.UP:
          case Y.ui.keyCode.LEFT:
            ((n = !1), i--);
            break;
          case Y.ui.keyCode.END:
            i = this.anchors.length - 1;
            break;
          case Y.ui.keyCode.HOME:
            i = 0;
            break;
          case Y.ui.keyCode.SPACE:
            return (
              e.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i)
            );
          case Y.ui.keyCode.ENTER:
            return (
              e.preventDefault(),
              clearTimeout(this.activating),
              void this._activate(i !== this.options.active && i)
            );
          default:
            return;
        }
        (e.preventDefault(),
          clearTimeout(this.activating),
          (i = this._focusNextTab(i, n)),
          e.ctrlKey ||
            e.metaKey ||
            (t.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 (e) {
      this._handlePageNav(e) ||
        (e.ctrlKey &&
          e.keyCode === Y.ui.keyCode.UP &&
          (e.preventDefault(), this.active.trigger("focus")));
    },
    _handlePageNav: function (e) {
      return e.altKey && e.keyCode === Y.ui.keyCode.PAGE_UP
        ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0)
        : e.altKey && e.keyCode === Y.ui.keyCode.PAGE_DOWN
          ? (this._activate(this._focusNextTab(this.options.active + 1, !0)),
            !0)
          : void 0;
    },
    _findNextTab: function (e, t) {
      var i = this.tabs.length - 1;
      for (
        ;
        -1 !==
        Y.inArray((e = (e = i < e ? 0 : e) < 0 ? i : e), this.options.disabled);

      )
        e = t ? e + 1 : e - 1;
      return e;
    },
    _focusNextTab: function (e, t) {
      return (
        (e = this._findNextTab(e, t)),
        this.tabs.eq(e).trigger("focus"),
        e
      );
    },
    _setOption: function (e, t) {
      "active" !== e
        ? (this._super(e, t),
          "collapsible" === e &&
            (this._toggleClass("ui-tabs-collapsible", null, t),
            t || !1 !== this.options.active || this._activate(0)),
          "event" === e && this._setupEvents(t),
          "heightStyle" === e && this._setupHeightStyle(t))
        : this._activate(t);
    },
    _sanitizeSelector: function (e) {
      return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "";
    },
    refresh: function () {
      var e = this.options,
        t = this.tablist.children(":has(a[href])");
      ((e.disabled = Y.map(t.filter(".ui-state-disabled"), function (e) {
        return t.index(e);
      })),
        this._processTabs(),
        !1 !== e.active && this.anchors.length
          ? this.active.length && !Y.contains(this.tablist[0], this.active[0])
            ? this.tabs.length === e.disabled.length
              ? ((e.active = !1), (this.active = Y()))
              : this._activate(this._findNextTab(Math.max(0, e.active - 1), !1))
            : (e.active = this.tabs.index(this.active))
          : ((e.active = !1), (this.active = Y())),
        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,
        e = this.tabs,
        t = 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 (e) {
            Y(this).is(".ui-state-disabled") && e.preventDefault();
          })
          .on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () {
            Y(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 Y("a", this)[0];
          })
          .attr({ tabIndex: -1 })),
        this._addClass(this.anchors, "ui-tabs-anchor"),
        (this.panels = Y()),
        this.anchors.each(function (e, t) {
          var i,
            n,
            r,
            o = Y(t).uniqueId().attr("id"),
            s = Y(t).closest("li"),
            a = s.attr("aria-controls");
          (l._isLocal(t)
            ? ((r = (i = t.hash).substring(1)),
              (n = l.element.find(l._sanitizeSelector(i))))
            : ((r = s.attr("aria-controls") || Y({}).uniqueId()[0].id),
              (n = l.element.find((i = "#" + r))).length ||
                (n = l._createPanel(r)).insertAfter(
                  l.panels[e - 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": r, "aria-labelledby": o }),
            n.attr("aria-labelledby", o));
        }),
        this.panels.attr("role", "tabpanel"),
        this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"),
        e &&
          (this._off(e.not(this.tabs)),
          this._off(t.not(this.anchors)),
          this._off(i.not(this.panels))));
    },
    _getList: function () {
      return this.tablist || this.element.find("ol, ul").eq(0);
    },
    _createPanel: function (e) {
      return Y("<div>").attr("id", e).data("ui-tabs-destroy", !0);
    },
    _setOptionDisabled: function (e) {
      var t, i;
      for (
        Array.isArray(e) &&
          (e.length ? e.length === this.anchors.length && (e = !0) : (e = !1)),
          i = 0;
        (t = this.tabs[i]);
        i++
      )
        ((t = Y(t)),
          !0 === e || -1 !== Y.inArray(i, e)
            ? (t.attr("aria-disabled", "true"),
              this._addClass(t, null, "ui-state-disabled"))
            : (t.removeAttr("aria-disabled"),
              this._removeClass(t, null, "ui-state-disabled")));
      ((this.options.disabled = e),
        this._toggleClass(
          this.widget(),
          this.widgetFullName + "-disabled",
          null,
          !0 === e,
        ));
    },
    _setupEvents: function (e) {
      var i = {};
      (e &&
        Y.each(e.split(" "), function (e, t) {
          i[t] = "_eventHandler";
        }),
        this._off(this.anchors.add(this.tabs).add(this.panels)),
        this._on(!0, this.anchors, {
          click: function (e) {
            e.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 (e) {
      var i,
        t = this.element.parent();
      "fill" === e
        ? ((i = t.height()),
          (i -= this.element.outerHeight() - this.element.height()),
          this.element.siblings(":visible").each(function () {
            var e = Y(this),
              t = e.css("position");
            "absolute" !== t && "fixed" !== t && (i -= e.outerHeight(!0));
          }),
          this.element
            .children()
            .not(this.panels)
            .each(function () {
              i -= Y(this).outerHeight(!0);
            }),
          this.panels
            .each(function () {
              Y(this).height(
                Math.max(0, i - Y(this).innerHeight() + Y(this).height()),
              );
            })
            .css("overflow", "auto"))
        : "auto" === e &&
          ((i = 0),
          this.panels
            .each(function () {
              i = Math.max(i, Y(this).height("").height());
            })
            .height(i));
    },
    _eventHandler: function (e) {
      var t = this.options,
        i = this.active,
        n = Y(e.currentTarget).closest("li"),
        r = n[0] === i[0],
        o = r && t.collapsible,
        s = o ? Y() : this._getPanelForTab(n),
        a = i.length ? this._getPanelForTab(i) : Y(),
        i = { oldTab: i, oldPanel: a, newTab: o ? Y() : n, newPanel: s };
      (e.preventDefault(),
        n.hasClass("ui-state-disabled") ||
          n.hasClass("ui-tabs-loading") ||
          this.running ||
          (r && !t.collapsible) ||
          !1 === this._trigger("beforeActivate", e, i) ||
          ((t.active = !o && this.tabs.index(n)),
          (this.active = r ? Y() : n),
          this.xhr && this.xhr.abort(),
          a.length ||
            s.length ||
            Y.error("jQuery UI Tabs: Mismatching fragment identifier."),
          s.length && this.load(this.tabs.index(n), e),
          this._toggle(e, i)));
    },
    _toggle: function (e, t) {
      var i = this,
        n = t.newPanel,
        r = t.oldPanel;
      function o() {
        ((i.running = !1), i._trigger("activate", e, t));
      }
      function s() {
        (i._addClass(
          t.newTab.closest("li"),
          "ui-tabs-active",
          "ui-state-active",
        ),
          n.length && i.options.show
            ? i._show(n, i.options.show, o)
            : (n.show(), o()));
      }
      ((this.running = !0),
        r.length && this.options.hide
          ? this._hide(r, this.options.hide, function () {
              (i._removeClass(
                t.oldTab.closest("li"),
                "ui-tabs-active",
                "ui-state-active",
              ),
                s());
            })
          : (this._removeClass(
              t.oldTab.closest("li"),
              "ui-tabs-active",
              "ui-state-active",
            ),
            r.hide(),
            s()),
        r.attr("aria-hidden", "true"),
        t.oldTab.attr({
          "aria-selected": "false",
          "aria-expanded": "false",
        }),
        n.length && r.length
          ? t.oldTab.attr("tabIndex", -1)
          : n.length &&
            this.tabs
              .filter(function () {
                return 0 === Y(this).attr("tabIndex");
              })
              .attr("tabIndex", -1),
        n.attr("aria-hidden", "false"),
        t.newTab.attr({
          "aria-selected": "true",
          "aria-expanded": "true",
          tabIndex: 0,
        }));
    },
    _activate: function (e) {
      var e = this._findActive(e);
      e[0] !== this.active[0] &&
        ((e = (e = !e.length ? this.active : e).find(".ui-tabs-anchor")[0]),
        this._eventHandler({
          target: e,
          currentTarget: e,
          preventDefault: Y.noop,
        }));
    },
    _findActive: function (e) {
      return !1 === e ? Y() : this.tabs.eq(e);
    },
    _getIndex: function (e) {
      return (e =
        "string" == typeof e
          ? this.anchors.index(
              this.anchors.filter("[href$='" + Y.escapeSelector(e) + "']"),
            )
          : e);
    },
    _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 () {
          Y.data(this, "ui-tabs-destroy")
            ? Y(this).remove()
            : Y(this).removeAttr(
                "role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded",
              );
        }),
        this.tabs.each(function () {
          var e = Y(this),
            t = e.data("ui-tabs-aria-controls");
          t
            ? e.attr("aria-controls", t).removeData("ui-tabs-aria-controls")
            : e.removeAttr("aria-controls");
        }),
        this.panels.show(),
        "content" !== this.options.heightStyle &&
          this.panels.css("height", ""));
    },
    enable: function (i) {
      var e = this.options.disabled;
      !1 !== e &&
        ((e =
          void 0 !== i &&
          ((i = this._getIndex(i)),
          Array.isArray(e)
            ? Y.map(e, function (e) {
                return e !== i ? e : null;
              })
            : Y.map(this.tabs, function (e, t) {
                return t !== i ? t : null;
              }))),
        this._setOptionDisabled(e));
    },
    disable: function (e) {
      var t = this.options.disabled;
      if (!0 !== t) {
        if (void 0 === e) t = !0;
        else {
          if (((e = this._getIndex(e)), -1 !== Y.inArray(e, t))) return;
          t = Array.isArray(t) ? Y.merge([e], t).sort() : [e];
        }
        this._setOptionDisabled(t);
      }
    },
    load: function (e, n) {
      e = this._getIndex(e);
      function r(e, t) {
        ("abort" === t && o.panels.stop(!1, !0),
          o._removeClass(i, "ui-tabs-loading"),
          s.removeAttr("aria-busy"),
          e === o.xhr && delete o.xhr);
      }
      var o = this,
        i = this.tabs.eq(e),
        e = i.find(".ui-tabs-anchor"),
        s = this._getPanelForTab(i),
        a = { tab: i, panel: s };
      this._isLocal(e[0]) ||
        ((this.xhr = Y.ajax(this._ajaxSettings(e, n, a))),
        this.xhr &&
          "canceled" !== this.xhr.statusText &&
          (this._addClass(i, "ui-tabs-loading"),
          s.attr("aria-busy", "true"),
          this.xhr
            .done(function (e, t, i) {
              setTimeout(function () {
                (s.html(e), o._trigger("load", n, a), r(i, t));
              }, 1);
            })
            .fail(function (e, t) {
              setTimeout(function () {
                r(e, t);
              }, 1);
            })));
    },
    _ajaxSettings: function (e, i, n) {
      var r = this;
      return {
        url: e.attr("href").replace(/#.*$/, ""),
        beforeSend: function (e, t) {
          return r._trigger(
            "beforeLoad",
            i,
            Y.extend({ jqXHR: e, ajaxSettings: t }, n),
          );
        },
      };
    },
    _getPanelForTab: function (e) {
      e = Y(e).attr("aria-controls");
      return this.element.find(this._sanitizeSelector("#" + e));
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tabs", Y.ui.tabs, {
        _processTabs: function () {
          (this._superApply(arguments), this._addClass(this.tabs, "ui-tab"));
        },
      }));
  Y.ui.tabs;
  (Y.widget("ui.tooltip", {
    version: "1.13.0",
    options: {
      classes: { "ui-tooltip": "ui-corner-all ui-widget-shadow" },
      content: function () {
        var e = Y(this).attr("title");
        return Y("<a>").text(e).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 (e, t) {
      var i = (e.attr("aria-describedby") || "").split(/\s+/);
      (i.push(t),
        e
          .data("ui-tooltip-id", t)
          .attr("aria-describedby", String.prototype.trim.call(i.join(" "))));
    },
    _removeDescribedBy: function (e) {
      var t = e.data("ui-tooltip-id"),
        i = (e.attr("aria-describedby") || "").split(/\s+/),
        t = Y.inArray(t, i);
      (-1 !== t && i.splice(t, 1),
        e.removeData("ui-tooltip-id"),
        (i = String.prototype.trim.call(i.join(" ")))
          ? e.attr("aria-describedby", i)
          : e.removeAttr("aria-describedby"));
    },
    _create: function () {
      (this._on({ mouseover: "open", focusin: "open" }),
        (this.tooltips = {}),
        (this.parents = {}),
        (this.liveRegion = Y("<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 = Y([])));
    },
    _setOption: function (e, t) {
      var i = this;
      (this._super(e, t),
        "content" === e &&
          Y.each(this.tooltips, function (e, t) {
            i._updateContent(t.element);
          }));
    },
    _setOptionDisabled: function (e) {
      this[e ? "_disable" : "_enable"]();
    },
    _disable: function () {
      var n = this;
      (Y.each(this.tooltips, function (e, t) {
        var i = Y.Event("blur");
        ((i.target = i.currentTarget = t.element[0]), n.close(i, !0));
      }),
        (this.disabledTitles = this.disabledTitles.add(
          this.element
            .find(this.options.items)
            .addBack()
            .filter(function () {
              var e = Y(this);
              if (e.is("[title]"))
                return e
                  .data("ui-tooltip-title", e.attr("title"))
                  .removeAttr("title");
            }),
        )));
    },
    _enable: function () {
      (this.disabledTitles.each(function () {
        var e = Y(this);
        e.data("ui-tooltip-title") &&
          e.attr("title", e.data("ui-tooltip-title"));
      }),
        (this.disabledTitles = Y([])));
    },
    open: function (e) {
      var i = this,
        t = Y(e ? e.target : this.element).closest(this.options.items);
      t.length &&
        !t.data("ui-tooltip-id") &&
        (t.attr("title") && t.data("ui-tooltip-title", t.attr("title")),
        t.data("ui-tooltip-open", !0),
        e &&
          "mouseover" === e.type &&
          t.parents().each(function () {
            var e,
              t = Y(this);
            (t.data("ui-tooltip-open") &&
              (((e = Y.Event("blur")).target = e.currentTarget = this),
              i.close(e, !0)),
              t.attr("title") &&
                (t.uniqueId(),
                (i.parents[this.id] = {
                  element: this,
                  title: t.attr("title"),
                }),
                t.attr("title", "")));
          }),
        this._registerCloseHandlers(e, t),
        this._updateContent(t, e));
    },
    _updateContent: function (t, i) {
      var e = this.options.content,
        n = this,
        r = i ? i.type : null;
      if ("string" == typeof e || e.nodeType || e.jquery)
        return this._open(i, t, e);
      (e = e.call(t[0], function (e) {
        n._delay(function () {
          t.data("ui-tooltip-open") && (i && (i.type = r), this._open(i, t, e));
        });
      })) && this._open(i, t, e);
    },
    _open: function (e, t, i) {
      var n,
        r,
        o,
        s = Y.extend({}, this.options.position);
      function a(e) {
        ((s.of = e), r.is(":hidden") || r.position(s));
      }
      i &&
        ((n = this._find(t))
          ? n.tooltip.find(".ui-tooltip-content").html(i)
          : (t.is("[title]") &&
              (e && "mouseover" === e.type
                ? t.attr("title", "")
                : t.removeAttr("title")),
            (n = this._tooltip(t)),
            (r = n.tooltip),
            this._addDescribedBy(t, r.attr("id")),
            r.find(".ui-tooltip-content").html(i),
            this.liveRegion.children().hide(),
            (i = Y("<div>").html(r.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 && e && /^mouse/.test(e.type)
              ? (this._on(this.document, { mousemove: a }), a(e))
              : r.position(Y.extend({ of: t }, this.options.position)),
            r.hide(),
            this._show(r, this.options.show),
            this.options.track &&
              this.options.show &&
              this.options.show.delay &&
              (o = this.delayedShow =
                setInterval(function () {
                  r.is(":visible") && (a(s.of), clearInterval(o));
                }, 13)),
            this._trigger("open", e, { tooltip: r })));
    },
    _registerCloseHandlers: function (e, t) {
      var i = {
        keyup: function (e) {
          e.keyCode === Y.ui.keyCode.ESCAPE &&
            (((e = Y.Event(e)).currentTarget = t[0]), this.close(e, !0));
        },
      };
      (t[0] !== this.element[0] &&
        (i.remove = function () {
          this._removeTooltip(this._find(t).tooltip);
        }),
        (e && "mouseover" !== e.type) || (i.mouseleave = "close"),
        (e && "focusin" !== e.type) || (i.focusout = "close"),
        this._on(!0, t, i));
    },
    close: function (e) {
      var t,
        i = this,
        n = Y(e ? e.currentTarget : this.element),
        r = this._find(n);
      r
        ? ((t = r.tooltip),
          r.closing ||
            (clearInterval(this.delayedShow),
            n.data("ui-tooltip-title") &&
              !n.attr("title") &&
              n.attr("title", n.data("ui-tooltip-title")),
            this._removeDescribedBy(n),
            (r.hiding = !0),
            t.stop(!0),
            this._hide(t, this.options.hide, function () {
              i._removeTooltip(Y(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"),
            e &&
              "mouseleave" === e.type &&
              Y.each(this.parents, function (e, t) {
                (Y(t.element).attr("title", t.title), delete i.parents[e]);
              }),
            (r.closing = !0),
            this._trigger("close", e, { tooltip: t }),
            r.hiding || (r.closing = !1)))
        : n.removeData("ui-tooltip-open");
    },
    _tooltip: function (e) {
      var t = Y("<div>").attr("role", "tooltip"),
        i = Y("<div>").appendTo(t),
        n = t.uniqueId().attr("id");
      return (
        this._addClass(i, "ui-tooltip-content"),
        this._addClass(t, "ui-tooltip", "ui-widget ui-widget-content"),
        t.appendTo(this._appendTo(e)),
        (this.tooltips[n] = { element: e, tooltip: t })
      );
    },
    _find: function (e) {
      e = e.data("ui-tooltip-id");
      return e ? this.tooltips[e] : null;
    },
    _removeTooltip: function (e) {
      (clearInterval(this.delayedShow),
        e.remove(),
        delete this.tooltips[e.attr("id")]);
    },
    _appendTo: function (e) {
      e = e.closest(".ui-front, dialog");
      return (e = !e.length ? this.document[0].body : e);
    },
    _destroy: function () {
      var n = this;
      (Y.each(this.tooltips, function (e, t) {
        var i = Y.Event("blur"),
          t = t.element;
        ((i.target = i.currentTarget = t[0]),
          n.close(i, !0),
          Y("#" + e).remove(),
          t.data("ui-tooltip-title") &&
            (t.attr("title") || t.attr("title", t.data("ui-tooltip-title")),
            t.removeData("ui-tooltip-title")));
      }),
        this.liveRegion.remove());
    },
  }),
    !1 !== Y.uiBackCompat &&
      Y.widget("ui.tooltip", Y.ui.tooltip, {
        options: { tooltipClass: null },
        _tooltip: function () {
          var e = this._superApply(arguments);
          return (
            this.options.tooltipClass &&
              e.tooltip.addClass(this.options.tooltipClass),
            e
          );
        },
      }));
  Y.ui.tooltip;
}),
  (function (e) {
    var t, i, n;
    function r(e, t) {
      var i, n;
      1 < e.originalEvent.touches.length ||
        (e.preventDefault(),
        (i = e.originalEvent.changedTouches[0]),
        (n = document.createEvent("MouseEvents")).initMouseEvent(
          t,
          !0,
          !0,
          window,
          1,
          i.screenX,
          i.screenY,
          i.clientX,
          i.clientY,
          !1,
          !1,
          !1,
          !1,
          0,
          null,
        ),
        e.target.dispatchEvent(n));
    }
    ((e.support.touch =
      "ontouchend" in document || 0 < navigator.maxTouchPoints),
      e.support.touch &&
        ((t = e.ui.mouse.prototype),
        (i = t._mouseInit),
        (t._touchStart = function (e) {
          !n &&
            this._mouseCapture(e.originalEvent.changedTouches[0]) &&
            ((n = !0),
            (this._touchMoved = !1),
            r(e, "mouseover"),
            r(e, "mousemove"),
            r(e, "mousedown"));
        }),
        (t._touchMove = function (e) {
          n && ((this._touchMoved = !0), r(e, "mousemove"));
        }),
        (t._touchEnd = function (e) {
          n &&
            (r(e, "mouseup"),
            r(e, "mouseout"),
            this._touchMoved || r(e, "click"),
            (n = !1));
        }),
        (t._mouseInit = function () {
          (this.element
            .bind("touchstart", e.proxy(this, "_touchStart"))
            .bind("touchmove", e.proxy(this, "_touchMove"))
            .bind("touchend", e.proxy(this, "_touchEnd")),
            i.call(this));
        })));
  })(jQuery),
  (function (e) {
    (e.widget("ui.dialog", e.ui.dialog, {
      _allowInteraction: function (e) {
        return !0;
      },
    }),
      (e.ui.dialog.prototype._focusTabbable = function () {}));
  })(jQuery));
/*!@license H5P.Transition-1.0/transition.js by Joubel licensed under MIT*/ jQuery =
  oldJQuery;
(((H5P = H5P || {}).Transition = (function () {
  Transition = {
    transitionEndEventNames: {
      WebkitTransition: "webkitTransitionEnd",
      transition: "transitionend",
      MozTransition: "transitionend",
      OTransition: "oTransitionEnd",
      msTransition: "MSTransitionEnd",
    },
    cache: [],
    getVendorPropertyName: function (e) {
      if (void 0 !== Transition.cache[e]) return Transition.cache[e];
      var t = document.createElement("div");
      if (e in t.style) Transition.cache[e] = e;
      else {
        var i = ["Moz", "Webkit", "O", "ms"],
          n = e.charAt(0).toUpperCase() + e.substr(1);
        if (e in t.style) Transition.cache[e] = e;
        else
          for (var r = 0; r < i.length; ++r) {
            var o = i[r] + n;
            if (o in t.style) {
              Transition.cache[e] = o;
              break;
            }
          }
      }
      return Transition.cache[e];
    },
    getTransitionEndEventName: function () {
      return (
        Transition.transitionEndEventNames[
          Transition.getVendorPropertyName("transition")
        ] || void 0
      );
    },
    onTransitionEnd: function (e, t, i) {
      ((i = i || 1e3),
        (Transition.transitionEndEventName =
          Transition.transitionEndEventName ||
          Transition.getTransitionEndEventName()));
      function n() {
        r ||
          (e.off(Transition.transitionEndEventName, t),
          (r = !0),
          clearTimeout(o),
          t());
      }
      var r = !1,
        o = setTimeout(function () {
          n();
        }, i);
      e.on(Transition.transitionEndEventName, function () {
        n();
      });
    },
  };
  function n(e, t) {
    var i;
    t >= e.length ||
      ((i = e[t]),
      H5P.Transition.onTransitionEnd(
        i.$element,
        function () {
          (i.end && i.end(), !0 !== i.break && n(e, t + 1));
        },
        i.timeout || void 0,
      ));
  }
  return (
    (Transition.sequence = function (e) {
      n(e, 0);
    }),
    Transition
  );
})(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelHelpTextDialog = (function (u) {
    var h = 0;
    function e(e, t, i) {
      H5P.EventDispatcher.call(this);
      var n = this,
        r = "joubel-help-text-header-" + ++h,
        o = "joubel-help-text-body-" + h,
        s = u("<div>", {
          class: "joubel-help-text-dialog-box",
          role: "dialog",
          "aria-labelledby": r,
          "aria-describedby": o,
        });
      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: r,
        role: "header",
        html: e,
      }).appendTo(a),
        u("<div>", {
          class: "joubel-help-text-body",
          id: o,
          html: t,
          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 (e) {
          -1 !== [32, 13].indexOf(e.which) && (e.preventDefault(), l());
        },
      }).appendTo(a);
      ((n.getElement = function () {
        return s;
      }),
        (n.focus = function () {
          c.focus();
        }));
    }
    return ((e.prototype = Object.create(
      H5P.EventDispatcher.prototype,
    )).constructor = e);
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelMessageDialog = (function (o) {
    return function (e, t) {
      function i() {
        (n.remove(), clearTimeout(r), e.off("click.messageDialog"));
      }
      var n = o("<div/>", {
          class: "joubel-message-dialog",
          text: t,
        }).appendTo(e),
        r = setTimeout(i, 3e3);
      return (e.on("click.messageDialog", i), n);
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressCircle = (function (a) {
    function e(t, e, i, n) {
      ((i = i || "#f0f0f0"), (n = n || "#ffffff"));
      var r = this.hexToRgb((e = e || "#1a73d9"));
      try {
        if ("" === (t = Number(t))) throw "is empty";
        if (isNaN(t)) throw "is not a number";
      } catch (e) {
        t = "err";
      }
      100 < t && (t = 100);
      var o =
          "rgb(" +
          parseInt(r.r, 10) +
          "," +
          parseInt(r.g, 10) +
          "," +
          parseInt(r.b, 10) +
          ")",
        s = a("<div/>", { class: "joubel-progress-circle-wrapper" }),
        e = a("<div/>", {
          class: "joubel-progress-circle-active-border",
        }).appendTo(s),
        r = a("<div/>", {
          class: "joubel-progress-circle-circle",
        }).appendTo(e);
      a("<span/>", {
        text: t + "%",
        class: "joubel-progress-circle-percentage",
      }).appendTo(r);
      t *= 3.6;
      return (
        (t <= 180
          ? e.css(
              "background-image",
              "linear-gradient(" +
                (90 + t) +
                "deg, transparent 50%, " +
                i +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
          : e.css(
              "background-image",
              "linear-gradient(" +
                (t - 90) +
                "deg, transparent 50%, " +
                o +
                " 50%),linear-gradient(90deg, " +
                i +
                " 50%, transparent 50%)",
            )
        )
          .css("border", "2px solid" + n)
          .css("background-color", o),
        (this.$activeBorder = e),
        (this.$backgroundCircle = r),
        (this.$wrapper = s),
        this.initResizeFunctionality(),
        s
      );
    }
    return (
      (e.prototype.initResizeFunctionality = function () {
        var e = this;
        (a(window).resize(function () {
          setTimeout(function () {
            e.resize();
          });
        }),
          setTimeout(function () {
            e.resize();
          }, 0));
      }),
      (e.prototype.resize = function () {
        var e,
          t,
          i,
          n = this.$wrapper.parent();
        void 0 !== n &&
          n &&
          ((i = parseInt(n.css("font-size"), 10)),
          (t =
            (e =
              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 - e,
            height: i - e,
            top: t,
            left: t,
          }));
      }),
      (e.prototype.hexToRgb = function (e) {
        e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
        return e
          ? {
              r: parseInt(e[1], 16),
              g: parseInt(e[2], 16),
              b: parseInt(e[3], 16),
            }
          : null;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).SimpleRoundedButton = (function (i) {
    return function (e) {
      var t = i("<div>", {
        class: "joubel-simple-rounded-button",
        title: e,
        role: "button",
        tabindex: "0",
      }).keydown(function (e) {
        -1 !== [32, 13].indexOf(e.which) &&
          (i(this).click(), e.preventDefault());
      });
      return (
        i("<span>", {
          class: "joubel-simple-rounded-button-text",
          html: e,
        }).appendTo(t),
        t
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSpeechBubble = (function (o) {
    var s,
      a,
      l,
      c,
      u,
      h,
      d = !!navigator.userAgent.match(/iPod|iPhone|iPad/g);
    function p(e) {
      var t = e.closest(".h5p-frame");
      return (t = !t.length ? e.closest(".h5p-container") : t);
    }
    function f() {
      g(s, a, h, l, c);
    }
    function g(e, t, i, n, r) {
      var o = (function (e, t) {
          ((e = e[0].getBoundingClientRect()),
            (t = t[0].getBoundingClientRect()));
          return {
            top: t.top - e.top,
            right: e.right - t.right,
            bottom: e.bottom - t.bottom,
            left: t.left - e.left,
            innerWidth: t.width,
            innerHeight: t.height,
            outerWidth: e.width,
            outerHeight: e.height,
          };
        })(p(t), t),
        s = o.bottom > o.top ? "bottom" : "top",
        a = 0.9 * o.outerWidth,
        i = i < a ? i : a,
        a = (function (e, t) {
          var i = {},
            n = e / 2;
          ((i.top = t.top + t.innerHeight),
            (i.bottom = t.bottom + t.innerHeight + 9),
            t.left < n
              ? (i.left = 3)
              : t.left + n > t.outerWidth
                ? (i.left = t.outerWidth - e - 3)
                : (i.left = t.left - n + t.innerWidth / 2));
          return i;
        })(i, o),
        t = (function (e, t, i, n) {
          var r = {},
            e = e - 20;
          ((r.left = i.left - t.left + n / 2 - 6), r.left < 9 && (r.left = 9));
          r.left > e && (r.left = e);
          return ((r.top = -6), (r.bottom = -6), r);
        })(i, a, o, t.width());
      e.css(
        ((e = i),
        (i = a),
        (a = 16),
        "top" === s
          ? {
              width: e + "px",
              bottom: i.bottom + "px",
              left: i.left + "px",
              fontSize: a + "px",
              top: "",
            }
          : {
              width: e + "px",
              top: i.top + "px",
              left: i.left + "px",
              fontSize: a + "px",
              bottom: "",
            }),
      );
      ((t = t),
        (t =
          "top" === s
            ? { bottom: t.bottom + "px", left: t.left + "px", top: "" }
            : { top: t.top + "px", left: t.left + "px", bottom: "" }));
      (n.css(t), r.css(t));
    }
    H5P.externalDispatcher.on("domHidden", function (e) {
      void 0 !== s && 0 !== e.data.$dom.find(a).length && m();
    });
    var m = 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(e) {
      e.target !== a[0] && (m(), (a = void 0));
    }
    return function (e, t, i) {
      ((h = i = i || 400),
        (a = e),
        (this.isCurrent = function (e) {
          return e.is(a);
        }),
        (this.remove = function () {
          m();
        }),
        void 0 !== s && m());
      var n,
        r = p(e);
      return (
        (n = s) &&
          (clearTimeout(u),
          n.removeClass("show"),
          setTimeout(function () {
            n && (n.remove(), (n = void 0));
          }, 500)),
        (l = o('<div class="joubel-speech-bubble-tail"></div>')),
        (c = o('<div class="joubel-speech-bubble-inner-tail"></div>')),
        (t = o(
          '<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">' +
            t +
            "</div></div>",
        ).prepend(c)),
        (s = o('<div class="joubel-speech-bubble" aria-live="assertive">')
          .append([l, t])
          .appendTo(r)),
        setTimeout(function () {
          s.addClass("show");
        }, 0),
        g(s, a, i, l, c),
        H5P.$body.on("mousedown.speechBubble", v),
        H5P.$window.on("resize", "", f),
        e.parents(".h5p-dialog").on("mousedown.speechBubble", v),
        d && H5P.$body.css("cursor", "pointer"),
        this
      );
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelThrobber = (function (e) {
    return function () {
      return e("<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 (t, i) {
        var n,
          e = l.html(t).text().trim();
        if ("" !== e) {
          i = a.extend(
            {
              tipLabel: e,
              helpIcon: !1,
              showSpeechBubble: !0,
              tabcontrol: !1,
            },
            i,
          );
          var r = 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 (e) {
              (o(), e.preventDefault());
            },
            keydown: function (e) {
              32 === e.which || 13 === e.which
                ? (o(), e.stopPropagation(), e.preventDefault())
                : o(!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: r,
          });
          var o = function (e) {
            void 0 !== n && n.isCurrent(r)
              ? (n.remove(),
                (n = void 0),
                r.attr("aria-expanded", !1),
                s.html(""))
              : !1 !== e &&
                i.showSpeechBubble &&
                ((n = H5P.JoubelSpeechBubble(r, t)),
                r.attr("aria-expanded", !0),
                s.html(t));
          };
          return r;
        }
      };
    })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelSlider = (function (t) {
    function e(e) {
      (H5P.EventDispatcher.call(this),
        (this.$slider = t(
          "<div>",
          t.extend({ class: "h5p-joubel-ui-slider" }, e),
        )),
        (this.$slides = []),
        (this.currentIndex = 0),
        (this.numSlides = 0));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.addSlide = function (e) {
        (e
          .addClass("h5p-joubel-ui-slide")
          .css({ left: 100 * this.numSlides + "%" }),
          this.$slider.append(e),
          this.$slides.push(e),
          this.numSlides++,
          1 === this.numSlides && e.addClass("current"));
      }),
      (e.prototype.attach = function (e) {
        e.append(this.$slider);
      }),
      (e.prototype.move = function (e) {
        var t = this;
        (0 === e && t.trigger("first-slide"),
          e + 1 === t.numSlides && t.trigger("last-slide"),
          t.trigger("move"));
        var i = t.$slides[this.currentIndex];
        (H5P.Transition.onTransitionEnd(this.$slider, function () {
          (i.removeClass("current"), t.trigger("moved"));
        }),
          this.$slides[e].addClass("current"));
        var n = "translateX(" + 100 * -e + "%)";
        (this.$slider.css({
          "-webkit-transform": n,
          "-moz-transform": n,
          "-ms-transform": n,
          transform: n,
        }),
          (this.currentIndex = e));
      }),
      (e.prototype.remove = function () {
        this.$slider.remove();
      }),
      (e.prototype.next = function () {
        this.currentIndex + 1 >= this.numSlides ||
          this.move(this.currentIndex + 1);
      }),
      (e.prototype.previous = function () {
        this.move(this.currentIndex - 1);
      }),
      (e.prototype.first = function () {
        this.move(0);
      }),
      (e.prototype.last = function () {
        this.move(this.numSlides - 1);
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelScoreBar = (function (s) {
    var a = 0;
    return function (e, t, i, n) {
      var r = this;
      function o(e) {
        return t ? t.replace(":num", e).replace(":total", r.maxScore) : "";
      }
      ((r.maxScore = e),
        (r.score = 0),
        a++,
        (r.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>'),
        (r.appendTo = function (e) {
          r.$scoreBar.appendTo(e);
        }),
        (r.setScore = function (e) {
          e !== r.score &&
            ((r.score = e > r.maxScore ? r.maxScore : e), r.updateVisuals());
        }),
        (r.incrementScore = function (e) {
          r.setScore(r.score + (e || 1));
        }),
        (r.setMaxScore = function (e) {
          r.maxScore = e;
        }),
        (r.updateVisuals = function () {
          (r.$progress.html(o(r.score)),
            r.$scoreCounter.text(r.score),
            r.$maxScore.text(r.maxScore),
            setTimeout(function () {
              (r.$progress.css({
                width: (r.score / r.maxScore) * 100 + "%",
              }),
                H5P.Transition.onTransitionEnd(
                  r.$progress,
                  function () {
                    (r.$scoreBar.toggleClass(
                      "h5p-joubelui-score-bar-full-score",
                      r.score === r.maxScore,
                    ),
                      r.$scoreBar.toggleClass(
                        "h5p-joubelui-score-bar-animation-active",
                        r.score === r.maxScore,
                      ),
                      r.$scoreBar.one("animationend", function () {
                        r.$scoreBar.removeClass(
                          "h5p-joubelui-score-bar-animation-active",
                        );
                      }));
                  },
                  600,
                ));
            }, 300));
        }),
        (r.reset = function () {
          r.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score");
        }),
        (function () {
          r.$scoreBar = s("<div>", { class: "h5p-joubelui-score-bar" });
          var e = s("<div>", {
            class: "h5p-joubelui-score-bar-visuals",
            appendTo: r.$scoreBar,
          });
          ((r.$progressWrapper = s("<div>", {
            class: "h5p-joubelui-score-bar-progress-wrapper",
            appendTo: e,
          })),
            (r.$progress = s("<div>", {
              class: "h5p-joubelui-score-bar-progress",
              html: o(r.score),
              appendTo: r.$progressWrapper,
            })),
            s("<div>", {
              class: "h5p-joubelui-score-bar-star",
              html: r.STAR_MARKUP,
            }).appendTo(e));
          e = s("<div>", {
            class: "h5p-joubelui-score-numeric",
            appendTo: r.$scoreBar,
            "aria-hidden": !0,
          });
          ((r.$scoreCounter = s("<span>", {
            class:
              "h5p-joubelui-score-number h5p-joubelui-score-number-counter",
            text: 0,
            appendTo: e,
          })),
            s("<span>", {
              class: "h5p-joubelui-score-number-separator",
              text: "/",
              appendTo: e,
            }),
            (r.$maxScore = s("<span>", {
              class: "h5p-joubelui-score-number h5p-joubelui-score-max",
              text: r.maxScore,
              appendTo: e,
            })),
            i &&
              (H5P.JoubelUI.createTip(i, {
                tipLabel: n || i,
                helpIcon: !0,
              }).appendTo(r.$scoreBar),
              r.$scoreBar.addClass("h5p-score-bar-has-help")));
        })());
    };
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelProgressbar = (function (i) {
    function e(e, t) {
      H5P.EventDispatcher.call(this);
      ((this.options = i.extend({ progressText: "Slide :num of :total" }, t)),
        (this.currentStep = 0),
        (this.steps = e),
        (this.$progressbar = i("<div>", {
          class: "h5p-joubelui-progressbar",
        })),
        (this.$background = i("<div>", {
          class: "h5p-joubelui-progressbar-background",
        }).appendTo(this.$progressbar)));
    }
    return (
      (((e.prototype = Object.create(
        H5P.EventDispatcher.prototype,
      )).constructor = e).prototype.updateAria = function () {
        var e;
        this.options.disableAria ||
          (this.$currentStatus ||
            (this.$currentStatus = i("<div>", {
              class: "h5p-joubelui-progressbar-slide-status-text",
              "aria-live": "assertive",
            }).appendTo(this.$progressbar)),
          (e = this.options.progressText
            .replace(":num", this.currentStep)
            .replace(":total", this.steps)),
          this.$currentStatus.html(e));
      }),
      (e.prototype.appendTo = function (e) {
        this.$progressbar.appendTo(e);
      }),
      (e.prototype.setProgress = function (e) {
        e > this.steps ||
          e < 0 ||
          ((this.currentStep = e),
          this.$background.css({
            width: (this.currentStep / this.steps) * 100 + "%",
          }),
          this.updateAria());
      }),
      (e.prototype.next = function () {
        this.setProgress(this.currentStep + 1);
      }),
      (e.prototype.reset = function () {
        this.setProgress(0);
      }),
      (e.prototype.isLastStep = function () {
        return this.steps === this.currentStep;
      }),
      e
    );
  })(H5P.jQuery)),
  ((H5P = H5P || {}).JoubelUI = (function (i) {
    function e() {}
    var t;
    return (
      (e.createTip = function (e, t) {
        return new H5P.JoubelTip(e, t);
      }),
      (e.createMessageDialog = function (e, t) {
        return new H5P.JoubelMessageDialog(e, t);
      }),
      (e.createHelpTextDialog = function (e, t, i) {
        return new H5P.JoubelHelpTextDialog(e, t, i);
      }),
      (e.createProgressCircle = function (e, t, i, n) {
        return new H5P.JoubelProgressCircle(e, t, i, n);
      }),
      (e.createThrobber = function () {
        return new H5P.JoubelThrobber();
      }),
      (e.createSimpleRoundedButton = function (e) {
        return new H5P.SimpleRoundedButton(e);
      }),
      (e.createSlider = function (e) {
        return new H5P.JoubelSlider(e);
      }),
      (e.createScoreBar = function (e, t, i, n) {
        return new H5P.JoubelScoreBar(e, t, i, n);
      }),
      (e.createProgressbar = function (e, t) {
        return new H5P.JoubelProgressbar(e, t);
      }),
      (e.createButton = function (e) {
        var t = "button";
        return (
          e.href ? (t = "a") : (e.type = "button"),
          e.class
            ? (e.class += " h5p-joubelui-button")
            : (e.class = "h5p-joubelui-button"),
          i("<" + t + "/>", e)
        );
      }),
      H5P.isFramed &&
        !H5P.hasiOSiframeScrollFix &&
        /iPad|iPhone|iPod/.test(navigator.userAgent) &&
        ((H5P.hasiOSiframeScrollFix = !0),
        (t = 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") &&
            t.call(this);
        })),
      e
    );
  })(H5P.jQuery)),
  /*!@license H5P.Question-1.5/scripts/question.js by Joubel licensed under MIT*/ (H5P.Tooltip =
    H5P.Tooltip || function () {}),
  (H5P.Question = (function (q, e, $) {
    function t(r) {
      var u = this;
      (e.call(u),
        (u.order = [
          "video",
          "image",
          "audio",
          "introduction",
          "content",
          "explanation",
          "feedback",
          "scorebar",
          "buttons",
          "read",
        ]));
      function h(e, t) {
        ((y[e] = {}),
          (e = y[e].$element = q("<div/>", { class: "h5p-question-" + e })),
          t && e[t instanceof q ? "append" : "html"](t));
      }
      function d(e, t) {
        t instanceof q
          ? y[e].$element.html("").append(t)
          : y[e].$element.html(t);
      }
      function p() {
        if (void 0 !== y.buttons) {
          clearTimeout(l);
          for (var e = 0; e < k.length; e++)
            (D(w, k[e].id, _, y.buttons.$element), (_[k[e].id].isVisible = !0));
          for (var t = 0, i = !(k = []), n = 0; n < x.length; n++) {
            var r = _[x[n].id];
            (r.isVisible && (t += 1), r.$element.is(":focus") && (i = !0));
          }
          var o = 150;
          (y.feedback &&
            y.feedback.$element.hasClass("h5p-question-popup") &&
            (o = 0),
            t === y.buttons.$element.children().length
              ? (R(y.buttons), A(i))
              : (A(i),
                y.buttons.$element.is(":empty") ||
                  (z(y.buttons),
                  I(y.buttons.$element),
                  (l = setTimeout(function () {
                    u.trigger("resize");
                  }, o))),
                L()),
            (s = void 0));
        }
      }
      function a() {
        var e = y.image.$element;
        (clearTimeout(i),
          e.addClass("animatable"),
          (i =
            ((T = T
              ? (q(this).attr("aria-expanded", !0),
                e.addClass("h5p-question-image-fill-width"),
                !1)
              : (q(this).attr("aria-expanded", !1),
                e.removeClass("h5p-question-image-fill-width"),
                !0)),
            setTimeout(function () {
              u.trigger("resize");
            }, 600))));
      }
      function n(e, t, i) {
        for (var n = 0; n < i.length; n++) if (i[n][t] === e) return n;
        return -1;
      }
      var f,
        g,
        m,
        v,
        s,
        l,
        t,
        i,
        b,
        o,
        c,
        y = {},
        _ = {},
        w = [],
        x = [],
        k = [],
        C = !1,
        P = { disableFeedback: !1, disableReadSpeaker: !1 },
        T = !0,
        S = !1,
        H = !1,
        D = function (e, t, i, n) {
          for (var r = 0; r < e.length; r++)
            if (e[r] === t) {
              for (
                ;
                0 < r && (void 0 === i[e[r - 1]] || !i[e[r - 1]].isVisible);

              )
                r--;
              (0 === r
                ? i[t].$element.prependTo(n)
                : i[t].$element.insertAfter(i[e[r - 1]].$element),
                (i[t].isVisible = !0));
              break;
            }
        },
        E = function (e, t) {
          var i,
            n,
            r,
            o,
            s = e.parent(),
            a = e.siblings(".h5p-question-feedback-tail"),
            l = e.outerWidth(),
            c = I(e),
            u = !1,
            h = s.height() / 2 - c / 2,
            d = s.width() / 2 - l / 2,
            p = 0,
            f = 0,
            g = 0;
          (null != t
            ? ((i = t[0].offsetTop < 15),
              (n = t[0].offsetTop + t.height() > s.height() - 15),
              (r = t[0].offsetLeft < 15),
              (o = t[0].offsetLeft + t.width() > s.width() - 15),
              (d = t[0].offsetLeft - l / 2 + t.width() / 2),
              (h = t[0].offsetTop - c - 15),
              (p = d + l / 2 - a.width() / 2),
              (f = h + c - a.height() / 2),
              (g = 225),
              c + 15 > t[0].offsetTop &&
                ((f = (h = t[0].offsetTop + t.height() + 15) - a.height() / 2),
                (g = 45)),
              (d = d < 0 ? 0 : d) + l > s.width() && (d = s.width() - l),
              i && (r || o)
                ? ((d = t[0].offsetLeft + (r ? t.width() : -l)),
                  (h = t[0].offsetTop + t.height()),
                  (u = !0))
                : n && (r || o)
                  ? ((d = t[0].offsetLeft + (r ? t.width() : -l)),
                    (h = t[0].offsetTop - c),
                    (u = !0))
                  : i ||
                    n ||
                    ((r || o) &&
                      ((h = t[0].offsetTop - c / 2 + t.width() / 2),
                      (d = t[0].offsetLeft + (r ? t.width() + 15 : -l - 15)) < 0
                        ? (u = !(d = 0))
                        : ((p = d + (r ? -a.width() / 2 : l - a.width() / 2)),
                          (f = h + c / 2 - a.height() / 2),
                          (g = r ? 315 : 135)))),
              h + c > s.height() &&
                ((h = s.height() - c),
                c > s.height() - (t[0].offsetTop + t.height() + 15) &&
                  (u = !0)))
            : (u = !0),
            e.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(" + g + "deg)",
                  })
                  .show());
        },
        I = function (e) {
          if (e.is(":visible")) {
            var t = e.hasClass("h5p-question-popup"),
              i = e
                .clone()
                .css({
                  position: "absolute",
                  "max-height": "none",
                  width: t ? "" : "100%",
                })
                .appendTo(e.parent()),
              n =
                parseFloat(e.css("margin-left")) +
                parseFloat(e.css("margin-right")),
              t = i.css("width") ? i.css("width") : "100%";
            i.css("width", "calc(" + t + " - " + n + "px)");
            ((t = Math.round(i.get(0).getBoundingClientRect().height)),
              (n = parseFloat(e.css("fontSize"))));
            return (
              e.css("max-height", t / n + "em"),
              i.remove(),
              0 < t &&
                y.buttons &&
                y.buttons.$element === e &&
                (z(y.buttons), setTimeout(L, 150)),
              t
            );
          }
          e.css("max-height", "none");
        },
        A = function (e) {
          for (var t = 0; t < x.length; t++) O(x[t].id);
          ((x = []), e && u.focusButton());
        },
        O = function (e) {
          (_[e].$element.detach(), (_[e].isVisible = !1));
        },
        M = function (e, t, i) {
          if (
            ((t = t || 0),
            (i = i || 5),
            e && e instanceof q && document !== e.get(0) && !(i <= t))
          )
            return "auto" === e.css("overflow-y") ? e : M(e.parent(), t + 1, i);
        },
        L = function () {
          var e;
          _ &&
            y.buttons &&
            ((e = function () {
              if (y.buttons.$element.is(":visible")) {
                var e,
                  t = { max: 0, min: 0, current: 0 };
                for (e in _) {
                  var i = _[e];
                  i.isVisible &&
                    (B(_[e]),
                    (t.max += i.width.max),
                    (t.min += i.width.min),
                    (t.current += i.isTruncated ? i.width.min : i.width.max));
                }
                function n(e) {
                  return t.max < e
                    ? (t.max !== t.current && F(t.current, e), !0)
                    : t.min < e && ((t.current > e ? N : F)(t.current, e), !0);
                }
                (j(!1),
                  n(Math.floor(y.buttons.$element.width()) - 1) ||
                    (j(!0), n(Math.floor(y.buttons.$element.width()) - 1)));
              }
            }),
            y.buttons.$element.is(":visible")
              ? e()
              : (t && clearTimeout(t),
                (t = setTimeout(function () {
                  ((t = void 0), e());
                }, 0))));
        },
        j = function (e) {
          y.scorebar &&
          y.scorebar.$element &&
          y.scorebar.$element.hasClass("h5p-question-visible")
            ? (y.buttons.$element.addClass("has-scorebar"),
              y.buttons.$element.toggleClass("wrap", e),
              y.scorebar.$element.toggleClass("full-width", e))
            : y.buttons.$element.removeClass("has-scorebar");
        },
        N = function (e, t) {
          for (var i = w.length - 1; 0 <= i; i--) {
            var n = w[i],
              r = _[n];
            if (!r.isTruncated && r.isVisible) {
              var o = r.$element;
              e -= r.width.max - r.width.min;
              n = o.text();
              if (
                (o.attr("data-tooltip", n),
                r.ariaLabel || o.attr("aria-label", n),
                o.html("").addClass("truncated"),
                (r.isTruncated = !0),
                e <= t)
              )
                return;
            }
          }
        },
        F = function (e, t) {
          for (var i = 0; i < w.length; i++) {
            var n = w[i],
              n = _[n];
            if (n.isTruncated && n.isVisible) {
              if (t < (e += 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));
            }
          }
        },
        z = function (e) {
          (e.$element.addClass("h5p-question-visible"), (e.isVisible = !0));
        },
        R = function (e) {
          (e.$element.css("max-height", ""),
            (e.isVisible = !1),
            setTimeout(function () {
              e.isVisible || e.$element.removeClass("h5p-question-visible");
            }, 150));
        };
      ((u.setBehaviour = function (e) {
        q.extend(P, e);
      }),
        (u.setVideo = function (e) {
          ((y.video = {
            $element: q("<div/>", { class: "h5p-question-video" }),
          }),
            H && e.params.playback && (e.params.playback.autoplay = !1),
            e.params.visuals || (e.params.visuals = {}),
            (e.params.visuals.fit = !1),
            (y.video.instance = H5P.newRunnable(
              e,
              u.contentId,
              y.video.$element,
              !0,
            )));
          var t = !1;
          return (
            y.video.instance.on("resize", function () {
              ((t = !0), u.trigger("resize"), (t = !1));
            }),
            u.on("resize", function () {
              t || y.video.instance.trigger("resize");
            }),
            u
          );
        }),
        (u.setAudio = function (e) {
          return (
            (e.params = e.params || {}),
            (y.audio = {
              $element: q("<div/>", { class: "h5p-question-audio" }),
            }),
            H
              ? (e.params.autoplay = !1)
              : "transparent" === e.params.playerMode &&
                (e.params.autoplay = !0),
            (y.audio.instance = H5P.newRunnable(
              e,
              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 (e) {
          e = new DOMParser().parseFromString(e, "text/html");
          const t = document.createElement("div");
          return (
            (t.innerHTML = e.documentElement.textContent),
            t.textContent || t.innerText || ""
          );
        }),
        (u.setImage = function (e, t) {
          ((t = t || {}),
            (y.image = {}),
            (y.image.$element = q("<div/>", {
              class: "h5p-question-image h5p-question-image-fill-width",
            })));
          var i = q("<div/>", {
              class: "h5p-question-image-wrap",
              appendTo: y.image.$element,
            }),
            n = q("<img/>", {
              src: H5P.getPath(e, u.contentId),
              alt: void 0 === t.alt ? "" : u.massageAttributeOutput(t.alt),
              title:
                void 0 === t.title ? "" : u.massageAttributeOutput(t.title),
              on: {
                load: function () {
                  (u.trigger("imageLoaded", this), u.trigger("resize"));
                },
              },
              appendTo: i,
            });
          if (!t.disableImageZooming) {
            const s = () => {
              var e =
                "true" === i.attr("aria-expanded")
                  ? t.minimizeImage
                  : t.expandImage;
              i.attr("aria-label", e + " " + t.alt);
            };
            var r = !1;
            return (
              u.on("resize", function () {
                !r &&
                  n.is(":visible") &&
                  (i
                    .addClass("h5p-question-image-scalable")
                    .attr("aria-expanded", !1)
                    .attr("role", "button")
                    .attr("tabIndex", "0")
                    .on("click", function (e) {
                      1 === e.which && (a.apply(this), s());
                    })
                    .on("keypress", function (e) {
                      32 === e.which &&
                        (e.preventDefault(), a.apply(this), s());
                    }),
                  s(),
                  y.image.$element.removeClass("h5p-question-image-fill-width"),
                  (r = !0));
              }),
              u
            );
          }
          n.css("maxHeight", "none");
          function o() {
            var e = y.image.$element.get(0).getBoundingClientRect().width;
            i.css({ "-webkit-transition": "none", transition: "none" });
            var t =
              2 *
              (i.get(0).getBoundingClientRect().left -
                y.image.$element.get(0).getBoundingClientRect().left);
            (n.get(0).naturalWidth >= e - t
              ? 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") ? o() : n.on("load", o);
        }),
        (u.setIntroduction = function (e) {
          return (h("introduction", e), u);
        }),
        (u.setContent = function (e, t) {
          return (
            h("content", e),
            t && t.class && y.content.$element.addClass(t.class),
            u
          );
        }),
        (u.read = function (e) {
          o &&
            (c ? (c += ("." === c.substr(-1, 1) ? " " : ". ") + e) : (c = e),
            o.html(c),
            setTimeout(function () {
              ((c = null), o.html(""));
            }, 100));
        }),
        (u.readFeedback = function () {
          var e;
          P.disableReadSpeaker ||
            !v ||
            !y.feedback ||
            !y.feedback.$element ||
            ((e = q(
              ".h5p-question-feedback-content-text",
              y.feedback.$element,
            )) &&
              e.html() &&
              e.html().length &&
              u.read(e.html()));
        }),
        (u.removeFeedback = function () {
          return (
            clearTimeout(b),
            y.feedback &&
              v &&
              ((v = !1),
              R(y.scorebar),
              R(y.feedback),
              (S = !0),
              (b = setTimeout(function () {
                (v ||
                  (y.feedback.$element.children().detach(),
                  y.scorebar.$element.children().detach(),
                  u.trigger("resize")),
                  (S = !1),
                  m.setScore(0));
              }, 150)),
              f && f.find(".h5p-question-feedback-tail").remove()),
            u
          );
        }),
        (u.setFeedback = function (e, t, i, n, r, o, s) {
          if (P.disableFeedback) return u;
          (p(),
            (g = null != o && null != o.click ? o.click : null),
            clearTimeout(b));
          var a = q("<div>", {
              class: "h5p-question-feedback-container",
            }),
            l = q("<div>", {
              class: "h5p-question-feedback-content",
            }).appendTo(a);
          q("<div>", {
            class: "h5p-question-feedback-content-text",
            html: e,
          }).appendTo(l);
          var c = q("<div>", {
            class: "h5p-question-scorebar-container",
          });
          return (
            (m = void 0 === m ? $.createScoreBar(i, n, r, s) : m).appendTo(c),
            l.toggleClass("has-content", void 0 !== e && 0 < e.length),
            !P.disableReadSpeaker &&
              n &&
              u.read(
                n.replace(":num", t).replace(":total", i) + ". " + (e || ""),
              ),
            (v = !0),
            y.feedback
              ? (d("feedback", a), d("scorebar", c))
              : (h("feedback", a),
                h("scorebar", c),
                C &&
                  f &&
                  (D(u.order, "feedback", y, f), D(u.order, "scorebar", y, f))),
            z(y.feedback),
            z(y.scorebar),
            L(),
            null != o && 1 == o.showAsPopup
              ? ((function (e) {
                  var t = y.feedback.$element,
                    i = y.content.$element,
                    n = null != g ? g.$element : null;
                  (t.appendTo(i).addClass("h5p-question-popup"),
                    y.scorebar && y.scorebar.$element.appendTo(t),
                    i.addClass("h5p-has-question-popup"));
                  var r = q("<div/>", {
                      class: "h5p-question-feedback-tail",
                    })
                      .hide()
                      .appendTo(i),
                    e = q("<div/>", {
                      class: "h5p-question-feedback-close",
                      tabindex: 0,
                      title: e,
                      on: {
                        click: function (e) {
                          (t.remove(), r.remove(), e.preventDefault());
                        },
                        keydown: function (e) {
                          switch (e.which) {
                            case 13:
                            case 32:
                              (t.remove(), r.remove(), e.preventDefault());
                          }
                        },
                      },
                    })
                      .hide()
                      .appendTo(t);
                  (null != n &&
                    (n.hasClass("correct")
                      ? (t.addClass("h5p-question-feedback-correct"),
                        e.show(),
                        y.buttons.$element.hide())
                      : y.buttons.$element.appendTo(y.feedback.$element)),
                    E(t, n));
                })(o.closeText),
                m.setScore(t))
              : (b = setTimeout(function () {
                  var e;
                  (I(y.feedback.$element),
                    I(y.scorebar.$element),
                    (S = !0),
                    !f ||
                      (f.hasClass("h5p-standalone") && !H5P.isFullscreen) ||
                      ((e = M(f)) &&
                        e.animate({ scrollTop: f.css("height") }, "slow")),
                    (b = setTimeout(function () {
                      ((S = !1), u.trigger("resize"), m.setScore(t));
                    }, 150)));
                }, 0)),
            u
          );
        }),
        (u.updateFeedbackContent = function (e, t) {
          return (
            y.feedback &&
              y.feedback.$element &&
              (t &&
                (e =
                  q(
                    ".h5p-question-feedback-content",
                    y.feedback.$element,
                  ).html() +
                  " " +
                  e),
              q(".h5p-question-feedback-content", y.feedback.$element)
                .html(e)
                .addClass("has-content"),
              I(y.feedback.$element),
              setTimeout(u.trigger.bind(u, "resize"), 150)),
            u
          );
        }),
        (u.setExplanation = function (e, t) {
          return (
            e
              ? ((e = new H5P.Question.Explainer(t, e)),
                y.explanation
                  ? d("explanation", e.getElement())
                  : (h("explanation", e.getElement()),
                    C && f && D(u.order, "explanation", y, f)))
              : y.explanation && y.explanation.$element.children().detach(),
            u
          );
        }),
        (u.hasButton = function (e) {
          return void 0 !== _[e];
        }),
        (u.addButton = function (e, t, i, n, r, o) {
          if (_[e]) return u;
          (void 0 === y.buttons &&
            (h("buttons"), C && D(u.order, "buttons", y, f)),
            ((o = o || {}).confirmationDialog = o.confirmationDialog || {}),
            (r = r || {}));
          function s() {
            o.confirmationDialog.enable && a
              ? (o.confirmationDialog.$parentElement ||
                  y.popups.$element.removeClass("hidden"),
                a.show(c.position().top))
              : i();
          }
          var a = u.addConfirmationDialogToButton(o.confirmationDialog, i);
          (o.contentData &&
            o.contentData.standalone &&
            (o.contentData.isScoringEnabled ||
              o.contentData.isReportingEnabled) &&
            o.textIfSubmitting &&
            (t = o.textIfSubmitting),
            (_[e] = {
              isTruncated: !1,
              text: t,
              isVisible: !1,
              ariaLabel: r["aria-label"],
            }));
          var l = void 0 !== r.href,
            c = (_[e].$element = $.createButton(
              q.extend(
                {
                  class: "h5p-question-" + e,
                  html: t,
                  on: {
                    click: function (e) {
                      (s(), l && e.preventDefault());
                    },
                  },
                },
                r,
              ),
            ));
          return (
            w.push(e),
            H5P.Tooltip(c.get(0), { tooltipSource: "data-tooltip" }),
            l &&
              c.on("keypress", function (e) {
                32 === e.which && (s(), e.preventDefault());
              }),
            (void 0 !== n && !n) ||
              (c.appendTo(y.buttons.$element),
              (_[e].isVisible = !0),
              z(y.buttons)),
            u
          );
        }));
      var B = function (e) {
        var t = e.$element,
          t = t
            .clone()
            .css({
              position: "absolute",
              "white-space": "nowrap",
              "max-width": "none",
            })
            .removeClass("truncated")
            .html(e.text)
            .appendTo(t.parent());
        ((e.width = {
          max: Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          ),
        }),
          t.html("").addClass("truncated"),
          (e.width.min = Math.ceil(
            t.outerWidth() +
              parseFloat(t.css("margin-left")) +
              parseFloat(t.css("margin-right")),
          )),
          t.remove());
      };
      ((u.addConfirmationDialogToButton = function (t, e) {
        if ((t = t || {}).enable) {
          var i = new H5P.ConfirmationDialog({
            instance: t.instance,
            headerText: t.l10n.header,
            dialogText: t.l10n.body,
            cancelText: t.l10n.cancelLabel,
            confirmText: t.l10n.confirmLabel,
          });
          if (t.$parentElement) {
            const n = t.$parentElement.get(0);
            let e;
            (n.classList.contains("h5p-content") &&
              (e = n.querySelector(".h5p-container")),
              i.appendTo(e ?? n));
          } else
            (void 0 === y.popups &&
              (h("popups"),
              C && D(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 () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                e(),
                u.trigger("confirmed"));
            }),
            i.on("canceled", function () {
              (t.$parentElement || y.popups.$element.addClass("hidden"),
                u.trigger("canceled"));
            }),
            i
          );
        }
      }),
        (u.showButton = function (e, t) {
          var i = -1 !== n(e, "id", x);
          if (void 0 === _[e] || (!0 === _[e].isVisible && !i)) return u;
          t = t || 0;
          i = n(e, "id", k);
          if (-1 !== i) return (k[i].priority < t && (k[i].priority = t), u);
          i = n(e, "id", x);
          return (
            -1 !== i
              ? x[i].priority <= t &&
                (x.splice(i, 1), k.push({ id: e, priority: t }))
              : _[e].$element.is(":visible") || k.push({ id: e, priority: t }),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.hideButton = function (e, t) {
          var i = -1 !== n(e, "id", k);
          if (void 0 === _[e] || (!1 === _[e].isVisible && !i)) return u;
          t = t || 0;
          i = n(e, "id", x);
          if (-1 !== i) return (x[i].priority < t && (x[i].priority = t), u);
          i = n(e, "id", k);
          return (
            -1 !== i
              ? k[i].priority <= t &&
                (k.splice(i, 1), x.push({ id: e, priority: t }))
              : _[e].$element.is(":visible")
                ? x.push({ id: e, priority: t })
                : O(e),
            (s = s || setTimeout(p, 0)),
            u
          );
        }),
        (u.focusButton = function (e) {
          if (void 0 === e)
            for (var t = 0; t < w.length; t++) {
              var i = _[w[t]];
              if (i && i.isVisible) {
                i.$element.focus();
                break;
              }
            }
          else _[e] && _[e].$element.is(":visible") && _[e].$element.focus();
          return u;
        }),
        (u.toggleReadSpeaker = function (e) {
          P.disableReadSpeaker = e || !P.disableReadSpeaker;
        }),
        (u.insertSectionAtElement = function (e, t) {
          return (
            void 0 === y[e] && h(e),
            (y[e].parent = t),
            C || D([e], e, y, t),
            u
          );
        }),
        (u.attach = function (e) {
          (u.isRoot() && u.setActivityStarted(),
            void 0 === f &&
              (void 0 !== u.registerDomElements &&
                (u.registerDomElements instanceof Function ||
                  "function" == typeof u.registerDomElements) &&
                u.registerDomElements(),
              (o = q("<div/>", {
                "aria-live": "polite",
                class: "h5p-hidden-read",
              })),
              h("read", o),
              u.trigger("registerDomElements")),
            (f = e).html("").addClass("h5p-question h5p-" + r));
          for (var t = [], i = 0; i < u.order.length; i++) {
            var n = u.order[i];
            y[n] &&
              (y[n].parent
                ? y[n].$element.appendTo(y[n].parent)
                : t.push(y[n].$element),
              (y[n].isVisible = !0));
          }
          return (
            e.append(t),
            u.trigger(
              "domChanged",
              {
                $target: e,
                library: u.libraryInfo.machineName,
                contentId: u.contentId,
                key: "newLibrary",
              },
              { bubbles: !0, external: !0 },
            ),
            (C = !0),
            u
          );
        }),
        (u.detachSections = function () {
          for (var e in ((C = !1), y)) y[e].$element.detach();
          return u;
        }),
        u.on("resize", function () {
          !S && y.feedback && v && I(y.feedback.$element);
          var e = y.feedback,
            t = g;
          (null != e &&
            null != e.$element &&
            null != t &&
            null != t.$element &&
            setTimeout(function () {
              E(e.$element, t.$element);
            }, 10),
            L());
        }));
    }
    return (
      (((t.prototype = Object.create(e.prototype)).constructor =
        t).determineOverallFeedback = function (e, t) {
        t = Math.floor(100 * t);
        for (var i = 0; i < e.length; i++) {
          var n = e[i],
            r = void 0 !== n.feedback && 0 !== n.feedback.trim().length;
          if (n.from <= t && n.to >= t && r) return n.feedback;
        }
        return "";
      }),
      t
    );
  })(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 (o, s) {
        var a = this;
        (!(function () {
          ((a.$explanation = l("<div>", {
            class: "h5p-question-explanation-container",
          })),
            l("<div>", {
              class: "h5p-question-explanation-title",
              role: "heading",
              html: o,
              appendTo: a.$explanation,
            }));
          for (
            var e = l("<ul>", {
                class: "h5p-question-explanation-list",
                appendTo: a.$explanation,
              }),
              t = 0;
            t < s.length;
            t++
          ) {
            var i = s[t],
              n = l("<li>", {
                class: "h5p-question-explanation-item",
                appendTo: e,
              }),
              r = l("<div>", {
                class: "h5p-question-explanation-status",
              });
            (i.correct &&
              l("<span>", {
                class: "h5p-question-explanation-correct",
                html: i.correct,
                appendTo: r,
              }),
              i.wrong &&
                l("<span>", {
                  class: "h5p-question-explanation-wrong",
                  html: i.wrong,
                  appendTo: r,
                }),
              r.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 (e) {
      var t = document.createElement("div");
      return (
        t.classList.add(e ? "h5p-question-plus-one" : "h5p-question-minus-one"),
        t.classList.add("h5p-question-hidden-one"),
        n.push(t),
        i && clearTimeout(i),
        (i = setTimeout(r, 0)),
        t
      );
    };
    var r = function () {
        var e = 0,
          t = 150;
        n.length && n.length > Math.ceil(1e3 / t) && (t = 1e3 / n.length);
        for (var i = 0; i < n.length; i++) (setTimeout(o(n[i]), e), (e += t));
      },
      o = function (e) {
        return function () {
          e.classList.remove("h5p-question-hidden-one");
        };
      };
  }),
  /*!@license H5P.DragQuestion-1.14/h5p-drag-question.js by Joubel licensed under MIT*/ (() => {
    "use strict";
    function e(e) {
      const n = e.length;
      return function t() {
        const i = Array.prototype.slice.call(arguments, 0);
        return i.length >= n
          ? e.apply(null, i)
          : function () {
              var e = Array.prototype.slice.call(arguments, 0);
              return t.apply(null, i.concat(e));
            };
      };
    }
    const t = (...e) =>
        e.reduce(
          (t, i) =>
            (...e) =>
              t(i(...e)),
        ),
      i = e(function (e, t) {
        t.forEach(e);
      }),
      n =
        (e(function (e, t) {
          return t.map(e);
        }),
        e(function (e, t) {
          return t.filter(e);
        })),
      r = e(function (e, t) {
        return t.some(e);
      }),
      o = e(function (e, t) {
        return -1 != t.indexOf(e);
      }),
      s = e(function (t, e) {
        return n((e) => !o(e, t), e);
      }),
      a = e((e, t) => t.getAttribute(e)),
      l = e((e, t, i) => i.setAttribute(e, t)),
      c = e((e, t) => t.removeAttribute(e)),
      u = e((e, t) => t.hasAttribute(e)),
      h = e((e, t, i) => i.getAttribute(e) === t),
      d =
        (e((e, t) => {
          var i = a(e, t);
          l(e, ("true" !== i).toString(), t);
        }),
        e((e, t) => e.appendChild(t)),
        e((e, t) => t.querySelector(e)),
        e((e, t) => {
          return ((e = t.querySelectorAll(e)), Array.prototype.slice.call(e));
        }),
        e((e, t) => e.removeChild(t)),
        e((e, t) => t.classList.contains(e)),
        e((e, t) => t.classList.add(e))),
      p = e((e, t) => t.classList.remove(e)),
      f = d("hidden"),
      g = p("hidden"),
      m =
        (e((e, t) => (e ? g : f)(t)),
        e((e, t, i) => {
          i.classList[t ? "add" : "remove"](e);
        }),
        c("tabindex")),
      v = (i(m), l("tabindex", "0")),
      b = l("tabindex", "-1"),
      y = u("tabindex");
    class _ {
      constructor(e) {
        (Object.assign(this, {
          listeners: {},
          on: function (e, t, i) {
            i = { listener: t, scope: i };
            return (
              (this.listeners[e] = this.listeners[e] || []),
              this.listeners[e].push(i),
              this
            );
          },
          fire: function (e, t) {
            return (this.listeners[e] || []).every(function (e) {
              return !1 !== e.listener.call(e.scope || this, t);
            });
          },
          propagate: function (e, i) {
            let n = this;
            e.forEach((t) => i.on(t, (e) => n.fire(t, e)));
          },
        }),
          (this.plugins = e || []),
          (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(e) {
        (this.elements.push(e),
          this.firesEvent("addElement", e),
          1 === this.elements.length && this.setTabbable(e));
      }
      insertElementAt(e, t) {
        (this.elements.splice(t, 0, e),
          this.firesEvent("addElement", e),
          1 === this.elements.length && this.setTabbable(e));
      }
      removeElement(e) {
        ((this.elements = s([e], this.elements)),
          y(e) &&
            (this.setUntabbable(e),
            this.elements[0] && this.setTabbable(this.elements[0])),
          this.firesEvent("removeElement", e));
      }
      count() {
        return this.elements.length;
      }
      firesEvent(e, t) {
        var i = this.elements.indexOf(t);
        return this.fire(e, {
          element: t,
          index: i,
          elements: this.elements,
          oldElement: this.tabbableElement,
        });
      }
      nextElement({ index: e }) {
        const t = e === this.elements.length - 1,
          i = this.elements[t ? 0 : e + 1];
        (this.setTabbable(i), i.focus());
      }
      firstElement() {
        const e = this.elements[0];
        (this.setTabbable(e), e.focus());
      }
      lastElement() {
        const e = this.elements[this.elements.length - 1];
        (this.setTabbable(e), e.focus());
      }
      setTabbableByIndex(e) {
        e = this.elements[e];
        e && this.setTabbable(e);
      }
      setTabbable(e) {
        (i(this.setUntabbable.bind(this), this.elements),
          v(e),
          (this.tabbableElement = e));
      }
      setUntabbable(e) {
        e !== document.activeElement &&
          (this.negativeTabIndexAllowed ? b : m)(e);
      }
      previousElement({ index: e }) {
        const t = 0 === e,
          i = this.elements[t ? this.elements.length - 1 : e - 1];
        (this.setTabbable(i), i.focus());
      }
      useNegativeTabIndex() {
        ((this.negativeTabIndexAllowed = !0),
          this.elements.forEach((e) => {
            e.hasAttribute("tabindex") || b(e);
          }));
      }
      initPlugins() {
        this.plugins.forEach(function (e) {
          void 0 !== e.init && e.init(this);
        }, this);
      }
    }
    const w = "aria-grabbed",
      x = l(w),
      k = h(w, "true"),
      C = n(u(w)),
      P = t(i(l(w, "false")), C),
      T = t(r(k), C);
    class S {
      init(e) {
        ((this.controls = e), this.controls.on("select", this.select, this));
      }
      addElement(e) {
        (x("false", e), this.controls.addElement(e));
      }
      setAllGrabbedToFalse() {
        P(this.controls.elements);
      }
      hasAnyGrabbed() {
        return T(this.controls.elements);
      }
      select({ element: e }) {
        var t = k(e);
        (this.setAllGrabbedToFalse(), t || x("true", e));
      }
    }
    const H = "aria-dropeffect",
      D = l(H, "none"),
      E = l(H, "move"),
      I = n(u(H)),
      A = t(i(E), I),
      O = t(i(D), I);
    class M {
      init(e) {
        this.controls = e;
      }
      setAllToMove() {
        A(this.controls.elements);
      }
      setAllToNone() {
        O(this.controls.elements);
      }
    }
    M.DropEffect = {
      COPY: "copy",
      MOVE: "move",
      EXECUTE: "execute",
      POPUP: "popup",
      NONE: "none",
    };
    class L {
      constructor() {
        this.selectability = !0;
      }
      init(e) {
        ((this.boundHandleKeyDown = this.handleKeyDown.bind(this)),
          (this.controls = e),
          this.controls.on("addElement", this.listenForKeyDown, this),
          this.controls.on("removeElement", this.removeKeyDownListener, this));
      }
      listenForKeyDown({ element: e }) {
        e.addEventListener("keydown", this.boundHandleKeyDown);
      }
      removeKeyDownListener({ element: e }) {
        e.removeEventListener("keydown", this.boundHandleKeyDown);
      }
      handleKeyDown(e) {
        switch (e.which) {
          case 27:
            (this.close(e.target), e.preventDefault(), e.stopPropagation());
            break;
          case 35:
            (this.lastElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 36:
            (this.firstElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 13:
          case 32:
            (this.select(e.target), e.preventDefault(), e.stopPropagation());
            break;
          case 37:
          case 38:
            this.hasChromevoxModifiers(e) ||
              (this.previousElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
            break;
          case 39:
          case 40:
            this.hasChromevoxModifiers(e) ||
              (this.nextElement(e.target),
              e.preventDefault(),
              e.stopPropagation());
        }
      }
      hasChromevoxModifiers(e) {
        return e.shiftKey || e.ctrlKey;
      }
      previousElement(e) {
        !1 !== this.controls.firesEvent("beforePreviousElement", e) &&
          (this.controls.firesEvent("previousElement", e),
          this.controls.firesEvent("afterPreviousElement", e));
      }
      nextElement(e) {
        !1 !== this.controls.firesEvent("beforeNextElement", e) &&
          (this.controls.firesEvent("nextElement", e),
          this.controls.firesEvent("afterNextElement", e));
      }
      select(e) {
        this.selectability &&
          !1 !== this.controls.firesEvent("before-select", e) &&
          (this.controls.firesEvent("select", e),
          this.controls.firesEvent("after-select", e));
      }
      firstElement(e) {
        !1 !== this.controls.firesEvent("beforeFirstElement", e) &&
          (this.controls.firesEvent("firstElement", e),
          this.controls.firesEvent("afterFirstElement", e));
      }
      lastElement(e) {
        !1 !== this.controls.firesEvent("beforeLastElement", e) &&
          (this.controls.firesEvent("lastElement", e),
          this.controls.firesEvent("afterLastElement", e));
      }
      disableSelectability() {
        this.selectability = !1;
      }
      enableSelectability() {
        this.selectability = !0;
      }
      close(e) {
        !1 !== this.controls.firesEvent("before-close", e) &&
          (this.controls.firesEvent("close", e),
          this.controls.firesEvent("after-close", e));
      }
    }
    class j {
      constructor() {
        ((this.selectability = !0),
          (this.handleClickBound = this.handleClick.bind(this)),
          (this.handleDragBound = this.handleDrag.bind(this)));
      }
      init(e) {
        ((this.controls = e),
          this.controls.on("addElement", this.listenForKeyDown, this),
          this.controls.on("removeElement", this.unlistenForKeyDown, this));
      }
      listenForKeyDown({ element: e }) {
        (e.addEventListener("click", this.handleClickBound),
          e.addEventListener("drag", this.handleClickBound));
      }
      unlistenForKeyDown({ element: e }) {
        (e.removeEventListener("click", this.handleClickBound),
          e.removeEventListener("drag", this.handleDragBound));
      }
      handleClick(e) {
        this.controls.firesEvent("select", e.currentTarget);
      }
      handleDrag(e) {
        this.controls.firesEvent("drag", e.currentTarget);
      }
      disableSelectability() {
        this.selectability = !1;
      }
      enableSelectability() {
        this.selectability = !0;
      }
    }
    function N(e, t) {
      for (var i = 0; i < t.length; i++) {
        var n = t[i];
        ((n.enumerable = n.enumerable || !1),
          (n.configurable = !0),
          "value" in n && (n.writable = !0),
          Object.defineProperty(e, n.key, n));
      }
    }
    var F =
      (N((R = z), [
        {
          key: "setElementOpacity",
          value: function (e, t) {
            (z.setOpacity(e, "borderColor", t),
              z.setOpacity(e, "boxShadow", t),
              z.setOpacity(e, "background", t));
          },
        },
        {
          key: "setOpacity",
          value: function (e, t, i) {
            if ("background" === t)
              return (
                z.setOpacity(e, "backgroundColor", i),
                void z.setOpacity(e, "backgroundImage", i)
              );
            function n(e, t) {
              if ("borderColor" === e)
                return {
                  borderTopColor: t,
                  borderRightColor: t,
                  borderBottomColor: t,
                  borderLeftColor: t,
                };
              var i = {};
              return ((i[e] = t), i);
            }
            i = void 0 === i ? 1 : i / 100;
            var r,
              o = e.css(t),
              s = n(t, "");
            for (r in (e.css(s), s)) break;
            ((s = e.css(r)),
              (s = z.setAlphas(
                (s = "" === s || "none" === s ? o : s),
                "rgba(",
                i,
              )));
            ((s = z.setAlphas(s, "rgb(", i)), e.css(n(t, s)));
          },
        },
        {
          key: "setAlphas",
          value: function (e, t, i) {
            if (e) {
              for (var n = e.indexOf(t); -1 !== n; ) {
                var r = e.indexOf(")", n),
                  o = e.substring(n + t.length, r).split(",");
                ((o[3] = void 0 !== o[3] ? parseFloat(o[3]) * i : i),
                  (n = (e =
                    e.substring(0, n) +
                    "rgba(" +
                    o.join(",") +
                    e.substring(r, e.length)).indexOf(t, r)));
              }
              return e;
            }
          },
        },
        {
          key: "elementToDraggable",
          value: function (e, t) {
            for (var i = 0; i < e.length; i++)
              if (e[i]) {
                var n = e[i].findElement(t);
                if (n) return ((n.draggable = e[i]), n);
              }
          },
        },
        {
          key: "elementToDropZone",
          value: function (e, t) {
            for (var i = 0; i < e.length; i++)
              if (e[i].$dropZone.is(t)) return e[i];
          },
        },
        {
          key: "positionToPercentage",
          value: function (e, t) {
            return {
              top: (100 * parseInt(t.css("top"))) / e.innerHeight() + "%",
              left: (100 * parseInt(t.css("left"))) / e.innerWidth() + "%",
            };
          },
        },
        {
          key: "addHover",
          value: function (e, t) {
            (e.hover(
              function () {
                (e.addClass("h5p-draggable-hover"),
                  e.parent().hasClass("h5p-dragging") ||
                    z.setElementOpacity(e, t));
              },
              function () {
                e.parent().hasClass("h5p-dragging") ||
                  setTimeout(function () {
                    (e.removeClass("h5p-draggable-hover"),
                      z.setElementOpacity(e, t));
                  }, 1);
              },
            ),
              z.setElementOpacity(e, t));
          },
        },
        {
          key: "strip",
          value: function (e) {
            var t = document.createElement("div");
            return ((t.innerHTML = e), t.textContent || t.innerText || "");
          },
        },
      ]),
      Object.defineProperty(R, "prototype", { writable: !1 }),
      z);
    function z() {
      !(function (e) {
        if (!(e instanceof z))
          throw new TypeError("Cannot call a class as a function");
      })(this);
    }
    var R,
      B = H5P.jQuery,
      q =
        ((function (e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        })((R = $).prototype, [
          {
            key: "appendTo",
            value: function (e, t) {
              var n = this,
                i = '<div class="h5p-inner"></div>',
                r = "";
              (n.showLabel &&
                ((i =
                  '<div class="h5p-label">' +
                  n.label +
                  '<span class="h5p-hidden-read"></span></div>' +
                  i),
                (r = " h5p-has-label")),
                (i =
                  '<span class="h5p-hidden-read">' +
                  n.l10n.prefix.replace("{num}", n.id + 1) +
                  "</span>" +
                  i),
                (n.$dropZone = B("<div/>", {
                  class: "h5p-dropzone" + r,
                  tabindex: "-1",
                  role: "button",
                  "aria-disabled": !0,
                  css: {
                    left: n.x + "%",
                    top: n.y + "%",
                    width: n.width + "em",
                    height: n.height + "em",
                  },
                  html: i,
                })
                  .appendTo(e)
                  .children(".h5p-inner")
                  .droppable({
                    activeClass: "h5p-active",
                    tolerance: "intersect",
                    accept: function (e) {
                      e = F.elementToDraggable(t, e);
                      return !!e && n.accepts(e.draggable, t);
                    },
                    drop: function (e, t) {
                      var i = B(this);
                      (F.setOpacity(
                        i.removeClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      ),
                        t.draggable.data("addToZone", n.id),
                        -1 === n.getIndexOf(t.draggable) &&
                          n.alignables.push(t.draggable),
                        n.autoAlignable.enabled && n.autoAlign());
                    },
                    over: function () {
                      F.setOpacity(
                        B(this).addClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      );
                    },
                    out: function () {
                      F.setOpacity(
                        B(this).removeClass("h5p-over"),
                        "background",
                        n.backgroundOpacity,
                      );
                    },
                  })
                  .end()
                  .focus(function () {
                    o instanceof H5P.jQuery && o.attr("tabindex", "0");
                  })
                  .blur(function () {
                    o instanceof H5P.jQuery && o.attr("tabindex", "-1");
                  })));
              var o = H5P.JoubelUI.createTip(n.tip, {
                tipLabel: n.l10n.tipLabel,
                tabcontrol: !0,
              });
              (o instanceof H5P.jQuery &&
                B("<span/>", {
                  class: "h5p-dq-tipwrap",
                  "aria-label": n.l10n.tipAvailable,
                  append: o,
                  appendTo: n.$dropZone,
                }),
                t.forEach(function (e) {
                  var t = e.element.$;
                  e.isInDropZone(n.id) &&
                    -1 === n.getIndexOf(t) &&
                    n.alignables.push(t);
                }),
                n.autoAlignable.enabled && n.autoAlign(),
                setTimeout(function () {
                  n.updateBackgroundOpacity();
                }, 0));
            },
          },
          {
            key: "updateBackgroundOpacity",
            value: function () {
              (F.setOpacity(
                this.$dropZone.children(".h5p-label"),
                "background",
                this.backgroundOpacity,
              ),
                F.setOpacity(
                  this.$dropZone.children(".h5p-inner"),
                  "background",
                  this.backgroundOpacity,
                ));
            },
          },
          {
            key: "accepts",
            value: function (e, t) {
              if (!e.hasDropZone(this.id)) return !1;
              if (this.single)
                for (var i = 0; i < t.length; i++)
                  if (t[i] && t[i].isInDropZone(this.id)) return !1;
              return !0;
            },
          },
          {
            key: "getIndexOf",
            value: function (e) {
              for (var t = 0; t < this.alignables.length; t++)
                if (this.alignables[t][0] === e[0]) return t;
              return -1;
            },
          },
          {
            key: "removeAlignable",
            value: function (e) {
              var t = this,
                e = t.getIndexOf(e);
              -1 !== e &&
                (t.alignables.splice(e, 1),
                void 0 === t.autoAlignTimer &&
                  t.autoAlignable.enabled &&
                  (t.autoAlignTimer = setTimeout(function () {
                    (delete t.autoAlignTimer, t.autoAlign());
                  }, 1)));
            },
          },
          {
            key: "autoAlign",
            value: function () {
              for (
                var t,
                  i,
                  n = this,
                  r = n.$dropZone.parent()[0].getBoundingClientRect(),
                  e =
                    (n.autoAlignable.spacing / n.autoAlignable.size.width) *
                    100,
                  o =
                    (n.autoAlignable.spacing / n.autoAlignable.size.height) *
                    100,
                  s = { x: n.x + e, y: n.y + o },
                  a = n.$dropZone[0].getBoundingClientRect(),
                  l = { x: a.width - 2 * e, y: a.height - 2 * o },
                  c = { x: l.x, y: l.y },
                  u = 0,
                  h = function () {
                    (t.css({ left: s.x + "%", top: s.y + "%" }),
                      n.trigger("elementaligned", t));
                    var e = i.width + n.autoAlignable.spacing;
                    ((c.x -= e), (s.x += (e / r.width) * 100));
                    e = i.height + n.autoAlignable.spacing;
                    u < e && (u = e);
                  },
                  d = 0;
                d < n.alignables.length;
                d++
              )
                if (
                  ((t = n.alignables[d]),
                  (i = t[0].getBoundingClientRect()),
                  c.x >= i.width)
                )
                  h();
                else {
                  if (
                    ((c.x = l.x),
                    (s.x = n.x + e),
                    u && ((c.y -= u), (s.y += (u / r.height) * 100), (u = 0)),
                    c.y <= 0)
                  )
                    return;
                  h();
                }
            },
          },
          {
            key: "highlight",
            value: function () {
              this.$dropZone
                .attr("aria-disabled", "false")
                .children(".h5p-inner")
                .addClass("h5p-active");
            },
          },
          {
            key: "dehighlight",
            value: function () {
              this.$dropZone
                .attr("aria-disabled", "true")
                .children(".h5p-inner")
                .removeClass("h5p-active");
            },
          },
          {
            key: "reset",
            value: function () {
              this.alignables = [];
            },
          },
        ]),
        Object.defineProperty(R, "prototype", { writable: !1 }),
        $);
    function $(e, t, i) {
      !(function (e) {
        if (!(e instanceof $))
          throw new TypeError("Cannot call a class as a function");
      })(this);
      var n = this;
      (H5P.EventDispatcher.call(n),
        (n.id = t),
        (n.showLabel = e.showLabel),
        (n.label = e.label),
        (n.x = e.x),
        (n.y = e.y),
        (n.width = e.width),
        (n.height = e.height),
        (n.backgroundOpacity = e.backgroundOpacity),
        (n.tip = e.tipsAndFeedback.tip || ""),
        (n.single = e.single),
        (n.autoAlignable = e.autoAlign),
        (n.alignables = []),
        (n.l10n = i));
    }
    function W(e) {
      return (W =
        "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
          ? function (e) {
              return typeof e;
            }
          : function (e) {
              return e &&
                "function" == typeof Symbol &&
                e.constructor === Symbol &&
                e !== Symbol.prototype
                ? "symbol"
                : typeof e;
            })(e);
    }
    function U(e, t) {
      return (U = Object.setPrototypeOf
        ? Object.setPrototypeOf.bind()
        : function (e, t) {
            return ((e.__proto__ = t), e);
          })(e, t);
    }
    function V(e) {
      if (void 0 === e)
        throw new ReferenceError(
          "this hasn't been initialised - super() hasn't been called",
        );
      return e;
    }
    function Y(e) {
      return (Y = Object.setPrototypeOf
        ? Object.getPrototypeOf.bind()
        : function (e) {
            return e.__proto__ || Object.getPrototypeOf(e);
          })(e);
    }
    function Q(e) {
      return e.stopPropagation();
    }
    var X = H5P.jQuery,
      Z = (function () {
        !(function (e, t) {
          if ("function" != typeof t && null !== t)
            throw new TypeError(
              "Super expression must either be null or a function",
            );
          ((e.prototype = Object.create(t && t.prototype, {
            constructor: { value: e, writable: !0, configurable: !0 },
          })),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            t && U(e, t));
        })(u, H5P.EventDispatcher);
        var e,
          i,
          n,
          c =
            ((i = u),
            (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 (e) {
                return !1;
              }
            })()),
            function () {
              var e,
                t = Y(i);
              return (function (e, t) {
                if (t && ("object" === W(t) || "function" == typeof t))
                  return t;
                if (void 0 !== t)
                  throw new TypeError(
                    "Derived constructors may only return object or undefined",
                  );
                return V(e);
              })(
                this,
                n
                  ? ((e = Y(this).constructor),
                    Reflect.construct(t, arguments, e))
                  : t.apply(this, arguments),
              );
            });
        function u(e, t, i, n, r, o) {
          var s;
          !(function (e) {
            if (!(e instanceof u))
              throw new TypeError("Cannot call a class as a function");
          })(this);
          var a = V((s = c.call(this)));
          if (
            ((a.$ = X(a)),
            (a.id = t),
            (a.elements = []),
            (a.x = e.x),
            (a.y = e.y),
            (a.width = e.width),
            (a.height = e.height),
            (a.backgroundOpacity = e.backgroundOpacity),
            (a.dropZones = e.dropZones),
            (a.type = e.type),
            (a.multiple = e.multiple),
            (a.l10n = n),
            (a.allDropzones = r),
            (a.draggableNum = o),
            i)
          ) {
            a.multiple && a.elements.push({});
            for (var l = 0; l < i.length; l++)
              a.elements.push({
                dropZone: i[l].dz,
                position: { left: i[l].x + "%", top: i[l].y + "%" },
              });
          }
          return s;
        }
        return (
          (function (e, t) {
            for (var i = 0; i < t.length; i++) {
              var n = t[i];
              ((n.enumerable = n.enumerable || !1),
                (n.configurable = !0),
                "value" in n && (n.writable = !0),
                Object.defineProperty(e, n.key, n));
            }
          })((e = u).prototype, [
            {
              key: "appendTo",
              value: function (e, t) {
                if (this.elements.length)
                  for (var i = 0; i < this.elements.length; i++)
                    this.attachElement(i, e, t);
                else this.attachElement(null, e, t);
              },
            },
            {
              key: "attachElement",
              value: function (i, n, e) {
                var r,
                  o = this;
                (null === i
                  ? ((r = {}), o.elements.push(r), (i = o.elements.length - 1))
                  : (r = o.elements[i]),
                  X.extend(r, {
                    clone: function () {
                      o.attachElement(null, n, e);
                    },
                    reset: function () {
                      (void 0 !== r.dropZone &&
                        (o.trigger("leavingDropZone", r), delete r.dropZone),
                        o.multiple &&
                          (r.$.remove(),
                          delete o.elements[i],
                          o.trigger("elementremove", r.$[0])),
                        delete r.position);
                    },
                  }),
                  (r.$ = X("<div/>", {
                    class: "h5p-draggable",
                    tabindex: "-1",
                    role: "button",
                    css: {
                      left: o.x + "%",
                      top: o.y + "%",
                      width: o.width + "em",
                      height: o.height + "em",
                    },
                    appendTo: n,
                    title: o.type.params.title,
                  })
                    .on("click", function () {
                      o.trigger("focus", this);
                    })
                    .on("touchmove", Q)
                    .on("touchstart", Q)
                    .on("touchend", Q)
                    .draggable({
                      revert: function (e) {
                        n.removeClass("h5p-dragging");
                        var t = X(this);
                        return (
                          (t.data("uiDraggable").originalPosition = {
                            top: o.y + "%",
                            left: o.x + "%",
                          }),
                          o.updatePlacement(r),
                          t[0].setAttribute("aria-grabbed", "false"),
                          o.trigger("dragend"),
                          !e
                        );
                      },
                      start: function () {
                        var e = X(this),
                          t = o.mustCopyElement(r);
                        (t && r.clone(),
                          e.removeClass("h5p-wrong").detach().appendTo(n),
                          n.addClass("h5p-dragging"),
                          F.setElementOpacity(e, o.backgroundOpacity),
                          this.setAttribute("aria-grabbed", "true"),
                          o.trigger("focus", this),
                          o.trigger("dragstart", {
                            element: this,
                            effect: t ? "copy" : "move",
                          }));
                      },
                      stop: function () {
                        var e = X(this);
                        ((r.position = F.positionToPercentage(n, e)),
                          e.css(r.position));
                        var t = e.data("addToZone");
                        void 0 !== t
                          ? (e.removeData("addToZone"),
                            o.addToDropZone(i, r, t))
                          : r.reset();
                      },
                    })
                    .css("position", "")),
                  (o.element = r).position &&
                    (r.$.css(r.position), o.updatePlacement(r)),
                  F.addHover(r.$, o.backgroundOpacity),
                  H5P.newRunnable(o.type, e, r.$),
                  X(
                    '<span class="h5p-hidden-read">' +
                      o.l10n.prefix.replace("{num}", o.draggableNum) +
                      "</span>",
                  ).prependTo(r.$),
                  X('<span class="h5p-hidden-read"></span>').appendTo(r.$),
                  setTimeout(function () {
                    F.setElementOpacity(r.$, o.backgroundOpacity);
                  }, 0),
                  o.trigger("elementadd", r.$[0]));
              },
            },
            {
              key: "setFeedback",
              value: function (t, i) {
                this.elements.forEach(function (e) {
                  e.dropZone === i &&
                    (void 0 === e.$feedback &&
                      (e.$feedback = X("<span>", {
                        class: "h5p-hidden-read",
                        appendTo: e.$,
                      })),
                    e.$feedback.html(t));
                });
              },
            },
            {
              key: "mustCopyElement",
              value: function (e) {
                return this.multiple && void 0 === e.dropZone;
              },
            },
            {
              key: "hasDropZone",
              value: function (e) {
                for (var t = 0; t < this.dropZones.length; t++)
                  if (parseInt(this.dropZones[t]) === e) return !0;
                return !1;
              },
            },
            {
              key: "addToDropZone",
              value: function (e, t, i) {
                var n = this;
                if (n.multiple)
                  for (var r = 0; r < n.elements.length; r++)
                    if (
                      r !== e &&
                      void 0 !== n.elements[r] &&
                      n.elements[r].dropZone === i
                    )
                      return (
                        void 0 !== n.elements[e].dropZone &&
                          n.elements[e].dropZone !== i &&
                          n.trigger("leavingDropZone", t),
                        t.$.remove(),
                        delete n.elements[e],
                        void n.trigger("elementremove", this.element.$[0])
                      );
                (void 0 !== t.dropZone &&
                  t.dropZone !== i &&
                  n.trigger("leavingDropZone", t),
                  (t.dropZone = i),
                  n.updatePlacement(t),
                  n.trigger("interacted"));
              },
            },
            {
              key: "updatePlacement",
              value: function (e) {
                var t, i;
                (e.$suffix && e.$suffix.remove(),
                  void 0 !== e.dropZone
                    ? (e.$.addClass("h5p-dropped"),
                      F.setElementOpacity(e.$, self.backgroundOpacity),
                      (i = (i = this.allDropzones[e.dropZone].label)
                        ? (((t = document.createElement("div")).innerHTML = i),
                          t.innerText)
                        : e.dropZone + 1),
                      (e.$suffix = X(
                        '<span class="h5p-hidden-read">' +
                          this.l10n.suffix.replace("{num}", i) +
                          "</span>",
                      ).appendTo(e.$)))
                    : (e.$.removeClass("h5p-dropped")
                        .removeClass("h5p-wrong")
                        .removeClass("h5p-correct")
                        .css({ border: "", background: "" }),
                      F.setElementOpacity(e.$, this.backgroundOpacity)));
              },
            },
            {
              key: "resetPosition",
              value: function () {
                var i = this;
                (this.elements.forEach(function (e) {
                  var t;
                  (e.$feedback && (e.$feedback.remove(), delete e.$feedback),
                    void 0 !== e.dropZone &&
                      ((t = e.$).animate(
                        { left: i.x + "%", top: i.y + "%" },
                        function () {
                          i.multiple &&
                            (void 0 !== t.dropZone &&
                              i.trigger("leavingDropZone", t),
                            t.remove(),
                            0 <= i.elements.indexOf(e) &&
                              delete i.elements[i.elements.indexOf(e)],
                            i.trigger("elementremove", t[0]));
                        },
                      ),
                      i.updatePlacement(e)));
                }),
                  i.element &&
                    (void 0 !== i.element.dropZone &&
                      (i.trigger("leavingDropZone", i.element),
                      delete i.element.dropZone),
                    i.updatePlacement(i.element)));
              },
            },
            {
              key: "findElement",
              value: function (e) {
                for (var t = 0; t < this.elements.length; t++)
                  if (void 0 !== this.elements[t] && this.elements[t].$.is(e))
                    return { element: this.elements[t], index: t };
              },
            },
            {
              key: "isInDropZone",
              value: function (e) {
                for (var t = 0; t < this.elements.length; t++)
                  if (
                    void 0 !== this.elements[t] &&
                    this.elements[t].dropZone === e
                  )
                    return !0;
                return !1;
              },
            },
            {
              key: "disable",
              value: function () {
                for (var e = 0; e < this.elements.length; e++) {
                  var t = this.elements[e];
                  t &&
                    (t.$.draggable("disable"),
                    this.trigger("elementremove", t.$[0]));
                }
              },
            },
            {
              key: "enable",
              value: function () {
                for (var e = 0; e < this.elements.length; e++) {
                  var t = this.elements[e];
                  t &&
                    (t.$.draggable("enable"),
                    this.trigger("elementadd", t.$[0]));
                }
              },
            },
            {
              key: "results",
              value: function (e, t, i) {
                var n,
                  r,
                  o,
                  s,
                  a = 0;
                if (void (this.rawPoints = 0) === t) {
                  for (n = 0; n < this.elements.length; n++)
                    void 0 !== (o = this.elements[n]) &&
                      void 0 !== o.dropZone &&
                      (!0 !== e && this.markElement(o, "wrong", i), a--);
                  return a;
                }
                for (n = 0; n < this.elements.length; n++)
                  if (
                    void 0 !== (o = this.elements[n]) &&
                    void 0 !== o.dropZone
                  ) {
                    for (s = !1, r = 0; r < t.length; r++)
                      if (o.dropZone === t[r]) {
                        (!0 !== e && this.markElement(o, "correct", i),
                          (s = !0),
                          this.rawPoints++,
                          a++);
                        break;
                      }
                    s || (!0 !== e && this.markElement(o, "wrong", i), a--);
                  }
                return a;
              },
            },
            {
              key: "markElement",
              value: function (e, t, i) {
                var n = X("<span/>", {
                  class: "h5p-hidden-read",
                  html: this.l10n[t + "Answer"] + ". ",
                });
                (i && (n = n.add(i.getElement("correct" === t))),
                  (e.$suffix = e.$suffix.add(n)),
                  e.$.addClass("h5p-" + t).append(n),
                  F.setElementOpacity(e.$, this.backgroundOpacity));
              },
            },
          ]),
          Object.defineProperty(e, "prototype", { writable: !1 }),
          u
        );
      })(),
      K = H5P.jQuery,
      G = 0;
    function J(e, t, i) {
      var s = this;
      (G++,
        (this.id = this.contentId = t),
        (this.contentData = i),
        H5P.Question.call(s, "dragquestion"),
        (this.options = K.extend(
          !0,
          {},
          {
            scoreShow: "Check",
            tryAgain: "Retry",
            grabbablePrefix: "Grabbable {num} of {total}.",
            grabbableSuffix: "Placed in dropzone {num}.",
            dropzonePrefix: "Dropzone {num} of {total}.",
            noDropzone: "No dropzone",
            tipLabel: "Show tip.",
            tipAvailable: "Tip available",
            correctAnswer: "Correct answer",
            wrongAnswer: "Wrong answer",
            feedbackHeader: "Feedback",
            scoreBarLabel: "You got :num out of :total points",
            scoreExplanationButtonLabel: "Show score explanation",
            question: {
              settings: {
                questionTitle:
                  this.contentData &&
                  this.contentData.metadata &&
                  this.contentData.metadata.title
                    ? this.contentData.metadata.title
                    : "Drag and drop",
                size: { width: 620, height: 310 },
              },
              task: { elements: [], dropZones: [] },
            },
            overallFeedback: [],
            behaviour: {
              enableRetry: !0,
              enableCheckButton: !0,
              preventResize: !1,
              singlePoint: !1,
              applyPenalties: !0,
              enableScoreExplanation: !0,
              dropZoneHighlighting: "dragging",
              autoAlignSpacing: 2,
              showScorePoints: !0,
              showTitle: !1,
            },
            a11yCheck:
              "Check the answers. The responses will be marked as correct, incorrect, or unanswered.",
            a11yRetry:
              "Retry the task. Reset all responses and start the task over again.",
            submit: "Submit",
          },
          e,
        )),
        this.options.behaviour.singlePoint &&
          (this.options.behaviour.enableScoreExplanation = !1),
        (this.draggables = []),
        (this.dropZones = []),
        (this.answered =
          i &&
          void 0 !== i.previousState &&
          void 0 !== i.previousState.answers &&
          i.previousState.answers.length),
        (this.blankIsCorrect = !0),
        (this.backgroundOpacity =
          void 0 === this.options.behaviour.backgroundOpacity ||
          "" === this.options.behaviour.backgroundOpacity.trim()
            ? void 0
            : this.options.behaviour.backgroundOpacity),
        (s.$noDropZone = K(
          '<div class="h5p-dq-no-dz" role="button" style="display:none;"><span class="h5p-hidden-read">' +
            s.options.noDropzone +
            "</span></div>",
        )));
      function n(e) {
        for (var t = 0; t < r.drop.elements.length; t++)
          r.drop.elements[t].setAttribute("aria-dropeffect", e);
      }
      var r = ee(s.draggables, s.dropZones, s.$noDropZone[0]),
        o = [],
        a = this.options.question.task;
      for (this.correctDZs = [], f = 0; f < a.dropZones.length; f++) {
        o.push(!0);
        for (var l = a.dropZones[f].correctElements, c = 0; c < l.length; c++) {
          var u = l[c];
          (void 0 === this.correctDZs[u] && (this.correctDZs[u] = []),
            this.correctDZs[u].push(f));
        }
      }
      this.weight = 1;
      for (
        var h = function (e) {
            return !(void 0 === e.dropZones || !e.dropZones.length);
          },
          d = {
            prefix: s.options.grabbablePrefix.replace(
              "{total}",
              a.elements.filter(h).length,
            ),
            suffix: s.options.grabbableSuffix,
            correctAnswer: s.options.correctAnswer,
            wrongAnswer: s.options.wrongAnswer,
          },
          p = 1,
          f = 0;
        f < a.elements.length;
        f++
      ) {
        var g = a.elements[f];
        if (h(g)) {
          void 0 !== this.backgroundOpacity &&
            (g.backgroundOpacity = this.backgroundOpacity);
          var m = null;
          i &&
            void 0 !== i.previousState &&
            void 0 !== i.previousState.answers &&
            void 0 !== i.previousState.answers[f] &&
            (m = i.previousState.answers[f]);
          var m = new Z(g, f, m, d, a.dropZones, p++),
            v = "dragging" === s.options.behaviour.dropZoneHighlighting;
          for (
            m.on("elementadd", function (e) {
              r.drag.addElement(e.data);
            }),
              m.on("elementremove", function (e) {
                (r.drag.removeElement(e.data),
                  "true" === e.data.getAttribute("aria-grabbed") &&
                    (r.drag.firesEvent("select", e.data),
                    e.data.removeAttribute("aria-grabbed")));
              }),
              m.on("focus", function (e) {
                (r.drag.setTabbable(e.data), e.data.focus());
              }),
              m.on("dragstart", function (e) {
                (v && s.$container.addClass("h5p-dq-highlight-dz"), n(e.data));
              }),
              m.on("dragend", function () {
                (v && s.$container.removeClass("h5p-dq-highlight-dz"),
                  n("none"));
              }),
              m.on("interacted", function () {
                ((s.answered = !0), s.triggerXAPI("interacted"));
              }),
              m.on("leavingDropZone", function (e) {
                s.dropZones[e.data.dropZone].removeAlignable(e.data.$);
              }),
              this.draggables[f] = m,
              c = 0;
            c < g.dropZones.length;
            c++
          )
            o[g.dropZones[c]] = !1;
        }
      }
      this.numDropZonesWithoutElements = 0;
      var b = {
        prefix: s.options.dropzonePrefix.replace("{total}", a.dropZones.length),
        tipLabel: s.options.tipLabel,
        tipAvailable: s.options.tipAvailable,
      };
      for (f = 0; f < a.dropZones.length; f++) {
        var y = a.dropZones[f];
        (!0 === o[f] && (this.numDropZonesWithoutElements += 1),
          this.blankIsCorrect &&
            y.correctElements.length &&
            (this.blankIsCorrect = !1),
          (y.autoAlign = {
            enabled: y.autoAlign,
            spacing: s.options.behaviour.autoAlignSpacing,
            size: s.options.question.settings.size,
          }),
          (this.dropZones[f] = new q(y, f, b)),
          this.dropZones[f].on("elementaligned", function (e) {
            for (var t = e.data, i = 0; i < s.draggables.length; i++) {
              var n = s.draggables[i];
              if (n && n.elements && n.elements.length)
                for (var r = 0; r < n.elements.length; r++) {
                  var o = n.elements[r];
                  if (o && o.$[0] === t[0])
                    return void (o.position = F.positionToPercentage(
                      s.$container,
                      o.$,
                    ));
                }
            }
          }));
      }
      (this.on("resize", s.resize, s),
        this.on("domChanged", function (e) {
          s.contentId === e.data.contentId && s.trigger("resize");
        }),
        this.on("enterFullScreen", function () {
          s.$container &&
            (s.$container.parents(".h5p-content").css("height", "100%"),
            s.trigger("resize"));
        }),
        this.on("exitFullScreen", function () {
          s.$container &&
            (s.$container.parents(".h5p-content").css("height", "auto"),
            s.trigger("resize"));
        }));
    }
    ((((J.prototype = Object.create(H5P.Question.prototype)).constructor =
      J).prototype.registerDomElements = function () {
      var e = this;
      e.options.behaviour.showTitle &&
        ((e.$introduction = K(
          '<p class="h5p-dragquestion-introduction" id="dq-intro-' +
            G +
            '">' +
            e.options.question.settings.questionTitle +
            "</p>",
        )),
        e.setIntroduction(e.$introduction));
      var t,
        i,
        n = "";
      (void 0 !== this.options.question.settings.background &&
        (n += "h5p-dragquestion-has-no-background"),
        "always" === e.options.behaviour.dropZoneHighlighting &&
          (n && (n += " "), (n += "h5p-dq-highlight-dz-always")),
        e.setContent(e.createQuestionContent(), { class: n }),
        !1 !== H5P.canHasFullScreen &&
          this.options.behaviour.enableFullScreen &&
          ((i = K("<div/>", {
            class: "h5p-my-fullscreen-button-enter",
            title: this.options.localize.fullscreen,
            role: "button",
            tabindex: 0,
            on: {
              click: (t = function () {
                H5P.isFullscreen
                  ? H5P.exitFullScreen(e.$container)
                  : H5P.fullScreen(e.$container.parent().parent(), e);
              }),
              keypress: function (e) {
                (13 !== e.which && 32 !== e.which) || (t(), e.preventDefault());
              },
            },
            prependTo: this.$container.parent(),
          })),
          this.on("enterFullScreen", function () {
            (i.attr("class", "h5p-my-fullscreen-button-exit"),
              i.attr("title", this.options.localize.exitFullscreen));
          }),
          this.on("exitFullScreen", function () {
            (i.attr("class", "h5p-my-fullscreen-button-enter"),
              i.attr("title", this.options.localize.fullscreen));
          })),
        e.registerButtons(),
        setTimeout(function () {
          e.trigger("resize");
        }, 200));
    }),
      (J.prototype.getXAPIData = function () {
        var e = this.createXAPIEventTemplate("answered");
        return (
          this.addQuestionToXAPI(e),
          this.addResponseToXAPI(e),
          { statement: e.data.statement }
        );
      }),
      (J.prototype.addQuestionToXAPI = function (e) {
        e = e.getVerifiedStatementValue(["object", "definition"]);
        K.extend(e, this.getXAPIDefinition());
      }),
      (J.prototype.getXAPIDefinition = function () {
        var e = {};
        ((e.description = {
          "en-US": K(
            "<div>" + this.options.question.settings.questionTitle + "</div>",
          ).text(),
        }),
          (e.type = "http://adlnet.gov/expapi/activities/cmi.interaction"),
          (e.interactionType = "matching"),
          (e.source = []));
        for (var t = 0; t < this.options.question.task.elements.length; t++) {
          var i = this.options.question.task.elements[t];
          i.dropZones &&
            i.dropZones.length &&
            ((i = i.type.params.alt || i.type.params.text),
            e.source.push({
              id: "" + t,
              description: { "en-US": K("<div>" + i + "</div>").text() },
            }));
        }
        ((e.correctResponsesPattern = [""]), (e.target = []));
        for (
          var n = !0, t = 0;
          t < this.options.question.task.dropZones.length;
          t++
        )
          if (
            (e.target.push({
              id: "" + t,
              description: {
                "en-US": K(
                  "<div>" +
                    this.options.question.task.dropZones[t].label +
                    "</div>",
                ).text(),
              },
            }),
            this.options.question.task.dropZones[t].correctElements)
          )
            for (
              var r = 0;
              r <
              this.options.question.task.dropZones[t].correctElements.length;
              r++
            ) {
              var o = this.options.question.task,
                s = o.elements[o.dropZones[t].correctElements[r]];
              !s ||
                s.dropZones.indexOf(t.toString()) < 0 ||
                (n || (e.correctResponsesPattern[0] += "[,]"),
                (e.correctResponsesPattern[0] +=
                  t + "[.]" + o.dropZones[t].correctElements[r]),
                (n = !1));
            }
        return e;
      }),
      (J.prototype.addResponseToXAPI = function (e) {
        var t = this.getMaxScore(),
          i = this.getScore();
        (e.setScoredResult(i, t, this, !0, i == t),
          (e.data.statement.result.response = this.getUserXAPIResponse()));
      }),
      (J.prototype.getUserXAPIResponse = function () {
        var e = this.getUserAnswers();
        return e
          ? e
              .filter(function (e) {
                return e.elements.length;
              })
              .map(function (t) {
                return t.elements
                  .filter(function (e) {
                    return void 0 !== e.dropZone;
                  })
                  .map(function (e) {
                    return e.dropZone + "[.]" + t.index;
                  })
                  .join("[,]");
              })
              .filter(function (e) {
                return void 0 !== e && "" !== e;
              })
              .join("[,]")
          : "";
      }),
      (J.prototype.getUserAnswers = function () {
        return this.draggables
          .map(function (e, t) {
            return { index: t, draggable: e };
          })
          .filter(function (e) {
            return void 0 !== e.draggable && e.draggable.elements;
          })
          .map(function (e) {
            return { index: e.index, elements: e.draggable.elements };
          });
      }),
      (J.prototype.createQuestionContent = function () {
        ((this.$container = K(
          '<div class="h5p-inner" role="application" aria-labelledby="dq-intro-' +
            G +
            '"></div>',
        )),
          void 0 !== this.options.question.settings.background &&
            this.$container.css(
              "backgroundImage",
              'url("' +
                H5P.getPath(
                  this.options.question.settings.background.path,
                  this.id,
                ) +
                '")',
            ));
        for (
          var e = this.options.question.task, t = 0;
          t < e.elements.length;
          t++
        ) {
          var i,
            n = e.elements[t];
          void 0 !== n.dropZones && 0 !== n.dropZones.length
            ? this.draggables[t].appendTo(this.$container, this.id)
            : ((i = this.addElement(n, "static", t)),
              H5P.newRunnable(n.type, this.id, i),
              (function (e, t) {
                setTimeout(function () {
                  F.setOpacity(e, "background", t.backgroundOpacity);
                }, 0);
              })(i, n));
        }
        for (
          this.$noDropZone.appendTo(this.$container), t = 0;
          t < this.dropZones.length;
          t++
        )
          this.dropZones[t].appendTo(this.$container, this.draggables);
        return this.$container;
      }),
      (J.prototype.registerButtons = function () {
        (this.options.behaviour.enableCheckButton && this.addSolutionButton(),
          this.addRetryButton());
      }),
      (J.prototype.addSolutionButton = function () {
        var t = this;
        this.addButton(
          "check-answer",
          this.options.scoreShow,
          function () {
            ((t.answered = !0),
              t.showAllSolutions(),
              t.showScore(),
              t.addExplanation());
            var e = t.createXAPIEventTemplate("answered");
            (t.addQuestionToXAPI(e),
              t.addResponseToXAPI(e),
              t.trigger(e),
              (t.$introduction || t.$container.children().first()).focus());
          },
          !0,
          { "aria-label": this.options.a11yCheck },
          {
            contentData: this.contentData,
            textIfSubmitting: this.options.submit,
          },
        );
      }),
      (J.prototype.addExplanation = function () {
        var e = this,
          t = this.options.question.task,
          a = [];
        (t.dropZones.forEach(function (n, r) {
          var i,
            o,
            s = {
              correct: n.tipsAndFeedback.feedbackOnCorrect,
              incorrect: n.tipsAndFeedback.feedbackOnIncorrect,
            };
          (void 0 === s.correct && void 0 === s.incorrect) ||
            ((i = n.correctElements),
            (o = {}),
            e.draggables.forEach(function (t) {
              t.elements.forEach(function (e) {
                e.dropZone == r &&
                  (o[t.id] = {
                    instance: t,
                    correct: -1 !== i.indexOf("" + t.id),
                  });
              });
            }),
            Object.keys(o).forEach(function (e) {
              var t = o[e],
                i =
                  F.strip(
                    t.instance.type.params.alt || t.instance.type.params.text,
                  ) || "?",
                e = F.strip(n.label);
              t.correct && s.correct
                ? (a.push({ correct: e + " + " + i, text: s.correct }),
                  t.instance.setFeedback(s.correct, r))
                : !t.correct &&
                  s.incorrect &&
                  (a.push({
                    correct: e + " + ",
                    wrong: i,
                    text: s.incorrect,
                  }),
                  t.instance.setFeedback(s.incorrect, r));
            }));
        }),
          0 !== a.length &&
            this.setExplanation(a, this.options.feedbackHeader));
      }),
      (J.prototype.addRetryButton = function () {
        var e = this;
        this.addButton(
          "try-again",
          this.options.tryAgain,
          function () {
            (e.resetTask(),
              e.showButton("check-answer"),
              e.hideButton("try-again"));
          },
          !1,
          { "aria-label": this.options.a11yRetry },
        );
      }),
      (J.prototype.addElement = function (e, t, i) {
        return K(
          '<div class="h5p-' +
            t +
            '" style="left:' +
            e.x +
            "%;top:" +
            e.y +
            "%;width:" +
            e.width +
            "em;height:" +
            e.height +
            'em"></div>',
        )
          .appendTo(this.$container)
          .data("id", i);
      }),
      (J.prototype.resize = function (e) {
        var t,
          i,
          n,
          r,
          o = this;
        void 0 !== this.$container &&
          this.$container.is(":visible") &&
          (o.dropZones.forEach(function (e) {
            e.updateBackgroundOpacity();
          }),
          (n = e && e.data && e.data.decreaseSize) ||
            (this.$container.css("height", "99999px"),
            o.$container
              .parents(".h5p-standalone.h5p-dragquestion")
              .css("width", "")),
          (r = (t = this.options.question.settings.size).width / t.height),
          (e =
            (i = this.$container.parent()).width() -
            parseFloat(i.css("margin-left")) -
            parseFloat(i.css("margin-right"))),
          (i = o.$container.parents(
            ".h5p-standalone.h5p-dragquestion.h5p-semi-fullscreen",
          )).length &&
            (i.css("width", ""),
            n ||
              (o.$container.css("width", "10px"),
              i.css("width", ""),
              setTimeout(function () {
                o.trigger("resize", { decreaseSize: !0 });
              }, 200)),
            (n = K(window.frameElement)) &&
              ((e = n.parent().width()), i.css("width", e + "px"))),
          (r = e / r),
          e <= 0 && ((e = t.width), (r = t.height)),
          this.$container.css({
            width: e + "px",
            height: r + "px",
            fontSize: (e / t.width) * 16 + "px",
          }));
      }),
      (J.prototype.disableDraggables = function () {
        this.draggables.forEach(function (e) {
          e.disable();
        });
      }),
      (J.prototype.enableDraggables = function () {
        this.draggables.forEach(function (e) {
          e.enable();
        });
      }),
      (J.prototype.showAllSolutions = function (e) {
        var t;
        ((this.points = 0),
          (this.rawPoints = 0),
          this.blankIsCorrect && ((this.points = 1), (this.rawPoints = 1)),
          !e &&
            this.options.behaviour.showScorePoints &&
            !this.options.behaviour.singlePoint &&
            this.options.behaviour.applyPenalties &&
            (t = new H5P.Question.ScorePoints()));
        for (var i = 0; i < this.draggables.length; i++) {
          var n = this.draggables[i];
          void 0 !== n &&
            (e || n.disable(),
            (this.points += n.results(e, this.correctDZs[i], t)),
            (this.rawPoints += n.rawPoints));
        }
        (this.points < 0 && (this.points = 0),
          !this.answered && this.blankIsCorrect && (this.points = this.weight),
          this.options.behaviour.singlePoint &&
            (this.points = this.points === this.calculateMaxScore() ? 1 : 0),
          e || this.hideButton("check-answer"),
          this.options.behaviour.enableRetry &&
            !e &&
            this.showButton("try-again"),
          !this.hasButton("check-answer") ||
            (!1 !== this.options.behaviour.enableRetry &&
              this.points !== this.getMaxScore()) ||
            this.hideButton("try-again"));
      }),
      (J.prototype.showSolutions = function () {
        (this.showAllSolutions(),
          this.showScore(),
          this.hideButton("check-answer"),
          this.hideButton("try-again"),
          this.disableDraggables());
      }),
      (J.prototype.resetTask = function () {
        if (
          ((this.points = 0),
          (this.rawPoints = 0),
          (this.answered = !1),
          this.$container)
        )
          (this.dropZones.forEach(function (e) {
            e.reset();
          }),
            this.enableDraggables(),
            this.draggables.forEach(function (e) {
              e.resetPosition();
            }));
        else
          for (var e = 0; e < this.draggables.length; e++)
            if (void 0 !== this.draggables[e])
              for (var t = 0; t < this.draggables[e].elements.length; t++)
                void 0 !== this.draggables[e].elements[t] &&
                  ((this.draggables[e].elements[t].dropZone = void 0),
                  (this.draggables[e].elements[t].position = void 0));
        (this.showButton("check-answer"),
          this.hideButton("try-again"),
          this.removeFeedback(),
          this.setExplanation());
      }),
      (J.prototype.calculateMaxScore = function () {
        var e = 0;
        if (this.blankIsCorrect) return 1;
        for (
          var t = this.options.question.task.elements, i = 0;
          i < t.length;
          i++
        ) {
          var n = this.correctDZs[i];
          void 0 !== n && n.length && (t[i].multiple ? (e += n.length) : e++);
        }
        return e;
      }),
      (J.prototype.getMaxScore = function () {
        return this.options.behaviour.singlePoint
          ? this.weight
          : this.calculateMaxScore();
      }),
      (J.prototype.getScore = function () {
        this.showAllSolutions(!0);
        var e =
          this.options.behaviour.applyPenalties ||
          this.options.behaviour.singlePoint
            ? this.points
            : this.rawPoints;
        return (delete this.points, delete this.rawPoints, e);
      }),
      (J.prototype.getAnswerGiven = function () {
        return this.answered || this.blankIsCorrect;
      }),
      (J.prototype.showScore = function () {
        var e = this.calculateMaxScore();
        this.options.behaviour.singlePoint && (e = 1);
        var t =
            this.options.behaviour.applyPenalties ||
            this.options.behaviour.singlePoint
              ? this.points
              : this.rawPoints,
          i = H5P.Question.determineOverallFeedback(
            this.options.overallFeedback,
            t / e,
          )
            .replace("@score", t)
            .replace("@total", e),
          n =
            !(
              !this.options.behaviour.enableScoreExplanation ||
              !this.options.behaviour.applyPenalties
            ) && this.options.scoreExplanation;
        this.setFeedback(
          i,
          t,
          e,
          this.options.scoreBarLabel,
          n,
          void 0,
          this.options.scoreExplanationButtonLabel,
        );
      }),
      (J.prototype.getCurrentState = function () {
        for (var e = { answers: [] }, t = 0; t < this.draggables.length; t++) {
          var i = this.draggables[t];
          if (void 0 !== i) {
            for (var n = [], r = 0; r < i.elements.length; r++) {
              var o = i.elements[r];
              void 0 !== o &&
                void 0 !== o.dropZone &&
                n.push({
                  x: Number(o.position.left.replace("%", "")),
                  y: Number(o.position.top.replace("%", "")),
                  dz: o.dropZone,
                });
            }
            n.length && (e.answers[t] = n);
          }
        }
        return e;
      }),
      (J.prototype.getTitle = function () {
        return H5P.createTitle(
          this.contentData &&
            this.contentData.metadata &&
            this.contentData.metadata.title
            ? this.contentData.metadata.title
            : "Drag and drop",
        );
      }));
    var ee = function (r, o, s) {
      var a,
        l = {
          drag: new _([new L(), new j(), new S()]),
          drop: new _([new L(), new j(), new M()]),
        };
      (l.drag.useNegativeTabIndex(), l.drop.useNegativeTabIndex());
      function c() {
        (a.draggable.trigger("dragend"),
          a.element.$.removeClass("h5p-draggable-hover"),
          F.setElementOpacity(a.element.$, a.draggable.backgroundOpacity),
          -1 !== l.drop.elements.indexOf(s) &&
            (l.drop.removeElement(s), (s.style.display = "none")));
        for (var e, t = 0; t < o.length; t++) {
          var i = o[t];
          (i.dehighlight(),
            -1 !== l.drop.elements.indexOf(i.$dropZone[0]) &&
              l.drop.removeElement(i.$dropZone[0]));
        }
        (a.element.$.is(":visible")
          ? a.element.$.focus()
          : ((e = a.draggable.elements[a.draggable.elements.length - 1].$),
            l.drag.setTabbable(e[0]),
            e.focus()),
          (a = void 0));
      }
      return (
        l.drag.on("select", function (e) {
          var t,
            e = F.elementToDraggable(r, e.element);
          if (a) c();
          else {
            ((a = e).element.$.addClass("h5p-draggable-hover"),
              F.setElementOpacity(a.element.$, a.draggable.backgroundOpacity),
              a.draggable.trigger(
                "dragstart",
                a.draggable.mustCopyElement(a.element) ? "copy" : "move",
              ),
              l.drop.addElement(s),
              (s.style.display = "block"),
              (s.style.left = a.draggable.x + "%"),
              (s.style.top = a.draggable.y + "%"),
              (s.style.width = a.draggable.width + "em"),
              (s.style.height = a.draggable.height + "em"));
            for (var i = 0; i < o.length; i++) {
              var n = o[i];
              n.accepts(a.draggable, r) &&
                (n.highlight(),
                l.drop.addElement(n.$dropZone[0]),
                (t && a.element.dropZone !== n.id) || (t = n.$dropZone));
            }
            t && (l.drop.setTabbable(t[0]), t.focus());
          }
        }),
        l.drop.on("select", function (e) {
          if (a) {
            if (e.element === s)
              return (
                void 0 !== a.element.dropZone && a.element.reset(),
                void (
                  void 0 !== a &&
                  (a.element.$.css({
                    left: a.draggable.x + "%",
                    top: a.draggable.y + "%",
                    width: a.draggable.width + "em",
                    height: a.draggable.height + "em",
                  }),
                  a.draggable.updatePlacement(a.element),
                  a.element.$[0].setAttribute("aria-grabbed", "false"),
                  c())
                )
              );
            e = F.elementToDropZone(o, e.element);
            (a.draggable.mustCopyElement(a.element) && a.element.clone(),
              a.draggable.addToDropZone(a.index, a.element, e.id),
              a.element.$.css({ left: e.x + "%", top: e.y + "%" }),
              -1 === e.getIndexOf(a.element.$) &&
                e.alignables.push(a.element.$),
              e.autoAlign(),
              a.element.$[0].setAttribute("aria-grabbed", "false"),
              c());
          }
        }),
        l
      );
    };
    H5P.DragQuestion = J;
  })() /*!@license H5P.InteractiveBook-1.7/dist/h5p-interactive-book.js by Joubel licensed under MIT*/,
  (() => {
    var i = {
        9552: (e) => {
          "use strict";
          e.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: (e, t, i) => {
          var n,
            s = i(9552),
            r = i(521),
            a = Object.hasOwnProperty,
            o = Object.create(null);
          for (n in s) a.call(s, n) && (o[s[n]] = n);
          var l = (e.exports = { to: {}, get: {} });
          function c(e, t, i) {
            return Math.min(Math.max(t, e), i);
          }
          function u(e) {
            e = Math.round(e).toString(16).toUpperCase();
            return e.length < 2 ? "0" + e : e;
          }
          ((l.get = function (e) {
            var t, i;
            switch (e.substring(0, 3).toLowerCase()) {
              case "hsl":
                ((t = l.get.hsl(e)), (i = "hsl"));
                break;
              case "hwb":
                ((t = l.get.hwb(e)), (i = "hwb"));
                break;
              default:
                ((t = l.get.rgb(e)), (i = "rgb"));
            }
            return t ? { model: i, value: t } : null;
          }),
            (l.get.rgb = function (e) {
              if (!e) return null;
              var t,
                i,
                n,
                r = [0, 0, 0, 1];
              if ((t = e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i))) {
                for (n = t[2], t = t[1], i = 0; i < 3; i++) {
                  var o = 2 * i;
                  r[i] = parseInt(t.slice(o, 2 + o), 16);
                }
                n && (r[3] = parseInt(n, 16) / 255);
              } else if ((t = e.match(/^#([a-f0-9]{3,4})$/i))) {
                for (n = (t = t[1])[3], i = 0; i < 3; i++)
                  r[i] = parseInt(t[i] + t[i], 16);
                n && (r[3] = parseInt(n + n, 16) / 255);
              } else if (
                (t = e.match(
                  /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
                ))
              ) {
                for (i = 0; i < 3; i++) r[i] = parseInt(t[i + 1], 0);
                t[4] &&
                  (t[5]
                    ? (r[3] = 0.01 * parseFloat(t[4]))
                    : (r[3] = parseFloat(t[4])));
              } else {
                if (
                  !(t = e.match(
                    /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
                  ))
                )
                  return (t = e.match(/^(\w+)$/))
                    ? "transparent" === t[1]
                      ? [0, 0, 0, 0]
                      : a.call(s, t[1])
                        ? (((r = s[t[1]])[3] = 1), r)
                        : null
                    : null;
                for (i = 0; i < 3; i++)
                  r[i] = Math.round(2.55 * parseFloat(t[i + 1]));
                t[4] &&
                  (t[5]
                    ? (r[3] = 0.01 * parseFloat(t[4]))
                    : (r[3] = parseFloat(t[4])));
              }
              for (i = 0; i < 3; i++) r[i] = c(r[i], 0, 255);
              return ((r[3] = c(r[3], 0, 1)), r);
            }),
            (l.get.hsl = function (e) {
              if (!e) return null;
              var t = e.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 (t) {
                e = parseFloat(t[4]);
                return [
                  ((parseFloat(t[1]) % 360) + 360) % 360,
                  c(parseFloat(t[2]), 0, 100),
                  c(parseFloat(t[3]), 0, 100),
                  c(isNaN(e) ? 1 : e, 0, 1),
                ];
              }
              return null;
            }),
            (l.get.hwb = function (e) {
              if (!e) return null;
              var t = e.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 (t) {
                e = parseFloat(t[4]);
                return [
                  ((parseFloat(t[1]) % 360) + 360) % 360,
                  c(parseFloat(t[2]), 0, 100),
                  c(parseFloat(t[3]), 0, 100),
                  c(isNaN(e) ? 1 : e, 0, 1),
                ];
              }
              return null;
            }),
            (l.to.hex = function () {
              var e = r(arguments);
              return (
                "#" +
                u(e[0]) +
                u(e[1]) +
                u(e[2]) +
                (e[3] < 1 ? u(Math.round(255 * e[3])) : "")
              );
            }),
            (l.to.rgb = function () {
              var e = r(arguments);
              return e.length < 4 || 1 === e[3]
                ? "rgb(" +
                    Math.round(e[0]) +
                    ", " +
                    Math.round(e[1]) +
                    ", " +
                    Math.round(e[2]) +
                    ")"
                : "rgba(" +
                    Math.round(e[0]) +
                    ", " +
                    Math.round(e[1]) +
                    ", " +
                    Math.round(e[2]) +
                    ", " +
                    e[3] +
                    ")";
            }),
            (l.to.rgb.percent = function () {
              var e = r(arguments),
                t = Math.round((e[0] / 255) * 100),
                i = Math.round((e[1] / 255) * 100),
                n = Math.round((e[2] / 255) * 100);
              return e.length < 4 || 1 === e[3]
                ? "rgb(" + t + "%, " + i + "%, " + n + "%)"
                : "rgba(" + t + "%, " + i + "%, " + n + "%, " + e[3] + ")";
            }),
            (l.to.hsl = function () {
              var e = r(arguments);
              return e.length < 4 || 1 === e[3]
                ? "hsl(" + e[0] + ", " + e[1] + "%, " + e[2] + "%)"
                : "hsla(" +
                    e[0] +
                    ", " +
                    e[1] +
                    "%, " +
                    e[2] +
                    "%, " +
                    e[3] +
                    ")";
            }),
            (l.to.hwb = function () {
              var e = r(arguments),
                t = "";
              return (
                4 <= e.length && 1 !== e[3] && (t = ", " + e[3]),
                "hwb(" + e[0] + ", " + e[1] + "%, " + e[2] + "%" + t + ")"
              );
            }),
            (l.to.keyword = function (e) {
              return o[e.slice(0, 3)];
            }));
        },
        7124: (i, n, e) => {
          const r = e(6855),
            o = e(7747),
            s = ["keyword", "gray", "hex"],
            a = {};
          for (const i of Object.keys(o))
            a[[...o[i].labels].sort().join("")] = i;
          const l = {};
          function c(e, t) {
            if (!(this instanceof c)) return new c(e, t);
            if ((t = t && t in s ? null : t) && !(t in o))
              throw new Error("Unknown model: " + t);
            let i, n;
            if (null == e)
              ((this.model = "rgb"),
                (this.color = [0, 0, 0]),
                (this.valpha = 1));
            else if (e instanceof c)
              ((this.model = e.model),
                (this.color = [...e.color]),
                (this.valpha = e.valpha));
            else if ("string" == typeof e) {
              const t = r.get(e);
              if (null === t)
                throw new Error("Unable to parse color from string: " + e);
              ((this.model = t.model),
                (n = o[this.model].channels),
                (this.color = t.value.slice(0, n)),
                (this.valpha = "number" == typeof t.value[n] ? t.value[n] : 1));
            } else if (0 < e.length) {
              ((this.model = t || "rgb"), (n = o[this.model].channels));
              const i = Array.prototype.slice.call(e, 0, n);
              ((this.color = h(i, n)),
                (this.valpha = "number" == typeof e[n] ? e[n] : 1));
            } else if ("number" == typeof e)
              ((this.model = "rgb"),
                (this.color = [(e >> 16) & 255, (e >> 8) & 255, 255 & e]),
                (this.valpha = 1));
            else {
              this.valpha = 1;
              const t = Object.keys(e);
              "alpha" in e &&
                (t.splice(t.indexOf("alpha"), 1),
                (this.valpha = "number" == typeof e.alpha ? e.alpha : 0));
              const r = t.sort().join("");
              if (!(r in a))
                throw new Error(
                  "Unable to parse color from object: " + JSON.stringify(e),
                );
              this.model = a[r];
              const s = o[this.model]["labels"],
                l = [];
              for (i = 0; i < s.length; i++) l.push(e[s[i]]);
              this.color = h(l);
            }
            if (l[this.model])
              for (n = o[this.model].channels, i = 0; i < n; i++) {
                const e = l[this.model][i];
                e && (this.color[i] = e(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(e) {
              let t = this.model in r.to ? this : this.rgb();
              t = t.round("number" == typeof e ? e : 1);
              e = 1 === t.valpha ? t.color : [...t.color, this.valpha];
              return r.to[t.model](e);
            },
            percentString(e) {
              ((e = this.rgb().round("number" == typeof e ? e : 1)),
                (e = 1 === e.valpha ? e.color : [...e.color, this.valpha]));
              return r.to.rgb.percent(e);
            },
            array() {
              return 1 === this.valpha
                ? [...this.color]
                : [...this.color, this.valpha];
            },
            object() {
              const t = {},
                i = o[this.model]["channels"],
                n = o[this.model]["labels"];
              for (let e = 0; e < i; e++) t[n[e]] = this.color[e];
              return (1 !== this.valpha && (t.alpha = this.valpha), t);
            },
            unitArray() {
              const e = this.rgb().color;
              return (
                (e[0] /= 255),
                (e[1] /= 255),
                (e[2] /= 255),
                1 !== this.valpha && e.push(this.valpha),
                e
              );
            },
            unitObject() {
              const e = this.rgb().object();
              return (
                (e.r /= 255),
                (e.g /= 255),
                (e.b /= 255),
                1 !== this.valpha && (e.alpha = this.valpha),
                e
              );
            },
            round(e) {
              return (
                (e = Math.max(e || 0, 0)),
                new c(
                  [
                    ...this.color.map(
                      ((t = e),
                      function (e) {
                        return Number(e.toFixed(t));
                      }),
                    ),
                    this.valpha,
                  ],
                  this.model,
                )
              );
              var t;
            },
            alpha(e) {
              return void 0 !== e
                ? new c(
                    [...this.color, Math.max(0, Math.min(1, e))],
                    this.model,
                  )
                : this.valpha;
            },
            red: t("rgb", 0, u(255)),
            green: t("rgb", 1, u(255)),
            blue: t("rgb", 2, u(255)),
            hue: t(
              ["hsl", "hsv", "hsl", "hwb", "hcg"],
              0,
              (e) => ((e % 360) + 360) % 360,
            ),
            saturationl: t("hsl", 1, u(100)),
            lightness: t("hsl", 2, u(100)),
            saturationv: t("hsv", 1, u(100)),
            value: t("hsv", 2, u(100)),
            chroma: t("hcg", 1, u(100)),
            gray: t("hcg", 2, u(100)),
            white: t("hwb", 1, u(100)),
            wblack: t("hwb", 2, u(100)),
            cyan: t("cmyk", 0, u(100)),
            magenta: t("cmyk", 1, u(100)),
            yellow: t("cmyk", 2, u(100)),
            black: t("cmyk", 3, u(100)),
            x: t("xyz", 0, u(95.047)),
            y: t("xyz", 1, u(100)),
            z: t("xyz", 2, u(108.833)),
            l: t("lab", 0, u(100)),
            a: t("lab", 1),
            b: t("lab", 2),
            keyword(e) {
              return void 0 !== e
                ? new c(e)
                : o[this.model].keyword(this.color);
            },
            hex(e) {
              return void 0 !== e
                ? new c(e)
                : r.to.hex(this.rgb().round().color);
            },
            hexa(e) {
              if (void 0 !== e) return new c(e);
              e = this.rgb().round().color;
              let t = Math.round(255 * this.valpha)
                .toString(16)
                .toUpperCase();
              return (1 === t.length && (t = "0" + t), r.to.hex(e) + t);
            },
            rgbNumber() {
              var e = this.rgb().color;
              return ((255 & e[0]) << 16) | ((255 & e[1]) << 8) | (255 & e[2]);
            },
            luminosity() {
              const e = this.rgb().color,
                t = [];
              for (var [i, n] of e.entries()) {
                const e = n / 255;
                t[i] = e <= 0.04045 ? e / 12.92 : ((0.055 + e) / 1.055) ** 2.4;
              }
              return 0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2];
            },
            contrast(e) {
              var t = this.luminosity(),
                e = e.luminosity();
              return e < t ? (t + 0.05) / (e + 0.05) : (e + 0.05) / (t + 0.05);
            },
            level(e) {
              e = this.contrast(e);
              return 7 <= e ? "AAA" : 4.5 <= e ? "AA" : "";
            },
            isDark() {
              var e = this.rgb().color;
              return (2126 * e[0] + 7152 * e[1] + 722 * e[2]) / 1e4 < 128;
            },
            isLight() {
              return !this.isDark();
            },
            negate() {
              const t = this.rgb();
              for (let e = 0; e < 3; e++) t.color[e] = 255 - t.color[e];
              return t;
            },
            lighten(e) {
              const t = this.hsl();
              return ((t.color[2] += t.color[2] * e), t);
            },
            darken(e) {
              const t = this.hsl();
              return ((t.color[2] -= t.color[2] * e), t);
            },
            saturate(e) {
              const t = this.hsl();
              return ((t.color[1] += t.color[1] * e), t);
            },
            desaturate(e) {
              const t = this.hsl();
              return ((t.color[1] -= t.color[1] * e), t);
            },
            whiten(e) {
              const t = this.hwb();
              return ((t.color[1] += t.color[1] * e), t);
            },
            blacken(e) {
              const t = this.hwb();
              return ((t.color[2] += t.color[2] * e), t);
            },
            grayscale() {
              var e = this.rgb().color,
                e = 0.3 * e[0] + 0.59 * e[1] + 0.11 * e[2];
              return c.rgb(e, e, e);
            },
            fade(e) {
              return this.alpha(this.valpha - this.valpha * e);
            },
            opaquer(e) {
              return this.alpha(this.valpha + this.valpha * e);
            },
            rotate(e) {
              const t = this.hsl();
              let i = t.color[0];
              return (
                (i = (i + e) % 360),
                (i = i < 0 ? 360 + i : i),
                (t.color[0] = i),
                t
              );
            },
            mix(e, t) {
              if (!e || !e.rgb)
                throw new Error(
                  'Argument to "mix" was not a Color instance, but rather an instance of ' +
                    typeof e,
                );
              const i = e.rgb(),
                n = this.rgb(),
                r = void 0 === t ? 0.5 : t,
                o = 2 * r - 1,
                s = i.alpha() - n.alpha(),
                a = (1 + (o * s == -1 ? o : (o + s) / (1 + o * 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() * r + n.alpha() * (1 - r),
              );
            },
          };
          for (const i of Object.keys(o))
            if (!s.includes(i)) {
              const n = o[i]["channels"];
              ((c.prototype[i] = function (...e) {
                return this.model === i
                  ? new c(this)
                  : 0 < e.length
                    ? new c(e, i)
                    : new c(
                        [
                          ...((e = o[this.model][i].raw(this.color)),
                          Array.isArray(e) ? e : [e]),
                          this.valpha,
                        ],
                        i,
                      );
              }),
                (c[i] = function (...e) {
                  let t = e[0];
                  return ("number" == typeof t && (t = h(e, n)), new c(t, i));
                }));
            }
          function t(i, n, r) {
            for (const e of (i = Array.isArray(i) ? i : [i]))
              (l[e] || (l[e] = []))[n] = r;
            return (
              (i = i[0]),
              function (e) {
                let t;
                return (
                  void 0 !== e
                    ? (r && (e = r(e)), (t = this[i]()), (t.color[n] = e))
                    : ((t = this[i]().color[n]), r && (t = r(t))),
                  t
                );
              }
            );
          }
          function u(t) {
            return function (e) {
              return Math.max(0, Math.min(t, e));
            };
          }
          function h(t, i) {
            for (let e = 0; e < i; e++) "number" != typeof t[e] && (t[e] = 0);
            return t;
          }
          i.exports = c;
        },
        5043: (e, t, i) => {
          const s = i(1086),
            a = {};
          for (const e of Object.keys(s)) a[s[e]] = e;
          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"] },
          };
          e.exports = l;
          for (const e of Object.keys(l)) {
            if (!("channels" in l[e]))
              throw new Error("missing channels property: " + e);
            if (!("labels" in l[e]))
              throw new Error("missing channel labels property: " + e);
            if (l[e].labels.length !== l[e].channels)
              throw new Error("channel and label counts mismatch: " + e);
            const { channels: t, labels: i } = l[e];
            (delete l[e].channels,
              delete l[e].labels,
              Object.defineProperty(l[e], "channels", { value: t }),
              Object.defineProperty(l[e], "labels", { value: i }));
          }
          ((l.rgb.hsl = function (e) {
            var t = e[0] / 255,
              i = e[1] / 255,
              n = e[2] / 255,
              r = Math.min(t, i, n),
              o = Math.max(t, i, n),
              e = o - r;
            let s;
            (o === r
              ? (s = 0)
              : t === o
                ? (s = (i - n) / e)
                : i === o
                  ? (s = 2 + (n - t) / e)
                  : n === o && (s = 4 + (t - i) / e),
              (s = Math.min(60 * s, 360)),
              s < 0 && (s += 360));
            i = (r + o) / 2;
            return [
              s,
              100 * (o === r ? 0 : i <= 0.5 ? e / (o + r) : e / (2 - o - r)),
              100 * i,
            ];
          }),
            (l.rgb.hsv = function (e) {
              let t, i, n, r, o;
              function s(e) {
                return (u - e) / 6 / h + 0.5;
              }
              const a = e[0] / 255,
                l = e[1] / 255,
                c = e[2] / 255,
                u = Math.max(a, l, c),
                h = u - Math.min(a, l, c);
              return (
                0 == h
                  ? ((r = 0), (o = 0))
                  : ((o = h / u),
                    (t = s(a)),
                    (i = s(l)),
                    (n = s(c)),
                    a === u
                      ? (r = n - i)
                      : l === u
                        ? (r = 1 / 3 + t - n)
                        : c === u && (r = 2 / 3 + i - t),
                    r < 0 ? (r += 1) : 1 < r && --r),
                [360 * r, 100 * o, 100 * u]
              );
            }),
            (l.rgb.hwb = function (e) {
              var t = e[0],
                i = e[1],
                n = e[2];
              return [
                l.rgb.hsl(e)[0],
                100 * ((1 / 255) * Math.min(t, Math.min(i, n))),
                100 * (n = 1 - (1 / 255) * Math.max(t, Math.max(i, n))),
              ];
            }),
            (l.rgb.cmyk = function (e) {
              var t = e[0] / 255,
                i = e[1] / 255,
                n = e[2] / 255,
                e = Math.min(1 - t, 1 - i, 1 - n);
              return [
                100 * ((1 - t - e) / (1 - e) || 0),
                100 * ((1 - i - e) / (1 - e) || 0),
                100 * ((1 - n - e) / (1 - e) || 0),
                100 * e,
              ];
            }),
            (l.rgb.keyword = function (e) {
              const t = a[e];
              if (t) return t;
              let i,
                n = 1 / 0;
              for (const t of Object.keys(s)) {
                const a = s[t],
                  o =
                    ((r = a),
                    (e[0] - r[0]) ** 2 +
                      (e[1] - r[1]) ** 2 +
                      (e[2] - r[2]) ** 2);
                o < n && ((n = o), (i = t));
              }
              var r;
              return i;
            }),
            (l.keyword.rgb = function (e) {
              return s[e];
            }),
            (l.rgb.xyz = function (e) {
              let t = e[0] / 255,
                i = e[1] / 255,
                n = e[2] / 255;
              return (
                (t = 0.04045 < t ? ((t + 0.055) / 1.055) ** 2.4 : t / 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 * t + 0.3576 * i + 0.1805 * n),
                  100 * (0.2126 * t + 0.7152 * i + 0.0722 * n),
                  100 * (0.0193 * t + 0.1192 * i + 0.9505 * n),
                ]
              );
            }),
            (l.rgb.lab = function (e) {
              e = l.rgb.xyz(e);
              let t = e[0],
                i = e[1],
                n = e[2];
              return (
                (t /= 95.047),
                (i /= 100),
                (n /= 108.883),
                (t = 0.008856 < t ? t ** (1 / 3) : 7.787 * t + 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 * (t - i), 200 * (i - n)]
              );
            }),
            (l.hsl.rgb = function (e) {
              var t = e[0] / 360,
                i = e[1] / 100,
                e = e[2] / 100;
              let n, r, o;
              if (0 == i) return ((o = 255 * e), [o, o, o]);
              const s = 2 * e - (n = e < 0.5 ? e * (1 + i) : e + i - e * i),
                a = [0, 0, 0];
              for (let e = 0; e < 3; e++)
                ((r = t + (1 / 3) * -(e - 1)),
                  r < 0 && r++,
                  1 < r && r--,
                  (o =
                    6 * r < 1
                      ? s + 6 * (n - s) * r
                      : 2 * r < 1
                        ? n
                        : 3 * r < 2
                          ? s + (n - s) * (2 / 3 - r) * 6
                          : s),
                  (a[e] = 255 * o));
              return a;
            }),
            (l.hsl.hsv = function (e) {
              var t = e[0],
                i = e[1] / 100,
                n = e[2] / 100,
                r = i,
                e = Math.max(n, 0.01);
              return (
                (i *= (n *= 2) <= 1 ? n : 2 - n),
                (r *= e <= 1 ? e : 2 - e),
                [
                  t,
                  100 * (0 == n ? (2 * r) / (e + r) : (2 * i) / (n + i)),
                  ((n + i) / 2) * 100,
                ]
              );
            }),
            (l.hsv.rgb = function (e) {
              var t = e[0] / 60,
                i = e[1] / 100,
                n = e[2] / 100,
                e = Math.floor(t) % 6,
                t = t - Math.floor(t),
                r = 255 * n * (1 - i),
                o = 255 * n * (1 - i * t),
                s = 255 * n * (1 - i * (1 - t));
              switch (((n *= 255), e)) {
                case 0:
                  return [n, s, r];
                case 1:
                  return [o, n, r];
                case 2:
                  return [r, n, s];
                case 3:
                  return [r, o, n];
                case 4:
                  return [s, r, n];
                case 5:
                  return [n, r, o];
              }
            }),
            (l.hsv.hsl = function (e) {
              var t = e[0],
                i = e[1] / 100,
                n = e[2] / 100,
                r = Math.max(n, 0.01),
                e = (2 - i) * n,
                n = (2 - i) * r,
                r = i * r;
              return [
                t,
                100 * ((r /= n <= 1 ? n : 2 - n) || 0),
                100 * (e /= 2),
              ];
            }),
            (l.hwb.rgb = function (e) {
              var t = e[0] / 360;
              let i = e[1] / 100,
                n = e[2] / 100;
              e = i + n;
              let r;
              1 < e && ((i /= e), (n /= e));
              var e = Math.floor(6 * t),
                o = 1 - n;
              ((r = 6 * t - e), 0 != (1 & e) && (r = 1 - r));
              var s = i + r * (o - i);
              let a, l, c;
              switch (e) {
                default:
                case 6:
                case 0:
                  ((a = o), (l = s), (c = i));
                  break;
                case 1:
                  ((a = s), (l = o), (c = i));
                  break;
                case 2:
                  ((a = i), (l = o), (c = s));
                  break;
                case 3:
                  ((a = i), (l = s), (c = o));
                  break;
                case 4:
                  ((a = s), (l = i), (c = o));
                  break;
                case 5:
                  ((a = o), (l = i), (c = s));
              }
              return [255 * a, 255 * l, 255 * c];
            }),
            (l.cmyk.rgb = function (e) {
              var t = e[0] / 100,
                i = e[1] / 100,
                n = e[2] / 100,
                e = e[3] / 100;
              return [
                255 * (1 - Math.min(1, t * (1 - e) + e)),
                255 * (1 - Math.min(1, i * (1 - e) + e)),
                255 * (1 - Math.min(1, n * (1 - e) + e)),
              ];
            }),
            (l.xyz.rgb = function (e) {
              var t = e[0] / 100,
                i = e[1] / 100,
                e = e[2] / 100;
              let n, r, o;
              return (
                (n = 3.2406 * t + -1.5372 * i + -0.4986 * e),
                (r = -0.9689 * t + 1.8758 * i + 0.0415 * e),
                (o = 0.0557 * t + -0.204 * i + 1.057 * e),
                (n =
                  0.0031308 < n ? 1.055 * n ** (1 / 2.4) - 0.055 : 12.92 * n),
                (r =
                  0.0031308 < r ? 1.055 * r ** (1 / 2.4) - 0.055 : 12.92 * r),
                (o =
                  0.0031308 < o ? 1.055 * o ** (1 / 2.4) - 0.055 : 12.92 * o),
                (n = Math.min(Math.max(0, n), 1)),
                (r = Math.min(Math.max(0, r), 1)),
                (o = Math.min(Math.max(0, o), 1)),
                [255 * n, 255 * r, 255 * o]
              );
            }),
            (l.xyz.lab = function (e) {
              let t = e[0],
                i = e[1],
                n = e[2];
              return (
                (t /= 95.047),
                (i /= 100),
                (n /= 108.883),
                (t = 0.008856 < t ? t ** (1 / 3) : 7.787 * t + 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 * (t - i), 200 * (i - n)]
              );
            }),
            (l.lab.xyz = function (e) {
              let t, i, n;
              ((i = (e[0] + 16) / 116),
                (t = e[1] / 500 + i),
                (n = i - e[2] / 200));
              var r = i ** 3,
                o = t ** 3,
                e = n ** 3;
              return (
                (i = 0.008856 < r ? r : (i - 16 / 116) / 7.787),
                (t = 0.008856 < o ? o : (t - 16 / 116) / 7.787),
                (n = 0.008856 < e ? e : (n - 16 / 116) / 7.787),
                (t *= 95.047),
                (i *= 100),
                (n *= 108.883),
                [t, i, n]
              );
            }),
            (l.lab.lch = function (e) {
              var t = e[0],
                i = e[1],
                e = e[2];
              let n;
              return (
                (n = (360 * Math.atan2(e, i)) / 2 / Math.PI),
                n < 0 && (n += 360),
                [t, Math.sqrt(i * i + e * e), n]
              );
            }),
            (l.lch.lab = function (e) {
              var t = e[0],
                i = e[1],
                e = (e[2] / 360) * 2 * Math.PI;
              return [t, i * Math.cos(e), i * Math.sin(e)];
            }),
            (l.rgb.ansi16 = function (e, t = null) {
              var [i, n, r] = e,
                t = null === t ? l.rgb.hsv(e)[2] : t;
              if (0 === (t = Math.round(t / 50))) return 30;
              let o =
                30 +
                ((Math.round(r / 255) << 2) |
                  (Math.round(n / 255) << 1) |
                  Math.round(i / 255));
              return (2 === t && (o += 60), o);
            }),
            (l.hsv.ansi16 = function (e) {
              return l.rgb.ansi16(l.hsv.rgb(e), e[2]);
            }),
            (l.rgb.ansi256 = function (e) {
              var t = e[0],
                i = e[1],
                e = e[2];
              return t === i && i === e
                ? t < 8
                  ? 16
                  : 248 < t
                    ? 231
                    : Math.round(((t - 8) / 247) * 24) + 232
                : 16 +
                    36 * Math.round((t / 255) * 5) +
                    6 * Math.round((i / 255) * 5) +
                    Math.round((e / 255) * 5);
            }),
            (l.ansi16.rgb = function (e) {
              let t = e % 10;
              if (0 === t || 7 === t)
                return (
                  50 < e && (t += 3.5),
                  (t = (t / 10.5) * 255),
                  [t, t, t]
                );
              e = 0.5 * (1 + ~~(50 < e));
              return [
                (1 & t) * e * 255,
                ((t >> 1) & 1) * e * 255,
                ((t >> 2) & 1) * e * 255,
              ];
            }),
            (l.ansi256.rgb = function (e) {
              if (232 <= e) {
                const t = 10 * (e - 232) + 8;
                return [t, t, t];
              }
              let t;
              return (
                (e -= 16),
                [
                  (Math.floor(e / 36) / 5) * 255,
                  (Math.floor((t = e % 36) / 6) / 5) * 255,
                  ((t % 6) / 5) * 255,
                ]
              );
            }),
            (l.rgb.hex = function (e) {
              e = (
                ((255 & Math.round(e[0])) << 16) +
                ((255 & Math.round(e[1])) << 8) +
                (255 & Math.round(e[2]))
              )
                .toString(16)
                .toUpperCase();
              return "000000".substring(e.length) + e;
            }),
            (l.hex.rgb = function (e) {
              e = e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
              if (!e) return [0, 0, 0];
              let t = e[0];
              3 === e[0].length &&
                (t = t
                  .split("")
                  .map((e) => e + e)
                  .join(""));
              e = parseInt(t, 16);
              return [(e >> 16) & 255, (e >> 8) & 255, 255 & e];
            }),
            (l.rgb.hcg = function (e) {
              var t = e[0] / 255,
                i = e[1] / 255,
                n = e[2] / 255,
                r = Math.max(Math.max(t, i), n),
                o = Math.min(Math.min(t, i), n),
                e = r - o,
                i =
                  e <= 0
                    ? 0
                    : r === t
                      ? ((i - n) / e) % 6
                      : r === i
                        ? 2 + (n - t) / e
                        : 4 + (t - i) / e;
              return (
                (i /= 6),
                [360 * (i %= 1), 100 * e, 100 * (e < 1 ? o / (1 - e) : 0)]
              );
            }),
            (l.hsl.hcg = function (e) {
              var t = e[1] / 100,
                i = e[2] / 100,
                t = i < 0.5 ? 2 * t * i : 2 * t * (1 - i);
              let n = t < 1 ? (i - 0.5 * t) / (1 - t) : 0;
              return [e[0], 100 * t, 100 * n];
            }),
            (l.hsv.hcg = function (e) {
              var t = e[1] / 100,
                i = e[2] / 100,
                t = t * i;
              let n = t < 1 ? (i - t) / (1 - t) : 0;
              return [e[0], 100 * t, 100 * n];
            }),
            (l.hcg.rgb = function (e) {
              var t = e[0] / 360,
                i = e[1] / 100,
                e = e[2] / 100;
              if (0 == i) return [255 * e, 255 * e, 255 * e];
              const n = [0, 0, 0],
                r = (t % 1) * 6,
                o = r % 1,
                s = 1 - o;
              switch (Math.floor(r)) {
                case 0:
                  ((n[0] = 1), (n[1] = o), (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] = o));
                  break;
                case 3:
                  ((n[0] = 0), (n[1] = s), (n[2] = 1));
                  break;
                case 4:
                  ((n[0] = o), (n[1] = 0), (n[2] = 1));
                  break;
                default:
                  ((n[0] = 1), (n[1] = 0), (n[2] = s));
              }
              return (
                (e = (1 - i) * e),
                [
                  255 * (i * n[0] + e),
                  255 * (i * n[1] + e),
                  255 * (i * n[2] + e),
                ]
              );
            }),
            (l.hcg.hsv = function (e) {
              var t = e[1] / 100,
                i = t + (e[2] / 100) * (1 - t);
              let n = 0 < i ? t / i : 0;
              return [e[0], 100 * n, 100 * i];
            }),
            (l.hcg.hsl = function (e) {
              var t = e[1] / 100,
                i = (e[2] / 100) * (1 - t) + 0.5 * t;
              let n = 0;
              return (
                0 < i && i < 0.5
                  ? (n = t / (2 * i))
                  : 0.5 <= i && i < 1 && (n = t / (2 * (1 - i))),
                [e[0], 100 * n, 100 * i]
              );
            }),
            (l.hcg.hwb = function (e) {
              var t = e[1] / 100,
                i = t + (e[2] / 100) * (1 - t);
              return [e[0], 100 * (i - t), 100 * (1 - i)];
            }),
            (l.hwb.hcg = function (e) {
              var t = e[1] / 100,
                i = 1 - e[2] / 100,
                t = i - t;
              let n = t < 1 ? (i - t) / (1 - t) : 0;
              return [e[0], 100 * t, 100 * n];
            }),
            (l.apple.rgb = function (e) {
              return [
                (e[0] / 65535) * 255,
                (e[1] / 65535) * 255,
                (e[2] / 65535) * 255,
              ];
            }),
            (l.rgb.apple = function (e) {
              return [
                (e[0] / 255) * 65535,
                (e[1] / 255) * 65535,
                (e[2] / 255) * 65535,
              ];
            }),
            (l.gray.rgb = function (e) {
              return [
                (e[0] / 100) * 255,
                (e[0] / 100) * 255,
                (e[0] / 100) * 255,
              ];
            }),
            (l.gray.hsl = function (e) {
              return [0, 0, e[0]];
            }),
            (l.gray.hsv = l.gray.hsl),
            (l.gray.hwb = function (e) {
              return [0, 100, e[0]];
            }),
            (l.gray.cmyk = function (e) {
              return [0, 0, 0, e[0]];
            }),
            (l.gray.lab = function (e) {
              return [e[0], 0, 0];
            }),
            (l.gray.hex = function (e) {
              ((e = 255 & Math.round((e[0] / 100) * 255)),
                (e = ((e << 16) + (e << 8) + e).toString(16).toUpperCase()));
              return "000000".substring(e.length) + e;
            }),
            (l.rgb.gray = function (e) {
              return [((e[0] + e[1] + e[2]) / 3 / 255) * 100];
            }));
        },
        7747: (e, t, i) => {
          const n = i(5043),
            r = 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 = r(s);
            Object.keys(a).forEach((e) => {
              var i,
                n,
                t = a[e];
              function r(...e) {
                var t = e[0];
                return null == t ? t : (1 < t.length && (e = t), i(e));
              }
              function o(...e) {
                var t = e[0];
                if (null == t) return t;
                1 < t.length && (e = t);
                const i = n(e);
                if ("object" == typeof i)
                  for (let e = i.length, t = 0; t < e; t++)
                    i[t] = Math.round(i[t]);
                return i;
              }
              ((l[s][e] =
                ("conversion" in (n = t) && (o.conversion = n.conversion), o)),
                (l[s][e].raw =
                  ("conversion" in (i = t) && (r.conversion = i.conversion),
                  r)));
            });
          }),
            (e.exports = l));
        },
        8074: (e, t, i) => {
          const a = i(5043);
          function s(e, t) {
            const i = [t[e].parent, e];
            let n = a[t[e].parent][e],
              r = t[e].parent;
            for (; t[r].parent; )
              (i.unshift(t[r].parent),
                (n = (function (t, i) {
                  return function (e) {
                    return i(t(e));
                  };
                })(a[t[r].parent][r], n)),
                (r = t[r].parent));
            return ((n.conversion = i), n);
          }
          e.exports = function (i) {
            const n = (function (i) {
                const n = (function () {
                    const i = {},
                      n = Object.keys(a);
                    for (let e = n.length, t = 0; t < e; t++)
                      i[n[t]] = { distance: -1, parent: null };
                    return i;
                  })(),
                  r = [i];
                for (n[i].distance = 0; r.length; ) {
                  const i = r.pop(),
                    o = Object.keys(a[i]);
                  for (let e = o.length, t = 0; t < e; t++) {
                    const a = o[t],
                      s = n[a];
                    -1 === s.distance &&
                      ((s.distance = n[i].distance + 1),
                      (s.parent = i),
                      r.unshift(a));
                  }
                }
                return n;
              })(i),
              r = {},
              o = Object.keys(n);
            for (let e = o.length, t = 0; t < e; t++) {
              const i = o[t];
              null !== n[i].parent && (r[i] = s(i, n));
            }
            return r;
          };
        },
        1086: (e) => {
          "use strict";
          e.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: (e, t, i) => {
          var n = i(930),
            r = i(9268),
            o = TypeError;
          e.exports = function (e) {
            if (n(e)) return e;
            throw o(r(e) + " is not a function");
          };
        },
        1449: (e, t, i) => {
          var n = i(1956),
            r = i(9268),
            o = TypeError;
          e.exports = function (e) {
            if (n(e)) return e;
            throw o(r(e) + " is not a constructor");
          };
        },
        1378: (e, t, i) => {
          var n = i(930),
            r = String,
            o = TypeError;
          e.exports = function (e) {
            if ("object" == typeof e || n(e)) return e;
            throw o("Can't set " + r(e) + " as a prototype");
          };
        },
        8669: (e, t, i) => {
          var n = i(211),
            r = i(4710),
            i = i(7826).f,
            o = n("unscopables"),
            s = Array.prototype;
          (null == s[o] && i(s, o, { configurable: !0, value: r(null) }),
            (e.exports = function (e) {
              s[o][e] = !0;
            }));
        },
        9966: (e, t, i) => {
          "use strict";
          var n = i(3448).charAt;
          e.exports = function (e, t, i) {
            return t + (i ? n(e, t).length : 1);
          };
        },
        6112: (e, t, i) => {
          var n = i(8759),
            r = String,
            o = TypeError;
          e.exports = function (e) {
            if (n(e)) return e;
            throw o(r(e) + " is not an object");
          };
        },
        1005: (e, t, i) => {
          i = i(3677);
          e.exports = i(function () {
            var e;
            "function" == typeof ArrayBuffer &&
              ((e = new ArrayBuffer(8)),
              Object.isExtensible(e) &&
                Object.defineProperty(e, "a", { value: 8 }));
          });
        },
        1984: (e, t, i) => {
          "use strict";
          var n = i(8062).forEach,
            i = i(2802)("forEach");
          e.exports = i
            ? [].forEach
            : function (e) {
                return n(this, e, 1 < arguments.length ? arguments[1] : void 0);
              };
        },
        1842: (e, t, i) => {
          "use strict";
          var d = i(8516),
            p = i(9413),
            f = i(3060),
            g = i(7850),
            m = i(2814),
            v = i(1956),
            b = i(2871),
            y = i(9720),
            _ = i(3546),
            w = i(1667),
            x = Array;
          e.exports = function (e) {
            var t = f(e),
              i = v(this),
              e = arguments.length,
              n = 1 < e ? arguments[1] : void 0,
              r = void 0 !== n;
            r && (n = d(n, 2 < e ? arguments[2] : void 0));
            var o,
              s,
              a,
              l,
              c,
              u,
              e = w(t),
              h = 0;
            if (!e || (this === x && m(e)))
              for (o = b(t), s = i ? new this(o) : x(o); h < o; h++)
                ((u = r ? n(t[h], h) : t[h]), y(s, h, u));
            else
              for (
                c = (l = _(t, e)).next, s = i ? new this() : [];
                !(a = p(c, l)).done;
                h++
              )
                ((u = r ? g(l, n, [a.value, h], !0) : a.value), y(s, h, u));
            return ((s.length = h), s);
          };
        },
        6198: (e, t, i) => {
          function n(a) {
            return function (e, t, i) {
              var n,
                r = l(e),
                o = u(r),
                s = c(i, o);
              if (a && t != t) {
                for (; s < o; ) if ((n = r[s++]) != n) return !0;
              } else
                for (; s < o; s++)
                  if ((a || s in r) && r[s] === t) return a || s || 0;
              return !a && -1;
            };
          }
          var l = i(4088),
            c = i(7740),
            u = i(2871);
          e.exports = { includes: n(!0), indexOf: n(!1) };
        },
        8062: (e, t, i) => {
          function n(d) {
            var p = 1 == d,
              f = 2 == d,
              g = 3 == d,
              m = 4 == d,
              v = 6 == d,
              b = 7 == d,
              y = 5 == d || v;
            return function (e, t, i, n) {
              for (
                var r,
                  o,
                  s = x(e),
                  a = w(s),
                  l = _(t, i),
                  c = k(a),
                  u = 0,
                  n = n || C,
                  h = p ? n(e, c) : f || b ? n(e, 0) : void 0;
                u < c;
                u++
              )
                if ((y || u in a) && ((o = l((r = a[u]), u, s)), d))
                  if (p) h[u] = o;
                  else if (o)
                    switch (d) {
                      case 3:
                        return !0;
                      case 5:
                        return r;
                      case 6:
                        return u;
                      case 2:
                        P(h, r);
                    }
                  else
                    switch (d) {
                      case 4:
                        return !1;
                      case 7:
                        P(h, r);
                    }
              return v ? -1 : g || m ? m : h;
            };
          }
          var _ = i(8516),
            r = i(8240),
            w = i(5974),
            x = i(3060),
            k = i(2871),
            C = i(5574),
            P = r([].push);
          e.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: (e, t, i) => {
          var n = i(3677),
            r = i(211),
            o = i(1448),
            s = r("species");
          e.exports = function (t) {
            return (
              51 <= o ||
              !n(function () {
                var e = [];
                return (
                  ((e.constructor = {})[s] = function () {
                    return { foo: 1 };
                  }),
                  1 !== e[t](Boolean).foo
                );
              })
            );
          };
        },
        2802: (e, t, i) => {
          "use strict";
          var n = i(3677);
          e.exports = function (e, t) {
            var i = [][e];
            return (
              !!i &&
              n(function () {
                i.call(
                  null,
                  t ||
                    function () {
                      return 1;
                    },
                  1,
                );
              })
            );
          };
        },
        3329: (e, t, i) => {
          var l = i(7740),
            c = i(2871),
            u = i(9720),
            h = Array,
            d = Math.max;
          e.exports = function (e, t, i) {
            for (
              var n = c(e),
                r = l(t, n),
                o = l(void 0 === i ? n : i, n),
                s = h(d(o - r, 0)),
                a = 0;
              r < o;
              r++, a++
            )
              u(s, a, e[r]);
            return ((s.length = a), s);
          };
        },
        745: (e, t, i) => {
          i = i(8240);
          e.exports = i([].slice);
        },
        8789: (e, t, i) => {
          var n = i(6526),
            r = i(1956),
            o = i(8759),
            s = i(211)("species"),
            a = Array;
          e.exports = function (e) {
            var t;
            return (
              n(e) &&
                ((t = e.constructor),
                ((r(t) && (t === a || n(t.prototype))) ||
                  (o(t) && null === (t = t[s]))) &&
                  (t = void 0)),
              void 0 === t ? a : t
            );
          };
        },
        5574: (e, t, i) => {
          var n = i(8789);
          e.exports = function (e, t) {
            return new (n(e))(0 === t ? 0 : t);
          };
        },
        7850: (e, t, i) => {
          var r = i(6112),
            o = i(6737);
          e.exports = function (e, t, i, n) {
            try {
              return n ? t(r(i)[0], i[1]) : t(i);
            } catch (t) {
              o(e, "throw", t);
            }
          };
        },
        8939: (e, t, i) => {
          var r = i(211)("iterator"),
            o = !1;
          try {
            var n = 0,
              s = {
                next: function () {
                  return { done: !!n++ };
                },
                return: function () {
                  o = !0;
                },
              };
            ((s[r] = function () {
              return this;
            }),
              Array.from(s, function () {
                throw 2;
              }));
          } catch (e) {}
          e.exports = function (e, t) {
            if (!t && !o) return !1;
            var i = !1;
            try {
              var n = {};
              ((n[r] = function () {
                return {
                  next: function () {
                    return { done: (i = !0) };
                  },
                };
              }),
                e(n));
            } catch (e) {}
            return i;
          };
        },
        2306: (e, t, i) => {
          var i = i(8240),
            n = i({}.toString),
            r = i("".slice);
          e.exports = function (e) {
            return r(n(e), 8, -1);
          };
        },
        375: (e, t, i) => {
          var n = i(2371),
            r = i(930),
            o = i(2306),
            s = i(211)("toStringTag"),
            a = Object,
            l =
              "Arguments" ==
              o(
                (function () {
                  return arguments;
                })(),
              );
          e.exports = n
            ? o
            : function (e) {
                var t;
                return void 0 === e
                  ? "Undefined"
                  : null === e
                    ? "Null"
                    : "string" ==
                        typeof (e = (function (e, t) {
                          try {
                            return e[t];
                          } catch (e) {}
                        })((t = a(e)), s))
                      ? e
                      : l
                        ? o(t)
                        : "Object" == (e = o(t)) && r(t.callee)
                          ? "Arguments"
                          : e;
              };
        },
        8474: (e, t, i) => {
          var l = i(9606),
            c = i(6095),
            u = i(4399),
            h = i(7826);
          e.exports = function (e, t, i) {
            for (var n = c(t), r = h.f, o = u.f, s = 0; s < n.length; s++) {
              var a = n[s];
              l(e, a) || (i && l(i, a)) || r(e, a, o(t, a));
            }
          };
        },
        7209: (e, t, i) => {
          i = i(3677);
          e.exports = !i(function () {
            function e() {}
            return (
              (e.prototype.constructor = null),
              Object.getPrototypeOf(new e()) !== e.prototype
            );
          });
        },
        471: (e, t, i) => {
          "use strict";
          function r() {
            return this;
          }
          var o = i(3083).IteratorPrototype,
            s = i(4710),
            a = i(5736),
            l = i(914),
            c = i(7719);
          e.exports = function (e, t, i, n) {
            t += " Iterator";
            return (
              (e.prototype = s(o, { next: a(+!n, i) })),
              l(e, t, !1, !0),
              (c[t] = r),
              e
            );
          };
        },
        2585: (e, t, i) => {
          var n = i(5283),
            r = i(7826),
            o = i(5736);
          e.exports = n
            ? function (e, t, i) {
                return r.f(e, t, o(1, i));
              }
            : function (e, t, i) {
                return ((e[t] = i), e);
              };
        },
        5736: (e) => {
          e.exports = function (e, t) {
            return {
              enumerable: !(1 & e),
              configurable: !(2 & e),
              writable: !(4 & e),
              value: t,
            };
          };
        },
        9720: (e, t, i) => {
          "use strict";
          var n = i(2258),
            r = i(7826),
            o = i(5736);
          e.exports = function (e, t, i) {
            t = n(t);
            t in e ? r.f(e, t, o(0, i)) : (e[t] = i);
          };
        },
        1343: (e, t, i) => {
          var s = i(930),
            a = i(7826),
            l = i(3712),
            c = i(9444);
          e.exports = function (e, t, i, n) {
            var r = (n = n || {}).enumerable,
              o = void 0 !== n.name ? n.name : t;
            if ((s(i) && l(i, o, n), n.global)) r ? (e[t] = i) : c(t, i);
            else {
              try {
                n.unsafe ? e[t] && (r = !0) : delete e[t];
              } catch (e) {}
              r
                ? (e[t] = i)
                : a.f(e, t, {
                    value: i,
                    enumerable: !1,
                    configurable: !n.nonConfigurable,
                    writable: !n.nonWritable,
                  });
            }
            return e;
          };
        },
        9444: (e, t, i) => {
          var n = i(2086),
            r = Object.defineProperty;
          e.exports = function (t, i) {
            try {
              r(n, t, { value: i, configurable: !0, writable: !0 });
            } catch (e) {
              n[t] = i;
            }
            return i;
          };
        },
        8432: (e, t, i) => {
          "use strict";
          function m() {
            return this;
          }
          var v = i(1695),
            b = i(9413),
            y = i(3296),
            n = i(4398),
            _ = i(930),
            w = i(471),
            x = i(2130),
            k = i(7530),
            C = i(914),
            P = i(2585),
            T = i(1343),
            r = i(211),
            S = i(7719),
            i = i(3083),
            H = n.PROPER,
            D = n.CONFIGURABLE,
            E = i.IteratorPrototype,
            I = i.BUGGY_SAFARI_ITERATORS,
            A = r("iterator"),
            O = "values";
          e.exports = function (e, t, i, n, r, o, s) {
            w(i, t, n);
            function a(e) {
              if (e === r && g) return g;
              if (!I && e in p) return p[e];
              switch (e) {
                case "keys":
                case O:
                case "entries":
                  return function () {
                    return new i(this, e);
                  };
              }
              return function () {
                return new i(this);
              };
            }
            var l,
              c,
              u,
              h = t + " Iterator",
              d = !1,
              p = e.prototype,
              f = p[A] || p["@@iterator"] || (r && p[r]),
              g = (!I && f) || a(r),
              n = ("Array" == t && p.entries) || f;
            if (
              (n &&
                (l = x(n.call(new e()))) !== Object.prototype &&
                l.next &&
                (y || x(l) === E || (k ? k(l, E) : _(l[A]) || T(l, A, m)),
                C(l, h, !0, !0),
                y && (S[h] = m)),
              H &&
                r == O &&
                f &&
                f.name !== O &&
                (!y && D
                  ? P(p, "name", O)
                  : ((d = !0),
                    (g = function () {
                      return b(f, this);
                    }))),
              r)
            )
              if (
                ((c = {
                  values: a(O),
                  keys: o ? g : a("keys"),
                  entries: a("entries"),
                }),
                s)
              )
                for (u in c) (!I && !d && u in p) || T(p, u, c[u]);
              else v({ target: t, proto: !0, forced: I || d }, c);
            return (
              (y && !s) || p[A] === g || T(p, A, g, { name: r }),
              (S[t] = g),
              c
            );
          };
        },
        4145: (e, t, i) => {
          var n = i(9775),
            r = i(9606),
            o = i(9251),
            s = i(7826).f;
          e.exports = function (e) {
            var t = n.Symbol || (n.Symbol = {});
            r(t, e) || s(t, e, { value: o.f(e) });
          };
        },
        5283: (e, t, i) => {
          i = i(3677);
          e.exports = !i(function () {
            return (
              7 !=
              Object.defineProperty({}, 1, {
                get: function () {
                  return 7;
                },
              })[1]
            );
          });
        },
        821: (e, t, i) => {
          var n = i(2086),
            i = i(8759),
            r = n.document,
            o = i(r) && i(r.createElement);
          e.exports = function (e) {
            return o ? r.createElement(e) : {};
          };
        },
        7620: (e) => {
          var t = TypeError;
          e.exports = function (e) {
            if (9007199254740991 < e) throw t("Maximum allowed index exceeded");
            return e;
          };
        },
        933: (e) => {
          e.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: (e, t, i) => {
          ((i = i(821)("span").classList),
            (i = i && i.constructor && i.constructor.prototype));
          e.exports = i === Object.prototype ? void 0 : i;
        },
        4999: (e, t, i) => {
          i = i(563);
          e.exports = i("navigator", "userAgent") || "";
        },
        1448: (e, t, i) => {
          var n,
            r,
            o = i(2086),
            s = i(4999),
            i = o.process,
            o = o.Deno,
            o = (i && i.versions) || (o && o.version),
            o = o && o.v8;
          (!(r = o
            ? 0 < (n = o.split("."))[0] && n[0] < 4
              ? 1
              : +(n[0] + n[1])
            : r) &&
            s &&
            (!(n = s.match(/Edge\/(\d+)/)) || 74 <= n[1]) &&
            (n = s.match(/Chrome\/(\d+)/)) &&
            (r = +n[1]),
            (e.exports = r));
        },
        8684: (e) => {
          e.exports = [
            "constructor",
            "hasOwnProperty",
            "isPrototypeOf",
            "propertyIsEnumerable",
            "toLocaleString",
            "toString",
            "valueOf",
          ];
        },
        1695: (e, t, i) => {
          var c = i(2086),
            u = i(4399).f,
            h = i(2585),
            d = i(1343),
            p = i(9444),
            f = i(8474),
            g = i(7189);
          e.exports = function (e, t) {
            var i,
              n,
              r,
              o,
              s = e.target,
              a = e.global,
              l = e.stat;
            if ((i = a ? c : l ? c[s] || p(s, {}) : (c[s] || {}).prototype))
              for (n in t) {
                if (
                  ((r = t[n]),
                  (o = e.dontCallGetSet ? (o = u(i, n)) && o.value : i[n]),
                  !g(a ? n : s + (l ? "." : "#") + n, e.forced) && void 0 !== o)
                ) {
                  if (typeof r == typeof o) continue;
                  f(r, o);
                }
                ((e.sham || (o && o.sham)) && h(r, "sham", !0), d(i, n, r, e));
              }
          };
        },
        3677: (e) => {
          e.exports = function (e) {
            try {
              return !!e();
            } catch (e) {
              return !0;
            }
          };
        },
        2331: (e, t, 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"),
            g = RegExp.prototype;
          e.exports = function (i, e, t, n) {
            var s,
              r = d(i),
              a = !h(function () {
                var e = {};
                return (
                  (e[r] = function () {
                    return 7;
                  }),
                  7 != ""[i](e)
                );
              }),
              o =
                a &&
                !h(function () {
                  var e = !1,
                    t = /a/;
                  return (
                    "split" === i &&
                      (((t = {}).constructor = {}),
                      (t.constructor[f] = function () {
                        return t;
                      }),
                      (t.flags = ""),
                      (t[r] = /./[r])),
                    (t.exec = function () {
                      return ((e = !0), null);
                    }),
                    t[r](""),
                    !e
                  );
                });
            ((a && o && !t) ||
              ((s = l(/./[r])),
              (e = e(r, ""[i], function (e, t, i, n, r) {
                var o = l(e),
                  e = t.exec;
                return e === u || e === g.exec
                  ? a && !r
                    ? { done: !0, value: s(t, i, n) }
                    : { done: !0, value: o(i, t, n) }
                  : { done: !1 };
              })),
              c(String.prototype, i, e[0]),
              c(g, r, e[1])),
              n && p(g[r], "sham", !0));
          };
        },
        6910: (e, t, i) => {
          i = i(3677);
          e.exports = !i(function () {
            return Object.isExtensible(Object.preventExtensions({}));
          });
        },
        7258: (e, t, i) => {
          var n = i(6059),
            i = Function.prototype,
            r = i.apply,
            o = i.call;
          e.exports =
            ("object" == typeof Reflect && Reflect.apply) ||
            (n
              ? o.bind(r)
              : function () {
                  return o.apply(r, arguments);
                });
        },
        8516: (e, t, i) => {
          var n = i(8240),
            r = i(5089),
            o = i(6059),
            s = n(n.bind);
          e.exports = function (e, t) {
            return (
              r(e),
              void 0 === t
                ? e
                : o
                  ? s(e, t)
                  : function () {
                      return e.apply(t, arguments);
                    }
            );
          };
        },
        6059: (e, t, i) => {
          i = i(3677);
          e.exports = !i(function () {
            var e = function () {}.bind();
            return "function" != typeof e || e.hasOwnProperty("prototype");
          });
        },
        2395: (e, t, i) => {
          "use strict";
          var n = i(8240),
            o = i(5089),
            s = i(8759),
            a = i(9606),
            l = i(745),
            i = i(6059),
            c = Function,
            u = n([].concat),
            h = n([].join),
            d = {};
          e.exports = i
            ? c.bind
            : function (t) {
                var i = o(this),
                  e = i.prototype,
                  n = l(arguments, 1),
                  r = function () {
                    var e = u(n, l(arguments));
                    return this instanceof r
                      ? (function (e, t, i) {
                          if (!a(d, t)) {
                            for (var n = [], r = 0; r < t; r++)
                              n[r] = "a[" + r + "]";
                            d[t] = c("C,a", "return new C(" + h(n, ",") + ")");
                          }
                          return d[t](e, i);
                        })(i, e.length, e)
                      : i.apply(t, e);
                  };
                return (s(e) && (r.prototype = e), r);
              };
        },
        9413: (e, t, i) => {
          var i = i(6059),
            n = Function.prototype.call;
          e.exports = i
            ? n.bind(n)
            : function () {
                return n.apply(n, arguments);
              };
        },
        4398: (e, t, i) => {
          var n = i(5283),
            r = i(9606),
            o = Function.prototype,
            s = n && Object.getOwnPropertyDescriptor,
            i = r(o, "name"),
            r = i && "something" === function () {}.name,
            o = i && (!n || s(o, "name").configurable);
          e.exports = { EXISTS: i, PROPER: r, CONFIGURABLE: o };
        },
        8240: (e, t, i) => {
          var n = i(6059),
            r = Function.prototype,
            i = r.bind,
            o = r.call,
            s = n && i.bind(o, o);
          e.exports = n
            ? function (e) {
                return e && s(e);
              }
            : function (e) {
                return (
                  e &&
                  function () {
                    return o.apply(e, arguments);
                  }
                );
              };
        },
        563: (e, t, i) => {
          var n = i(2086),
            r = i(930);
          e.exports = function (e, t) {
            return arguments.length < 2
              ? ((i = n[e]), r(i) ? i : void 0)
              : n[e] && n[e][t];
            var i;
          };
        },
        1667: (e, t, i) => {
          var n = i(375),
            r = i(2964),
            o = i(7719),
            s = i(211)("iterator");
          e.exports = function (e) {
            if (null != e) return r(e, s) || r(e, "@@iterator") || o[n(e)];
          };
        },
        3546: (e, t, i) => {
          var n = i(9413),
            r = i(5089),
            o = i(6112),
            s = i(9268),
            a = i(1667),
            l = TypeError;
          e.exports = function (e, t) {
            var i = arguments.length < 2 ? a(e) : t;
            if (r(i)) return o(n(i, e));
            throw l(s(e) + " is not iterable");
          };
        },
        2964: (e, t, i) => {
          var n = i(5089);
          e.exports = function (e, t) {
            t = e[t];
            return null == t ? void 0 : n(t);
          };
        },
        8509: (e, t, i) => {
          var n = i(8240),
            r = i(3060),
            d = Math.floor,
            p = n("".charAt),
            f = n("".replace),
            g = n("".slice),
            m = /\$([$&'`]|\d{1,2}|<[^>]*>)/g,
            v = /\$([$&'`]|\d{1,2})/g;
          e.exports = function (o, s, a, l, c, e) {
            var u = a + o.length,
              h = l.length,
              t = v;
            return (
              void 0 !== c && ((c = r(c)), (t = m)),
              f(e, t, function (e, t) {
                var i;
                switch (p(t, 0)) {
                  case "$":
                    return "$";
                  case "&":
                    return o;
                  case "`":
                    return g(s, 0, a);
                  case "'":
                    return g(s, u);
                  case "<":
                    i = c[g(t, 1, -1)];
                    break;
                  default:
                    var n = +t;
                    if (0 == n) return e;
                    if (h < n) {
                      var r = d(n / 10);
                      return 0 !== r && r <= h
                        ? void 0 === l[r - 1]
                          ? p(t, 1)
                          : l[r - 1] + p(t, 1)
                        : e;
                    }
                    i = l[n - 1];
                }
                return void 0 === i ? "" : i;
              })
            );
          };
        },
        2086: (e, t, i) => {
          function n(e) {
            return e && e.Math == Math && e;
          }
          e.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: (e, t, i) => {
          var n = i(8240),
            r = i(3060),
            o = n({}.hasOwnProperty);
          e.exports =
            Object.hasOwn ||
            function (e, t) {
              return o(r(e), t);
            };
        },
        7153: (e) => {
          e.exports = {};
        },
        5963: (e, t, i) => {
          i = i(563);
          e.exports = i("document", "documentElement");
        },
        6761: (e, t, i) => {
          var n = i(5283),
            r = i(3677),
            o = i(821);
          e.exports =
            !n &&
            !r(function () {
              return (
                7 !=
                Object.defineProperty(o("div"), "a", {
                  get: function () {
                    return 7;
                  },
                }).a
              );
            });
        },
        5974: (e, t, i) => {
          var n = i(8240),
            r = i(3677),
            o = i(2306),
            s = Object,
            a = n("".split);
          e.exports = r(function () {
            return !s("z").propertyIsEnumerable(0);
          })
            ? function (e) {
                return "String" == o(e) ? a(e, "") : s(e);
              }
            : s;
        },
        9277: (e, t, i) => {
          var n = i(8240),
            r = i(930),
            i = i(4489),
            o = n(Function.toString);
          (r(i.inspectSource) ||
            (i.inspectSource = function (e) {
              return o(e);
            }),
            (e.exports = i.inspectSource));
        },
        2423: (e, t, i) => {
          function n(e) {
            c(e, m, { value: { objectID: "O" + v++, weakData: {} } });
          }
          var s = i(1695),
            a = i(8240),
            r = i(7153),
            o = i(8759),
            l = i(9606),
            c = i(7826).f,
            u = i(62),
            h = i(3226),
            d = i(3813),
            p = i(5422),
            f = i(6910),
            g = !1,
            m = p("meta"),
            v = 0,
            b = (e.exports = {
              enable: function () {
                ((b.enable = function () {}), (g = !0));
                var r = u.f,
                  o = a([].splice),
                  e = {};
                ((e[m] = 1),
                  r(e).length &&
                    ((u.f = function (e) {
                      for (var t = r(e), i = 0, n = t.length; i < n; i++)
                        if (t[i] === m) {
                          o(t, i, 1);
                          break;
                        }
                      return t;
                    }),
                    s(
                      { target: "Object", stat: !0, forced: !0 },
                      { getOwnPropertyNames: h.f },
                    )));
              },
              fastKey: function (e, t) {
                if (!o(e))
                  return "symbol" == typeof e
                    ? e
                    : ("string" == typeof e ? "S" : "P") + e;
                if (!l(e, m)) {
                  if (!d(e)) return "F";
                  if (!t) return "E";
                  n(e);
                }
                return e[m].objectID;
              },
              getWeakData: function (e, t) {
                if (!l(e, m)) {
                  if (!d(e)) return !0;
                  if (!t) return !1;
                  n(e);
                }
                return e[m].weakData;
              },
              onFreeze: function (e) {
                return (f && g && d(e) && !l(e, m) && n(e), e);
              },
            });
          r[m] = !0;
        },
        3278: (e, t, i) => {
          var n,
            r,
            o,
            s,
            a,
            l,
            c,
            u,
            h = i(9316),
            d = i(2086),
            p = i(8240),
            f = i(8759),
            g = i(2585),
            m = i(9606),
            v = i(4489),
            b = i(8944),
            i = i(7153),
            y = "Object already initialized",
            _ = d.TypeError,
            d = d.WeakMap;
          ((c =
            h || v.state
              ? ((n = v.state || (v.state = new d())),
                (r = p(n.get)),
                (o = p(n.has)),
                (s = p(n.set)),
                (a = function (e, t) {
                  if (o(n, e)) throw new _(y);
                  return ((t.facade = e), s(n, e, t), t);
                }),
                (l = function (e) {
                  return r(n, e) || {};
                }),
                function (e) {
                  return o(n, e);
                })
              : ((i[(u = b("state"))] = !0),
                (a = function (e, t) {
                  if (m(e, u)) throw new _(y);
                  return ((t.facade = e), g(e, u, t), t);
                }),
                (l = function (e) {
                  return m(e, u) ? e[u] : {};
                }),
                function (e) {
                  return m(e, u);
                })),
            (e.exports = {
              set: a,
              get: l,
              has: c,
              enforce: function (e) {
                return c(e) ? l(e) : a(e, {});
              },
              getterFor: function (i) {
                return function (e) {
                  var t;
                  if (!f(e) || (t = l(e)).type !== i)
                    throw _("Incompatible receiver, " + i + " required");
                  return t;
                };
              },
            }));
        },
        2814: (e, t, i) => {
          var n = i(211),
            r = i(7719),
            o = n("iterator"),
            s = Array.prototype;
          e.exports = function (e) {
            return void 0 !== e && (r.Array === e || s[o] === e);
          };
        },
        6526: (e, t, i) => {
          var n = i(2306);
          e.exports =
            Array.isArray ||
            function (e) {
              return "Array" == n(e);
            };
        },
        930: (e) => {
          e.exports = function (e) {
            return "function" == typeof e;
          };
        },
        1956: (e, t, i) => {
          function n() {}
          function r(e) {
            if (!l(e)) return !1;
            try {
              return (p(n, d, e), !0);
            } catch (e) {
              return !1;
            }
          }
          function o(e) {
            if (!l(e)) return !1;
            switch (c(e)) {
              case "AsyncFunction":
              case "GeneratorFunction":
              case "AsyncGeneratorFunction":
                return !1;
            }
            try {
              return m || !!g(f, h(e));
            } catch (e) {
              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/,
            g = s(f.exec),
            m = !f.exec(n);
          ((o.sham = !0),
            (e.exports =
              !p ||
              a(function () {
                var e;
                return (
                  r(r.call) ||
                  !r(Object) ||
                  !r(function () {
                    e = !0;
                  }) ||
                  e
                );
              })
                ? o
                : r));
        },
        7189: (e, t, i) => {
          function n(e, t) {
            return (e = l[a(e)]) == u || (e != c && (o(t) ? r(t) : !!t));
          }
          var r = i(3677),
            o = i(930),
            s = /#|\.prototype\./,
            a = (n.normalize = function (e) {
              return String(e).replace(s, ".").toLowerCase();
            }),
            l = (n.data = {}),
            c = (n.NATIVE = "N"),
            u = (n.POLYFILL = "P");
          e.exports = n;
        },
        8759: (e, t, i) => {
          var n = i(930);
          e.exports = function (e) {
            return "object" == typeof e ? null !== e : n(e);
          };
        },
        3296: (e) => {
          e.exports = !1;
        },
        7994: (e, t, i) => {
          var n = i(8759),
            r = i(2306),
            o = i(211)("match");
          e.exports = function (e) {
            var t;
            return n(e) && (void 0 !== (t = e[o]) ? !!t : "RegExp" == r(e));
          };
        },
        2071: (e, t, i) => {
          var n = i(563),
            r = i(930),
            o = i(5516),
            i = i(1876),
            s = Object;
          e.exports = i
            ? function (e) {
                return "symbol" == typeof e;
              }
            : function (e) {
                var t = n("Symbol");
                return r(t) && o(t.prototype, s(e));
              };
        },
        6737: (e, t, i) => {
          var o = i(9413),
            s = i(6112),
            a = i(2964);
          e.exports = function (e, t, i) {
            var n, r;
            s(e);
            try {
              if (!(n = a(e, "return"))) {
                if ("throw" === t) throw i;
                return i;
              }
              n = o(n, e);
            } catch (e) {
              ((r = !0), (n = e));
            }
            if ("throw" === t) throw i;
            if (r) throw n;
            return (s(n), i);
          };
        },
        3083: (e, t, i) => {
          "use strict";
          var n,
            r = i(3677),
            o = 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 ||
            r(function () {
              var e = {};
              return n[h].call(e) !== e;
            })
              ? (n = {})
              : u && (n = s(n)),
            o(n[h]) ||
              l(n, h, function () {
                return this;
              }),
            (e.exports = {
              IteratorPrototype: n,
              BUGGY_SAFARI_ITERATORS: i,
            }));
        },
        7719: (e) => {
          e.exports = {};
        },
        2871: (e, t, i) => {
          var n = i(4005);
          e.exports = function (e) {
            return n(e.length);
          };
        },
        3712: (e, t, i) => {
          var n = i(3677),
            r = i(930),
            o = 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"),
            e = (e.exports = function (e, t, i) {
              ("Symbol(" === String(t).slice(0, 7) &&
                (t = "[" + String(t).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"),
                i && i.getter && (t = "get " + t),
                i && i.setter && (t = "set " + t),
                (!o(e, "name") || (a && e.name !== t)) &&
                  (s
                    ? h(e, "name", { value: t, configurable: !0 })
                    : (e.name = t)),
                d &&
                  i &&
                  o(i, "arity") &&
                  e.length !== i.arity &&
                  h(e, "length", { value: i.arity }));
              try {
                i && o(i, "constructor") && i.constructor
                  ? s && h(e, "prototype", { writable: !1 })
                  : e.prototype && (e.prototype = void 0);
              } catch (e) {}
              i = c(e);
              return (
                o(i, "source") ||
                  (i.source = p.join("string" == typeof t ? t : "")),
                e
              );
            });
          Function.prototype.toString = e(function () {
            return (r(this) && u(this).source) || l(this);
          }, "toString");
        },
        5681: (e) => {
          var t = Math.ceil,
            i = Math.floor;
          e.exports =
            Math.trunc ||
            function (e) {
              e = +e;
              return (0 < e ? i : t)(e);
            };
        },
        3441: (e, t, i) => {
          i = i(3193);
          e.exports = i && !!Symbol.for && !!Symbol.keyFor;
        },
        3193: (e, t, i) => {
          var n = i(1448),
            i = i(3677);
          e.exports =
            !!Object.getOwnPropertySymbols &&
            !i(function () {
              var e = Symbol();
              return (
                !String(e) ||
                !(Object(e) instanceof Symbol) ||
                (!Symbol.sham && n && n < 41)
              );
            });
        },
        9316: (e, t, i) => {
          var n = i(2086),
            r = i(930),
            i = i(9277),
            n = n.WeakMap;
          e.exports = r(n) && /native code/.test(i(n));
        },
        8675: (e, t, i) => {
          "use strict";
          var d = i(5283),
            n = i(8240),
            p = i(9413),
            r = i(3677),
            f = i(8779),
            g = i(6952),
            m = i(7446),
            v = i(3060),
            b = i(5974),
            o = Object.assign,
            s = Object.defineProperty,
            y = n([].concat);
          e.exports =
            !o ||
            r(function () {
              if (
                d &&
                1 !==
                  o(
                    { b: 1 },
                    o(
                      s({}, "a", {
                        enumerable: !0,
                        get: function () {
                          s(this, "b", { value: 3, enumerable: !1 });
                        },
                      }),
                      { b: 2 },
                    ),
                  ).b
              )
                return !0;
              var e = {},
                t = {},
                i = Symbol(),
                n = "abcdefghijklmnopqrst";
              return (
                (e[i] = 7),
                n.split("").forEach(function (e) {
                  t[e] = e;
                }),
                7 != o({}, e)[i] || f(o({}, t)).join("") != n
              );
            })
              ? function (e, t) {
                  for (
                    var i = v(e), n = arguments.length, r = 1, o = g.f, s = m.f;
                    r < n;

                  )
                    for (
                      var a,
                        l = b(arguments[r++]),
                        c = o ? y(f(l), o(l)) : f(l),
                        u = c.length,
                        h = 0;
                      h < u;

                    )
                      ((a = c[h++]), (d && !p(s, l, a)) || (i[a] = l[a]));
                  return i;
                }
              : o;
        },
        4710: (e, t, i) => {
          function n() {}
          function r(e) {
            (e.write(g("")), e.close());
            var t = e.parentWindow.Object;
            return ((e = null), t);
          }
          var o,
            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"),
            g = function (e) {
              return "<" + p + ">" + e + "</" + p + ">";
            },
            m = function () {
              try {
                o = new ActiveXObject("htmlfile");
              } catch (e) {}
              var e, t, i;
              m =
                "undefined" == typeof document || (document.domain && o)
                  ? r(o)
                  : ((t = h("iframe")),
                    (i = "java" + p + ":"),
                    (t.style.display = "none"),
                    u.appendChild(t),
                    (t.src = String(i)),
                    (e = t.contentWindow.document).open(),
                    e.write(g("document.F=Object")),
                    e.close(),
                    e.F);
              for (var n = l.length; n--; ) delete m[d][l[n]];
              return m();
            };
          ((c[f] = !0),
            (e.exports =
              Object.create ||
              function (e, t) {
                var i;
                return (
                  null !== e
                    ? ((n[d] = s(e)), (i = new n()), (n[d] = null), (i[f] = e))
                    : (i = m()),
                  void 0 === t ? i : a.f(i, t)
                );
              }));
        },
        7711: (e, t, i) => {
          var n = i(5283),
            r = i(8202),
            a = i(7826),
            l = i(6112),
            c = i(4088),
            u = i(8779);
          t.f =
            n && !r
              ? Object.defineProperties
              : function (e, t) {
                  l(e);
                  for (var i, n = c(t), r = u(t), o = r.length, s = 0; s < o; )
                    a.f(e, (i = r[s++]), n[i]);
                  return e;
                };
        },
        7826: (e, t, i) => {
          var n = i(5283),
            r = i(6761),
            o = i(8202),
            s = i(6112),
            a = i(2258),
            l = TypeError,
            c = Object.defineProperty,
            u = Object.getOwnPropertyDescriptor,
            h = "enumerable",
            d = "configurable",
            p = "writable";
          t.f = n
            ? o
              ? function (e, t, i) {
                  var n;
                  return (
                    s(e),
                    (t = a(t)),
                    s(i),
                    "function" == typeof e &&
                      "prototype" === t &&
                      "value" in i &&
                      p in i &&
                      !i[p] &&
                      (n = u(e, t)) &&
                      n[p] &&
                      ((e[t] = i.value),
                      (i = {
                        configurable: (d in i ? i : n)[d],
                        enumerable: (h in i ? i : n)[h],
                        writable: !1,
                      })),
                    c(e, t, i)
                  );
                }
              : c
            : function (e, t, i) {
                if ((s(e), (t = a(t)), s(i), r))
                  try {
                    return c(e, t, i);
                  } catch (e) {}
                if ("get" in i || "set" in i)
                  throw l("Accessors not supported");
                return ("value" in i && (e[t] = i.value), e);
              };
        },
        4399: (e, t, i) => {
          var n = i(5283),
            r = i(9413),
            o = i(7446),
            s = i(5736),
            a = i(4088),
            l = i(2258),
            c = i(9606),
            u = i(6761),
            h = Object.getOwnPropertyDescriptor;
          t.f = n
            ? h
            : function (e, t) {
                if (((e = a(e)), (t = l(t)), u))
                  try {
                    return h(e, t);
                  } catch (e) {}
                if (c(e, t)) return s(!r(o.f, e, t), e[t]);
              };
        },
        3226: (e, t, i) => {
          var n = i(2306),
            r = i(4088),
            o = i(62).f,
            s = i(3329),
            a =
              "object" == typeof window && window && Object.getOwnPropertyNames
                ? Object.getOwnPropertyNames(window)
                : [];
          e.exports.f = function (e) {
            return a && "Window" == n(e)
              ? (function (e) {
                  try {
                    return o(e);
                  } catch (e) {
                    return s(a);
                  }
                })(e)
              : o(r(e));
          };
        },
        62: (e, t, i) => {
          var n = i(1352),
            r = i(8684).concat("length", "prototype");
          t.f =
            Object.getOwnPropertyNames ||
            function (e) {
              return n(e, r);
            };
        },
        6952: (e, t) => {
          t.f = Object.getOwnPropertySymbols;
        },
        2130: (e, t, i) => {
          var n = i(9606),
            r = i(930),
            o = i(3060),
            s = i(8944),
            i = i(7209),
            a = s("IE_PROTO"),
            l = Object,
            c = l.prototype;
          e.exports = i
            ? l.getPrototypeOf
            : function (e) {
                var t = o(e);
                if (n(t, a)) return t[a];
                e = t.constructor;
                return r(e) && t instanceof e
                  ? e.prototype
                  : t instanceof l
                    ? c
                    : null;
              };
        },
        3813: (e, t, i) => {
          var n = i(3677),
            r = i(8759),
            o = i(2306),
            s = i(1005),
            a = Object.isExtensible,
            n = n(function () {
              a(1);
            });
          e.exports =
            n || s
              ? function (e) {
                  return (
                    !!r(e) && (!s || "ArrayBuffer" != o(e)) && (!a || a(e))
                  );
                }
              : a;
        },
        5516: (e, t, i) => {
          i = i(8240);
          e.exports = i({}.isPrototypeOf);
        },
        1352: (e, t, i) => {
          var n = i(8240),
            s = i(9606),
            a = i(4088),
            l = i(6198).indexOf,
            c = i(7153),
            u = n([].push);
          e.exports = function (e, t) {
            var i,
              n = a(e),
              r = 0,
              o = [];
            for (i in n) !s(c, i) && s(n, i) && u(o, i);
            for (; t.length > r; ) s(n, (i = t[r++])) && (~l(o, i) || u(o, i));
            return o;
          };
        },
        8779: (e, t, i) => {
          var n = i(1352),
            r = i(8684);
          e.exports =
            Object.keys ||
            function (e) {
              return n(e, r);
            };
        },
        7446: (e, t) => {
          "use strict";
          var i = {}.propertyIsEnumerable,
            n = Object.getOwnPropertyDescriptor,
            r = n && !i.call({ 1: 2 }, 1);
          t.f = r
            ? function (e) {
                e = n(this, e);
                return !!e && e.enumerable;
              }
            : i;
        },
        7530: (e, t, i) => {
          var r = i(8240),
            o = i(6112),
            s = i(1378);
          e.exports =
            Object.setPrototypeOf ||
            ("__proto__" in {}
              ? (function () {
                  var i,
                    n = !1,
                    e = {};
                  try {
                    ((i = r(
                      Object.getOwnPropertyDescriptor(
                        Object.prototype,
                        "__proto__",
                      ).set,
                    ))(e, []),
                      (n = e instanceof Array));
                  } catch (i) {}
                  return function (e, t) {
                    return (o(e), s(t), n ? i(e, t) : (e.__proto__ = t), e);
                  };
                })()
              : void 0);
        },
        999: (e, t, i) => {
          "use strict";
          var n = i(2371),
            r = i(375);
          e.exports = n
            ? {}.toString
            : function () {
                return "[object " + r(this) + "]";
              };
        },
        7999: (e, t, i) => {
          var r = i(9413),
            o = i(930),
            s = i(8759),
            a = TypeError;
          e.exports = function (e, t) {
            var i, n;
            if ("string" === t && o((i = e.toString)) && !s((n = r(i, e))))
              return n;
            if (o((i = e.valueOf)) && !s((n = r(i, e)))) return n;
            if ("string" !== t && o((i = e.toString)) && !s((n = r(i, e))))
              return n;
            throw a("Can't convert object to primitive value");
          };
        },
        6095: (e, t, i) => {
          var n = i(563),
            r = i(8240),
            o = i(62),
            s = i(6952),
            a = i(6112),
            l = r([].concat);
          e.exports =
            n("Reflect", "ownKeys") ||
            function (e) {
              var t = o.f(a(e)),
                i = s.f;
              return i ? l(t, i(e)) : t;
            };
        },
        9775: (e, t, i) => {
          i = i(2086);
          e.exports = i;
        },
        1189: (e, t, i) => {
          var n = i(9413),
            r = i(6112),
            o = i(930),
            s = i(2306),
            a = i(4861),
            l = TypeError;
          e.exports = function (e, t) {
            var i = e.exec;
            if (o(i)) {
              i = n(i, e, t);
              return (null !== i && r(i), i);
            }
            if ("RegExp" === s(e)) return n(a, e, t);
            throw l("RegExp#exec called on incompatible receiver");
          };
        },
        4861: (e, t, i) => {
          "use strict";
          var f = i(9413),
            n = i(8240),
            g = i(4059),
            m = i(4276),
            r = i(4930),
            o = i(9197),
            v = i(4710),
            b = i(3278).get,
            s = i(2582),
            i = i(2910),
            y = o("native-string-replace", String.prototype.replace),
            _ = RegExp.prototype.exec,
            w = _,
            x = n("".charAt),
            k = n("".indexOf),
            C = n("".replace),
            P = n("".slice),
            T =
              ((o = /b*/g),
              f(_, (n = /a/), "a"),
              f(_, o, "a"),
              0 !== n.lastIndex || 0 !== o.lastIndex),
            S = r.BROKEN_CARET,
            H = void 0 !== /()??/.exec("")[1];
          ((T || H || S || s || i) &&
            (w = function (e) {
              var t,
                i,
                n,
                r,
                o,
                s,
                a = this,
                l = b(a),
                c = g(e),
                u = l.raw;
              if (u)
                return (
                  (u.lastIndex = a.lastIndex),
                  (p = f(w, u, c)),
                  (a.lastIndex = u.lastIndex),
                  p
                );
              var h = l.groups,
                d = S && a.sticky,
                e = f(m, a),
                u = a.source,
                p = 0,
                l = c;
              if (
                (d &&
                  ((e = C(e, "y", "")),
                  -1 === k(e, "g") && (e += "g"),
                  (l = P(c, a.lastIndex)),
                  0 < a.lastIndex &&
                    (!a.multiline ||
                      (a.multiline && "\n" !== x(c, a.lastIndex - 1))) &&
                    ((u = "(?: " + u + ")"), (l = " " + l), p++),
                  (t = new RegExp("^(?:" + u + ")", e))),
                H && (t = new RegExp("^" + u + "$(?!\\s)", e)),
                T && (i = a.lastIndex),
                (n = f(_, d ? t : a, l)),
                d
                  ? n
                    ? ((n.input = P(n.input, p)),
                      (n[0] = P(n[0], p)),
                      (n.index = a.lastIndex),
                      (a.lastIndex += n[0].length))
                    : (a.lastIndex = 0)
                  : T &&
                    n &&
                    (a.lastIndex = a.global ? n.index + n[0].length : i),
                H &&
                  n &&
                  1 < n.length &&
                  f(y, n[0], t, function () {
                    for (r = 1; r < arguments.length - 2; r++)
                      void 0 === arguments[r] && (n[r] = void 0);
                  }),
                n && h)
              )
                for (n.groups = o = v(null), r = 0; r < h.length; r++)
                  o[(s = h[r])[0]] = n[s[1]];
              return n;
            }),
            (e.exports = w));
        },
        4276: (e, t, i) => {
          "use strict";
          var n = i(6112);
          e.exports = function () {
            var e = n(this),
              t = "";
            return (
              e.hasIndices && (t += "d"),
              e.global && (t += "g"),
              e.ignoreCase && (t += "i"),
              e.multiline && (t += "m"),
              e.dotAll && (t += "s"),
              e.unicode && (t += "u"),
              e.unicodeSets && (t += "v"),
              e.sticky && (t += "y"),
              t
            );
          };
        },
        9028: (e, t, i) => {
          var n = i(9413),
            r = i(9606),
            o = i(5516),
            s = i(4276),
            a = RegExp.prototype;
          e.exports = function (e) {
            var t = e.flags;
            return void 0 !== t || "flags" in a || r(e, "flags") || !o(a, e)
              ? t
              : n(s, e);
          };
        },
        4930: (e, t, i) => {
          var n = i(3677),
            r = i(2086).RegExp,
            o = n(function () {
              var e = r("a", "y");
              return ((e.lastIndex = 2), null != e.exec("abcd"));
            }),
            i =
              o ||
              n(function () {
                return !r("a", "y").sticky;
              }),
            n =
              o ||
              n(function () {
                var e = r("^r", "gy");
                return ((e.lastIndex = 2), null != e.exec("str"));
              });
          e.exports = {
            BROKEN_CARET: n,
            MISSED_STICKY: i,
            UNSUPPORTED_Y: o,
          };
        },
        2582: (e, t, i) => {
          var n = i(3677),
            r = i(2086).RegExp;
          e.exports = n(function () {
            var e = r(".", "s");
            return !(e.dotAll && e.exec("\n") && "s" === e.flags);
          });
        },
        2910: (e, t, i) => {
          var n = i(3677),
            r = i(2086).RegExp;
          e.exports = n(function () {
            var e = r("(?<a>b)", "g");
            return (
              "b" !== e.exec("b").groups.a || "bc" !== "b".replace(e, "$<a>c")
            );
          });
        },
        9586: (e) => {
          var t = TypeError;
          e.exports = function (e) {
            if (null == e) throw t("Can't call method on " + e);
            return e;
          };
        },
        914: (e, t, i) => {
          var n = i(7826).f,
            r = i(9606),
            o = i(211)("toStringTag");
          e.exports = function (e, t, i) {
            (e = e && !i ? e.prototype : e) &&
              !r(e, o) &&
              n(e, o, { configurable: !0, value: t });
          };
        },
        8944: (e, t, i) => {
          var n = i(9197),
            r = i(5422),
            o = n("keys");
          e.exports = function (e) {
            return o[e] || (o[e] = r(e));
          };
        },
        4489: (e, t, i) => {
          var n = i(2086),
            r = i(9444),
            i = "__core-js_shared__",
            i = n[i] || r(i, {});
          e.exports = i;
        },
        9197: (e, t, i) => {
          var n = i(3296),
            r = i(4489);
          (e.exports = function (e, t) {
            return r[e] || (r[e] = void 0 !== t ? t : {});
          })("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: (e, t, i) => {
          var n = i(6112),
            r = i(1449),
            o = i(211)("species");
          e.exports = function (e, t) {
            var i,
              e = n(e).constructor;
            return void 0 === e || null == (i = n(e)[o]) ? t : r(i);
          };
        },
        3448: (e, t, i) => {
          function n(o) {
            return function (e, t) {
              var i,
                n = a(l(e)),
                r = s(t),
                e = n.length;
              return r < 0 || e <= r
                ? o
                  ? ""
                  : void 0
                : (t = u(n, r)) < 55296 ||
                    56319 < t ||
                    r + 1 === e ||
                    (i = u(n, r + 1)) < 56320 ||
                    57343 < i
                  ? o
                    ? c(n, r)
                    : t
                  : o
                    ? h(n, r, r + 2)
                    : i - 56320 + ((t - 55296) << 10) + 65536;
            };
          }
          var r = i(8240),
            s = i(9502),
            a = i(4059),
            l = i(9586),
            c = r("".charAt),
            u = r("".charCodeAt),
            h = r("".slice);
          e.exports = { codeAt: n(!1), charAt: n(!0) };
        },
        338: (e, t, i) => {
          var n = i(9413),
            r = i(563),
            o = i(211),
            s = i(1343);
          e.exports = function () {
            var e = r("Symbol"),
              t = e && e.prototype,
              i = t && t.valueOf,
              e = o("toPrimitive");
            t &&
              !t[e] &&
              s(
                t,
                e,
                function (e) {
                  return n(i, this);
                },
                { arity: 1 },
              );
          };
        },
        7740: (e, t, i) => {
          var n = i(9502),
            r = Math.max,
            o = Math.min;
          e.exports = function (e, t) {
            e = n(e);
            return e < 0 ? r(e + t, 0) : o(e, t);
          };
        },
        4088: (e, t, i) => {
          var n = i(5974),
            r = i(9586);
          e.exports = function (e) {
            return n(r(e));
          };
        },
        9502: (e, t, i) => {
          var n = i(5681);
          e.exports = function (e) {
            e = +e;
            return e != e || 0 == e ? 0 : n(e);
          };
        },
        4005: (e, t, i) => {
          var n = i(9502),
            r = Math.min;
          e.exports = function (e) {
            return 0 < e ? r(n(e), 9007199254740991) : 0;
          };
        },
        3060: (e, t, i) => {
          var n = i(9586),
            r = Object;
          e.exports = function (e) {
            return r(n(e));
          };
        },
        1288: (e, t, i) => {
          var n = i(9413),
            r = i(8759),
            o = i(2071),
            s = i(2964),
            a = i(7999),
            i = i(211),
            l = TypeError,
            c = i("toPrimitive");
          e.exports = function (e, t) {
            if (!r(e) || o(e)) return e;
            var i = s(e, c);
            if (i) {
              if (
                ((i = n(i, e, (t = void 0 === t ? "default" : t))),
                !r(i) || o(i))
              )
                return i;
              throw l("Can't convert object to primitive value");
            }
            return a(e, (t = void 0 === t ? "number" : t));
          };
        },
        2258: (e, t, i) => {
          var n = i(1288),
            r = i(2071);
          e.exports = function (e) {
            e = n(e, "string");
            return r(e) ? e : e + "";
          };
        },
        2371: (e, t, i) => {
          var n = {};
          ((n[i(211)("toStringTag")] = "z"),
            (e.exports = "[object z]" === String(n)));
        },
        4059: (e, t, i) => {
          var n = i(375),
            r = String;
          e.exports = function (e) {
            if ("Symbol" === n(e))
              throw TypeError("Cannot convert a Symbol value to a string");
            return r(e);
          };
        },
        9268: (e) => {
          var t = String;
          e.exports = function (e) {
            try {
              return t(e);
            } catch (e) {
              return "Object";
            }
          };
        },
        5422: (e, t, i) => {
          var i = i(8240),
            n = 0,
            r = Math.random(),
            o = i((1).toString);
          e.exports = function (e) {
            return "Symbol(" + (void 0 === e ? "" : e) + ")_" + o(++n + r, 36);
          };
        },
        1876: (e, t, i) => {
          i = i(3193);
          e.exports = i && !Symbol.sham && "symbol" == typeof Symbol.iterator;
        },
        8202: (e, t, i) => {
          var n = i(5283),
            i = i(3677);
          e.exports =
            n &&
            i(function () {
              return (
                42 !=
                Object.defineProperty(function () {}, "prototype", {
                  value: 42,
                  writable: !1,
                }).prototype
              );
            });
        },
        9251: (e, t, i) => {
          i = i(211);
          t.f = i;
        },
        211: (e, t, i) => {
          var n = i(2086),
            r = i(9197),
            o = i(9606),
            s = i(5422),
            a = i(3193),
            l = i(1876),
            c = r("wks"),
            u = n.Symbol,
            h = u && u.for,
            d = l ? u : (u && u.withoutSetter) || s;
          e.exports = function (e) {
            var t;
            return (
              (o(c, e) && (a || "string" == typeof c[e])) ||
                ((t = "Symbol." + e),
                a && o(u, e) ? (c[e] = u[e]) : (c[e] = (l && h ? h : d)(t))),
              c[e]
            );
          };
        },
        3938: (e, t, i) => {
          "use strict";
          var n = i(1695),
            r = i(3677),
            c = i(6526),
            u = i(8759),
            h = i(3060),
            d = i(2871),
            p = i(7620),
            f = i(9720),
            g = i(5574),
            o = i(9955),
            s = i(211),
            i = i(1448),
            m = s("isConcatSpreadable"),
            r =
              51 <= i ||
              !r(function () {
                var e = [];
                return ((e[m] = !1), e.concat()[0] !== e);
              }),
            o = o("concat");
          n(
            { target: "Array", proto: !0, arity: 1, forced: !r || !o },
            {
              concat: function (e) {
                for (
                  var t,
                    i,
                    n,
                    r = h(this),
                    o = g(r, 0),
                    s = 0,
                    a = -1,
                    l = arguments.length;
                  a < l;
                  a++
                )
                  if (
                    (function (e) {
                      if (!u(e)) return !1;
                      var t = e[m];
                      return void 0 !== t ? !!t : c(e);
                    })((n = -1 === a ? r : arguments[a]))
                  )
                    for (i = d(n), p(s + i), t = 0; t < i; t++, s++)
                      t in n && f(o, s, n[t]);
                  else (p(s + 1), f(o, s++, n));
                return ((o.length = s), o);
              },
            },
          );
        },
        8010: (e, t, i) => {
          "use strict";
          var n = i(1695),
            r = i(8062).filter;
          n(
            { target: "Array", proto: !0, forced: !i(9955)("filter") },
            {
              filter: function (e) {
                return r(this, e, 1 < arguments.length ? arguments[1] : void 0);
              },
            },
          );
        },
        5610: (e, t, i) => {
          var n = i(1695),
            r = i(1842);
          n(
            {
              target: "Array",
              stat: !0,
              forced: !i(8939)(function (e) {
                Array.from(e);
              }),
            },
            { from: r },
          );
        },
        5769: (e, t, i) => {
          "use strict";
          var n = i(4088),
            r = i(8669),
            o = 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);
          e.exports = l(
            Array,
            "Array",
            function (e, t) {
              h(this, { type: u, target: n(e), index: 0, kind: t });
            },
            function () {
              var e = d(this),
                t = e.target,
                i = e.kind,
                n = e.index++;
              return !t || n >= t.length
                ? { value: (e.target = void 0), done: !0 }
                : "keys" == i
                  ? { value: n, done: !1 }
                  : "values" == i
                    ? { value: t[n], done: !1 }
                    : { value: [n, t[n]], done: !1 };
            },
            "values",
          );
          o = o.Arguments = o.Array;
          if (
            (r("keys"),
            r("values"),
            r("entries"),
            !c && i && "values" !== o.name)
          )
            try {
              a(o, "name", { value: "values" });
            } catch (e) {}
        },
        5613: (e, t, i) => {
          "use strict";
          var n = i(1695),
            r = i(8240),
            o = i(5974),
            s = i(4088),
            i = i(2802),
            a = r([].join),
            o = o != Object,
            i = i("join", ",");
          n(
            { target: "Array", proto: !0, forced: o || !i },
            {
              join: function (e) {
                return a(s(this), void 0 === e ? "," : e);
              },
            },
          );
        },
        1013: (e, t, i) => {
          "use strict";
          var n = i(1695),
            r = i(8062).map;
          n(
            { target: "Array", proto: !0, forced: !i(9955)("map") },
            {
              map: function (e) {
                return r(this, e, 1 < arguments.length ? arguments[1] : void 0);
              },
            },
          );
        },
        2410: (e, t, 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),
            g = i(9720),
            r = i(211),
            o = i(9955),
            m = i(745),
            o = o("slice"),
            v = r("species"),
            b = Array,
            y = Math.max;
          n(
            { target: "Array", proto: !0, forced: !o },
            {
              slice: function (e, t) {
                var i,
                  n,
                  r,
                  o = f(this),
                  s = p(o),
                  a = d(e, s),
                  l = d(void 0 === t ? s : t, s);
                if (
                  c(o) &&
                  ((i = o.constructor),
                  (i =
                    (u(i) && (i === b || c(i.prototype))) ||
                    (h(i) && null === (i = i[v]))
                      ? void 0
                      : i) === b || void 0 === i)
                )
                  return m(o, a, l);
                for (
                  n = new (void 0 === i ? b : i)(y(l - a, 0)), r = 0;
                  a < l;
                  a++, r++
                )
                  a in o && g(n, r, o[a]);
                return ((n.length = r), n);
              },
            },
          );
        },
        3352: (e, t, i) => {
          var n = i(5283),
            r = i(4398).EXISTS,
            o = i(8240),
            s = i(7826).f,
            i = Function.prototype,
            a = o(i.toString),
            l =
              /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,
            c = o(l.exec);
          n &&
            !r &&
            s(i, "name", {
              configurable: !0,
              get: function () {
                try {
                  return c(l, a(this))[1];
                } catch (e) {
                  return "";
                }
              },
            });
        },
        5735: (e, t, i) => {
          function r(e, t) {
            var i = g(arguments),
              n = t;
            if ((p(t) || void 0 !== e) && !f(e))
              return (
                h(t) ||
                  (t = function (e, t) {
                    if ((d(n) && (t = l(n, this, e, t)), !f(t))) return t;
                  }),
                (i[1] = t),
                a(m, null, i)
              );
          }
          function o(e, t, i) {
            var n = b(i, t - 1),
              t = b(i, t + 1);
            return (v(k, e) && !v(C, t)) || (v(C, e) && !v(k, n))
              ? "\\u" + w(y(e, 0), 16)
              : e;
          }
          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),
            g = i(745),
            i = i(3193),
            m = s("JSON", "stringify"),
            v = c(/./.exec),
            b = c("".charAt),
            y = c("".charCodeAt),
            _ = c("".replace),
            w = c((1).toString),
            x = /[\uD800-\uDFFF]/g,
            k = /^[\uD800-\uDBFF]$/,
            C = /^[\uDC00-\uDFFF]$/,
            P =
              !i ||
              u(function () {
                var e = s("Symbol")();
                return (
                  "[null]" != m([e]) ||
                  "{}" != m({ a: e }) ||
                  "{}" != m(Object(e))
                );
              }),
            T = u(function () {
              return (
                '"\\udf06\\ud834"' !== m("\udf06\ud834") ||
                '"\\udead"' !== m("\udead")
              );
            });
          m &&
            n(
              { target: "JSON", stat: !0, arity: 3, forced: P || T },
              {
                stringify: function (e, t, i) {
                  var n = g(arguments),
                    n = a(P ? r : m, null, n);
                  return T && "string" == typeof n ? _(n, x, o) : n;
                },
              },
            );
        },
        8410: (e, t, i) => {
          var n = i(1695),
            i = i(8675);
          n(
            {
              target: "Object",
              stat: !0,
              arity: 2,
              forced: Object.assign !== i,
            },
            { assign: i },
          );
        },
        4844: (e, t, i) => {
          var n = i(1695),
            r = i(6910),
            o = i(3677),
            s = i(8759),
            a = i(2423).onFreeze,
            l = Object.freeze;
          n(
            {
              target: "Object",
              stat: !0,
              forced: o(function () {
                l(1);
              }),
              sham: !r,
            },
            {
              freeze: function (e) {
                return l && s(e) ? l(a(e)) : e;
              },
            },
          );
        },
        252: (e, t, i) => {
          var n = i(1695),
            r = i(3677),
            o = i(4088),
            s = i(4399).f,
            i = i(5283),
            r = r(function () {
              s(1);
            });
          n(
            { target: "Object", stat: !0, forced: !i || r, sham: !i },
            {
              getOwnPropertyDescriptor: function (e, t) {
                return s(o(e), t);
              },
            },
          );
        },
        4009: (e, t, i) => {
          var n = i(1695),
            r = i(5283),
            l = i(6095),
            c = i(4088),
            u = i(4399),
            h = i(9720);
          n(
            { target: "Object", stat: !0, sham: !r },
            {
              getOwnPropertyDescriptors: function (e) {
                for (
                  var t, i, n = c(e), r = u.f, o = l(n), s = {}, a = 0;
                  o.length > a;

                )
                  void 0 !== (i = r(n, (t = o[a++]))) && h(s, t, i);
                return s;
              },
            },
          );
        },
        883: (e, t, i) => {
          var n = i(1695),
            r = i(3193),
            o = i(3677),
            s = i(6952),
            a = i(3060);
          n(
            {
              target: "Object",
              stat: !0,
              forced:
                !r ||
                o(function () {
                  s.f(1);
                }),
            },
            {
              getOwnPropertySymbols: function (e) {
                var t = s.f;
                return t ? t(a(e)) : [];
              },
            },
          );
        },
        2274: (e, t, i) => {
          var n = i(1695),
            r = i(3677),
            o = i(3060),
            s = i(2130),
            i = i(7209);
          n(
            {
              target: "Object",
              stat: !0,
              forced: r(function () {
                s(1);
              }),
              sham: !i,
            },
            {
              getPrototypeOf: function (e) {
                return s(o(e));
              },
            },
          );
        },
        2571: (e, t, i) => {
          var n = i(1695),
            r = i(3060),
            o = i(8779);
          n(
            {
              target: "Object",
              stat: !0,
              forced: i(3677)(function () {
                o(1);
              }),
            },
            {
              keys: function (e) {
                return o(r(e));
              },
            },
          );
        },
        3238: (e, t, i) => {
          var n = i(2371),
            r = i(1343),
            i = i(999);
          n || r(Object.prototype, "toString", i, { unsafe: !0 });
        },
        3214: (e, t, i) => {
          var n = i(1695),
            r = i(563),
            o = i(7258),
            s = i(2395),
            a = i(1449),
            l = i(6112),
            c = i(8759),
            u = i(4710),
            i = i(3677),
            h = r("Reflect", "construct"),
            d = Object.prototype,
            p = [].push,
            f = i(function () {
              function e() {}
              return !(h(function () {}, [], e) instanceof e);
            }),
            g = !i(function () {
              h(function () {});
            }),
            i = f || g;
          n(
            { target: "Reflect", stat: !0, forced: i, sham: i },
            {
              construct: function (e, t) {
                (a(e), l(t));
                var i = arguments.length < 3 ? e : a(arguments[2]);
                if (g && !f) return h(e, t, i);
                if (e == i) {
                  switch (t.length) {
                    case 0:
                      return new e();
                    case 1:
                      return new e(t[0]);
                    case 2:
                      return new e(t[0], t[1]);
                    case 3:
                      return new e(t[0], t[1], t[2]);
                    case 4:
                      return new e(t[0], t[1], t[2], t[3]);
                  }
                  var n = [null];
                  return (o(p, n, t), new (o(s, e, n))());
                }
                ((n = i.prototype), (i = u(c(n) ? n : d)), (n = o(e, i, t)));
                return c(n) ? n : i;
              },
            },
          );
        },
        2077: (e, t, i) => {
          "use strict";
          var n = i(1695),
            i = i(4861);
          n(
            { target: "RegExp", proto: !0, forced: /./.exec !== i },
            { exec: i },
          );
        },
        895: (e, t, i) => {
          "use strict";
          var n = i(4398).PROPER,
            r = i(1343),
            o = 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) &&
            r(
              RegExp.prototype,
              i,
              function () {
                var e = o(this);
                return "/" + s(e.source) + "/" + s(l(e));
              },
              { unsafe: !0 },
            );
        },
        7460: (e, t, i) => {
          "use strict";
          var n = i(3448).charAt,
            r = i(4059),
            o = i(3278),
            i = i(8432),
            s = "String Iterator",
            a = o.set,
            l = o.getterFor(s);
          i(
            String,
            "String",
            function (e) {
              a(this, { type: s, string: r(e), index: 0 });
            },
            function () {
              var e = l(this),
                t = e.string,
                i = e.index;
              return i >= t.length
                ? { value: void 0, done: !0 }
                : ((i = n(t, i)),
                  (e.index += i.length),
                  { value: i, done: !1 });
            },
          );
        },
        911: (e, t, i) => {
          "use strict";
          var x = i(7258),
            r = i(9413),
            n = i(8240),
            o = i(2331),
            s = i(3677),
            k = i(6112),
            C = i(930),
            P = i(9502),
            T = i(4005),
            S = i(4059),
            a = i(9586),
            H = i(9966),
            l = i(2964),
            D = i(8509),
            E = i(1189),
            c = i(211)("replace"),
            I = Math.max,
            A = Math.min,
            O = n([].concat),
            M = n([].push),
            L = n("".indexOf),
            j = n("".slice),
            n = "$0" === "a".replace(/./, "$0"),
            u = !!/./[c] && "" === /./[c]("a", "$0");
          o(
            "replace",
            function (e, y, _) {
              var w = u ? "$" : "$0";
              return [
                function (e, t) {
                  var i = a(this),
                    n = null == e ? void 0 : l(e, c);
                  return n ? r(n, e, i, t) : r(y, S(i), e, t);
                },
                function (e, t) {
                  var i = k(this),
                    n = S(e);
                  if (
                    "string" == typeof t &&
                    -1 === L(t, w) &&
                    -1 === L(t, "$<")
                  ) {
                    e = _(y, i, n, t);
                    if (e.done) return e.value;
                  }
                  var r = C(t);
                  r || (t = S(t));
                  var o,
                    s = i.global;
                  s && ((o = i.unicode), (i.lastIndex = 0));
                  for (var a = []; ; ) {
                    var l = E(i, n);
                    if (null === l) break;
                    if ((M(a, l), !s)) break;
                    "" === S(l[0]) && (i.lastIndex = H(n, T(i.lastIndex), o));
                  }
                  for (var c, u = "", h = 0, d = 0; d < a.length; d++) {
                    for (
                      var p = S((l = a[d])[0]),
                        f = I(A(P(l.index), n.length), 0),
                        g = [],
                        m = 1;
                      m < l.length;
                      m++
                    )
                      M(g, void 0 === (c = l[m]) ? c : String(c));
                    var v,
                      b = l.groups,
                      b = r
                        ? ((v = O([p], g, f, n)),
                          void 0 !== b && M(v, b),
                          S(x(t, void 0, v)))
                        : D(p, n, f, g, b, t);
                    h <= f && ((u += j(n, h, f) + b), (h = f + p.length));
                  }
                  return u + j(n, h);
                },
              ];
            },
            !!s(function () {
              var e = /./;
              return (
                (e.exec = function () {
                  var e = [];
                  return ((e.groups = { a: "7" }), e);
                }),
                "7" !== "".replace(e, "$<a>")
              );
            }) ||
              !n ||
              u,
          );
        },
        2482: (e, t, i) => {
          "use strict";
          var u = i(7258),
            h = i(9413),
            n = i(8240),
            r = i(2331),
            d = i(7994),
            v = i(6112),
            p = i(9586),
            b = i(8515),
            y = i(9966),
            _ = i(4005),
            w = i(4059),
            o = i(2964),
            x = i(3329),
            k = i(1189),
            C = i(4861),
            s = i(4930),
            i = i(3677),
            P = s.UNSUPPORTED_Y,
            T = Math.min,
            S = [].push,
            H = n(/./.exec),
            D = n(S),
            E = n("".slice);
          r(
            "split",
            function (r, f, g) {
              var m =
                "c" == "abbc".split(/(b)*/)[1] ||
                4 != "test".split(/(?:)/, -1).length ||
                2 != "ab".split(/(?:ab)*/).length ||
                4 != ".".split(/(.?)(.?)/).length ||
                1 < ".".split(/()()/).length ||
                "".split(/.?/).length
                  ? function (e, t) {
                      var i = w(p(this)),
                        n = void 0 === t ? 4294967295 : t >>> 0;
                      if (0 == n) return [];
                      if (void 0 === e) return [i];
                      if (!d(e)) return h(f, i, e, n);
                      for (
                        var r,
                          o,
                          s,
                          a = [],
                          t =
                            (e.ignoreCase ? "i" : "") +
                            (e.multiline ? "m" : "") +
                            (e.unicode ? "u" : "") +
                            (e.sticky ? "y" : ""),
                          l = 0,
                          c = new RegExp(e.source, t + "g");
                        (r = h(C, c, i)) &&
                        !(
                          (o = c.lastIndex) > l &&
                          (D(a, E(i, l, r.index)),
                          1 < r.length &&
                            r.index < i.length &&
                            u(S, a, x(r, 1)),
                          (s = r[0].length),
                          (l = o),
                          n <= a.length)
                        );

                      )
                        c.lastIndex === r.index && c.lastIndex++;
                      return (
                        l === i.length
                          ? (!s && H(c, "")) || D(a, "")
                          : D(a, E(i, l)),
                        n < a.length ? x(a, 0, n) : a
                      );
                    }
                  : "0".split(void 0, 0).length
                    ? function (e, t) {
                        return void 0 === e && 0 === t ? [] : h(f, this, e, t);
                      }
                    : f;
              return [
                function (e, t) {
                  var i = p(this),
                    n = null == e ? void 0 : o(e, r);
                  return n ? h(n, e, i, t) : h(m, w(i), e, t);
                },
                function (e, t) {
                  var i = v(this),
                    n = w(e),
                    r = g(m, i, n, t, m !== f);
                  if (r.done) return r.value;
                  var e = b(i, RegExp),
                    o = i.unicode,
                    r =
                      (i.ignoreCase ? "i" : "") +
                      (i.multiline ? "m" : "") +
                      (i.unicode ? "u" : "") +
                      (P ? "g" : "y"),
                    s = new e(P ? "^(?:" + i.source + ")" : i, r),
                    a = void 0 === t ? 4294967295 : t >>> 0;
                  if (0 == a) return [];
                  if (0 === n.length) return null === k(s, n) ? [n] : [];
                  for (var l = 0, c = 0, u = []; c < n.length; ) {
                    s.lastIndex = P ? 0 : c;
                    var h,
                      d = k(s, P ? E(n, c) : n);
                    if (
                      null === d ||
                      (h = T(_(s.lastIndex + (P ? c : 0)), n.length)) === l
                    )
                      c = y(n, c, o);
                    else {
                      if ((D(u, E(n, l, c)), u.length === a)) return u;
                      for (var p = 1; p <= d.length - 1; p++)
                        if ((D(u, d[p]), u.length === a)) return u;
                      c = l = h;
                    }
                  }
                  return (D(u, E(n, l)), u);
                },
              ];
            },
            !!i(function () {
              var e = /(?:)/,
                t = e.exec;
              e.exec = function () {
                return t.apply(this, arguments);
              };
              e = "ab".split(e);
              return 2 !== e.length || "a" !== e[0] || "b" !== e[1];
            }),
            P,
          );
        },
        4211: (e, t, i) => {
          "use strict";
          function n(e, t) {
            var i = (re[e] = P(K));
            return (
              Q(i, { type: Y, tag: e, description: t }),
              g || (i.description = t),
              i
            );
          }
          function r(e, t, i) {
            return (
              e === Z && r(oe, t, i),
              _(e),
              (t = x(t)),
              _(i),
              b(re, t)
                ? (i.enumerable
                    ? (b(e, V) && e[V][t] && (e[V][t] = !1),
                      (i = P(i, { enumerable: C(0, !1) })))
                    : (b(e, V) || ee(e, V, C(1, {})), (e[V][t] = !0)),
                  ae(e, t, i))
                : ee(e, t, i)
            );
          }
          function o(t, e) {
            _(t);
            var i = w(e),
              e = T(i).concat(c(i));
            return (
              U(e, function (e) {
                (g && !d(s, i, e)) || r(t, e, i[e]);
              }),
              t
            );
          }
          function s(e) {
            var t = x(e),
              e = d(ie, this, t);
            return (
              !(this === Z && b(re, t) && !b(oe, t)) &&
              (!(e || !b(this, t) || !b(re, t) || (b(this, V) && this[V][t])) ||
                e)
            );
          }
          function a(e, t) {
            var i = w(e),
              e = x(t);
            if (i !== Z || !b(re, e) || b(oe, e)) {
              t = J(i, e);
              return (
                !t || !b(re, e) || (b(i, V) && i[V][e]) || (t.enumerable = !0),
                t
              );
            }
          }
          function l(e) {
            var e = te(w(e)),
              t = [];
            return (
              U(e, function (e) {
                b(re, e) || b(N, e) || ne(t, e);
              }),
              t
            );
          }
          function c(e) {
            var t = e === Z,
              e = te(t ? oe : w(e)),
              i = [];
            return (
              U(e, function (e) {
                !b(re, e) || (t && !b(Z, e)) || ne(i, re[e]);
              }),
              i
            );
          }
          var u = i(1695),
            h = i(2086),
            d = i(9413),
            p = i(8240),
            f = i(3296),
            g = i(5283),
            m = i(3193),
            v = i(3677),
            b = i(9606),
            y = i(5516),
            _ = i(6112),
            w = i(4088),
            x = i(2258),
            k = i(4059),
            C = i(5736),
            P = i(4710),
            T = i(8779),
            S = i(62),
            H = i(3226),
            D = i(6952),
            E = i(4399),
            I = i(7826),
            A = i(7711),
            O = i(7446),
            M = i(1343),
            L = i(9197),
            j = i(8944),
            N = i(7153),
            F = i(5422),
            z = i(211),
            R = i(9251),
            B = i(4145),
            q = i(338),
            $ = i(914),
            W = i(3278),
            U = i(8062).forEach,
            V = j("hidden"),
            Y = "Symbol",
            j = "prototype",
            Q = W.set,
            X = W.getterFor(Y),
            Z = Object[j],
            W = h.Symbol,
            K = W && W[j],
            G = h.TypeError,
            h = h.QObject,
            J = E.f,
            ee = I.f,
            te = H.f,
            ie = O.f,
            ne = p([].push),
            re = L("symbols"),
            oe = L("op-symbols"),
            L = L("wks"),
            se = !h || !h[j] || !h[j].findChild,
            ae =
              g &&
              v(function () {
                return (
                  7 !=
                  P(
                    ee({}, "a", {
                      get: function () {
                        return ee(this, "a", { value: 7 }).a;
                      },
                    }),
                  ).a
                );
              })
                ? function (e, t, i) {
                    var n = J(Z, t);
                    (n && delete Z[t],
                      ee(e, t, i),
                      n && e !== Z && ee(Z, t, n));
                  }
                : ee;
          (m ||
            (M(
              (K = (W = function () {
                if (y(K, this)) throw G("Symbol is not a constructor");
                var e =
                    arguments.length && void 0 !== arguments[0]
                      ? k(arguments[0])
                      : void 0,
                  t = F(e),
                  i = function (e) {
                    (this === Z && d(i, oe, e),
                      b(this, V) && b(this[V], t) && (this[V][t] = !1),
                      ae(this, t, C(1, e)));
                  };
                return (
                  g && se && ae(Z, t, { configurable: !0, set: i }),
                  n(t, e)
                );
              })[j]),
              "toString",
              function () {
                return X(this).tag;
              },
            ),
            M(W, "withoutSetter", function (e) {
              return n(F(e), e);
            }),
            (O.f = s),
            (I.f = r),
            (A.f = o),
            (E.f = a),
            (S.f = H.f = l),
            (D.f = c),
            (R.f = function (e) {
              return n(z(e), e);
            }),
            g &&
              (ee(K, "description", {
                configurable: !0,
                get: function () {
                  return X(this).description;
                },
              }),
              f || M(Z, "propertyIsEnumerable", s, { unsafe: !0 }))),
            u(
              {
                global: !0,
                constructor: !0,
                wrap: !0,
                forced: !m,
                sham: !m,
              },
              { Symbol: W },
            ),
            U(T(L), function (e) {
              B(e);
            }),
            u(
              { target: Y, stat: !0, forced: !m },
              {
                useSetter: function () {
                  se = !0;
                },
                useSimple: function () {
                  se = !1;
                },
              },
            ),
            u(
              { target: "Object", stat: !0, forced: !m, sham: !g },
              {
                create: function (e, t) {
                  return void 0 === t ? P(e) : o(P(e), t);
                },
                defineProperty: r,
                defineProperties: o,
                getOwnPropertyDescriptor: a,
              },
            ),
            u(
              { target: "Object", stat: !0, forced: !m },
              { getOwnPropertyNames: l },
            ),
            q(),
            $(W, Y),
            (N[V] = !0));
        },
        2189: (e, t, i) => {
          "use strict";
          var n,
            r,
            o,
            s,
            a,
            l,
            c,
            u = i(1695),
            h = i(5283),
            d = i(2086),
            p = i(8240),
            f = i(9606),
            g = i(930),
            m = i(5516),
            v = i(4059),
            b = i(7826).f,
            i = i(8474),
            y = d.Symbol,
            _ = y && y.prototype;
          !h ||
            !g(y) ||
            ("description" in _ && void 0 === y().description) ||
            ((n = {}),
            i(
              (i = function () {
                var e =
                    arguments.length < 1 || void 0 === arguments[0]
                      ? void 0
                      : v(arguments[0]),
                  t = m(_, this) ? new y(e) : void 0 === e ? y() : y(e);
                return ("" === e && (n[t] = !0), t);
              }),
              y,
            ),
            ((i.prototype = _).constructor = i),
            (r = "Symbol(test)" == String(y("test"))),
            (o = p(_.toString)),
            (s = p(_.valueOf)),
            (a = /^Symbol\((.*)\)[^)]+$/),
            (l = p("".replace)),
            (c = p("".slice)),
            b(_, "description", {
              configurable: !0,
              get: function () {
                var e = s(this),
                  t = o(e);
                if (f(n, e)) return "";
                t = r ? c(t, 7, -1) : l(t, a, "$1");
                return "" === t ? void 0 : t;
              },
            }),
            u({ global: !0, constructor: !0, forced: !0 }, { Symbol: i }));
        },
        8028: (e, t, i) => {
          var n = i(1695),
            r = i(563),
            o = 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 (e) {
                var t = s(e);
                if (o(l, t)) return l[t];
                e = r("Symbol")(t);
                return ((l[t] = e), (c[e] = t), e);
              },
            },
          );
        },
        1047: (e, t, i) => {
          i(4145)("iterator");
        },
        5901: (e, t, i) => {
          (i(4211), i(8028), i(9819), i(5735), i(883));
        },
        9819: (e, t, i) => {
          var n = i(1695),
            r = i(9606),
            o = 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 (e) {
                if (!o(e)) throw TypeError(s(e) + " is not a symbol");
                if (r(l, e)) return l[e];
              },
            },
          );
        },
        5849: (e, t, i) => {
          function n(t) {
            if (t && t.forEach !== l)
              try {
                c(t, "forEach", l);
              } catch (e) {
                t.forEach = l;
              }
          }
          var r,
            o = i(2086),
            s = i(933),
            a = i(3526),
            l = i(1984),
            c = i(2585);
          for (r in s) s[r] && n(o[r] && o[r].prototype);
          n(a);
        },
        4078: (e, t, i) => {
          function n(e, t) {
            if (e) {
              if (e[u] !== d)
                try {
                  c(e, u, d);
                } catch (t) {
                  e[u] = d;
                }
              if ((e[h] || c(e, h, t), s[t]))
                for (var i in l)
                  if (e[i] !== l[i])
                    try {
                      c(e, i, l[i]);
                    } catch (t) {
                      e[i] = l[i];
                    }
            }
          }
          var r,
            o = 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 (r in s) n(o[r] && o[r].prototype, r);
          n(a, "DOMTokenList");
        },
        2062: () => {
          var l = function (e) {
            return ((e = +e), isNaN(e) || e == 1 / 0 || e == -1 / 0 ? 0 : e);
          };
          (Element.prototype.scroll ||
            (Element.prototype.scroll = function () {
              var e,
                t = arguments.length,
                i = this.ownerDocument,
                n = i.defaultView,
                r = "BackCompat" == i.compatMode,
                o = document.getElementsByTagName("BODY")[0],
                s = {};
              if (i == window.document && n && 0 !== t) {
                if (1 === t) {
                  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)),
                    (e = "left" in s ? s.left : this.scrollLeft),
                    (a = "top" in s ? s.top : this.scrollTop));
                } else
                  ((s.left = e = l(arguments[0])),
                    (s.top = a = l(arguments[1])));
                this != document.documentElement
                  ? this != o ||
                    !r ||
                    (function (e) {
                      e = o || document.getElementsByTagName("BODY")[0];
                      var t = window.getComputedStyle(e),
                        i = window.getComputedStyle(e.parent),
                        n = t.overflowX,
                        r = t.overflowY,
                        e = i.overflowX,
                        i = i.overflowY;
                      return (
                        ("table-column" == t.display ||
                          "table-column-group" == t.display) &&
                        "visible" != e &&
                        "clip" != e &&
                        "visible" != i &&
                        "clip" != i &&
                        "visible" != n &&
                        "clip" != n &&
                        "visible" != r &&
                        "clip" != r
                      );
                    })()
                    ? ((this.scrollLeft = e), (this.scrollTop = a))
                    : n.scroll(s.left, s.top)
                  : r ||
                    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 e = arguments.length,
                  t = {};
                if (0 !== e) {
                  if (1 === e) {
                    e = arguments[0];
                    if ("object" != typeof e)
                      throw "Failed to execute 'scrollBy' on 'Element': parameter 1 ('options') is not an object.";
                    ("left" in e && (t.left = l(e.left)),
                      "top" in e && (t.top = l(e.top)));
                  } else
                    ((t.left = l(arguments[0])), (t.top = l(arguments[1])));
                  ((t.left =
                    "left" in t ? t.left + this.scrollLeft : this.scrollLeft),
                    (t.top =
                      "top" in t ? t.top + this.scrollTop : this.scrollTop),
                    this.scroll(t));
                }
              }));
        },
        7190: (e) => {
          e.exports = function (e) {
            return (
              !(!e || "string" == typeof e) &&
              (e instanceof Array ||
                Array.isArray(e) ||
                (0 <= e.length &&
                  (e.splice instanceof Function ||
                    (Object.getOwnPropertyDescriptor(e, e.length - 1) &&
                      "String" !== e.constructor.name))))
            );
          };
        },
        7159: (e, t, i) => {
          var n = [i(5998)];
          void 0 ===
            (i =
              "function" ==
              typeof (i = function (d) {
                function s(e) {
                  this.init(e);
                }
                ((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 (e) {
                    (d.extend(this, e),
                      (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 e,
                      t = this.canvas;
                    ((t.width = this.size),
                      (t.height = this.size),
                      (this.ctx = t.getContext("2d")),
                      1 < window.devicePixelRatio &&
                        ((e = window.devicePixelRatio),
                        (t.style.width = t.style.height = this.size + "px"),
                        (t.width = t.height = this.size * e),
                        this.ctx.scale(e, e)));
                  },
                  initFill: function () {
                    var t,
                      i = this,
                      e = this.fill,
                      n = this.ctx,
                      r = this.size;
                    if (!e) throw Error("The fill is not specified!");
                    if (
                      ((e = "string" == typeof e ? { color: e } : e).color &&
                        (this.arcFill = e.color),
                      e.gradient)
                    ) {
                      var o = e.gradient;
                      if (1 == o.length) this.arcFill = o[0];
                      else if (1 < o.length) {
                        for (
                          var s = e.gradientAngle || 0,
                            s = e.gradientDirection || [
                              (r / 2) * (1 - Math.cos(s)),
                              (r / 2) * (1 + Math.sin(s)),
                              (r / 2) * (1 + Math.cos(s)),
                              (r / 2) * (1 - Math.sin(s)),
                            ],
                            a = n.createLinearGradient.apply(n, s),
                            l = 0;
                          l < o.length;
                          l++
                        ) {
                          var c = o[l],
                            u = l / (o.length - 1);
                          (d.isArray(c) && ((u = c[1]), (c = c[0])),
                            a.addColorStop(u, c));
                        }
                        this.arcFill = a;
                      }
                    }
                    function h() {
                      var e = d("<canvas>")[0];
                      ((e.width = i.size),
                        (e.height = i.size),
                        e.getContext("2d").drawImage(t, 0, 0, r, r),
                        (i.arcFill = i.ctx.createPattern(e, "no-repeat")),
                        i.drawFrame(i.lastFrameValue));
                    }
                    e.image &&
                      (e.image instanceof Image
                        ? (t = e.image)
                        : ((t = new Image()).src = e.image),
                      t.complete ? h() : (t.onload = h));
                  },
                  draw: function () {
                    this.animation
                      ? this.drawAnimated(this.value)
                      : this.drawFrame(this.value);
                  },
                  drawFrame: function (e) {
                    ((this.lastFrameValue = e),
                      this.ctx.clearRect(0, 0, this.size, this.size),
                      this.drawEmptyArc(e),
                      this.drawArc(e));
                  },
                  drawArc: function (e) {
                    var t, i, n, r;
                    0 !== e &&
                      ((t = this.ctx),
                      (i = this.radius),
                      (n = this.getThickness()),
                      (r = this.startAngle),
                      t.save(),
                      t.beginPath(),
                      this.reverse
                        ? t.arc(i, i, i - n / 2, r - 2 * Math.PI * e, r)
                        : t.arc(i, i, i - n / 2, r, r + 2 * Math.PI * e),
                      (t.lineWidth = n),
                      (t.lineCap = this.lineCap),
                      (t.strokeStyle = this.arcFill),
                      t.stroke(),
                      t.restore());
                  },
                  drawEmptyArc: function (e) {
                    var t = this.ctx,
                      i = this.radius,
                      n = this.getThickness(),
                      r = this.startAngle;
                    e < 1 &&
                      (t.save(),
                      t.beginPath(),
                      e <= 0
                        ? t.arc(i, i, i - n / 2, 0, 2 * Math.PI)
                        : this.reverse
                          ? t.arc(i, i, i - n / 2, r, r - 2 * Math.PI * e)
                          : t.arc(i, i, i - n / 2, r + 2 * Math.PI * e, r),
                      (t.lineWidth = n),
                      (t.strokeStyle = this.emptyFill),
                      t.stroke(),
                      t.restore());
                  },
                  drawAnimated: function (i) {
                    var n = this,
                      r = this.el,
                      e = d(this.canvas);
                    (e.stop(!0, !1),
                      r.trigger("circle-animation-start"),
                      e
                        .css({ animationProgress: 0 })
                        .animate(
                          { animationProgress: 1 },
                          d.extend({}, this.animation, {
                            step: function (e) {
                              var t = n.animationStartValue * (1 - e) + i * e;
                              (n.drawFrame(t),
                                r.trigger("circle-animation-progress", [e, t]));
                            },
                          }),
                        )
                        .promise()
                        .always(function () {
                          r.trigger("circle-animation-end");
                        }));
                  },
                  getThickness: function () {
                    return d.isNumeric(this.thickness)
                      ? this.thickness
                      : this.size / 14;
                  },
                  getValue: function () {
                    return this.value;
                  },
                  setValue: function (e) {
                    (this.animation &&
                      (this.animationStartValue = this.lastFrameValue),
                      (this.value = e),
                      this.draw());
                  },
                }),
                  (d.circleProgress = { defaults: s.prototype }),
                  (d.easing.circleProgressEasing = function (e) {
                    return e < 0.5
                      ? 0.5 * (e *= 2) * e * e
                      : 1 - 0.5 * (e = 2 - 2 * e) * e * e;
                  }),
                  (d.fn.circleProgress = function (r, e) {
                    var o = "circle-progress",
                      t = this.data(o);
                    if ("widget" == r) {
                      if (!t)
                        throw Error(
                          'Calling "widget" method on not initialized instance is forbidden',
                        );
                      return t.canvas;
                    }
                    if ("value" != r)
                      return this.each(function () {
                        var e,
                          t = d(this),
                          i = t.data(o),
                          n = d.isPlainObject(r) ? r : {};
                        i
                          ? i.init(n)
                          : ("string" ==
                              typeof (e = d.extend({}, t.data())).fill &&
                              (e.fill = JSON.parse(e.fill)),
                            "string" == typeof e.animation &&
                              (e.animation = JSON.parse(e.animation)),
                            ((n = d.extend(e, n)).el = t),
                            (i = new s(n)),
                            t.data(o, i));
                      });
                    if (!t)
                      throw Error(
                        'Calling "value" method on not initialized instance is forbidden',
                      );
                    if (void 0 === e) return t.getValue();
                    var i = e;
                    return this.each(function () {
                      d(this).data(o).setValue(i);
                    });
                  }));
              })
                ? i.apply(t, n)
                : i) || (e.exports = i);
        },
        521: (e, t, i) => {
          "use strict";
          var o = i(7190),
            s = Array.prototype.concat,
            a = Array.prototype.slice,
            n = (e.exports = function (e) {
              for (var t = [], i = 0, n = e.length; i < n; i++) {
                var r = e[i];
                o(r) ? (t = s.call(t, a.call(r))) : t.push(r);
              }
              return t;
            });
          n.wrap = function (e) {
            return function () {
              return e(n(arguments));
            };
          };
        },
        5998: (e) => {
          "use strict";
          e.exports = H5P.jQuery;
        },
      },
      n = {};
    function Z(e) {
      var t = n[e];
      if (void 0 !== t) return t.exports;
      t = n[e] = { exports: {} };
      return (i[e](t, t.exports, Z), t.exports);
    }
    ((Z.n = (e) => {
      var t = e && e.__esModule ? () => e.default : () => e;
      return (Z.d(t, { a: t }), t);
    }),
      (Z.d = (e, t) => {
        for (var i in t)
          Z.o(t, i) &&
            !Z.o(e, i) &&
            Object.defineProperty(e, i, { enumerable: !0, get: t[i] });
      }),
      (Z.g = (function () {
        if ("object" == typeof globalThis) return globalThis;
        try {
          return this || new Function("return this")();
        } catch (e) {
          if ("object" == typeof window) return window;
        }
      })()),
      (Z.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)),
      (() => {
        "use strict";
        function e(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        (Z(3214),
          Z(8410),
          Z(2571),
          Z(5901),
          Z(252),
          Z(4009),
          Z(2189),
          Z(1047),
          Z(5769),
          Z(7460),
          Z(4078),
          Z(3238),
          Z(5849),
          Z(1013),
          Z(8010),
          Z(3938),
          Z(2410),
          Z(2077),
          Z(911),
          Z(2274),
          Z(2482),
          Z(5613),
          Z(895));
        const h =
          ((X = t),
          (i = [
            {
              key: "extractFragmentsFromURL",
              value: function (e, t) {
                if (!t.location.hash) return {};
                var i = {};
                return (
                  t.location.hash
                    .replace("#", "")
                    .split("&")
                    .forEach(function (e) {
                      -1 !== e.indexOf("=") &&
                        ((e = e.split("=")), (i[e[0]] = e[1]));
                    }),
                  "function" != typeof e || e(i) ? i : {}
                );
              },
            },
            {
              key: "createFragmentsString",
              value: function (e) {
                var t,
                  i = [];
                for (t in e) i.push("".concat(t, "=").concat(e[t]));
                return "#".concat(i.join("&"));
              },
            },
            {
              key: "areFragmentsEqual",
              value: function (e, t) {
                var i,
                  n =
                    2 < arguments.length && void 0 !== arguments[2]
                      ? arguments[2]
                      : [];
                for (i in e)
                  if (e.hasOwnProperty(i)) {
                    if (0 < n.length && -1 === n.indexOf(i)) continue;
                    if (!t[i] || e[i].toString() !== t[i].toString()) return !1;
                  }
                return !0;
              },
            },
          ]),
          null && e(X.prototype, null),
          e(X, i),
          Object.defineProperty(X, "prototype", { writable: !1 }),
          t);
        function t() {
          !(function (e) {
            if (!(e instanceof t))
              throw new TypeError("Cannot call a class as a function");
          })(this);
        }
        function r(e) {
          return (r =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        function a(e, t) {
          (null == t || t > e.length) && (t = e.length);
          for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];
          return n;
        }
        function l(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function c(e, t) {
          return (c = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function u(e) {
          return (u = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        (Z(4844), Z(3352), Z(5610));
        const d = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && c(e, t));
          })(s, H5P.EventDispatcher);
          var e,
            i,
            n,
            o =
              ((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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = u(i);
                return (function (e, t) {
                  if (t && ("object" === r(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (e) {
                    if (void 0 === e)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return e;
                  })(e);
                })(
                  this,
                  n
                    ? ((e = u(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function s(e, t, i, n) {
            var r;
            return (
              (function (e) {
                if (!(e instanceof s))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((r = o.call(this)).id = t),
              (r.parent = n),
              (r.behaviour = e.behaviour),
              (r.content = document.createElement("ul")),
              r.content.classList.add("navigation-list"),
              (r.container = r.addSideBar()),
              (r.l10n = e.l10n),
              (r.chapters = r.findAllChapters(e.chapters)),
              (r.chapterNodes = r.getChapterNodes()),
              i &&
                ((r.titleElem = r.addMainTitle(i)),
                r.container.appendChild(r.titleElem)),
              r.chapterNodes.forEach(function (e) {
                r.content.appendChild(e);
              }),
              20 < r.chapters.length &&
                r.content.classList.add("large-navigation-list"),
              r.container.appendChild(r.content),
              r.addTransformListener(),
              r.initializeNavigationControls(),
              r
            );
          }
          return (
            l((e = s).prototype, [
              {
                key: "initializeNavigationControls",
                value: function () {
                  var r = this,
                    o = Object.freeze({ UP: 38, DOWN: 40 });
                  this.chapterNodes.forEach(function (e, i) {
                    e.querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    ).addEventListener("keydown", function (e) {
                      switch (e.keyCode) {
                        case o.UP:
                          (r.setFocusToChapterItem(i, -1), e.preventDefault());
                          break;
                        case o.DOWN:
                          (r.setFocusToChapterItem(i, 1), e.preventDefault());
                      }
                    });
                    for (
                      var n = e.querySelectorAll(
                          ".h5p-interactive-book-navigation-section",
                        ),
                        t = 0;
                      t < n.length;
                      t++
                    )
                      !(function (t) {
                        n[t]
                          .querySelector(".section-button")
                          .addEventListener("keydown", function (e) {
                            switch (e.keyCode) {
                              case o.UP:
                                (r.setFocusToSectionItem(i, t, -1),
                                  e.preventDefault());
                                break;
                              case o.DOWN:
                                (r.setFocusToSectionItem(i, t, 1),
                                  e.preventDefault());
                            }
                          });
                      })(t);
                  });
                },
              },
              {
                key: "focus",
                value: function () {
                  this.content.querySelector("button").focus();
                },
              },
              {
                key: "setFocusToChapterItem",
                value: function (e) {
                  var t =
                      1 < arguments.length && void 0 !== arguments[1]
                        ? arguments[1]
                        : 0,
                    i = e + t;
                  if (
                    (i < 0
                      ? (i = this.chapterNodes.length - 1)
                      : i > this.chapterNodes.length - 1 && (i = 0),
                    t)
                  ) {
                    var n = 0 < t ? e : i,
                      e = this.chapterNodes[n];
                    if (
                      !e.classList.contains(
                        "h5p-interactive-book-navigation-closed",
                      )
                    ) {
                      e = e.querySelectorAll(
                        ".h5p-interactive-book-navigation-section",
                      );
                      if (e.length) {
                        var r = 0 < t ? 0 : e.length - 1;
                        return void this.setFocusToSectionItem(n, r);
                      }
                    }
                  }
                  r = this.chapterNodes[i].querySelector(
                    ".h5p-interactive-book-navigation-chapter-button",
                  );
                  this.setFocusToItem(r, i);
                },
              },
              {
                key: "setFocusToSectionItem",
                value: function (e, t) {
                  var i =
                      2 < arguments.length && void 0 !== arguments[2]
                        ? arguments[2]
                        : 0,
                    n = this.chapterNodes[e].querySelectorAll(
                      ".h5p-interactive-book-navigation-section",
                    ),
                    i = t + i;
                  i > n.length - 1
                    ? this.setFocusToChapterItem(e + 1)
                    : i < 0
                      ? this.setFocusToChapterItem(e)
                      : ((i = n[i].querySelector(".section-button")),
                        this.setFocusToItem(i, e));
                },
              },
              {
                key: "setFocusToItem",
                value: function (e, o) {
                  var t =
                    2 < arguments.length &&
                    void 0 !== arguments[2] &&
                    arguments[2];
                  (this.chapterNodes.forEach(function (e, t) {
                    var i = e.querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    );
                    (t === o
                      ? i.classList.add(
                          "h5p-interactive-book-navigation-current",
                        )
                      : i.classList.remove(
                          "h5p-interactive-book-navigation-current",
                        ),
                      i.setAttribute("tabindex", "-1"));
                    for (
                      var n = e.querySelectorAll(
                          ".h5p-interactive-book-navigation-section",
                        ),
                        r = 0;
                      r < n.length;
                      r++
                    )
                      n[r]
                        .querySelector(".section-button")
                        .setAttribute("tabindex", "-1");
                  }),
                    e.setAttribute("tabindex", "0"),
                    (this.focusedChapter = o),
                    t || e.focus());
                },
              },
              {
                key: "addSideBar",
                value: function () {
                  var e = document.createElement("div");
                  return (
                    (e.id = "h5p-interactive-book-navigation-menu"),
                    e.classList.add("h5p-interactive-book-navigation"),
                    e
                  );
                },
              },
              {
                key: "addMainTitle",
                value: function (e) {
                  var t = document.createElement("h2");
                  (t.classList.add("navigation-title"),
                    (t.innerHTML = e),
                    t.setAttribute("title", e));
                  e = document.createElement("div");
                  return (
                    e.classList.add(
                      "h5p-interactive-book-navigation-maintitle",
                    ),
                    e.appendChild(t),
                    e
                  );
                },
              },
              {
                key: "findSectionsInChapter",
                value: function (e) {
                  for (
                    var t = [], i = e.params.content, n = 0;
                    n < i.length;
                    n++
                  ) {
                    var r = i[n].content,
                      o =
                        "H5P.Link" === r.library.split(" ")[0]
                          ? r.params.title || "New link"
                          : r.metadata.title;
                    t.push({
                      title: o,
                      id: r.subContentId
                        ? "h5p-interactive-book-section-".concat(r.subContentId)
                        : void 0,
                    });
                  }
                  return t;
                },
              },
              {
                key: "findAllChapters",
                value: function (e) {
                  for (var t = [], i = 0; i < e.length; i++) {
                    var n = this.findSectionsInChapter(e[i]),
                      r = e[i].metadata.title,
                      o = "h5p-interactive-book-chapter-".concat(
                        e[i].subContentId,
                      );
                    t.push({
                      sections: n,
                      title: r,
                      id: o,
                      isSummary: !1,
                    });
                  }
                  return (
                    this.parent.hasSummary() &&
                      t.push({
                        sections: [],
                        title: this.l10n.summaryHeader,
                        id: "h5p-interactive-book-chapter-summary",
                        isSummary: !0,
                      }),
                    t
                  );
                },
              },
              {
                key: "toggleChapter",
                value: function (e, t) {
                  t =
                    void 0 !== t
                      ? t
                      : !e.classList.contains(
                          "h5p-interactive-book-navigation-closed",
                        );
                  var i = e.querySelector(
                      ".h5p-interactive-book-navigation-sectionlist",
                    ),
                    n = e.getElementsByClassName(
                      "h5p-interactive-book-navigation-chapter-accordion",
                    )[0];
                  (e
                    .querySelector(
                      ".h5p-interactive-book-navigation-chapter-button",
                    )
                    .setAttribute("aria-expanded", (!t).toString()),
                    !0 === t
                      ? (e.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"))))
                      : (e.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 e,
                    n = this;
                  (this.chapterNodes.forEach(function (e, t) {
                    n.toggleChapter(e, t !== i);
                  }),
                    this.parent.trigger("resize"),
                    i !== this.focusedChapter &&
                      ((e = this.chapterNodes[i].querySelector(
                        ".h5p-interactive-book-navigation-chapter-button",
                      )),
                      this.setFocusToItem(e, i, !0)));
                },
              },
              {
                key: "resetIndicators",
                value: function () {
                  var o = this;
                  this.chapterNodes.forEach(function (e, t) {
                    o.updateChapterProgressIndicator(t, "BLANK");
                    var i,
                      n = (function (e, t) {
                        var i =
                          ("undefined" != typeof Symbol &&
                            e[Symbol.iterator]) ||
                          e["@@iterator"];
                        if (!i) {
                          if (
                            Array.isArray(e) ||
                            (i = (function (e) {
                              if (e) {
                                if ("string" == typeof e) return a(e, void 0);
                                var t = Object.prototype.toString
                                  .call(e)
                                  .slice(8, -1);
                                return "Map" ===
                                  (t =
                                    "Object" === t && e.constructor
                                      ? e.constructor.name
                                      : t) || "Set" === t
                                  ? Array.from(e)
                                  : "Arguments" === t ||
                                      /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(
                                        t,
                                      )
                                    ? a(e, void 0)
                                    : void 0;
                              }
                            })(e)) ||
                            (t && e && "number" == typeof e.length)
                          ) {
                            i && (e = i);
                            var n = 0,
                              t = function () {};
                            return {
                              s: t,
                              n: function () {
                                return n >= e.length
                                  ? { done: !0 }
                                  : { done: !1, value: e[n++] };
                              },
                              e: function (e) {
                                throw e;
                              },
                              f: t,
                            };
                          }
                          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 r,
                          o = !0,
                          s = !1;
                        return {
                          s: function () {
                            i = i.call(e);
                          },
                          n: function () {
                            var e = i.next();
                            return ((o = e.done), e);
                          },
                          e: function (e) {
                            ((s = !0), (r = e));
                          },
                          f: function () {
                            try {
                              o || null == i.return || i.return();
                            } finally {
                              if (s) throw r;
                            }
                          },
                        };
                      })(
                        e.getElementsByClassName(
                          "h5p-interactive-book-navigation-section",
                        ),
                      );
                    try {
                      for (n.s(); !(i = n.n()).done; ) {
                        var r = i.value.querySelector(
                          ".h5p-interactive-book-navigation-section-icon",
                        );
                        r &&
                          (r.classList.remove("icon-question-answered"),
                          r.classList.add("icon-chapter-blank"));
                      }
                    } catch (e) {
                      n.e(e);
                    } finally {
                      n.f();
                    }
                  });
                },
              },
              {
                key: "updateChapterProgressIndicator",
                value: function (e, t) {
                  this.behaviour.progressIndicators &&
                    !this.chapters[e].isSummary &&
                    ((e = this.chapterNodes[e].getElementsByClassName(
                      "h5p-interactive-book-navigation-chapter-progress",
                    )[0]),
                    "BLANK" === t
                      ? (e.classList.remove("icon-chapter-started"),
                        e.classList.remove("icon-chapter-done"),
                        e.classList.add("icon-chapter-blank"))
                      : "DONE" === t
                        ? (e.classList.remove("icon-chapter-blank"),
                          e.classList.remove("icon-chapter-started"),
                          e.classList.add("icon-chapter-done"))
                        : "STARTED" === t &&
                          (e.classList.remove("icon-chapter-blank"),
                          e.classList.remove("icon-chapter-done"),
                          e.classList.add("icon-chapter-started")));
                },
              },
              {
                key: "setSectionMarker",
                value: function (e, t) {
                  t = this.chapterNodes[e].querySelector(
                    ".h5p-interactive-book-navigation-section-" +
                      t +
                      " .h5p-interactive-book-navigation-section-icon",
                  );
                  t &&
                    (t.classList.remove("icon-chapter-blank"),
                    t.classList.add("icon-question-answered"));
                },
              },
              {
                key: "getNodesFromChapter",
                value: function (e, n) {
                  var r = this,
                    t = document.createElement("li"),
                    i = "h5p-interactive-book-sectionlist-" + n;
                  if (
                    (t.classList.add("h5p-interactive-book-navigation-chapter"),
                    e.isSummary)
                  ) {
                    t.classList.add(
                      "h5p-interactive-book-navigation-summary-button",
                    );
                    var o = this.parent.chapters[n].instance.summaryMenuButton;
                    return (
                      o.classList.add(
                        "h5p-interactive-book-navigation-chapter-button",
                      ),
                      t.appendChild(o),
                      t
                    );
                  }
                  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 = e.title),
                    a.setAttribute("title", e.title));
                  var l = document.createElement("div");
                  this.behaviour.progressIndicators &&
                    (l.classList.add("icon-chapter-blank"),
                    l.classList.add(
                      "h5p-interactive-book-navigation-chapter-progress",
                    ));
                  o = document.createElement("button");
                  (o.setAttribute("tabindex", 0 === n ? "0" : "-1"),
                    o.classList.add(
                      "h5p-interactive-book-navigation-chapter-button",
                    ),
                    this.parent.activeChapter !== n
                      ? (s.classList.add("icon-collapsed"),
                        o.setAttribute("aria-expanded", "false"))
                      : (s.classList.add("icon-expanded"),
                        o.setAttribute("aria-expanded", "true")),
                    o.setAttribute("aria-controls", i),
                    (o.onclick = function (e) {
                      var t = !e.currentTarget
                          .querySelector(
                            ".h5p-interactive-book-navigation-chapter-accordion",
                          )
                          .classList.contains("hidden"),
                        i =
                          "true" ===
                          e.currentTarget.getAttribute("aria-expanded");
                      (r.isOpenOnMobile() && r.parent.trigger("toggleMenu"),
                        (!r.isOpenOnMobile() && t && i) ||
                          ((i = {
                            h5pbookid: r.parent.contentId,
                            chapter: r.chapters[n].id,
                            section: 0,
                          }),
                          r.parent.trigger("newChapter", i)),
                        t &&
                          (r.toggleChapter(e.currentTarget.parentElement),
                          r.parent.trigger("resize")));
                    }),
                    o.appendChild(s),
                    o.appendChild(a),
                    o.appendChild(l),
                    t.appendChild(o),
                    this.parent.activeChapter === n
                      ? t
                          .querySelector(
                            ".h5p-interactive-book-navigation-chapter-button",
                          )
                          .classList.add(
                            "h5p-interactive-book-navigation-current",
                          )
                      : this.toggleChapter(t, !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 g = p.querySelectorAll("h2, h3"), m = 0;
                          m < g.length;
                          m++
                        ) {
                          var v = g[m],
                            v = this.createSectionLink(n, d, v.textContent, m);
                          (h.push(v), c.appendChild(v));
                        }
                      }
                    }
                  return (
                    e.tasksLeft && (e.maxTasks = e.tasksLeft),
                    0 === h.length &&
                      (u = t.querySelector(
                        ".h5p-interactive-book-navigation-chapter-accordion",
                      )) &&
                      u.classList.add("hidden"),
                    t.appendChild(c),
                    t
                  );
                },
              },
              {
                key: "createSectionLink",
                value: function (i, e) {
                  var n = this,
                    t =
                      2 < arguments.length && void 0 !== arguments[2]
                        ? arguments[2]
                        : null,
                    r =
                      3 < arguments.length && void 0 !== arguments[3]
                        ? arguments[3]
                        : null,
                    o = this.chapters[i].sections[e],
                    s = document.createElement("div");
                  ((s.innerHTML = t || o.title),
                    s.setAttribute("title", t || o.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[e].isTask &&
                      a.classList.add(
                        "h5p-interactive-book-navigation-section-task",
                      ));
                  t = document.createElement("button");
                  (t.classList.add("section-button"),
                    t.setAttribute("tabindex", "-1"),
                    (t.onclick = function (e) {
                      var t = {
                        h5pbookid: n.parent.contentId,
                        chapter: n.chapters[i].id,
                        section: o.id,
                      };
                      (null !== r && (t.headerNumber = r),
                        n.parent.trigger("newChapter", t),
                        n.isOpenOnMobile() && n.parent.trigger("toggleMenu"),
                        e.preventDefault());
                    }),
                    t.appendChild(a),
                    t.appendChild(s));
                  s = document.createElement("li");
                  return (
                    s.classList.add("h5p-interactive-book-navigation-section"),
                    s.classList.add(
                      "h5p-interactive-book-navigation-section-" + e,
                    ),
                    s.appendChild(t),
                    s
                  );
                },
              },
              {
                key: "getChapterNodes",
                value: function () {
                  var i = this;
                  return this.chapters.map(function (e, t) {
                    return i.getNodesFromChapter(e, t);
                  });
                },
              },
              {
                key: "isOpenOnMobile",
                value: function () {
                  return (
                    this.parent.isMenuOpen() && this.parent.isSmallSurface()
                  );
                },
              },
              {
                key: "addTransformListener",
                value: function () {
                  var t = this;
                  this.container.addEventListener(
                    "transitionend",
                    function (e) {
                      "flex-basis" === e.propertyName &&
                        t.parent.trigger("resize");
                    },
                  );
                },
              },
            ]),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            s
          );
        })();
        function o(e) {
          return (o =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        function p() {
          return (p = Object.assign
            ? Object.assign.bind()
            : function (e) {
                for (var t = 1; t < arguments.length; t++) {
                  var i,
                    n = arguments[t];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
                }
                return e;
              }).apply(this, arguments);
        }
        function f(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function g(e, t) {
          return (g = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function m(e) {
          return (m = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        const v = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && g(e, t));
          })(a, H5P.EventDispatcher);
          var 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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = m(i);
                return (function (e, t) {
                  if (t && ("object" === o(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (e) {
                    if (void 0 === e)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return e;
                  })(e);
                })(
                  this,
                  n
                    ? ((e = m(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function a(e, t, i, n, r) {
            var o;
            (!(function (e) {
              if (!(e instanceof a))
                throw new TypeError("Cannot call a class as a function");
            })(this),
              ((o = s.call(this)).id = e),
              (o.parent = i),
              (o.params = n || {}),
              (o.params.l10n = n.l10n),
              (o.params.a11y = p(
                {
                  progress: "Page @page of @total",
                  menu: "Toggle navigation menu",
                },
                o.params.a11y || {},
              )),
              (o.totalChapters = t),
              (o.arrows = o.addArrows()),
              (o.progressBar = o.createProgressBar()),
              (o.progressIndicator = o.createProgressIndicator()),
              (o.chapterTitle = o.createChapterTitle()),
              (o.menuToggleButton = o.createMenuToggleButton()));
            t = document.createElement("div");
            return (
              t.classList.add("h5p-interactive-book-status"),
              o.params.displayToTopButton &&
                t.appendChild(o.createToTopButton()),
              o.params.displayFullScreenButton &&
                H5P.fullscreenSupported &&
                t.appendChild(o.createFullScreenButton()),
              t.appendChild(o.arrows.buttonWrapperNext),
              t.appendChild(o.arrows.buttonWrapperPrevious),
              o.params.displayMenuToggleButton &&
                t.appendChild(o.menuToggleButton),
              t.appendChild(o.progressIndicator.wrapper),
              t.appendChild(o.chapterTitle.wrapper),
              (o.wrapper = document.createElement("div")),
              o.wrapper.classList.add(r),
              o.wrapper.setAttribute("tabindex", "-1"),
              o.wrapper.appendChild(o.progressBar.wrapper),
              o.wrapper.appendChild(t),
              o.on("updateStatusBar", o.updateStatusBar),
              o.on("seqChapter", function (e) {
                var t = { h5pbookid: o.parent.contentId };
                (e.data.toTop && (t.section = "top"),
                  "next" === e.data.direction
                    ? o.parent.activeChapter + 1 < o.parent.chapters.length
                      ? (t.chapter = "h5p-interactive-book-chapter-".concat(
                          o.parent.chapters[o.parent.activeChapter + 1].instance
                            .subContentId,
                        ))
                      : o.parent.hasSummary() &&
                        o.parent.activeChapter + 1 ===
                          o.parent.chapters.length &&
                        o.parent.trigger("viewSummary", t)
                    : "prev" === e.data.direction &&
                      0 < o.parent.activeChapter &&
                      (t.chapter = "h5p-interactive-book-chapter-".concat(
                        o.parent.chapters[o.parent.activeChapter - 1].instance
                          .subContentId,
                      )),
                  t.chapter && o.parent.trigger("newChapter", t));
              }),
              o
            );
          }
          return (
            f((e = a).prototype, [
              {
                key: "updateProgressBar",
                value: function (e) {
                  var t = "".concat((e / this.totalChapters) * 100, "%");
                  this.progressBar.progress.style.width = t;
                  e = this.params.a11y.progress
                    .replace("@page", e)
                    .replace("@total", this.totalChapters);
                  this.progressBar.progress.title = e;
                },
              },
              {
                key: "updateA11yProgress",
                value: function (e) {
                  this.progressIndicator.hiddenButRead.innerHTML =
                    this.params.a11y.progress
                      .replace("@page", e)
                      .replace("@total", this.totalChapters);
                },
              },
              {
                key: "updateStatusBar",
                value: function () {
                  var e = this.parent.getActiveChapter() + 1,
                    t = this.parent.chapters[e - 1].title;
                  ((this.progressIndicator.current.innerHTML = e),
                    this.updateA11yProgress(e),
                    this.updateProgressBar(e),
                    (this.chapterTitle.text.innerHTML = t),
                    this.chapterTitle.text.setAttribute("title", t),
                    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 e = this,
                    t = {};
                  return (
                    (t.buttonPrevious = document.createElement("div")),
                    t.buttonPrevious.classList.add(
                      "navigation-button",
                      "icon-previous",
                    ),
                    t.buttonPrevious.setAttribute(
                      "title",
                      this.params.l10n.previousPage,
                    ),
                    (t.buttonWrapperPrevious =
                      document.createElement("button")),
                    t.buttonWrapperPrevious.classList.add(
                      "h5p-interactive-book-status-arrow",
                      "h5p-interactive-book-status-button",
                      "previous",
                    ),
                    t.buttonWrapperPrevious.setAttribute(
                      "aria-label",
                      this.params.l10n.previousPage,
                    ),
                    (t.buttonWrapperPrevious.onclick = function () {
                      e.trigger("seqChapter", {
                        direction: "prev",
                        toTop: !0,
                      });
                    }),
                    t.buttonWrapperPrevious.appendChild(t.buttonPrevious),
                    (t.buttonNext = document.createElement("div")),
                    t.buttonNext.classList.add(
                      "navigation-button",
                      "icon-next",
                    ),
                    t.buttonNext.setAttribute(
                      "title",
                      this.params.l10n.nextPage,
                    ),
                    (t.buttonWrapperNext = document.createElement("button")),
                    t.buttonWrapperNext.classList.add(
                      "h5p-interactive-book-status-arrow",
                      "h5p-interactive-book-status-button",
                      "next",
                    ),
                    t.buttonWrapperNext.setAttribute(
                      "aria-label",
                      this.params.l10n.nextPage,
                    ),
                    (t.buttonWrapperNext.onclick = function () {
                      e.trigger("seqChapter", {
                        direction: "next",
                        toTop: !0,
                      });
                    }),
                    t.buttonWrapperNext.appendChild(t.buttonNext),
                    t
                  );
                },
              },
              {
                key: "createMenuToggleButton",
                value: function () {
                  var e = this,
                    t = document.createElement("a");
                  t.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 () {
                      e.parent.trigger("toggleMenu");
                    }),
                    i.appendChild(t),
                    i
                  );
                },
              },
              {
                key: "isMenuOpen",
                value: function () {
                  return this.menuToggleButton.classList.contains(
                    "h5p-interactive-book-status-menu-active",
                  );
                },
              },
              {
                key: "createProgressBar",
                value: function () {
                  var e = document.createElement("div");
                  (e.classList.add(
                    "h5p-interactive-book-status-progressbar-front",
                  ),
                    e.setAttribute("tabindex", "-1"));
                  var t = document.createElement("div");
                  return (
                    t.classList.add(
                      "h5p-interactive-book-status-progressbar-back",
                    ),
                    t.appendChild(e),
                    { wrapper: t, progress: e }
                  );
                },
              },
              {
                key: "createChapterTitle",
                value: function () {
                  var e = document.createElement("h1");
                  e.classList.add("title");
                  var t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-status-chapter"),
                    t.appendChild(e),
                    { wrapper: t, text: e }
                  );
                },
              },
              {
                key: "createToTopButton",
                value: function () {
                  var e = this,
                    t = document.createElement("div");
                  (t.classList.add("icon-up"),
                    t.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 () {
                      (e.parent.trigger("scrollToTop"),
                        document
                          .querySelector(".h5p-interactive-book-status-menu")
                          .focus());
                    }),
                    i.appendChild(t),
                    i
                  );
                },
              },
              {
                key: "setVisibility",
                value: function (e) {
                  e
                    ? this.wrapper.classList.add("footer-hidden")
                    : this.wrapper.classList.remove("footer-hidden");
                },
              },
              {
                key: "createProgressIndicator",
                value: function () {
                  var e = document.createElement("span");
                  (e.classList.add(
                    "h5p-interactive-book-status-progress-number",
                  ),
                    e.setAttribute("aria-hidden", "true"));
                  var t = document.createElement("span");
                  (t.classList.add(
                    "h5p-interactive-book-status-progress-divider",
                  ),
                    (t.innerHTML = " / "),
                    t.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 r = document.createElement("p");
                  (r.classList.add("h5p-interactive-book-status-progress"),
                    r.appendChild(e),
                    r.appendChild(t),
                    r.appendChild(i),
                    r.appendChild(n));
                  var o = document.createElement("div");
                  return (
                    o.classList.add(
                      "h5p-interactive-book-status-progress-wrapper",
                    ),
                    o.appendChild(r),
                    {
                      wrapper: o,
                      current: e,
                      total: i,
                      divider: t,
                      progressText: r,
                      hiddenButRead: n,
                    }
                  );
                },
              },
              {
                key: "setButtonStatus",
                value: function (e, t) {
                  t
                    ? (this.arrows["buttonWrapper" + e].setAttribute(
                        "disabled",
                        "disabled",
                      ),
                      this.arrows["button" + e].classList.add("disabled"))
                    : (this.arrows["buttonWrapper" + e].removeAttribute(
                        "disabled",
                      ),
                      this.arrows["button" + e].classList.remove("disabled"));
                },
              },
              {
                key: "createFullScreenButton",
                value: function () {
                  function t() {
                    !0 === H5P.isFullscreen
                      ? H5P.exitFullScreen()
                      : H5P.fullScreen(e.parent.mainWrapper, e.parent);
                  }
                  var e = 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", t),
                    i.addEventListener("keyPress", function (e) {
                      (13 !== e.which && 32 !== e.which) ||
                        (t(), e.preventDefault());
                    }),
                    this.parent.on("enterFullScreen", function () {
                      ((e.parent.isFullscreen = !0),
                        i.classList.remove(
                          "h5p-interactive-book-enter-fullscreen",
                        ),
                        i.classList.add("h5p-interactive-book-exit-fullscreen"),
                        i.setAttribute("title", e.params.l10n.exitFullscreen),
                        i.setAttribute(
                          "aria-label",
                          e.params.l10n.exitFullScreen,
                        ),
                        e.parent.pageContent.updateFooter());
                    }),
                    this.parent.on("exitFullScreen", function () {
                      ((e.parent.isFullscreen = !1),
                        i.classList.remove(
                          "h5p-interactive-book-exit-fullscreen",
                        ),
                        i.classList.add(
                          "h5p-interactive-book-enter-fullscreen",
                        ),
                        i.setAttribute("title", e.params.l10n.fullscreen),
                        i.setAttribute("aria-label", e.params.l10n.fullscreen),
                        e.parent.pageContent.updateFooter());
                    }),
                    i
                  );
                },
              },
            ]),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            a
          );
        })();
        function b(e) {
          return (b =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        function y(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function _(e, t) {
          return (_ = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function w(e) {
          return (w = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        const x = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && _(e, t));
          })(a, H5P.EventDispatcher);
          var 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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = w(i);
                return (function (e, t) {
                  if (t && ("object" === b(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (e) {
                    if (void 0 === e)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return e;
                  })(e);
                })(
                  this,
                  n
                    ? ((e = w(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function a(e, t, i, n, r) {
            var o;
            return (
              (function (e) {
                if (!(e instanceof a))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((o = s.call(this)).parent = r),
              (o.params = e),
              (o.contentId = n),
              (o.container = o.createContainer()),
              e.coverMedium
                ? ((o.visuals = o.createVisualsElement(e.coverMedium)),
                  o.visuals && o.container.appendChild(o.visuals))
                : o.container.classList.add("h5p-cover-nographics"),
              o.container.appendChild(o.createTitleElement(t)),
              e.coverDescription &&
                o.container.appendChild(
                  o.createDescriptionElement(e.coverDescription),
                ),
              o.container.appendChild(o.createReadButton(i)),
              o
            );
          }
          return (
            y((e = a).prototype, [
              {
                key: "createContainer",
                value: function () {
                  var e = document.createElement("div");
                  return (e.classList.add("h5p-interactive-book-cover"), e);
                },
              },
              {
                key: "createVisualsElement",
                value: function (e) {
                  if (!e || !e.params) return null;
                  e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-cover-graphics"),
                    e
                  );
                },
              },
              {
                key: "initMedia",
                value: function () {
                  var e;
                  this.visuals &&
                    this.params.coverMedium &&
                    ("H5P.Video" ===
                      ((e = this.params.coverMedium).library || "").split(
                        " ",
                      )[0] && (e.params.visuals.fit = !1),
                    H5P.newRunnable(
                      e,
                      this.contentId,
                      H5P.jQuery(this.visuals),
                      !1,
                      { metadata: e.medatata },
                    ),
                    "H5P.Image" === (e.library || "").split(" ")[0] &&
                      (((e =
                        this.visuals.querySelector("img") ||
                        this.visuals.querySelector(
                          ".h5p-placeholder",
                        )).style.height = "auto"),
                      (e.style.width = "auto")),
                    this.visuals.appendChild(this.createCoverBar()));
                },
              },
              {
                key: "createImage",
                value: function (e, t, i) {
                  var n = document.createElement("img");
                  return (
                    n.classList.add("h5p-interactive-book-cover-image"),
                    (n.src = H5P.getPath(e, t)),
                    n.setAttribute("draggable", "false"),
                    i && (n.alt = i),
                    n
                  );
                },
              },
              {
                key: "createCoverBar",
                value: function () {
                  var e = document.createElement("div");
                  return (e.classList.add("h5p-interactive-book-cover-bar"), e);
                },
              },
              {
                key: "createTitleElement",
                value: function (e) {
                  var t = document.createElement("p");
                  t.innerHTML = e;
                  e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-cover-title"),
                    e.appendChild(t),
                    e
                  );
                },
              },
              {
                key: "createDescriptionElement",
                value: function (e) {
                  if (!e) return null;
                  var t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-cover-description"),
                    (t.innerHTML = e),
                    t
                  );
                },
              },
              {
                key: "createReadButton",
                value: function (e) {
                  var t = this,
                    i = document.createElement("button");
                  ((i.innerHTML = e),
                    (i.onclick = function () {
                      t.removeCover();
                    }));
                  e = document.createElement("div");
                  return (
                    e.classList.add("h5p-interactive-book-cover-readbutton"),
                    e.appendChild(i),
                    e
                  );
                },
              },
              {
                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(e, "prototype", { writable: !1 }),
            a
          );
        })();
        Z(7159);
        var i = Z(7124),
          s = Z.n(i);
        function n(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        var k =
          ((X = C),
          (i = [
            {
              key: "setBase",
              value: function (e) {
                e &&
                  ((C.colorBase = s()(e)),
                  (C.colorText = [
                    C.DEFAULT_COLOR_BG,
                    C.computeContrastColor(C.colorBase),
                    C.computeContrastColor(C.colorBase, C.DEFAULT_COLOR_BG),
                  ]
                    .map(function (e) {
                      return {
                        color: e,
                        contrast: C.colorBase.contrast(e),
                      };
                    })
                    .reduce(
                      function (e, t) {
                        return t.contrast > e.contrast ? t : e;
                      },
                      { contrast: 0 },
                    ).color));
              },
            },
            {
              key: "getColor",
              value: function (e) {
                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 e;
                var n = s()("#ffffff").rgb().array();
                return s().rgb(
                  e
                    .rgb()
                    .array()
                    .map(function (e, t) {
                      return i.opacity * e + (1 - i.opacity) * n[t];
                    }),
                );
              },
            },
            {
              key: "isBaseColor",
              value: function (e) {
                return s()(e).hex() === C.colorBase.hex();
              },
            },
            {
              key: "computeContrastColor",
              value: function (e, i) {
                for (
                  var n, r = (i = i || e).luminosity(), t = 0;
                  t <= 1 &&
                  "break" !==
                    (function (t) {
                      if (
                        (n = s().rgb(
                          e
                            .rgb()
                            .array()
                            .map(function (e) {
                              return e * (0.5 < r ? 1 - t : 1 + t);
                            }),
                        )).contrast(i) >= C.MINIMUM_ACCEPTABLE_CONTRAST
                      )
                        return "break";
                    })(t);
                  t += 0.05
                );
                return n;
              },
            },
            {
              key: "getContentTypeCSS",
              value: function (e) {
                return C.COLOR_OVERRIDES[e]
                  ? C.COLOR_OVERRIDES[e].getCSS()
                  : "";
              },
            },
            {
              key: "getCSS",
              value: function () {
                return ":root{\n      --color-base: "
                  .concat(C.colorBase, ";\n      --color-base-5: ")
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.05 }),
                    ";\n      --color-base-10: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.1 }),
                    ";\n      --color-base-20: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.2 }),
                    ";\n      --color-base-75: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.75 }),
                    ";\n      --color-base-80: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.8 }),
                    ";\n      --color-base-85: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.85 }),
                    ";\n      --color-base-90: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.9 }),
                    ";\n      --color-base-95: ",
                  )
                  .concat(
                    C.getColor(C.colorBase, { opacity: 0.95 }),
                    ";\n      --color-text: ",
                  )
                  .concat(C.colorText, ";\n      --color-contrast: ")
                  .concat(
                    C.computeContrastColor(C.colorBase, C.DEFAULT_COLOR_BG),
                    ";\n    }",
                  );
              },
            },
          ]),
          null && n(X.prototype, null),
          n(X, i),
          Object.defineProperty(X, "prototype", { writable: !1 }),
          C);
        function C() {
          !(function (e) {
            if (!(e instanceof C))
              throw new TypeError("Cannot call a class as a function");
          })(this);
        }
        function P(e) {
          return (P =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        function T(e, t) {
          var i =
            ("undefined" != typeof Symbol && e[Symbol.iterator]) ||
            e["@@iterator"];
          if (!i) {
            if (
              Array.isArray(e) ||
              (i = (function (e) {
                if (e) {
                  if ("string" == typeof e) return S(e, void 0);
                  var t = Object.prototype.toString.call(e).slice(8, -1);
                  return "Map" ===
                    (t =
                      "Object" === t && e.constructor
                        ? e.constructor.name
                        : t) || "Set" === t
                    ? Array.from(e)
                    : "Arguments" === t ||
                        /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)
                      ? S(e, void 0)
                      : void 0;
                }
              })(e)) ||
              (t && e && "number" == typeof e.length)
            ) {
              i && (e = i);
              var n = 0,
                t = function () {};
              return {
                s: t,
                n: function () {
                  return n >= e.length
                    ? { done: !0 }
                    : { done: !1, value: e[n++] };
                },
                e: function (e) {
                  throw e;
                },
                f: t,
              };
            }
            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 r,
            o = !0,
            s = !1;
          return {
            s: function () {
              i = i.call(e);
            },
            n: function () {
              var e = i.next();
              return ((o = e.done), e);
            },
            e: function (e) {
              ((s = !0), (r = e));
            },
            f: function () {
              try {
                o || null == i.return || i.return();
              } finally {
                if (s) throw r;
              }
            },
          };
        }
        function S(e, t) {
          (null == t || t > e.length) && (t = e.length);
          for (var i = 0, n = new Array(t); i < t; i++) n[i] = e[i];
          return n;
        }
        function H(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function D(e, t) {
          return (D = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function E(e) {
          return (E = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        ((k.DEFAULT_COLOR_BASE = s()("#1768c4")),
          (k.DEFAULT_COLOR_BG = s()("#ffffff")),
          (k.MINIMUM_ACCEPTABLE_CONTRAST = 4.5),
          (k.colorBase = k.DEFAULT_COLOR_BASE),
          (k.colorText = k.DEFAULT_COLOR_BG));
        const I = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && D(e, t));
          })(o, H5P.EventDispatcher);
          var e,
            i,
            n,
            r =
              ((i = o),
              (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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = E(i);
                return (function (e, t) {
                  if (t && ("object" === P(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (e) {
                    if (void 0 === e)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return e;
                  })(e);
                })(
                  this,
                  n
                    ? ((e = E(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function o(e, t, i) {
            var n;
            return (
              (function (e) {
                if (!(e instanceof o))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((n = r.call(this)).parent = t),
              (n.behaviour = e.behaviour),
              (n.l10n = e.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(),
              )),
              t.on("bookCompleted", function (e) {
                return n.setBookComplete(e.data.completed);
              }),
              t.on("toggleMenu", function () {
                var e = document.querySelector(
                  ".h5p-interactive-book-summary-footer",
                );
                e &&
                  n.bookCompleted &&
                  (n.parent.isMenuOpen()
                    ? e.classList.add("menu-open")
                    : e.classList.remove("menu-open"));
              }),
              n
            );
          }
          return (
            H((e = o).prototype, [
              {
                key: "setBookComplete",
                value: function (t) {
                  var e = this.parent.mainWrapper
                    ? this.parent.mainWrapper[0].querySelector(
                        ".h5p-interactive-book-summary-footer",
                      )
                    : null;
                  (!e &&
                    this.parent.isSmallSurface() &&
                    ((e = document.createElement("div")).classList.add(
                      "h5p-interactive-book-summary-footer",
                    ),
                    e.appendChild(this.createSummaryButton()),
                    this.parent.mainWrapper.append(e)),
                    e &&
                      t &&
                      setTimeout(function () {
                        return e.classList.add("show-footer");
                      }, 0),
                    (this.bookCompleted = t),
                    Array.from(
                      document.querySelectorAll(
                        ".h5p-interactive-book-summary-menu-button",
                      ),
                    ).forEach(function (e) {
                      return e.setAttribute(
                        "data-book-completed",
                        t.toString(),
                      );
                    }));
                },
              },
              {
                key: "setChapters",
                value: function (e) {
                  this.chapters = Array.isArray(e) ? e : [];
                },
              },
              {
                key: "setSummaryMenuButtonDisabled",
                value: function () {
                  this.summaryMenuButton.disabled =
                    !(0 < arguments.length && void 0 !== arguments[0]) ||
                    arguments[0];
                },
              },
              {
                key: "setFilter",
                value: function (e) {
                  var t = 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 (e) {
                    (e.classList.remove(
                      "h5p-interactive-book-summary-top-section",
                    ),
                      e.classList.remove(
                        "h5p-interactive-book-summary-bottom-section",
                      ));
                  });
                  var r = i.querySelector(
                    ".h5p-interactive-book-summary-overview-list-empty",
                  );
                  ((r.style.display = "none"),
                    e === this.filterActionUnanswered
                      ? (i.classList.add(
                          "h5p-interactive-book-summary-overview-list-only-unanswered",
                        ),
                        (n = n.filter(function (e) {
                          return !e.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",
                            ))
                          : (r.style.display = "block"))
                      : e === this.filterActionAll &&
                        i.classList.remove(
                          "h5p-interactive-book-summary-overview-list-only-unanswered",
                        ),
                    setTimeout(function () {
                      return t.trigger("resize");
                    }, 1));
                },
              },
              {
                key: "createSummaryButton",
                value: function () {
                  var t = this,
                    e = document.createElement("button");
                  (e.classList.add("h5p-interactive-book-summary-menu-button"),
                    (e.onclick = function () {
                      var e = {
                        h5pbookid: t.parent.contentId,
                        chapter: "h5p-interactive-book-chapter-summary",
                        section: "top",
                      };
                      (t.parent.trigger("newChapter", e),
                        t.parent.isMenuOpen() &&
                          t.parent.isSmallSurface() &&
                          t.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 r = document.createElement("span");
                  return (
                    r.classList.add(
                      "h5p-interactive-book-summary-menu-button-arrow",
                    ),
                    r.classList.add("icon-up"),
                    r.setAttribute("aria-hidden", "true"),
                    e.appendChild(i),
                    e.appendChild(n),
                    e.appendChild(r),
                    e
                  );
                },
              },
              {
                key: "createCircle",
                value: function (e) {
                  var t = k.computeContrastColor(
                      k.colorBase,
                      k.DEFAULT_COLOR_BG,
                    ),
                    i = document.createElement("div");
                  return (
                    i.classList.add(
                      "h5p-interactive-book-summary-progress-circle",
                    ),
                    i.setAttribute("data-value", e),
                    i.setAttribute("data-start-angle", -Math.PI / 3),
                    i.setAttribute("data-thickness", 13),
                    i.setAttribute(
                      "data-empty-fill",
                      "rgba(".concat(t.rgb().array().join(", "), ", .1)"),
                    ),
                    i.setAttribute(
                      "data-fill",
                      JSON.stringify({ color: t.hex() }),
                    ),
                    i
                  );
                },
              },
              {
                key: "createProgress",
                value: function (e, t, i, n) {
                  var r =
                      4 < arguments.length &&
                      void 0 !== arguments[4] &&
                      arguments[4],
                    o = 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 = e;
                  var c = (100 * i) / n;
                  (void 0 === o && (o = i), void 0 === s && (s = n));
                  e = document.createElement("p");
                  (e.classList.add(
                    "h5p-interactive-book-summary-progressbox-bigtext",
                  ),
                    (e.innerHTML = Math.round(c) + "%"),
                    r &&
                      ((c = document.createElement("span")).classList.add(
                        "absolute-value",
                      ),
                      (c.innerHTML = i),
                      (r = document.createElement("span")).classList.add(
                        "separator",
                      ),
                      (r.innerHTML = "/"),
                      (u = document.createElement("span")).classList.add(
                        "absolute-value",
                      ),
                      (u.innerHTML = n),
                      (e.innerHTML = ""),
                      e.appendChild(c),
                      e.appendChild(r),
                      e.appendChild(u)));
                  var u = document.createElement("span");
                  (u.classList.add(
                    "h5p-interactive-book-summary-progressbox-smalltext",
                  ),
                    (u.innerHTML = t.replace("@count", o).replace("@total", s)),
                    a.appendChild(l),
                    a.appendChild(e),
                    a.appendChild(u));
                  u = document.createElement("div");
                  return (
                    u.appendChild(a),
                    u.appendChild(this.createCircle(i / n)),
                    u
                  );
                },
              },
              {
                key: "addScoreProgress",
                value: function () {
                  var e,
                    t = 0,
                    i = 0,
                    n = T(this.chapters);
                  try {
                    for (n.s(); !(e = n.n()).done; ) {
                      var r = e.value;
                      ((t += r.maxTasks), (i += r.tasksLeft));
                    }
                  } catch (e) {
                    n.e(e);
                  } finally {
                    n.f();
                  }
                  var o = this.createProgress(
                    this.l10n.totalScoreLabel,
                    this.l10n.interactionsProgressSubtext,
                    this.parent.getScore(),
                    this.parent.getMaxScore(),
                    !0,
                    Math.max(t - i, 0),
                    t,
                  );
                  (o.classList.add(
                    "h5p-interactive-book-summary-progress-container",
                  ),
                    o.classList.add(
                      "h5p-interactive-book-summary-score-progress",
                    ));
                  var s = o.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" }),
                    ),
                    o
                  );
                },
              },
              {
                key: "addBookProgress",
                value: function () {
                  var e = this.createProgress(
                    this.l10n.bookProgress,
                    this.l10n.bookProgressSubtext,
                    this.chapters.filter(function (e) {
                      return e.completed;
                    }).length,
                    this.chapters.length,
                  );
                  return (
                    e.classList.add(
                      "h5p-interactive-book-summary-progress-container",
                    ),
                    e.classList.add(
                      "h5p-interactive-book-summary-book-progress",
                    ),
                    e
                  );
                },
              },
              {
                key: "addInteractionsProgress",
                value: function () {
                  var e,
                    t = 0,
                    i = 0,
                    n = T(this.chapters);
                  try {
                    for (n.s(); !(e = n.n()).done; ) {
                      var r = e.value;
                      ((t += r.maxTasks), (i += r.tasksLeft));
                    }
                  } catch (e) {
                    n.e(e);
                  } finally {
                    n.f();
                  }
                  var o = this.createProgress(
                    this.l10n.interactionsProgress,
                    this.l10n.interactionsProgressSubtext,
                    Math.max(t - i, 0),
                    t,
                  );
                  return (
                    o.classList.add(
                      "h5p-interactive-book-summary-progress-container",
                    ),
                    o.classList.add(
                      "h5p-interactive-book-summary-interactions-progress",
                    ),
                    o
                  );
                },
              },
              {
                key: "addProgressIndicators",
                value: function () {
                  var e;
                  this.behaviour.progressIndicators &&
                    ((e = document.createElement("div")).classList.add(
                      "h5p-interactive-box-summary-progress",
                    ),
                    e.appendChild(this.addScoreProgress()),
                    e.appendChild(this.addBookProgress()),
                    e.appendChild(this.addInteractionsProgress()),
                    setTimeout(function () {
                      return H5P.jQuery(
                        ".h5p-interactive-book-summary-progress-circle",
                      ).circleProgress();
                    }, 100),
                    this.wrapper.appendChild(e));
                },
              },
              {
                key: "addActionButtons",
                value: function () {
                  var e,
                    t = this,
                    i = document.createElement("div");
                  (i.classList.add("h5p-interactive-book-summary-buttons"),
                    this.checkTheAnswerIsUpdated(),
                    this.parent.isSubmitButtonEnabled &&
                      this.parent.isAnswerUpdated &&
                      ((e = this.addButton(
                        "icon-paper-pencil",
                        this.l10n.submitReport,
                      )).classList.add("h5p-interactive-book-summary-submit"),
                      (e.onclick = function () {
                        (t.trigger("submitted"),
                          t.parent.triggerXAPIScored(
                            t.parent.getScore(),
                            t.parent.getMaxScore(),
                            "completed",
                          ),
                          i.classList.add("submitted"),
                          i.querySelector(".answers-submitted").focus(),
                          (t.tempState = JSON.stringify(t.getChapterStats())),
                          (t.parent.isAnswerUpdated = !1));
                      }),
                      i.appendChild(e)),
                    this.behaviour.enableRetry &&
                      i.appendChild(this.createRestartButton()),
                    i.appendChild(this.createSubmittedConfirmation()),
                    this.wrapper.appendChild(i));
                },
              },
              {
                key: "createRestartButton",
                value: function () {
                  var e = this,
                    t = this.addButton("icon-restart", this.l10n.restartLabel);
                  return (
                    t.classList.add("h5p-interactive-book-summary-restart"),
                    (t.onclick = function () {
                      return e.parent.resetTask();
                    }),
                    t
                  );
                },
              },
              {
                key: "createSubmittedConfirmation",
                value: function () {
                  var e = document.createElement("div");
                  e.classList.add("h5p-interactive-book-summary-submitted");
                  var t = document.createElement("span");
                  (t.classList.add("icon-chapter-done"),
                    t.classList.add("icon-check-mark"),
                    e.appendChild(t));
                  t = document.createElement("p");
                  return (
                    (t.innerHTML = this.l10n.yourAnswersAreSubmittedForReview),
                    (t.tabIndex = -1),
                    t.classList.add("answers-submitted"),
                    e.appendChild(t),
                    this.behaviour.enableRetry &&
                      e.appendChild(this.createRestartButton()),
                    e
                  );
                },
              },
              {
                key: "addButton",
                value: function (e, t) {
                  var i = document.createElement("button");
                  ((i.type = "button"),
                    i.classList.add("h5p-interactive-book-summary-button"),
                    (i.innerHTML = t));
                  t = document.createElement("span");
                  return (
                    t.classList.add(e),
                    t.setAttribute("aria-hidden", "true"),
                    i.appendChild(t),
                    i
                  );
                },
              },
              {
                key: "createSectionList",
                value: function (e, o) {
                  var s,
                    t,
                    i,
                    a = this,
                    l = [],
                    c = !1,
                    n = T(e);
                  try {
                    for (n.s(); !(s = n.n()).done; )
                      !(function () {
                        var t = s.value,
                          e = document.createElement("li");
                        (e.classList.add(
                          "h5p-interactive-book-summary-overview-section-details",
                        ),
                          a.behaviour.progressIndicators &&
                            ((r = document.createElement("span")).classList.add(
                              "h5p-interactive-book-summary-section-icon",
                            ),
                            r.classList.add(
                              t.taskDone
                                ? "icon-chapter-done"
                                : "icon-chapter-blank",
                            ),
                            e.appendChild(r)));
                        var i = document.createElement("button");
                        ((i.type = "button"),
                          i.classList.add(
                            "h5p-interactive-book-summary-section-title",
                          ),
                          (i.onclick = function () {
                            var e = {
                              h5pbookid: a.parent.contentId,
                              chapter: "h5p-interactive-book-chapter-".concat(
                                o,
                              ),
                              section: "h5p-interactive-book-section-".concat(
                                t.instance.subContentId,
                              ),
                            };
                            a.parent.trigger("newChapter", e);
                          }));
                        var n =
                            t.instance.contentData &&
                            t.instance.contentData.metadata &&
                            t.instance.contentData.metadata.title,
                          r =
                            t.content &&
                            t.content.metadata &&
                            t.content.metadata.title;
                        i.innerHTML = n || r || "Untitled";
                        r = document.createElement("div");
                        (r.classList.add(
                          "h5p-interactive-book-summary-section-score",
                        ),
                          (r.innerHTML = "-"),
                          "function" == typeof t.instance.getScore &&
                            (r.innerHTML = a.l10n.scoreText
                              .replace("@score", t.instance.getScore())
                              .replace("@maxscore", t.instance.getMaxScore())),
                          t.taskDone
                            ? e.classList.add(
                                "h5p-interactive-book-summary-overview-section-details-task-done",
                              )
                            : (c = !0),
                          e.appendChild(i),
                          e.appendChild(r),
                          l.push(e));
                      })();
                  } catch (e) {
                    n.e(e);
                  } finally {
                    n.f();
                  }
                  return (
                    l.length &&
                      ((t = document.createElement("div")).classList.add(
                        "h5p-interactive-book-summary-overview-section-score-header",
                      ),
                      ((i = document.createElement("div")).innerHTML =
                        this.l10n.score),
                      t.appendChild(i),
                      l.unshift(t)),
                    { hasUnansweredInteractions: c, sectionElements: l }
                  );
                },
              },
              {
                key: "createChapterOverview",
                value: function (t) {
                  var i = this,
                    e = document.createElement("li");
                  e.classList.add(
                    "h5p-interactive-book-summary-overview-section",
                  );
                  var n = document.createElement("h4");
                  n.onclick = function () {
                    var e = {
                      h5pbookid: i.parent.contentId,
                      chapter: "h5p-interactive-book-chapter-".concat(
                        t.instance.subContentId,
                      ),
                      section: "top",
                    };
                    i.parent.trigger("newChapter", e);
                  };
                  var r = document.createElement("span");
                  ((r.innerHTML = t.title),
                    n.appendChild(r),
                    this.behaviour.progressIndicators &&
                      ((o = document.createElement("span")),
                      (r = this.parent.getChapterStatus(t)),
                      o.classList.add("icon-chapter-".concat(r.toLowerCase())),
                      n.appendChild(o)),
                    e.appendChild(n));
                  var o = this.createSectionList(
                      t.sections.filter(function (e) {
                        return e.isTask;
                      }),
                      t.instance.subContentId,
                    ),
                    n = o.sectionElements;
                  !1 === o.hasUnansweredInteractions &&
                    e.classList.add(
                      "h5p-interactive-book-summary-no-interactions",
                    );
                  o = document.createElement("div");
                  (o.classList.add(
                    "h5p-interactive-book-summary-chapter-subheader",
                  ),
                    t.maxTasks
                      ? (o.innerHTML = this.l10n.leftOutOfTotalCompleted
                          .replace(
                            "@left",
                            Math.max(t.maxTasks - t.tasksLeft, 0),
                          )
                          .replace("@max", t.maxTasks))
                      : (o.innerHTML = this.l10n.noInteractions),
                    e.appendChild(o));
                  var s = document.createElement("ul");
                  return (
                    n.length &&
                      n.map(function (e) {
                        return s.appendChild(e);
                      }),
                    e.appendChild(s),
                    e
                  );
                },
              },
              {
                key: "createFilterDropdown",
                value: function () {
                  function e(e, t) {
                    var i = document.createElement("li");
                    i.role = "menuitem";
                    var n = document.createElement("button");
                    return (
                      (n.textContent = e),
                      (n.type = "button"),
                      (n.onclick = function (e) {
                        (r.setFilter(t),
                          o.removeAttribute("active"),
                          s.setAttribute("aria-expanded", "false"),
                          (a.textContent = e.currentTarget.innerHTML));
                      }),
                      i.appendChild(n),
                      i
                    );
                  }
                  var r = this,
                    o = document.createElement("div");
                  o.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 () {
                      o.hasAttribute("active")
                        ? (o.removeAttribute("active"),
                          s.setAttribute("aria-expanded", "false"))
                        : (o.setAttribute("active", ""),
                          s.setAttribute("aria-expanded", "true"),
                          s.focus());
                    }));
                  var a = document.createElement("span");
                  ((a.textContent = this.l10n.allInteractions),
                    s.appendChild(a));
                  var t = document.createElement("span");
                  (t.classList.add(
                    "h5p-interactive-book-summary-dropdown-icon",
                  ),
                    t.classList.add("icon-expanded"),
                    t.setAttribute("aria-hidden", "true"),
                    s.appendChild(t));
                  var i = document.createElement("ul");
                  ((i.role = "menu"),
                    i.classList.add(
                      "h5p-interactive-book-summary-dropdown-menu",
                    ));
                  var n = e(this.l10n.allInteractions, this.filterActionAll),
                    t = e(
                      this.l10n.unansweredInteractions,
                      this.filterActionUnanswered,
                    );
                  return (
                    i.appendChild(n),
                    i.appendChild(t),
                    o.appendChild(s),
                    o.appendChild(i),
                    o
                  );
                },
              },
              {
                key: "addSummaryOverview",
                value: function () {
                  var e = document.createElement("ul");
                  e.classList.add("h5p-interactive-book-summary-list");
                  var t = document.createElement("li");
                  t.classList.add(
                    "h5p-interactive-book-summary-overview-header",
                  );
                  var i = document.createElement("h3");
                  ((i.innerHTML = this.l10n.summaryHeader),
                    t.appendChild(i),
                    t.appendChild(this.createFilterDropdown()),
                    e.appendChild(t));
                  var n = document.createElement("ol");
                  n.classList.add("h5p-interactive-book-summary-overview-list");
                  var r,
                    o = T(this.chapters);
                  try {
                    for (o.s(); !(r = o.n()).done; ) {
                      var s = r.value;
                      n.appendChild(this.createChapterOverview(s));
                    }
                  } catch (e) {
                    o.e(e);
                  } finally {
                    o.f();
                  }
                  t = document.createElement("p");
                  (t.classList.add(
                    "h5p-interactive-book-summary-overview-list-empty",
                  ),
                    t.classList.add("h5p-interactive-book-summary-top-section"),
                    t.classList.add(
                      "h5p-interactive-book-summary-bottom-section",
                    ),
                    (t.innerHTML = this.l10n.noInteractions),
                    n.appendChild(t),
                    e.appendChild(n),
                    this.wrapper.appendChild(e));
                },
              },
              {
                key: "addScoreBar",
                value: function () {
                  var e = document.createElement("div");
                  e.classList.add("h5p-interactive-book-summary-score-bar");
                  var t = H5P.JoubelUI.createScoreBar(
                    this.parent.getMaxScore(),
                  );
                  (t.setScore(this.parent.getScore()),
                    t.appendTo(e),
                    this.wrapper.appendChild(e));
                },
              },
              {
                key: "noChapterInteractions",
                value: function () {
                  var e = document.createElement("div");
                  e.classList.add(
                    "h5p-interactive-book-summary-no-chapter-interactions",
                  );
                  var t = document.createElement("p");
                  t.innerHTML = this.l10n.noChapterInteractionBoldText;
                  var i = document.createElement("p");
                  (i.classList.add(
                    "h5p-interactive-book-summary-no-initialized-chapters",
                  ),
                    (i.innerHTML = this.l10n.noChapterInteractionText),
                    e.appendChild(t),
                    e.appendChild(i),
                    this.wrapper.appendChild(e));
                },
              },
              {
                key: "addSummaryPage",
                value: function (e) {
                  if (
                    ((this.wrapper = document.createElement("div")),
                    this.wrapper.classList.add(
                      "h5p-interactive-book-summary-page",
                    ),
                    0 <
                      this.chapters.filter(function (e) {
                        return e.isInitialized;
                      }).length ||
                      this.chapters.some(function (e) {
                        return e.sections.some(function (e) {
                          return e.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 t in this.chapters)
                          this.parent.pageContent.initializeChapter(t);
                      (this.addProgressIndicators(),
                        this.addActionButtons(),
                        this.addSummaryOverview(),
                        this.addScoreBar());
                    }
                  } else this.noChapterInteractions();
                  return (
                    Array.from(
                      document.querySelectorAll(
                        ".h5p-interactive-book-summary-footer",
                      ),
                    ).forEach(function (e) {
                      return e.remove();
                    }),
                    e.append(this.wrapper),
                    e
                  );
                },
              },
              {
                key: "checkTheAnswerIsUpdated",
                value: function () {
                  var e,
                    t = this.getChapterStats(),
                    i = JSON.parse(this.tempState),
                    n = T(t.keys());
                  try {
                    for (n.s(); !(e = n.n()).done; ) {
                      var r,
                        o = e.value,
                        s = i[o].state.instances,
                        a = t[o].state.instances,
                        l = t[o].sections,
                        c = T(s.keys());
                      try {
                        for (c.s(); !(r = c.n()).done; ) {
                          var u = r.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" === P(s[u]) &&
                              !Array.isArray(s[u]) &&
                              JSON.stringify(s[u]) !== JSON.stringify(a[u]) &&
                              l[u].taskDone &&
                              (this.parent.isAnswerUpdated = !0));
                        }
                      } catch (e) {
                        c.e(e);
                      } finally {
                        c.f();
                      }
                      if (this.parent.isAnswerUpdated) break;
                    }
                  } catch (e) {
                    n.e(e);
                  } finally {
                    n.f();
                  }
                },
              },
              {
                key: "getChapterStats",
                value: function () {
                  return this.chapters
                    .filter(function (e) {
                      return !e.isSummary;
                    })
                    .map(function (e) {
                      return {
                        sections: e.sections.map(function (e) {
                          return { taskDone: e.taskDone };
                        }),
                        state: e.instance.getCurrentState(),
                      };
                    });
                },
              },
              {
                key: "compareStates",
                value: function (e, i) {
                  return (
                    Array.isArray(e) &&
                    Array.isArray(i) &&
                    e.length === i.length &&
                    e.every(function (e, t) {
                      return e === i[t] || "" === i[t];
                    })
                  );
                },
              },
            ]),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            o
          );
        })();
        function A(e) {
          return (A =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        function O(t, e) {
          var i,
            n = Object.keys(t);
          return (
            Object.getOwnPropertySymbols &&
              ((i = Object.getOwnPropertySymbols(t)),
              e &&
                (i = i.filter(function (e) {
                  return Object.getOwnPropertyDescriptor(t, e).enumerable;
                })),
              n.push.apply(n, i)),
            n
          );
        }
        function M(n) {
          for (var e = 1; e < arguments.length; e++) {
            var r = null != arguments[e] ? arguments[e] : {};
            e % 2
              ? O(Object(r), !0).forEach(function (e) {
                  var t, i;
                  ((t = n),
                    (e = r[(i = e)]),
                    i in t
                      ? Object.defineProperty(t, i, {
                          value: e,
                          enumerable: !0,
                          configurable: !0,
                          writable: !0,
                        })
                      : (t[i] = e));
                })
              : Object.getOwnPropertyDescriptors
                ? Object.defineProperties(
                    n,
                    Object.getOwnPropertyDescriptors(r),
                  )
                : O(Object(r)).forEach(function (e) {
                    Object.defineProperty(
                      n,
                      e,
                      Object.getOwnPropertyDescriptor(r, e),
                    );
                  });
          }
          return n;
        }
        function L() {
          return (L = Object.assign
            ? Object.assign.bind()
            : function (e) {
                for (var t = 1; t < arguments.length; t++) {
                  var i,
                    n = arguments[t];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
                }
                return e;
              }).apply(this, arguments);
        }
        function j(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function N(e, t) {
          return (N = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function F(e) {
          return (F = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        const z = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && N(e, t));
          })(a, H5P.EventDispatcher);
          var 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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = F(i);
                return (function (e, t) {
                  if (t && ("object" === A(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return (function (e) {
                    if (void 0 === e)
                      throw new ReferenceError(
                        "this hasn't been initialised - super() hasn't been called",
                      );
                    return e;
                  })(e);
                })(
                  this,
                  n
                    ? ((e = F(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function a(e, t, i, n, r) {
            var o;
            return (
              (function (e) {
                if (!(e instanceof a))
                  throw new TypeError("Cannot call a class as a function");
              })(this),
              ((o = s.call(this)).parent = n),
              (o.behaviour = e.behaviour),
              (o.params = r),
              (o.targetPage = {}),
              (o.targetPage.redirectFromComponent = !1),
              (o.columnNodes = []),
              (o.chapters = []),
              (o.l10n = e.l10n),
              (o.sidebarIsOpen = !1),
              (o.previousState =
                i.previousState && 0 < Object.keys(i.previousState).length
                  ? i.previousState
                  : null),
              n.hasValidChapters() &&
                ((i = o.createColumns(e, t, i)), o.preloadChapter(i)),
              (o.content = o.createPageContent()),
              (o.container = document.createElement("div")),
              o.container.classList.add(
                "h5p-interactive-book-main",
                "h5p-interactive-book-navigation-hidden",
              ),
              o.container.appendChild(o.content),
              o
            );
          }
          return (
            j((e = a).prototype, [
              {
                key: "getChapters",
                value: function () {
                  var t =
                    !(0 < arguments.length && void 0 !== arguments[0]) ||
                    arguments[0];
                  return this.chapters.filter(function (e) {
                    return !e.isSummary || (e.isSummary && !!t);
                  });
                },
              },
              {
                key: "resetChapters",
                value: function () {
                  this.behaviour.progressIndicators &&
                    !this.behaviour.progressAuto &&
                    this.columnNodes.forEach(function (e) {
                      Array.from(
                        e.querySelectorAll(
                          ".h5p-interactive-book-status-progress-marker > input[type=checkbox]",
                        ),
                      ).forEach(function (e) {
                        return (e.checked = !1);
                      });
                    });
                },
              },
              {
                key: "createPageContent",
                value: function () {
                  var t = document.createElement("div");
                  return (
                    t.classList.add("h5p-interactive-book-content"),
                    this.columnNodes.forEach(function (e) {
                      t.appendChild(e);
                    }),
                    this.setChapterOrder(this.parent.getActiveChapter()),
                    t
                  );
                },
              },
              {
                key: "setChapterOrder",
                value: function (i) {
                  i < 0 ||
                    i > this.columnNodes.length - 1 ||
                    this.columnNodes.forEach(function (e, t) {
                      (e.classList.remove("h5p-interactive-book-previous"),
                        e.classList.remove("h5p-interactive-book-current"),
                        e.classList.remove("h5p-interactive-book-next"),
                        t === i - 1 ||
                          (t === i &&
                            e.classList.add("h5p-interactive-book-current")));
                    });
                },
              },
              {
                key: "createChapterReadCheckbox",
                value: function (e) {
                  var t = this,
                    i = document.createElement("input");
                  (i.setAttribute("type", "checkbox"),
                    (i.checked = e),
                    (i.onclick = function (e) {
                      t.parent.setChapterRead(void 0, e.target.checked);
                    }));
                  var n = document.createElement("p");
                  n.innerHTML = this.params.l10n.markAsFinished;
                  e = document.createElement("label");
                  return (
                    e.classList.add(
                      "h5p-interactive-book-status-progress-marker",
                    ),
                    e.appendChild(i),
                    e.appendChild(n),
                    e
                  );
                },
              },
              {
                key: "injectSectionId",
                value: function (e, t) {
                  for (
                    var i = t.getElementsByClassName("h5p-column-content"),
                      n = 0;
                    n < e.length;
                    n++
                  )
                    i[n].id = "h5p-interactive-book-section-".concat(
                      e[n].instance.subContentId,
                    );
                },
              },
              {
                key: "preloadChapter",
                value: function (e) {
                  (this.initializeChapter(e), this.initializeChapter(e + 1));
                },
              },
              {
                key: "initializeChapter",
                value: function (e) {
                  if (!(e < 0 || e > this.chapters.length - 1)) {
                    var t,
                      i = this.chapters[e];
                    if (i.isSummary) {
                      var n = this.columnNodes[e];
                      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[e]),
                      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 === (t = n.chapters) ||
                              void 0 === t ||
                              !t[e].completed
                            ),
                          ),
                        ),
                      (i.isInitialized = !0));
                  }
                },
              },
              {
                key: "createColumns",
                value: function (r, o, s) {
                  var a = this,
                    l =
                      (s = L({}, s)).previousState &&
                      0 < Object.keys(s.previousState).length
                        ? s.previousState
                        : null,
                    e = h.extractFragmentsFromURL(
                      this.parent.validateFragments,
                      this.parent.hashWindow,
                    );
                  0 === Object.keys(e).length &&
                    s &&
                    l &&
                    l.urlFragments &&
                    (e = l.urlFragments);
                  var c = [];
                  this.chapters = c;
                  for (var t, i = 0; i < r.chapters.length; i++)
                    !(function (i) {
                      var e = document.createElement("div"),
                        t = M(
                          M({}, s),
                          {},
                          {
                            metadata: M({}, s.metadata),
                            previousState: l ? l.chapters[i].state : {},
                          },
                        ),
                        t = H5P.newRunnable(
                          r.chapters[i],
                          o,
                          void 0,
                          void 0,
                          t,
                        );
                      a.parent.bubbleUp(t, "resize", a.parent);
                      var n = {
                        isInitialized: !1,
                        instance: t,
                        title: r.chapters[i].metadata.title,
                        completed: !!l && l.chapters[i].completed,
                        tasksLeft: l ? l.chapters[i].tasksLeft : 0,
                        isSummary: !1,
                        sections: t.getInstances().map(function (e, t) {
                          return {
                            content: r.chapters[i].params.content[t].content,
                            instance: e,
                            isTask: !1,
                          };
                        }),
                      };
                      (e.classList.add("h5p-interactive-book-chapter"),
                        (e.id = "h5p-interactive-book-chapter-".concat(
                          t.subContentId,
                        )),
                        (n.maxTasks = 0),
                        (n.tasksLeft = 0),
                        n.sections.forEach(function (e, t) {
                          H5P.Column.isTask(e.instance) &&
                            ((e.isTask = !0),
                            n.maxTasks++,
                            n.tasksLeft++,
                            a.behaviour.progressIndicators &&
                              ((e.taskDone =
                                !!l && l.chapters[i].sections[t].taskDone),
                              e.taskDone && n.tasksLeft--));
                        }),
                        c.push(n),
                        a.columnNodes.push(e));
                    })(i);
                  if (
                    (this.parent.hasSummary(c) &&
                      ((u = document.createElement("div")),
                      (t = new I(M({}, r), this.parent, this.getChapters(!1))),
                      this.parent.bubbleUp(t, "resize", this.parent),
                      (t = {
                        isInitialized: !1,
                        instance: t,
                        title: this.l10n.summaryHeader,
                        isSummary: !0,
                        sections: [],
                      }),
                      u.classList.add("h5p-interactive-book-chapter"),
                      (u.id = "h5p-interactive-book-chapter-summary"),
                      (t.maxTasks = t.tasksLeft),
                      c.push(t),
                      this.columnNodes.push(u)),
                    e.chapter && e.h5pbookid == this.parent.contentId)
                  ) {
                    var n,
                      u = this.findChapterIndex(e.chapter);
                    return -1 === u
                      ? 0
                      : (this.parent.setActiveChapter(u),
                        e.section &&
                          ((n = e.headerNumber),
                          setTimeout(function () {
                            (a.redirectSection(e.section, n),
                              a.parent.hasCover() &&
                                a.parent.cover.removeCover());
                          }, 1e3)),
                        u);
                  }
                  return 0;
                },
              },
              {
                key: "redirectSection",
                value: function (e) {
                  var t,
                    i,
                    n =
                      1 < arguments.length && void 0 !== arguments[1]
                        ? arguments[1]
                        : null;
                  "top" === e
                    ? this.parent.trigger("scrollToTop")
                    : (t = document.getElementById(e)) &&
                      (null === n ||
                        ((e = t.querySelectorAll("h2, h3"))[n] && (t = e[n])),
                      (i = document.createElement("div")).setAttribute(
                        "tabindex",
                        "-1",
                      ),
                      t.parentNode.insertBefore(i, t),
                      i.focus(),
                      i.addEventListener("blur", function () {
                        i.parentNode.removeChild(i);
                      }),
                      (this.targetPage.redirectFromComponent = !1),
                      setTimeout(function () {
                        t.scrollIntoView(!0);
                      }, 100));
                },
              },
              {
                key: "findChapterIndex",
                value: function (i) {
                  var n = -1;
                  return (
                    this.columnNodes.forEach(function (e, t) {
                      -1 === n && e.id === i && (n = t);
                    }),
                    n
                  );
                },
              },
              {
                key: "changeChapter",
                value: function (e, t) {
                  var i,
                    n,
                    r,
                    o,
                    s,
                    a = this;
                  this.columnNodes[
                    this.parent.getActiveChapter()
                  ].classList.contains("h5p-interactive-book-animate") ||
                    ((this.targetPage = t),
                    (t =
                      (i = this.parent.getActiveChapter()) !==
                      (n = this.parent.getChapterId(this.targetPage.chapter))),
                    e || this.parent.updateChapterProgress(i, t),
                    this.preloadChapter(n),
                    n < this.columnNodes.length &&
                      ((r = this.columnNodes[i]),
                      (o = this.columnNodes[n]),
                      t && !e
                        ? (this.parent.setActiveChapter(n),
                          o.classList.add(
                            "h5p-interactive-book-".concat(
                              (s = i < n ? "next" : "previous"),
                            ),
                          ),
                          o.classList.add("h5p-interactive-book-animate"),
                          r.classList.add("h5p-interactive-book-animate"),
                          setTimeout(function () {
                            ("previous" == s
                              ? r.classList.add("h5p-interactive-book-next")
                              : (r.classList.remove(
                                  "h5p-interactive-book-current",
                                ),
                                r.classList.add(
                                  "h5p-interactive-book-previous",
                                )),
                              o.classList.remove(
                                "h5p-interactive-book-".concat(s),
                              ));
                          }, 1),
                          setTimeout(function () {
                            (r.classList.remove("h5p-interactive-book-next"),
                              r.classList.remove(
                                "h5p-interactive-book-previous",
                              ),
                              r.classList.remove(
                                "h5p-interactive-book-current",
                              ),
                              o.classList.add("h5p-interactive-book-current"),
                              o.classList.remove(
                                "h5p-interactive-book-animate",
                              ),
                              r.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 e, t;
                  0 !== this.chapters.length &&
                    ((e = this.parent.getActiveChapter()),
                    (t = this.columnNodes[e]),
                    (e = this.parent.shouldFooterBeHidden(t.clientHeight)),
                    (t = this.parent.statusBarFooter.wrapper.parentNode),
                    e
                      ? t !== this.content &&
                        this.content.appendChild(
                          this.parent.statusBarFooter.wrapper,
                        )
                      : t !== this.parent.$wrapper &&
                        this.parent.$wrapper.append(
                          this.parent.statusBarFooter.wrapper,
                        ));
                },
              },
              {
                key: "toggleNavigationMenu",
                value: function () {
                  var e = this;
                  (this.sidebarIsOpen
                    ? (H5P.Transition.onTransitionEnd(
                        H5P.jQuery(this.container),
                        function () {
                          e.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 () {
                        e.container.classList.add(
                          "h5p-interactive-book-navigation-open",
                        );
                      }, 1)),
                    (this.sidebarIsOpen = !this.sidebarIsOpen));
                },
              },
            ]),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            a
          );
        })();
        function R(e) {
          return (R =
            "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
              ? function (e) {
                  return typeof e;
                }
              : function (e) {
                  return e &&
                    "function" == typeof Symbol &&
                    e.constructor === Symbol &&
                    e !== Symbol.prototype
                    ? "symbol"
                    : typeof e;
                })(e);
        }
        Z(2062);
        var B = [
          "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 q(t, e) {
          var i,
            n = Object.keys(t);
          return (
            Object.getOwnPropertySymbols &&
              ((i = Object.getOwnPropertySymbols(t)),
              e &&
                (i = i.filter(function (e) {
                  return Object.getOwnPropertyDescriptor(t, e).enumerable;
                })),
              n.push.apply(n, i)),
            n
          );
        }
        function $(n) {
          for (var e = 1; e < arguments.length; e++) {
            var r = null != arguments[e] ? arguments[e] : {};
            e % 2
              ? q(Object(r), !0).forEach(function (e) {
                  var t, i;
                  ((t = n),
                    (e = r[(i = e)]),
                    i in t
                      ? Object.defineProperty(t, i, {
                          value: e,
                          enumerable: !0,
                          configurable: !0,
                          writable: !0,
                        })
                      : (t[i] = e));
                })
              : Object.getOwnPropertyDescriptors
                ? Object.defineProperties(
                    n,
                    Object.getOwnPropertyDescriptors(r),
                  )
                : q(Object(r)).forEach(function (e) {
                    Object.defineProperty(
                      n,
                      e,
                      Object.getOwnPropertyDescriptor(r, e),
                    );
                  });
          }
          return n;
        }
        function W() {
          return (W = Object.assign
            ? Object.assign.bind()
            : function (e) {
                for (var t = 1; t < arguments.length; t++) {
                  var i,
                    n = arguments[t];
                  for (i in n)
                    Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
                }
                return e;
              }).apply(this, arguments);
        }
        function U(e, t) {
          for (var i = 0; i < t.length; i++) {
            var n = t[i];
            ((n.enumerable = n.enumerable || !1),
              (n.configurable = !0),
              "value" in n && (n.writable = !0),
              Object.defineProperty(e, n.key, n));
          }
        }
        function V(e, t) {
          return (V = Object.setPrototypeOf
            ? Object.setPrototypeOf.bind()
            : function (e, t) {
                return ((e.__proto__ = t), e);
              })(e, t);
        }
        function Y(e) {
          if (void 0 === e)
            throw new ReferenceError(
              "this hasn't been initialised - super() hasn't been called",
            );
          return e;
        }
        function Q(e) {
          return (Q = Object.setPrototypeOf
            ? Object.getPrototypeOf.bind()
            : function (e) {
                return e.__proto__ || Object.getPrototypeOf(e);
              })(e);
        }
        var X = (function () {
          !(function (e, t) {
            if ("function" != typeof t && null !== t)
              throw new TypeError(
                "Super expression must either be null or a function",
              );
            ((e.prototype = Object.create(t && t.prototype, {
              constructor: { value: e, writable: !0, configurable: !0 },
            })),
              Object.defineProperty(e, "prototype", { writable: !1 }),
              t && V(e, t));
          })(a, H5P.EventDispatcher);
          var e,
            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 (e) {
                  return !1;
                }
              })()),
              function () {
                var e,
                  t = Q(i);
                return (function (e, t) {
                  if (t && ("object" === R(t) || "function" == typeof t))
                    return t;
                  if (void 0 !== t)
                    throw new TypeError(
                      "Derived constructors may only return object or undefined",
                    );
                  return Y(e);
                })(
                  this,
                  n
                    ? ((e = Q(this).constructor),
                      Reflect.construct(t, arguments, e))
                    : t.apply(this, arguments),
                );
              });
          function a(e, t) {
            var o,
              i =
                2 < arguments.length && void 0 !== arguments[2]
                  ? arguments[2]
                  : {};
            !(function (e) {
              if (!(e instanceof a))
                throw new TypeError("Cannot call a class as a function");
            })(this);
            var n = Y((o = s.call(this)));
            ((o.contentId = t),
              (o.previousState = i.previousState),
              e &&
                e.behaviour &&
                e.behaviour.baseColor &&
                !k.isBaseColor(e.behaviour.baseColor) &&
                (k.setBase(e.behaviour.baseColor),
                (r = document.createElement("style")).styleSheet
                  ? (r.styleSheet.cssText = k.getCSS())
                  : r.appendChild(document.createTextNode(k.getCSS())),
                document.head.appendChild(r)),
              (o.activeChapter = 0),
              (o.newHandler = {}),
              (o.completed = !1),
              (o.params = a.sanitizeConfig(e)),
              (o.l10n = o.params.l10n),
              (o.params.behaviour = o.params.behaviour || {}),
              (o.mainWrapper = null),
              (o.currentRatio = null),
              (o.smallSurface = "h5p-interactive-book-small"),
              (o.mediumSurface = "h5p-interactive-book-medium"),
              (o.largeSurface = "h5p-interactive-book-large"),
              (o.chapters = []),
              (o.isSubmitButtonEnabled = !1),
              (o.isAnswerUpdated = !0),
              void 0 !== i.isScoringEnabled || void 0 !== i.isReportingEnabled
                ? (o.isSubmitButtonEnabled =
                    i.isScoringEnabled || i.isReportingEnabled)
                : void 0 !== H5PIntegration.reportingIsEnabled &&
                  (o.isSubmitButtonEnabled = H5PIntegration.reportingIsEnabled),
              (o.params.behaviour.enableSolutionsButton = !1),
              (o.params.behaviour.enableRetry =
                null === (r = o.params.behaviour.enableRetry) ||
                void 0 === r ||
                r),
              (o.getAnswerGiven = function () {
                return o.chapters.reduce(function (e, t) {
                  return "function" == typeof t.instance.getAnswerGiven
                    ? e && t.instance.getAnswerGiven()
                    : e;
                }, !0);
              }),
              (o.getScore = function () {
                return 0 < o.chapters.length
                  ? o.chapters.reduce(function (e, t) {
                      return "function" == typeof t.instance.getScore
                        ? e + t.instance.getScore()
                        : e;
                    }, 0)
                  : (o.previousState && o.previousState.score) || 0;
              }),
              (o.getMaxScore = function () {
                return 0 < o.chapters.length
                  ? o.chapters.reduce(function (e, t) {
                      return "function" == typeof t.instance.getMaxScore
                        ? e + t.instance.getMaxScore()
                        : e;
                    }, 0)
                  : (o.previousState && o.previousState.maxScore) || 0;
              }),
              (o.showSolutions = function () {
                o.chapters.forEach(function (e) {
                  ("function" == typeof e.instance.toggleReadSpeaker &&
                    e.instance.toggleReadSpeaker(!0),
                    "function" == typeof e.instance.showSolutions &&
                      e.instance.showSolutions(),
                    "function" == typeof e.instance.toggleReadSpeaker &&
                      e.instance.toggleReadSpeaker(!1));
                });
              }),
              (o.resetTask = function () {
                if (o.hasValidChapters()) {
                  for (var e in (o.chapters.forEach(function (e, t) {
                    ("function" == typeof e.instance.resetTask &&
                      e.instance.resetTask(),
                      (e.completed = !1),
                      (e.tasksLeft = e.maxTasks),
                      e.sections.forEach(function (e) {
                        return (e.taskDone = !1);
                      }),
                      o.setChapterRead(t, !1));
                  }),
                  o.previousState))
                    delete o.previousState[e];
                  o.hashWindow.location.hash = "";
                  var t = o.getActiveChapter();
                  (o.redirectChapter({
                    h5pbookid: o.contentId,
                    chapter: o.pageContent.columnNodes[0].id,
                    section: "top",
                  }),
                    (o.chapters[t].completed = !1),
                    o.hasCover() && o.displayCover(o.mainWrapper),
                    (o.isAnswerUpdated = !1),
                    o.setActivityStarted(!0),
                    o.pageContent.resetChapters(),
                    o.sideBar.resetIndicators());
                }
              }),
              (o.getXAPIData = function () {
                var e = o.createXAPIEventTemplate("answered");
                return (
                  o.addQuestionToXAPI(e),
                  e.setScoredResult(
                    o.getScore(),
                    o.getMaxScore(),
                    Y(o),
                    !0,
                    o.getScore() === o.getMaxScore(),
                  ),
                  {
                    statement: e.data.statement,
                    children: o.getXAPIDataFromChildren(
                      o.chapters.map(function (e) {
                        return e.instance;
                      }),
                    ),
                  }
                );
              }),
              (o.getXAPIDataFromChildren = function (e) {
                return e
                  .map(function (e) {
                    if ("function" == typeof e.getXAPIData)
                      return e.getXAPIData();
                  })
                  .filter(function (e) {
                    return !!e;
                  });
              }),
              (o.addQuestionToXAPI = function (e) {
                W(
                  e.getVerifiedStatementValue(["object", "definition"]),
                  o.getxAPIDefinition(),
                );
              }),
              (o.getxAPIDefinition = function () {
                return {
                  interactionType: "compound",
                  type: "http://adlnet.gov/expapi/activities/cmi.interaction",
                  description: { "en-US": "" },
                };
              }),
              (o.getCurrentState = function () {
                var e,
                  t = o.chapters
                    .filter(function (e) {
                      return !e.isSummary;
                    })
                    .map(function (e) {
                      return {
                        completed: e.completed || null,
                        sections: e.sections.map(function (e) {
                          return { taskDone: e.taskDone || null };
                        }),
                        state: e.instance.getCurrentState() || null,
                      };
                    }),
                  t = {
                    urlFragments:
                      !o.hashWindow.location.hash &&
                      null !== (e = o.previousState) &&
                      void 0 !== e &&
                      e.urlFragments
                        ? o.previousState.urlFragments
                        : h.extractFragmentsFromURL(
                            o.validateFragments,
                            o.hashWindow,
                          ),
                    chapters: t,
                  };
                return (
                  0 < o.activeChapter &&
                    ((t.score = o.getScore()), (t.maxScore = o.getMaxScore())),
                  t
                );
              }),
              (o.getContext = function () {
                return o.cover && !o.cover.hidden
                  ? {}
                  : { type: "page", value: o.activeChapter + 1 };
              }),
              (o.hasCover = function () {
                return o.cover && o.cover.container;
              }),
              (o.hasSummary = function () {
                var e =
                  0 < arguments.length && void 0 !== arguments[0]
                    ? arguments[0]
                    : o.chapters;
                return (
                  o.hasChaptersTasks(e) &&
                  o.params.behaviour.displaySummary &&
                  !0 === o.params.behaviour.displaySummary
                );
              }),
              (o.hasChaptersTasks = function (e) {
                return (
                  0 <
                  e.filter(function (e) {
                    return (
                      0 <
                      e.sections.filter(function (e) {
                        return !0 === e.isTask;
                      }).length
                    );
                  }).length
                );
              }),
              (o.hasValidChapters = function () {
                return 0 < o.params.chapters.length;
              }),
              (o.getActiveChapter = function () {
                return 0 < arguments.length &&
                  void 0 !== arguments[0] &&
                  arguments[0]
                  ? o.chapters[o.activeChapter]
                  : o.activeChapter;
              }),
              (o.setActiveChapter = function (e) {
                ((e = parseInt(e)), isNaN(e) || (o.activeChapter = e));
              }),
              (o.validateFragments = function (e) {
                return (
                  void 0 !== e.chapter &&
                  String(e.h5pbookid) === String(n.contentId)
                );
              }),
              (o.bubbleUp = function (e, t, i) {
                e.on(t, function (e) {
                  ((i.bubblingUpwards = !0),
                    i.trigger(t, e),
                    (i.bubblingUpwards = !1));
                });
              }),
              (o.isMenuOpen = function () {
                return o.statusBarHeader.isMenuOpen();
              }),
              (o.isSmallSurface = function () {
                return o.mainWrapper && o.mainWrapper.hasClass(o.smallSurface);
              }),
              (o.getRatio = function () {
                return (
                  o.mainWrapper.width() /
                  parseFloat(o.mainWrapper.css("font-size"))
                );
              }),
              (o.setWrapperClassFromRatio = function (e) {
                var t =
                  1 < arguments.length && void 0 !== arguments[1]
                    ? arguments[1]
                    : o.getRatio();
                t !== o.currentRatio &&
                  (o.breakpoints().forEach(function (e) {
                    e.shouldAdd(t)
                      ? o.mainWrapper.addClass(e.className)
                      : o.mainWrapper.removeClass(e.className);
                  }),
                  (o.currentRatio = t));
              }),
              (o.resize = function () {
                var e, t;
                o.pageContent &&
                  o.hasValidChapters() &&
                  o.mainWrapper &&
                  (o.setWrapperClassFromRatio(o.mainWrapper),
                  (e = o.getActiveChapter()),
                  null !== (t = o.pageContent.columnNodes[e]).offsetParent &&
                    (o.bubblingUpwards ||
                      o.pageContent.chapters[e].instance.trigger("resize"),
                    o.pageContent.content.style.height ===
                      "".concat(t.offsetHeight, "px") ||
                      t.classList.contains("h5p-interactive-book-animate") ||
                      ((o.pageContent.content.style.height = "".concat(
                        t.offsetHeight,
                        "px",
                      )),
                      o.pageContent.updateFooter(),
                      setTimeout(function () {
                        o.trigger("resize");
                      }, 10))));
              }),
              o.on("resize", o.resize, Y(o)),
              o.on("toggleMenu", function (e) {
                o.sideBar.container.addEventListener(
                  "transitionend",
                  function () {
                    o.trigger("resize");
                  },
                );
                e = !(
                  null !== (e = e.data) &&
                  void 0 !== e &&
                  e.shouldNotFocusNav
                );
                (o.pageContent.toggleNavigationMenu(),
                  o.statusBarHeader.menuToggleButton.setAttribute(
                    "aria-expanded",
                    o.statusBarHeader.menuToggleButton.classList.toggle(
                      "h5p-interactive-book-status-menu-active",
                    )
                      ? "true"
                      : "false",
                  ),
                  o.pageContent.sidebarIsOpen && e && o.sideBar.focus());
              }),
              o.on("scrollToTop", function () {
                var e;
                !0 === H5P.isFullscreen
                  ? (e = o.pageContent.container).scrollBy(0, -e.scrollHeight)
                  : o.statusBarHeader.wrapper.scrollIntoView(!0);
              }),
              o.on("newChapter", function (e) {
                var t;
                o.pageContent.columnNodes[
                  o.getActiveChapter()
                ].classList.contains("h5p-interactive-book-animate") ||
                  ((o.newHandler = e.data),
                  (e.data.newHash = h.createFragmentsString(o.newHandler)),
                  (o.newHandler.redirectFromComponent = !0),
                  o.getChapterId(e.data.chapter) === o.activeChapter &&
                  h.areFragmentsEqual(
                    e.data,
                    h.extractFragmentsFromURL(
                      o.validateFragments,
                      o.hashWindow,
                    ),
                    ["h5pbookid", "chapter", "section", "headerNumber"],
                  )
                    ? o.pageContent.changeChapter(!1, e.data)
                    : (o.params.behaviour.progressAuto &&
                        ((t = o.getChapterId(o.newHandler.chapter)),
                        o.isFinalChapterWithoutTask(t) && o.setChapterRead(t)),
                      H5P.trigger(Y(o), "changeHash", e.data),
                      H5P.trigger(Y(o), "scrollToTop")));
              }),
              (o.isCurrentChapterRead = function () {
                return o.isChapterRead(
                  o.chapters[o.activeChapter],
                  o.params.behaviour.progressAuto,
                );
              }),
              (o.isChapterRead = function (e) {
                var t =
                  1 < arguments.length && void 0 !== arguments[1]
                    ? arguments[1]
                    : o.params.behaviour.progressAuto;
                return e.completed || (t && 0 === e.tasksLeft);
              }),
              (o.isFinalChapterWithoutTask = function (e) {
                return (
                  0 === o.chapters[e].maxTasks &&
                  o.chapters
                    .slice(0, e)
                    .concat(o.chapters.slice(e + 1))
                    .every(function (e) {
                      return 0 === e.tasksLeft;
                    })
                );
              }),
              (o.setChapterRead = function () {
                var e =
                    0 < arguments.length && void 0 !== arguments[0]
                      ? arguments[0]
                      : o.activeChapter,
                  t =
                    !(1 < arguments.length && void 0 !== arguments[1]) ||
                    arguments[1];
                (o.handleChapterCompletion(e, t),
                  o.sideBar.updateChapterProgressIndicator(
                    e,
                    t
                      ? "DONE"
                      : o.hasChapterStartedTasks(o.chapters[e])
                        ? "STARTED"
                        : "BLANK",
                  ));
              }),
              (o.hasChapterStartedTasks = function (e) {
                return (
                  0 <
                  e.sections.filter(function (e) {
                    return e.taskDone;
                  }).length
                );
              }),
              (o.getChapterStatus = function (e) {
                var t =
                    1 < arguments.length && void 0 !== arguments[1]
                      ? arguments[1]
                      : o.params.behaviour.progressAuto,
                  i = "BLANK";
                return (
                  o.isChapterRead(e, t)
                    ? (i = "DONE")
                    : o.hasChapterStartedTasks(e) && (i = "STARTED"),
                  i
                );
              }),
              (o.updateChapterProgress = function (e) {
                var t,
                  i =
                    1 < arguments.length &&
                    void 0 !== arguments[1] &&
                    arguments[1];
                o.params.behaviour.progressIndicators &&
                  ("DONE" ===
                    (i = (t = o.chapters[e]).maxTasks
                      ? o.getChapterStatus(t)
                      : o.isChapterRead(t) && i
                        ? "DONE"
                        : "BLANK") && o.handleChapterCompletion(e),
                  o.sideBar.updateChapterProgressIndicator(e, i));
              }),
              (o.getChapterId = function (e) {
                e = e.replace("h5p-interactive-book-chapter-", "");
                e = o.chapters
                  .map(function (e) {
                    return e.instance.subContentId;
                  })
                  .indexOf(e);
                return -1 === e ? 0 : e;
              }),
              (o.handleChapterCompletion = function (e) {
                e = o.chapters[e];
                if (!0 !== e.isSummary) {
                  if (
                    !(
                      !(1 < arguments.length && void 0 !== arguments[1]) ||
                      arguments[1]
                    )
                  )
                    return (
                      (e.completed = !1),
                      (o.completed = !1),
                      void o.trigger("bookCompleted", {
                        completed: o.completed,
                      })
                    );
                  (e.completed ||
                    ((e.completed = !0),
                    e.instance.triggerXAPIScored(
                      e.instance.getScore(),
                      e.instance.getMaxScore(),
                      "completed",
                    )),
                    !o.completed &&
                      o.chapters
                        .filter(function (e) {
                          return !e.isSummary;
                        })
                        .every(function (e) {
                          return e.completed;
                        }) &&
                      ((o.completed = !0),
                      o.trigger("bookCompleted", {
                        completed: o.completed,
                      })));
                }
              }),
              (o.shouldFooterBeHidden = function () {
                return o.isFullscreen;
              }),
              (o.getContainerWidth = function () {
                return o.pageContent && o.pageContent.container
                  ? o.pageContent.container.offsetWidth
                  : 0;
              }),
              (o.changeChapter = function (e) {
                (o.pageContent.changeChapter(e, o.newHandler),
                  o.statusBarHeader.updateStatusBar(),
                  o.statusBarFooter.updateStatusBar(),
                  (o.newHandler.redirectFromComponent = !1));
              }),
              (o.breakpoints = function () {
                return [
                  {
                    className: o.smallSurface,
                    shouldAdd: function (e) {
                      return e < 43;
                    },
                  },
                  {
                    className: o.mediumSurface,
                    shouldAdd: function (e) {
                      return 43 <= e && e < 60;
                    },
                  },
                  {
                    className: o.largeSurface,
                    shouldAdd: function (e) {
                      return 60 <= e;
                    },
                  },
                ];
              }),
              H5P.on(Y(o), "respondChangeHash", function () {
                var e = h.extractFragmentsFromURL(
                  n.validateFragments,
                  o.hashWindow,
                );
                e.h5pbookid &&
                  String(e.h5pbookid) === String(n.contentId) &&
                  o.redirectChapter(e);
              }),
              H5P.on(Y(o), "changeHash", function (e) {
                String(e.data.h5pbookid) === String(o.contentId) &&
                  (o.hashWindow.location.hash = e.data.newHash);
              }),
              H5P.externalDispatcher.on("xAPI", function (e) {
                var t,
                  i =
                    -1 <
                    [
                      "answered",
                      "completed",
                      "interacted",
                      "attempted",
                    ].indexOf(e.getVerb()),
                  e = n.chapters.length;
                n !== this &&
                  i &&
                  e &&
                  (t =
                    this.subContentId ||
                    (null === (t = this.contentData) || void 0 === t
                      ? void 0
                      : t.subContentId)) &&
                  n.setSectionStatusByID(t, n.activeChapter);
              }),
              (o.redirectChapter = function (e) {
                (o.newHandler.redirectFromComponent ||
                  (e.h5pbookid && String(e.h5pbookid) === String(n.contentId)
                    ? (n.newHandler = e)
                    : (n.newHandler = {
                        chapter: "h5p-interactive-book-chapter-".concat(
                          n.chapters[0].instance.subContentId,
                        ),
                        h5pbookid: n.h5pbookid,
                      })),
                  n.changeChapter(!1));
              }),
              (o.setSectionStatusByID = function (n, r) {
                o.chapters[r].sections.forEach(function (e, t) {
                  var i = e.instance;
                  i.subContentId !== n ||
                    e.taskDone ||
                    ((e.taskDone = !i.getAnswerGiven || i.getAnswerGiven()),
                    o.sideBar.setSectionMarker(r, t),
                    e.taskDone && --o.chapters[r].tasksLeft,
                    o.updateChapterProgress(r));
                });
              }),
              (o.addHashListener = function (e) {
                (e.addEventListener("hashchange", function (e) {
                  H5P.trigger(Y(o), "respondChangeHash", e);
                }),
                  (o.hashWindow = e));
              }));
            try {
              o.addHashListener(top);
            } catch (e) {
              if (!(e instanceof DOMException)) throw e;
              o.addHashListener(window);
            }
            ((o.displayCover = function (e) {
              (o.hideAllElements(!0),
                e.append(o.cover.container),
                e.addClass("covered"),
                o.cover.initMedia());
            }),
              (o.attach = function (e) {
                ((o.mainWrapper = e).addClass(
                  "h5p-interactive-book h5p-scrollable-fullscreen",
                ),
                  o.isEdge18orEarlier() && e.addClass("edge-18"),
                  o.setWrapperClassFromRatio(o.mainWrapper),
                  o.cover && o.displayCover(e),
                  e.append(o.statusBarHeader.wrapper));
                var t = o.pageContent.container.firstChild;
                (t &&
                  o.pageContent.container.insertBefore(o.sideBar.container, t),
                  e.append(o.pageContent.container),
                  e.append(o.statusBarFooter.wrapper),
                  (o.$wrapper = e),
                  o.params.behaviour.defaultTableOfContents &&
                    !o.isSmallSurface() &&
                    o.trigger("toggleMenu", { shouldNotFocusNav: !0 }),
                  o.pageContent.updateFooter());
              }),
              (o.isEdge18orEarlier = function () {
                var e = window.navigator.userAgent,
                  t = e.indexOf("Edge/");
                if (t < 0) return !1;
                t = e.substring(t + 5, e.indexOf(".", t));
                return parseInt(t) <= 18;
              }),
              (o.hideAllElements = function (e) {
                var t = [
                  this.statusBarHeader.wrapper,
                  this.statusBarFooter.wrapper,
                  this.pageContent.container,
                ];
                e
                  ? t.forEach(function (e) {
                      (e.classList.add("h5p-content-hidden"),
                        e.classList.add("h5p-interactive-book-cover-present"));
                    })
                  : t.forEach(function (e) {
                      (e.classList.remove("h5p-content-hidden"),
                        e.classList.remove(
                          "h5p-interactive-book-cover-present",
                        ));
                    });
              }),
              o.params.showCoverPage &&
                (o.cover = new x(
                  o.params.bookCover,
                  i.metadata.title,
                  o.l10n.read,
                  t,
                  Y(o),
                )));
            var r = $($({}, i), {}, { parent: Y(o) });
            return (
              (o.pageContent = new z(o.params, t, r, Y(o), {
                l10n: { markAsFinished: o.l10n.markAsFinished },
                behaviour: o.params.behaviour,
              })),
              (o.chapters = o.pageContent.getChapters()),
              (o.sideBar = new d(o.params, t, i.metadata.title, Y(o))),
              o.chapters.forEach(function (e, t) {
                o.setChapterRead(t, e.completed);
              }),
              (o.statusBarHeader = new v(
                t,
                o.chapters.length,
                Y(o),
                {
                  l10n: o.l10n,
                  a11y: o.params.a11y,
                  behaviour: o.params.behaviour,
                  displayFullScreenButton: !0,
                  displayMenuToggleButton: !0,
                },
                "h5p-interactive-book-status-header",
              )),
              (o.statusBarFooter = new v(
                t,
                o.chapters.length,
                Y(o),
                {
                  l10n: o.l10n,
                  a11y: o.params.a11y,
                  behaviour: o.params.behaviour,
                  displayToTopButton: !0,
                },
                "h5p-interactive-book-status-footer",
              )),
              o.hasCover()
                ? (o.hideAllElements(!0),
                  o.on("coverRemoved", function () {
                    (o.hideAllElements(!1),
                      o.trigger("resize"),
                      o.setActivityStarted(),
                      o.statusBarHeader.progressBar.progress.focus());
                  }))
                : o.setActivityStarted(),
              o.hasValidChapters() &&
                (o.statusBarHeader.updateStatusBar(),
                o.statusBarFooter.updateStatusBar()),
              o
            );
          }
          return (
            (e = a),
            (t = [
              {
                key: "sanitizeConfig",
                value: function (e) {
                  var t = e.read,
                    i = void 0 === t ? "Read" : t,
                    n = e.displayTOC,
                    r =
                      void 0 === n
                        ? "Display &#039;Table of contents&#039;"
                        : n,
                    o = e.hideTOC,
                    s = void 0 === o ? "Hide &#039;Table of contents&#039;" : o,
                    a = e.nextPage,
                    l = void 0 === a ? "Next page" : a,
                    c = e.previousPage,
                    u = void 0 === c ? "Previous page" : c,
                    h = e.chapterCompleted,
                    d = void 0 === h ? "Page completed!" : h,
                    p = e.partCompleted,
                    f = void 0 === p ? "@pages of @total completed" : p,
                    g = e.incompleteChapter,
                    m = void 0 === g ? "Incomplete page" : g,
                    v = e.navigateToTop,
                    b = void 0 === v ? "Navigate to the top" : v,
                    y = e.markAsFinished,
                    _ = void 0 === y ? "I have finished this page" : y,
                    w = e.fullscreen,
                    x = void 0 === w ? "Fullscreen" : w,
                    k = e.exitFullscreen,
                    C = void 0 === k ? "Exit fullscreen" : k,
                    P = e.bookProgressSubtext,
                    T = void 0 === P ? "@count of @total pages" : P,
                    S = e.interactionsProgressSubtext,
                    H = void 0 === S ? "@count of @total interactions" : S,
                    D = e.submitReport,
                    E = void 0 === D ? "Submit Report" : D,
                    t = e.restartLabel,
                    n = void 0 === t ? "Restart" : t,
                    o = e.summaryHeader,
                    a = void 0 === o ? "Summary" : o,
                    c = e.allInteractions,
                    h = void 0 === c ? "All interactions" : c,
                    p = e.unansweredInteractions,
                    g = void 0 === p ? "Unanswered interactions" : p,
                    v = e.scoreText,
                    y = void 0 === v ? "@score / @maxscore" : v,
                    w = e.leftOutOfTotalCompleted,
                    k =
                      void 0 === w ? "@left of @max interactinos completed" : w,
                    P = e.noInteractions,
                    S = void 0 === P ? "No interactions" : P,
                    D = e.score,
                    t = void 0 === D ? "Score" : D,
                    o = e.summaryAndSubmit,
                    c = void 0 === o ? "Summary & submit" : o,
                    p = e.noChapterInteractionBoldText,
                    v =
                      void 0 === p
                        ? "You have not interacted with any pages."
                        : p,
                    w = e.noChapterInteractionText,
                    P =
                      void 0 === w
                        ? "You have to interact with at least one page before you can see the summary."
                        : w,
                    D = e.yourAnswersAreSubmittedForReview,
                    o =
                      void 0 === D
                        ? "Your answers are submitted for review!"
                        : D,
                    p = e.bookProgress,
                    w = void 0 === p ? "Book progress" : p,
                    D = e.interactionsProgress,
                    p = void 0 === D ? "Interactions progress" : D,
                    D = e.totalScoreLabel,
                    D = void 0 === D ? "Total score" : D,
                    e = (function (e, t) {
                      if (null == e) return {};
                      var i,
                        n = (function (e, t) {
                          if (null == e) return {};
                          for (
                            var i, n = {}, r = Object.keys(e), o = 0;
                            o < r.length;
                            o++
                          )
                            ((i = r[o]), 0 <= t.indexOf(i) || (n[i] = e[i]));
                          return n;
                        })(e, t);
                      if (Object.getOwnPropertySymbols)
                        for (
                          var r = Object.getOwnPropertySymbols(e), o = 0;
                          o < r.length;
                          o++
                        )
                          ((i = r[o]),
                            0 <= t.indexOf(i) ||
                              (Object.prototype.propertyIsEnumerable.call(
                                e,
                                i,
                              ) &&
                                (n[i] = e[i])));
                      return n;
                    })(e, B);
                  return (
                    (e.chapters = e.chapters
                      .map(function (e) {
                        return (
                          (e.params.content = e.params.content.filter(
                            function (e) {
                              return e.content;
                            },
                          )),
                          e
                        );
                      })
                      .filter(function (e) {
                        return e.params.content && 0 < e.params.content.length;
                      })),
                    (e.behaviour.displaySummary =
                      void 0 === e.behaviour.displaySummary ||
                      e.behaviour.displaySummary),
                    (e.l10n = {
                      read: i,
                      displayTOC: r,
                      hideTOC: s,
                      nextPage: l,
                      previousPage: u,
                      chapterCompleted: d,
                      partCompleted: f,
                      incompleteChapter: m,
                      navigateToTop: b,
                      markAsFinished: _,
                      fullscreen: x,
                      exitFullscreen: C,
                      bookProgressSubtext: T,
                      interactionsProgressSubtext: H,
                      submitReport: E,
                      restartLabel: n,
                      summaryHeader: a,
                      allInteractions: h,
                      unansweredInteractions: g,
                      scoreText: y,
                      leftOutOfTotalCompleted: k,
                      noInteractions: S,
                      score: t,
                      summaryAndSubmit: c,
                      noChapterInteractionBoldText: v,
                      noChapterInteractionText: P,
                      yourAnswersAreSubmittedForReview: o,
                      bookProgress: w,
                      interactionsProgress: p,
                      totalScoreLabel: D,
                    }),
                    e
                  );
                },
              },
            ]),
            null && U(e.prototype, null),
            U(e, t),
            Object.defineProperty(e, "prototype", { writable: !1 }),
            a
          );
        })();
        (H5P = H5P || {}).InteractiveBook = X;
      })());
  })());
const realH5PGetPath = H5P.getPath;
H5P.getPath = function (e, t) {
  return e.startsWith("data:") ? e : realH5PGetPath(e, t);
};
var furtherH5PInlineResources = {
  "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_55_fbf9ee_1x400.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAP0lEQVQ4je3PMQrAMABC0a/3v2zX0mCXNkOgc6C4PARd5DqPGKCU8luS8SbAQhiCQRgJE56kZTfbbP9RSvnkBsWcEAZRWcgqAAAAAElFTkSuQmCC",
  "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_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_0_aaaaaa_40x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAe0lEQVRoge3OMQHAIBAAMcC/kjdZJHTI0A4XBdkz86wfO18H3hRUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUF8O8A8WdY6opAAAAAElFTkSuQmCC",
  "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-bg_highlight-soft_75_cccccc_1x100.png":
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAYAAABHLFpgAAAALElEQVQYlWN49OjRfyYGBgaGIUT8//8fSqBx0Yh///4RL8vAwAAVQ2MNOwIAl6g6KkOJwk8AAAAASUVORK5CYII=",
  "jQuery.ui-1.10/images/ui-icons_2e83ff_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-icons_454545_256x240.png":
    "data:image/png;base64, ",
  "jQuery.ui-1.10/images/ui-icons_222222_256x240.png":
    "data:image/png;base64, ",
  "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, ",
};
!(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;
};
