H5PIntegration = {
  "ajax": {
    "setFinished": "",
    "contentUserData": ""
  },
  "ajaxPath": "/h5p/ajax?action=",
  "contents": {
    "cid-1153857549": {
      "displayOptions": {
        "copy": false,
        "copyright": false,
        "embed": false,
        "export": false,
        "frame": false,
        "icon": false
      },
      "fullScreen": "0",
      "jsonContent": "{\"scoreShow\":\"Έλεγχος\",\"submit\":\"Submit\",\"tryAgain\":\"Επανάληψη\",\"scoreExplanation\":\"Για κάθε σωστή απάντηση κερδίζεις έναν βαθμό. Για κάθε λάθος απάντηση χάνεις έναν βαθμό. Η χαμηλότερη δυνατή βαθμολογία είναι 0.\",\"question\":{\"settings\":{\"size\":{\"width\":1100,\"height\":650},\"background\":{\"path\":\"resources/image-bg.jpg\",\"mime\":\"image/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1144,\"height\":546}},\"task\":{\"elements\":[{\"x\":67.55159817351598,\"y\":7.727602028495533,\"width\":21.333513484589037,\"height\":10.659295274272605,\"dropZones\":[\"0\",\"1\",\"2\",\"3\"],\"type\":{\"library\":\"H5P.Image 1.1\",\"params\":{\"decorative\":false,\"contentName\":\"Image\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"resources/image-pGSmEPf9.jpg\",\"mime\":\"image/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":597,\"height\":265},\"alt\":\"Προτιμάμε τα δημητριακά ολικής άλεσης. Τρώμε μαύρο ψωμί και μακαρόνια που είναι πλούσια σε φυτικές ίνες.\"},\"subContentId\":\"84386e4f-dda9-4bad-a25e-2a67bc805338\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\",\"authors\":[],\"changes\":[]}},\"backgroundOpacity\":5,\"multiple\":false},{\"x\":68.83561643835617,\"y\":38.63801014247767,\"width\":20.63270394779731,\"height\":7.876026683789954,\"dropZones\":[\"0\",\"1\",\"2\",\"3\"],\"type\":{\"library\":\"H5P.Image 1.1\",\"params\":{\"decorative\":false,\"contentName\":\"Image\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"resources/image-LA63Itgh.jpg\",\"mime\":\"image/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":566,\"height\":215},\"alt\":\"Επιλέγουμε φρούτα, τοστ ή κουλουράκι για κολατσιό στο σχολείο\"},\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\",\"authors\":[],\"changes\":[]},\"subContentId\":\"332b5976-0886-4704-b036-7ed872f9d768\"},\"backgroundOpacity\":5,\"multiple\":false},{\"x\":64.52694063926941,\"y\":57.957015213716495,\"width\":24.076705194063926,\"height\":7.090338184931507,\"dropZones\":[\"0\",\"1\",\"2\",\"3\"],\"type\":{\"library\":\"H5P.Image 1.1\",\"params\":{\"decorative\":false,\"contentName\":\"Image\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"alt\":\"Τρώμε όσπρια, λαδερά και ψάρι τις περισσότερες μέρες τις εβδομάδας\",\"file\":{\"path\":\"resources/image-dR03YNcn.jpg\",\"mime\":\"image/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":705,\"height\":174}},\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\",\"authors\":[],\"changes\":[]},\"subContentId\":\"6105fe8f-ec0c-48d0-b0a0-4e30e8b9d964\"},\"backgroundOpacity\":5,\"multiple\":false},{\"x\":62.785388127853885,\"y\":75.34411977783145,\"width\":24.804217179628942,\"height\":7.876026683789954,\"dropZones\":[\"0\",\"1\",\"2\",\"3\"],\"type\":{\"library\":\"H5P.Image 1.1\",\"params\":{\"decorative\":false,\"contentName\":\"Image\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"alt\":\"Αγαπάμε το σπιτικό φαγητό με φρέσκα υλικά\",\"file\":{\"path\":\"resources/image-VLoNOAlf.jpg\",\"mime\":\"image/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":637,\"height\":201}},\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\",\"authors\":[],\"changes\":[]},\"subContentId\":\"7ed2d2ae-8476-429e-aac7-41f9249d09e9\"},\"backgroundOpacity\":5,\"multiple\":false}],\"dropZones\":[{\"x\":8.015525114155251,\"y\":23.1828060854866,\"width\":17.99634703196347,\"height\":7.063356164383562,\"correctElements\":[\"1\"],\"showLabel\":false,\"backgroundOpacity\":5,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":false,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"<div>Θέση πάνω αριστερά</div>\"},{\"x\":38.09589041095891,\"y\":23.1828060854866,\"width\":20.75079908675799,\"height\":6.278538812785388,\"correctElements\":[\"2\"],\"showLabel\":false,\"backgroundOpacity\":5,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":false,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"<div>Θέση πάνω δεξιά</div>\"},{\"x\":38.529680365296805,\"y\":44.433711663849316,\"width\":17.481164383561644,\"height\":10.417808219178083,\"correctElements\":[\"0\"],\"showLabel\":false,\"backgroundOpacity\":5,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":false,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"<div>Θέση κάτω δεξιά</div>\"},{\"x\":8.130636415525114,\"y\":58.02511470659262,\"width\":18.881164383561644,\"height\":7.063356164383562,\"correctElements\":[\"3\"],\"showLabel\":false,\"backgroundOpacity\":5,\"tipsAndFeedback\":{\"tip\":\"\"},\"single\":true,\"autoAlign\":false,\"type\":{\"library\":\"H5P.DragQuestionDropzone 0.1\"},\"label\":\"<div>Θέση κάτω αριστερά</div>\"}]}},\"overallFeedback\":[{\"from\":0,\"to\":100}],\"behaviour\":{\"enableRetry\":true,\"enableCheckButton\":true,\"singlePoint\":false,\"applyPenalties\":true,\"enableScoreExplanation\":true,\"dropZoneHighlighting\":\"dragging\",\"autoAlignSpacing\":2,\"enableFullScreen\":false,\"showScorePoints\":true,\"showTitle\":true,\"backgroundOpacity\":\"0\"},\"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": {
        "license": "U",
        "title": "Πόσο Μεσογειακή είναι η διατροφή μας σήμερα; Διόρθωσε τις λάθος διατροφικές συμπεριφορές αντικαθιστώντας τα σημειώματα με τα αντίστοιχα σωστά.",
        "defaultLanguage": "en"
      },
      "scripts": [
        "/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.22"
      ],
      "styles": [
        "/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.6",
        "/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.11",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-help-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-message-dialog.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progress-circle.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-simple-rounded-button.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-speech-bubble.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-tip.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-slider.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-score-bar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-progressbar.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-ui.css?version=1.3.19",
        "/h5p/libraries/H5P.JoubelUI-1.3/css/joubel-icon.css?version=1.3.19",
        "/h5p/libraries/H5P.Question-1.5/styles/question.css?version=1.5.15",
        "/h5p/libraries/H5P.Question-1.5/styles/explainer.css?version=1.5.15",
        "/h5p/libraries/H5P.DragQuestion-1.14/css/dragquestion.css?version=1.14.22"
      ],
      "url": "1153857549",
      "exportUrl": "/h5p/download/1153857549"
    }
  },
  "core": {
    "scripts": [
      "/h5p/core/js/jquery.js?version=1.27",
      "/h5p/core/js/h5p.js?version=1.27",
      "/h5p/core/js/h5p-event-dispatcher.js?version=1.27",
      "/h5p/core/js/h5p-x-api-event.js?version=1.27",
      "/h5p/core/js/h5p-x-api.js?version=1.27",
      "/h5p/core/js/h5p-content-type.js?version=1.27",
      "/h5p/core/js/h5p-confirmation-dialog.js?version=1.27",
      "/h5p/core/js/h5p-action-bar.js?version=1.27",
      "/h5p/core/js/request-queue.js?version=1.27"
    ],
    "styles": [
      "/h5p/core/styles/h5p.css?version=1.27",
      "/h5p/core/styles/h5p-confirmation-dialog.css?version=1.27",
      "/h5p/core/styles/h5p-core-button.css?version=1.27"
    ]
  },
  "l10n": {
    "H5P": {
      "fullscreen": "client:fullscreen",
      "disableFullscreen": "client:disableFullscreen",
      "download": "client:download",
      "copyrights": "client:copyrights",
      "embed": "client:embed",
      "size": "client:size",
      "showAdvanced": "client:showAdvanced",
      "hideAdvanced": "client:hideAdvanced",
      "advancedHelp": "client:advancedHelp",
      "copyrightInformation": "client:copyrightInformation",
      "close": "client:close",
      "title": "client:title",
      "author": "client:author",
      "year": "client:year",
      "source": "client:source",
      "license": "client:license",
      "thumbnail": "client:thumbnail",
      "noCopyrights": "client:noCopyrights",
      "reuse": "client:reuse",
      "reuseContent": "client:reuseContent",
      "reuseDescription": "client:reuseDescription",
      "downloadDescription": "client:downloadDescription",
      "copyrightsDescription": "client:copyrightsDescription",
      "embedDescription": "client:embedDescription",
      "h5pDescription": "client:h5pDescription",
      "contentChanged": "client:contentChanged",
      "startingOver": "client:startingOver",
      "by": "client:by",
      "showMore": "client:showMore",
      "showLess": "client:showLess",
      "subLevel": "client:subLevel",
      "confirmDialogHeader": "client:confirmDialogHeader",
      "confirmDialogBody": "client:confirmDialogBody",
      "cancelLabel": "client:cancelLabel",
      "confirmLabel": "client:confirmLabel",
      "licenseU": "client:licenseU",
      "licenseCCBY": "client:licenseCCBY",
      "licenseCCBYSA": "client:licenseCCBYSA",
      "licenseCCBYND": "client:licenseCCBYND",
      "licenseCCBYNC": "client:licenseCCBYNC",
      "licenseCCBYNCSA": "client:licenseCCBYNCSA",
      "licenseCCBYNCND": "client:licenseCCBYNCND",
      "licenseCC40": "client:licenseCC40",
      "licenseCC30": "client:licenseCC30",
      "licenseCC25": "client:licenseCC25",
      "licenseCC20": "client:licenseCC20",
      "licenseCC10": "client:licenseCC10",
      "licenseGPL": "client:licenseGPL",
      "licenseV3": "client:licenseV3",
      "licenseV2": "client:licenseV2",
      "licenseV1": "client:licenseV1",
      "licensePD": "client:licensePD",
      "licenseCC010": "client:licenseCC010",
      "licensePDM": "client:licensePDM",
      "licenseC": "client:licenseC",
      "contentType": "client:contentType",
      "licenseExtras": "client:licenseExtras",
      "changes": "client:changes",
      "contentCopied": "client:contentCopied",
      "connectionLost": "client:connectionLost",
      "connectionReestablished": "client:connectionReestablished",
      "resubmitScores": "client:resubmitScores",
      "offlineDialogHeader": "client:offlineDialogHeader",
      "offlineDialogBody": "client:offlineDialogBody",
      "offlineDialogRetryMessage": "client:offlineDialogRetryMessage",
      "offlineDialogRetryButtonLabel": "client:offlineDialogRetryButtonLabel",
      "offlineSuccessfulSubmit": "client:offlineSuccessfulSubmit",
      "mainTitle": "client:mainTitle",
      "editInfoTitle": "client:editInfoTitle",
      "cancel": "client:cancel",
      "back": "client:back",
      "next": "client:next",
      "reviewInfo": "client:reviewInfo",
      "share": "client:share",
      "saveChanges": "client:saveChanges",
      "registerOnHub": "client:registerOnHub",
      "updateRegistrationOnHub": "client:updateRegistrationOnHub",
      "requiredInfo": "client:requiredInfo",
      "optionalInfo": "client:optionalInfo",
      "reviewAndShare": "client:reviewAndShare",
      "reviewAndSave": "client:reviewAndSave",
      "shared": "client:shared",
      "currentStep": "client:currentStep",
      "sharingNote": "client:sharingNote",
      "licenseDescription": "client:licenseDescription",
      "licenseVersion": "client:licenseVersion",
      "licenseVersionDescription": "client:licenseVersionDescription",
      "disciplineLabel": "client:disciplineLabel",
      "disciplineDescription": "client:disciplineDescription",
      "disciplineLimitReachedMessage": "client:disciplineLimitReachedMessage",
      "discipline": {
        "searchPlaceholder": "client:discipline.searchPlaceholder",
        "in": "client:discipline.in",
        "dropdownButton": "client:discipline.dropdownButton"
      },
      "removeChip": "client:removeChip",
      "keywordsPlaceholder": "client:keywordsPlaceholder",
      "keywords": "client:keywords",
      "keywordsDescription": "client:keywordsDescription",
      "altText": "client:altText",
      "reviewMessage": "client:reviewMessage",
      "subContentWarning": "client:subContentWarning",
      "disciplines": "client:disciplines",
      "shortDescription": "client:shortDescription",
      "longDescription": "client:longDescription",
      "icon": "client:icon",
      "screenshots": "client:screenshots",
      "helpChoosingLicense": "client:helpChoosingLicense",
      "shareFailed": "client:shareFailed",
      "editingFailed": "client:editingFailed",
      "shareTryAgain": "client:shareTryAgain",
      "pleaseWait": "client:pleaseWait",
      "language": "client:language",
      "level": "client:level",
      "shortDescriptionPlaceholder": "client:shortDescriptionPlaceholder",
      "longDescriptionPlaceholder": "client:longDescriptionPlaceholder",
      "description": "client:description",
      "iconDescription": "client:iconDescription",
      "screenshotsDescription": "client:screenshotsDescription",
      "submitted": "client:submitted",
      "isNowSubmitted": "client:isNowSubmitted",
      "changeHasBeenSubmitted": "client:changeHasBeenSubmitted",
      "contentAvailable": "client:contentAvailable",
      "contentUpdateSoon": "client:contentUpdateSoon",
      "contentLicenseTitle": "client:contentLicenseTitle",
      "licenseDialogDescription": "client:licenseDialogDescription",
      "publisherFieldTitle": "client:publisherFieldTitle",
      "publisherFieldDescription": "client:publisherFieldDescription",
      "emailAddress": "client:emailAddress",
      "publisherDescription": "client:publisherDescription",
      "publisherDescriptionText": "client:publisherDescriptionText",
      "contactPerson": "client:contactPerson",
      "phone": "client:phone",
      "address": "client:address",
      "city": "client:city",
      "zip": "client:zip",
      "country": "client:country",
      "logoUploadText": "client:logoUploadText",
      "acceptTerms": "client:acceptTerms",
      "successfullyRegistred": "client:successfullyRegistred",
      "successfullyRegistredDescription": "client:successfullyRegistredDescription",
      "successfullyUpdated": "client:successfullyUpdated",
      "accountDetailsLinkText": "client:accountDetailsLinkText",
      "registrationTitle": "client:registrationTitle",
      "registrationFailed": "client:registrationFailed",
      "registrationFailedDescription": "client:registrationFailedDescription",
      "maxLength": "client:maxLength",
      "keywordExists": "client:keywordExists",
      "licenseDetails": "client:licenseDetails",
      "remove": "client:remove",
      "removeImage": "client:removeImage",
      "cancelPublishConfirmationDialogTitle": "client:cancelPublishConfirmationDialogTitle",
      "cancelPublishConfirmationDialogDescription": "client:cancelPublishConfirmationDialogDescription",
      "cancelPublishConfirmationDialogCancelButtonText": "client:cancelPublishConfirmationDialogCancelButtonText",
      "cancelPublishConfirmationDialogConfirmButtonText": "client:cancelPublishConfirmationDialogConfirmButtonText",
      "add": "client:add",
      "age": "client:age",
      "ageDescription": "client:ageDescription",
      "invalidAge": "client:invalidAge",
      "contactPersonDescription": "client:contactPersonDescription",
      "emailAddressDescription": "client:emailAddressDescription",
      "copyrightWarning": "client:copyrightWarning",
      "keywordsExits": "client:keywordsExits",
      "someKeywordsExits": "client:someKeywordsExits"
    }
  },
  "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-' + '1153857549'].displayOptions.embed = false;
        } else {
            H5PIntegration.contents['cid-' + '1153857549'].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-' + '1153857549'].resizeCode = '';
        }
            
        /*!@license js/jquery.js by Joubel and other contributors, licensed under GNU GENERAL PUBLIC LICENSE Version 3*/
((e,t)=>{"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)})("undefined"!=typeof window?window:this,function(x,L){function b(e){return"function"==typeof e&&"number"!=typeof e.nodeType}function g(e){return null!=e&&e===e.window}var t=[],z=Object.getPrototypeOf,a=t.slice,j=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},F=t.push,R=t.indexOf,$={},q=$.toString,W=$.hasOwnProperty,B=W.toString,U=B.call(Object),m={},P=x.document,V={type:!0,src:!0,nonce:!0,noModule:!0};function Y(e,t,i){var n,s,o=(i=i||P).createElement("script");if(o.text=e,t)for(n in V)(s=t[n]||t.getAttribute&&t.getAttribute(n))&&o.setAttribute(n,s);i.head.appendChild(o).parentNode.removeChild(o)}function f(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?$[q.call(e)]||"object":typeof e}var e="3.5.1",C=function(e,t){return new C.fn.init(e,t)};function Q(e){var t=!!e&&"length"in e&&e.length,i=f(e);return!b(e)&&!g(e)&&("array"===i||0===t||"number"==typeof t&&0<t&&t-1 in e)}C.fn=C.prototype={jquery:e,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:F,sort:t.sort,splice:t.splice},C.extend=C.fn.extend=function(){var e,t,i,n,s,o=arguments[0]||{},r=1,a=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[r]||{},r++),"object"==typeof o||b(o)||(o={}),r===a&&(o=this,r--);r<a;r++)if(null!=(e=arguments[r]))for(t in e)i=e[t],"__proto__"!==t&&o!==i&&(l&&i&&(C.isPlainObject(i)||(n=Array.isArray(i)))?(s=o[t],s=n&&!Array.isArray(s)?[]:n||C.isPlainObject(s)?s:{},n=!1,o[t]=C.extend(l,s,i)):void 0!==i&&(o[t]=i));return o},C.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==q.call(e)||(e=z(e))&&("function"!=typeof(e=W.call(e,"constructor")&&e.constructor)||B.call(e)!==U))},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,i){Y(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(Q(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&&(Q(Object(e))?C.merge(t,"string"==typeof e?[e]:e):F.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,s=e.length;n<i;n++)e[s++]=t[n];return e.length=s,e},grep:function(e,t,i){for(var n=[],s=0,o=e.length,r=!i;s<o;s++)!t(e[s],s)!=r&&n.push(e[s]);return n},map:function(e,t,i){var n,s,o=0,r=[];if(Q(e))for(n=e.length;o<n;o++)null!=(s=t(e[o],o,i))&&r.push(s);else for(o in e)null!=(s=t(e[o],o,i))&&r.push(s);return j(r)},guid:1,support:m}),"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){$["[object "+t+"]"]=t.toLowerCase()});function n(e,t,i){for(var n=[],s=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&C(e).is(i))break;n.push(e)}return n}function Z(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}var e=(L=>{function u(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 z(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function j(){x()}var e,d,_,o,F,p,R,$,w,l,h,x,P,i,C,f,n,s,g,k="sizzle"+ +new Date,c=L.document,H=0,q=0,W=E(),B=E(),U=E(),m=E(),V=function(e,t){return e===t&&(h=!0),0},Y={}.hasOwnProperty,t=[],Q=t.pop,Z=t.push,T=t.push,X=t.slice,D=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",a="(?:\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",G="\\["+r+"*("+a+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+a+"))|)"+r+"*\\]",J=":("+a+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+G+")*)|.*)\\)|)",ee=new RegExp(r+"+","g"),I=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),te=new RegExp("^"+r+"*,"+r+"*"),ie=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),ne=new RegExp(r+"|>"),se=new RegExp(J),oe=new RegExp("^"+a+"$"),v={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),TAG:new RegExp("^("+a+"|[*])"),ATTR:new RegExp("^"+G),PSEUDO:new RegExp("^"+J),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("^(?:"+K+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},re=/HTML$/i,ae=/^(?:input|select|textarea|button)$/i,le=/^h\d$/i,b=/^[^{]+\{\s*\[native \w/,he=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ce=/[+~]/,y=new RegExp("\\\\[\\da-fA-F]{1,6}"+r+"?|\\\\([^\\r\\n\\f])","g"),ue=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,de=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{T.apply(t=X.call(c.childNodes),c.childNodes),t[c.childNodes.length].nodeType}catch(e){T={apply:t.length?function(e,t){Z.apply(e,X.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function S(e,t,i,n){var s,o,r,a,l,h,c=t&&t.ownerDocument,u=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==u&&9!==u&&11!==u)return i;if(!n&&(x(t),t=t||P,C)){if(11!==u&&(a=he.exec(e)))if(s=a[1]){if(9===u){if(!(h=t.getElementById(s)))return i;if(h.id===s)return i.push(h),i}else if(c&&(h=c.getElementById(s))&&g(t,h)&&h.id===s)return i.push(h),i}else{if(a[2])return T.apply(i,t.getElementsByTagName(e)),i;if((s=a[3])&&d.getElementsByClassName&&t.getElementsByClassName)return T.apply(i,t.getElementsByClassName(s)),i}if(d.qsa&&!m[e+" "]&&(!f||!f.test(e))&&(1!==u||"object"!==t.nodeName.toLowerCase())){if(h=e,c=t,1===u&&(ne.test(e)||ie.test(e))){for((c=ce.test(e)&&me(t.parentNode)||t)===t&&d.scope||((r=t.getAttribute("id"))?r=r.replace(ue,z):t.setAttribute("id",r=k)),o=(l=p(e)).length;o--;)l[o]=(r?"#"+r:":scope")+" "+N(l[o]);h=l.join(",")}try{return T.apply(i,c.querySelectorAll(h)),i}catch(t){m(e,!0)}finally{r===k&&t.removeAttribute("id")}}}return $(e.replace(I,"$1"),t,i,n)}function E(){var n=[];return function e(t,i){return n.push(t+" ")>_.cacheLength&&delete e[n.shift()],e[t+" "]=i}}function A(e){return e[k]=!0,e}function M(e){var t=P.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function pe(e,t){for(var i=e.split("|"),n=i.length;n--;)_.attrHandle[i[n]]=t}function fe(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 ge(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&&de(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function O(r){return A(function(o){return o=+o,A(function(e,t){for(var i,n=r([],e.length,o),s=n.length;s--;)e[i=n[s]]&&(e[i]=!(t[i]=e[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=S.support={},F=S.isXML=function(e){var t=e.namespaceURI,e=(e.ownerDocument||e).documentElement;return!re.test(t||e&&e.nodeName||"HTML")},x=S.setDocument=function(e){var e=e?e.ownerDocument||e:c;return e!=P&&9===e.nodeType&&e.documentElement&&(i=(P=e).documentElement,C=!F(P),c!=P&&(e=P.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",j,!1):e.attachEvent&&e.attachEvent("onunload",j)),d.scope=M(function(e){return i.appendChild(e).appendChild(P.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=M(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=M(function(e){return e.appendChild(P.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=b.test(P.getElementsByClassName),d.getById=M(function(e){return i.appendChild(e).id=k,!P.getElementsByName||!P.getElementsByName(k).length}),d.getById?(_.filter.ID=function(e){var t=e.replace(y,u);return function(e){return e.getAttribute("id")===t}},_.find.ID=function(e,t){if(void 0!==t.getElementById&&C)return(t=t.getElementById(e))?[t]:[]}):(_.filter.ID=function(e){var t=e.replace(y,u);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,s,o=t.getElementById(e);if(o){if((i=o.getAttributeNode("id"))&&i.value===e)return[o];for(s=t.getElementsByName(e),n=0;o=s[n++];)if((i=o.getAttributeNode("id"))&&i.value===e)return[o]}return[]}}),_.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],s=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;i=o[s++];)1===i.nodeType&&n.push(i);return n},_.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&C)return t.getElementsByClassName(e)},n=[],f=[],(d.qsa=b.test(P.querySelectorAll))&&(M(function(e){var t;i.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&f.push("[*^$]="+r+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||f.push("\\["+r+"*(?:value|"+K+")"),e.querySelectorAll("[id~="+k+"-]").length||f.push("~="),(t=P.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||f.push("\\["+r+"*name"+r+"*="+r+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||f.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||f.push(".#.+[+~]"),e.querySelectorAll("\\\f"),f.push("[\\r\\n\\f]")}),M(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=P.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&f.push("name"+r+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&f.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),f.push(",.*:")})),(d.matchesSelector=b.test(s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&M(function(e){d.disconnectedMatch=s.call(e,"*"),s.call(e,"[s!='']:x"),n.push("!=",J)}),f=f.length&&new RegExp(f.join("|")),n=n.length&&new RegExp(n.join("|")),e=b.test(i.compareDocumentPosition),g=e||b.test(i.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},V=e?function(e,t){var i;return e===t?(h=!0,0):!e.compareDocumentPosition-!t.compareDocumentPosition||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===i?e==P||e.ownerDocument==c&&g(c,e)?-1:t==P||t.ownerDocument==c&&g(c,t)?1:l?D(l,e)-D(l,t):0:4&i?-1:1)}:function(e,t){if(e===t)return h=!0,0;var i,n=0,s=e.parentNode,o=t.parentNode,r=[e],a=[t];if(!s||!o)return e==P?-1:t==P?1:s?-1:o?1:l?D(l,e)-D(l,t):0;if(s===o)return fe(e,t);for(i=e;i=i.parentNode;)r.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;r[n]===a[n];)n++;return n?fe(r[n],a[n]):r[n]==c?-1:a[n]==c?1:0}),P},S.matches=function(e,t){return S(e,null,null,t)},S.matchesSelector=function(e,t){if(x(e),d.matchesSelector&&C&&!m[t+" "]&&(!n||!n.test(t))&&(!f||!f.test(t)))try{var i=s.call(e,t);if(i||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){m(t,!0)}return 0<S(t,P,null,[e]).length},S.contains=function(e,t){return(e.ownerDocument||e)!=P&&x(e),g(e,t)},S.attr=function(e,t){(e.ownerDocument||e)!=P&&x(e);var i=_.attrHandle[t.toLowerCase()],i=i&&Y.call(_.attrHandle,t.toLowerCase())?i(e,t,!C):void 0;return void 0!==i?i:d.attributes||!C?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},S.escape=function(e){return(e+"").replace(ue,z)},S.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},S.uniqueSort=function(e){var t,i=[],n=0,s=0;if(h=!d.detectDuplicates,l=!d.sortStable&&e.slice(0),e.sort(V),h){for(;t=e[s++];)t===e[s]&&(n=i.push(s));for(;n--;)e.splice(i[n],1)}return l=null,e},o=S.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=o(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n++];)i+=o(t);return i},(_=S.selectors={cacheLength:50,createPseudo:A,match:v,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(y,u),e[3]=(e[3]||e[4]||e[5]||"").replace(y,u),"~="===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]||S.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]&&S.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return v.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&se.test(i)&&(t=(t=p(i,!0))&&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(y,u).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+r+")"+e+"("+r+"|$)"))&&W(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=S.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(ee," ")+" ").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,s,o,r,a,l,h=v!=b?"nextSibling":"previousSibling",c=e.parentNode,u=y&&e.nodeName.toLowerCase(),d=!i&&!y,p=!1;if(c){if(v){for(;h;){for(r=e;r=r[h];)if(y?r.nodeName.toLowerCase()===u:1===r.nodeType)return!1;l=h="only"===f&&!l&&"nextSibling"}return!0}if(l=[b?c.firstChild:c.lastChild],b&&d){for(p=(a=(n=(s=(o=(r=c)[k]||(r[k]={}))[r.uniqueID]||(o[r.uniqueID]={}))[f]||[])[0]===H&&n[1])&&n[2],r=a&&c.childNodes[a];r=++a&&r&&r[h]||(p=a=0,l.pop());)if(1===r.nodeType&&++p&&r===e){s[f]=[H,a,p];break}}else if(!1===(p=d?a=(n=(s=(o=(r=e)[k]||(r[k]={}))[r.uniqueID]||(o[r.uniqueID]={}))[f]||[])[0]===H&&n[1]:p))for(;(r=++a&&r&&r[h]||(p=a=0,l.pop()))&&((y?r.nodeName.toLowerCase()!==u:1!==r.nodeType)||!++p||(d&&((s=(o=r[k]||(r[k]={}))[r.uniqueID]||(o[r.uniqueID]={}))[f]=[H,p]),r!==e)););return(p-=m)===g||p%g==0&&0<=p/g}}},PSEUDO:function(e,o){var t,r=_.pseudos[e]||_.setFilters[e.toLowerCase()]||S.error("unsupported pseudo: "+e);return r[k]?r(o):1<r.length?(t=[e,e,"",o],_.setFilters.hasOwnProperty(e.toLowerCase())?A(function(e,t){for(var i,n=r(e,o),s=n.length;s--;)e[i=D(e,n[s])]=!(t[i]=n[s])}):function(e){return r(e,0,t)}):r}},pseudos:{not:A(function(e){var n=[],s=[],a=R(e.replace(I,"$1"));return a[k]?A(function(e,t,i,n){for(var s,o=a(e,null,n,[]),r=e.length;r--;)(s=o[r])&&(e[r]=!(t[r]=s))}):function(e,t,i){return n[0]=e,a(n,null,i,s),n[0]=null,!s.pop()}}),has:A(function(t){return function(e){return 0<S(t,e).length}}),contains:A(function(t){return t=t.replace(y,u),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:A(function(i){return oe.test(i||"")||S.error("unsupported lang: "+i),i=i.replace(y,u).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=L.location&&L.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===i},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!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 le.test(e.nodeName)},input:function(e){return ae.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:O(function(){return[0]}),last:O(function(e,t){return[t-1]}),eq:O(function(e,t,i){return[i<0?i+t:i]}),even:O(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:O(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:O(function(e,t,i){for(var n=i<0?i+t:t<i?t:i;0<=--n;)e.push(n);return e}),gt:O(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]=(t=>function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t})(e);for(e in{submit:!0,reset:!0})_.pseudos[e]=(i=>function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===i})(e);function ve(){}function N(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function be(r,e,t){var a=e.dir,l=e.next,h=l||a,c=t&&"parentNode"===h,u=q++;return e.first?function(e,t,i){for(;e=e[a];)if(1===e.nodeType||c)return r(e,t,i);return!1}:function(e,t,i){var n,s,o=[H,u];if(i){for(;e=e[a];)if((1===e.nodeType||c)&&r(e,t,i))return!0}else for(;e=e[a];)if(1===e.nodeType||c)if(s=(s=e[k]||(e[k]={}))[e.uniqueID]||(s[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[a]||e;else{if((n=s[h])&&n[0]===H&&n[1]===u)return o[2]=n[2];if((s[h]=o)[2]=r(e,t,i))return!0}return!1}}function ye(s){return 1<s.length?function(e,t,i){for(var n=s.length;n--;)if(!s[n](e,t,i))return!1;return!0}:s[0]}function _e(e,t,i,n,s){for(var o,r=[],a=0,l=e.length,h=null!=t;a<l;a++)!(o=e[a])||i&&!i(o,n,s)||(r.push(o),h&&t.push(a));return r}function we(p,f,g,m,v,e){return m&&!m[k]&&(m=we(m)),v&&!v[k]&&(v=we(v,e)),A(function(e,t,i,n){var s,o,r,a=[],l=[],h=t.length,c=e||((e,t,i)=>{for(var n=0,s=t.length;n<s;n++)S(e,t[n],i);return i})(f||"*",i.nodeType?[i]:i,[]),u=!p||!e&&f?c:_e(c,a,p,i,n),d=g?v||(e?p:h||m)?[]:t:u;if(g&&g(u,d,i,n),m)for(s=_e(d,l),m(s,[],i,n),o=s.length;o--;)(r=s[o])&&(d[l[o]]=!(u[l[o]]=r));if(e){if(v||p){if(v){for(s=[],o=d.length;o--;)(r=d[o])&&s.push(u[o]=r);v(null,d=[],s,n)}for(o=d.length;o--;)(r=d[o])&&-1<(s=v?D(e,r):a[o])&&(e[s]=!(t[s]=r))}}else d=_e(d===t?d.splice(h,d.length):d),v?v(null,t,d,n):T.apply(t,d)})}return ve.prototype=_.filters=_.pseudos,_.setFilters=new ve,p=S.tokenize=function(e,t){var i,n,s,o,r,a,l,h=B[e+" "];if(h)return t?0:h.slice(0);for(r=e,a=[],l=_.preFilter;r;){for(o in i&&!(n=te.exec(r))||(n&&(r=r.slice(n[0].length)||r),a.push(s=[])),i=!1,(n=ie.exec(r))&&(i=n.shift(),s.push({value:i,type:n[0].replace(I," ")}),r=r.slice(i.length)),_.filter)!(n=v[o].exec(r))||l[o]&&!(n=l[o](n))||(i=n.shift(),s.push({value:i,type:o,matches:n}),r=r.slice(i.length));if(!i)break}return t?r.length:r?S.error(e):B(e,a).slice(0)},R=S.compile=function(e,t){var i,m,v,b,y,n,s=[],o=[],r=U[e+" "];if(!r){for(i=(t=t||p(e)).length;i--;)((r=function e(t){for(var n,i,s,o=t.length,r=_.relative[t[0].type],a=r||_.relative[" "],l=r?1:0,h=be(function(e){return e===n},a,!0),c=be(function(e){return-1<D(n,e)},a,!0),u=[function(e,t,i){return e=!r&&(i||t!==w)||((n=t).nodeType?h:c)(e,t,i),n=null,e}];l<o;l++)if(i=_.relative[t[l].type])u=[be(ye(u),i)];else{if((i=_.filter[t[l].type].apply(null,t[l].matches))[k]){for(s=++l;s<o&&!_.relative[t[s].type];s++);return we(1<l&&ye(u),1<l&&N(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(I,"$1"),i,l<s&&e(t.slice(l,s)),s<o&&e(t=t.slice(s)),s<o&&N(t))}u.push(i)}return ye(u)}(t[i]))[k]?s:o).push(r);(r=U(e,(b=0<(v=s).length,y=0<(m=o).length,n=function(e,t,i,n,s){var o,r,a,l=0,h="0",c=e&&[],u=[],d=w,p=e||y&&_.find.TAG("*",s),f=H+=null==d?1:Math.random()||.1,g=p.length;for(s&&(w=t==P||t||s);h!==g&&null!=(o=p[h]);h++){if(y&&o){for(r=0,t||o.ownerDocument==P||(x(o),i=!C);a=m[r++];)if(a(o,t||P,i)){n.push(o);break}s&&(H=f)}b&&((o=!a&&o)&&l--,e)&&c.push(o)}if(l+=h,b&&h!==l){for(r=0;a=v[r++];)a(c,u,t,i);if(e){if(0<l)for(;h--;)c[h]||u[h]||(u[h]=Q.call(n));u=_e(u)}T.apply(n,u),s&&!e&&0<u.length&&1<l+v.length&&S.uniqueSort(n)}return s&&(H=f,w=d),c},b?A(n):n))).selector=e}return r},$=S.select=function(e,t,i,n){var s,o,r,a,l,h="function"==typeof e&&e,c=!n&&p(e=h.selector||e);if(i=i||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(r=o[0]).type&&9===t.nodeType&&C&&_.relative[o[1].type]){if(!(t=(_.find.ID(r.matches[0].replace(y,u),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(s=v.needsContext.test(e)?0:o.length;s--&&(r=o[s],!_.relative[a=r.type]);)if((l=_.find[a])&&(n=l(r.matches[0].replace(y,u),ce.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(s,1),e=n.length&&N(o))break;return T.apply(i,n),i}}return(h||R(e,c))(n,t,!C,i,!t||ce.test(e)&&me(t.parentNode)||t),i},d.sortStable=k.split("").sort(V).join("")===k,d.detectDuplicates=!!h,x(),d.sortDetached=M(function(e){return 1&e.compareDocumentPosition(P.createElement("fieldset"))}),M(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||pe("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&M(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||pe("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),M(function(e){return null==e.getAttribute("disabled")})||pe(K,function(e,t,i){if(!i)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),S})(x),X=(C.find=e,C.expr=e.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=e.uniqueSort,C.text=e.getText,C.isXMLDoc=e.isXML,C.contains=e.contains,C.escapeSelector=e.escape,C.expr.match.needsContext);function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var K=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function G(e,i,n){return b(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,s=this;if("string"!=typeof e)return this.pushStack(C(e).filter(function(){for(t=0;t<n;t++)if(C.contains(s[t],this))return!0}));for(i=this.pushStack([]),t=0;t<n;t++)C.find(e,s[t],i);return 1<n?C.uniqueSort(i):i},filter:function(e){return this.pushStack(G(this,e||[],!1))},not:function(e){return this.pushStack(G(this,e||[],!0))},is:function(e){return!!G(this,"string"==typeof e&&X.test(e)?C(e):e||[],!1).length}});var J,ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=((C.fn.init=function(e,t,i){if(e){if(i=i||J,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):b(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]:ee.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:P,!0)),K.test(n[1])&&C.isPlainObject(t))for(var n in t)b(this[n])?this[n](t[n]):this.attr(n,t[n])}else(i=P.getElementById(n[2]))&&(this[0]=i,this.length=1)}return this}).prototype=C.fn,J=C(P),/^(?:parents|prev(?:Until|All))/),ie={children:!0,contents:!0,next:!0,prev:!0};function ne(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,s=this.length,o=[],r="string"!=typeof e&&C(e);if(!X.test(e))for(;n<s;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(r?-1<r.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 n(e,"parentNode")},parentsUntil:function(e,t,i){return n(e,"parentNode",i)},next:function(e){return ne(e,"nextSibling")},prev:function(e){return ne(e,"previousSibling")},nextAll:function(e){return n(e,"nextSibling")},prevAll:function(e){return n(e,"previousSibling")},nextUntil:function(e,t,i){return n(e,"nextSibling",i)},prevUntil:function(e,t,i){return n(e,"previousSibling",i)},siblings:function(e){return Z((e.parentNode||{}).firstChild,e)},children:function(e){return Z(e.firstChild)},contents:function(e){return null!=e.contentDocument&&z(e.contentDocument)?e.contentDocument:(l(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},function(n,s){C.fn[n]=function(e,t){var i=C.map(this,s,e);return(t="Until"!==n.slice(-5)?e:t)&&"string"==typeof t&&(i=C.filter(t,i)),1<this.length&&(ie[n]||C.uniqueSort(i),te.test(n))&&i.reverse(),this.pushStack(i)}});var k=/[^\x20\t\r\n\f]+/g;function c(e){return e}function se(e){throw e}function oe(e,t,i,n){var s;try{e&&b(s=e.promise)?s.call(e).done(t).fail(i):e&&b(s=e.then)?s.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(k)||[],function(e,t){i[t]=!0}),i):C.extend({},n);function s(){for(a=a||n.once,r=o=!0;h.length;c=-1)for(t=h.shift();++c<l.length;)!1===l[c].apply(t[0],t[1])&&n.stopOnFalse&&(c=l.length,t=!1);n.memory||(t=!1),o=!1,a&&(l=t?[]:"")}var o,t,r,a,l=[],h=[],c=-1,u={add:function(){return l&&(t&&!o&&(c=l.length-1,h.push(t)),function i(e){C.each(e,function(e,t){b(t)?n.unique&&u.has(t)||l.push(t):t&&t.length&&"string"!==f(t)&&i(t)})}(arguments),t)&&!o&&s(),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<=c&&c--}),this},has:function(e){return e?-1<C.inArray(e,l):0<l.length},empty:function(){return l=l&&[],this},disable:function(){return a=h=[],l=t="",this},disabled:function(){return!l},lock:function(){return a=h=[],t||o||(l=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],h.push(t),o)||s(),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},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"]],s="pending",r={state:function(){return s},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var s=arguments;return C.Deferred(function(n){C.each(o,function(e,t){var i=b(s[t[4]])&&s[t[4]];a[t[1]](function(){var e=i&&i.apply(this,arguments);e&&b(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[t[0]+"With"](this,i?[e]:arguments)})}),s=null}).promise()},then:function(t,i,n){var l=0;function h(s,o,r,a){return function(){function e(){var e,t;if(!(s<l)){if((e=r.apply(i,n))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,b(t)?a?t.call(e,h(l,o,c,a),h(l,o,se,a)):(l++,t.call(e,h(l,o,c,a),h(l,o,se,a),h(l,o,c,o.notifyWith))):(r!==c&&(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<=s+1&&(r!==se&&(i=void 0,n=[e]),o.rejectWith(i,n))}};s?t():(C.Deferred.getStackHook&&(t.stackTrace=C.Deferred.getStackHook()),x.setTimeout(t))}}return C.Deferred(function(e){o[0][3].add(h(0,e,b(n)?n:c,e.notifyWith)),o[1][3].add(h(0,e,b(t)?t:c)),o[2][3].add(h(0,e,b(i)?i:se))}).promise()},promise:function(e){return null!=e?C.extend(e,r):r}},a={};return C.each(o,function(e,t){var i=t[2],n=t[5];r[t[1]]=i.add,n&&i.add(function(){s=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}),r.promise(a),e&&e.call(a,a),a},when:function(e){function t(t){return function(e){s[t]=this,o[t]=1<arguments.length?a.call(arguments):e,--i||r.resolveWith(s,o)}}var i=arguments.length,n=i,s=Array(n),o=a.call(arguments),r=C.Deferred();if(i<=1&&(oe(e,r.done(t(n)).resolve,r.reject,!i),"pending"===r.state()||b(o[n]&&o[n].then)))return r.then();for(;n--;)oe(o[n],t(n),r.reject);return r.promise()}});var re=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,ae=(C.Deferred.exceptionHook=function(e,t){x.console&&x.console.warn&&e&&re.test(e.name)&&x.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){x.setTimeout(function(){throw e})},C.Deferred());function le(){P.removeEventListener("DOMContentLoaded",le),x.removeEventListener("load",le),C.ready()}C.fn.ready=function(e){return ae.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||ae.resolveWith(P,[C])}}),C.ready.then=ae.then,"complete"===P.readyState||"loading"!==P.readyState&&!P.documentElement.doScroll?x.setTimeout(C.ready):(P.addEventListener("DOMContentLoaded",le),x.addEventListener("load",le));function u(e,t,i,n,s,o,r){var a=0,l=e.length,h=null==i;if("object"===f(i))for(a in s=!0,i)u(e,t,a,i[a],!0,o,r);else if(void 0!==n&&(s=!0,b(n)||(r=!0),t=h?r?(t.call(e,n),null):(h=t,function(e,t,i){return h.call(C(e),i)}):t))for(;a<l;a++)t(e[a],i,r?n:n.call(e[a],a,t(e[a],i)));return s?e:h?t.call(e):l?t(e[0],i):o}var he=/^-ms-/,ce=/-([a-z])/g;function ue(e,t){return t.toUpperCase()}function y(e){return e.replace(he,"ms-").replace(ce,ue)}function v(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function de(){this.expando=C.expando+de.uid++}de.uid=1,de.prototype={cache:function(e){var t=e[this.expando];return t||(t={},v(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,s=this.cache(e);if("string"==typeof t)s[y(t)]=i;else for(n in t)s[y(n)]=t[n];return s},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][y(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(y):(t=y(t))in n?[t]:t.match(k)||[]).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 _=new de,h=new de,pe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,fe=/[A-Z]/g;function ge(e,t,i){var n,s;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(fe,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i="true"===(s=i)||"false"!==s&&("null"===s?null:s===+s+""?+s:pe.test(s)?JSON.parse(s):s)}catch(e){}h.set(e,t,i)}else i=void 0;return i}C.extend({hasData:function(e){return h.hasData(e)||_.hasData(e)},data:function(e,t,i){return h.access(e,t,i)},removeData:function(e,t){h.remove(e,t)},_data:function(e,t,i){return _.access(e,t,i)},_removeData:function(e,t){_.remove(e,t)}}),C.fn.extend({data:function(i,e){var t,n,s,o=this[0],r=o&&o.attributes;if(void 0!==i)return"object"==typeof i?this.each(function(){h.set(this,i)}):u(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=h.get(o,i))||void 0!==(t=ge(o,i))?t:void 0;this.each(function(){h.set(this,i,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(s=h.get(o),1===o.nodeType)&&!_.get(o,"hasDataAttrs")){for(t=r.length;t--;)r[t]&&0===(n=r[t].name).indexOf("data-")&&(n=y(n.slice(5)),ge(o,n,s[n]));_.set(o,"hasDataAttrs",!0)}return s},removeData:function(e){return this.each(function(){h.remove(this,e)})}}),C.extend({queue:function(e,t,i){var n;if(e)return n=_.get(e,t=(t||"fx")+"queue"),i&&(!n||Array.isArray(i)?n=_.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,s=i.shift(),o=C._queueHooks(e,t);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===t&&i.unshift("inprogress"),delete o.stop,s.call(e,function(){C.dequeue(e,t)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return _.get(e,i)||_.access(e,i,{empty:C.Callbacks("once memory").add(function(){_.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(){--s||o.resolveWith(r,[r])}var n,s=1,o=C.Deferred(),r=this,a=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=_.get(r[a],e+"queueHooks"))&&n.empty&&(s++,n.empty.add(i));return i(),o.promise(t)}});function me(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&H(e)&&"none"===C.css(e,"display")}var e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ve=new RegExp("^(?:([+-])=|)("+e+")([a-z%]*)$","i"),d=["Top","Right","Bottom","Left"],w=P.documentElement,H=function(e){return C.contains(e.ownerDocument,e)},be={composed:!0};w.getRootNode&&(H=function(e){return C.contains(e.ownerDocument,e)||e.getRootNode(be)===e.ownerDocument});function ye(e,t,i,n){var s,o,r=20,a=n?function(){return n.cur()}:function(){return C.css(e,t,"")},l=a(),h=i&&i[3]||(C.cssNumber[t]?"":"px"),c=e.nodeType&&(C.cssNumber[t]||"px"!==h&&+l)&&ve.exec(C.css(e,t));if(c&&c[3]!==h){for(h=h||c[3],c=+(l/=2)||1;r--;)C.style(e,t,c+h),(1-o)*(1-(o=a()/l||.5))<=0&&(r=0),c/=o;C.style(e,t,(c*=2)+h),i=i||[]}return i&&(c=+c||+l||0,s=i[1]?c+(i[1]+1)*i[2]:+i[2],n)&&(n.unit=h,n.start=c,n.end=s),s}var _e={};function T(e,t){for(var i,n,s,o,r,a,l=[],h=0,c=e.length;h<c;h++)(n=e[h]).style&&(i=n.style.display,t?("none"===i&&(l[h]=_.get(n,"display")||null,l[h]||(n.style.display="")),""===n.style.display&&me(n)&&(l[h]=(a=o=s=void 0,o=n.ownerDocument,(a=_e[r=n.nodeName])||(s=o.body.appendChild(o.createElement(r)),a=C.css(s,"display"),s.parentNode.removeChild(s),_e[r]=a="none"===a?"block":a)))):"none"!==i&&(l[h]="none",_.set(n,"display",i)));for(h=0;h<c;h++)null!=l[h]&&(e[h].style.display=l[h]);return e}C.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){me(this)?C(this).show():C(this).hide()})}});var we=/^(?:checkbox|radio)$/i,xe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Pe=/^$|^module$|\/(?:java|ecma)script/i,i=P.createDocumentFragment().appendChild(P.createElement("div")),D=((A=P.createElement("input")).setAttribute("type","radio"),A.setAttribute("checked","checked"),A.setAttribute("name","t"),i.appendChild(A),m.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,i.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!i.cloneNode(!0).lastChild.defaultValue,i.innerHTML="<option></option>",m.option=!!i.lastChild,{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 I(e,t){var i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&l(e,t)?C.merge([e],i):i}function Ce(e,t){for(var i=0,n=e.length;i<n;i++)_.set(e[i],"globalEval",!t||_.get(t[i],"globalEval"))}D.tbody=D.tfoot=D.colgroup=D.caption=D.thead,D.th=D.td,m.option||(D.optgroup=D.option=[1,"<select multiple='multiple'>","</select>"]);var ke=/<|&#?\w+;/;function He(e,t,i,n,s){for(var o,r,a,l,h,c=t.createDocumentFragment(),u=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===f(o))C.merge(u,o.nodeType?[o]:o);else if(ke.test(o)){for(r=r||c.appendChild(t.createElement("div")),a=(xe.exec(o)||["",""])[1].toLowerCase(),a=D[a]||D._default,r.innerHTML=a[1]+C.htmlPrefilter(o)+a[2],h=a[0];h--;)r=r.lastChild;C.merge(u,r.childNodes),(r=c.firstChild).textContent=""}else u.push(t.createTextNode(o));for(c.textContent="",d=0;o=u[d++];)if(n&&-1<C.inArray(o,n))s&&s.push(o);else if(l=H(o),r=I(c.appendChild(o),"script"),l&&Ce(r),i)for(h=0;o=r[h++];)Pe.test(o.type||"")&&i.push(o);return c}var Te=/^key/,De=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ie=/^([^.]*)(?:\.(.+)|)/;function r(){return!0}function p(){return!1}function Se(e,t){return e===(()=>{try{return P.activeElement}catch(e){}})()==("focus"===t)}function Ee(e,t,i,n,s,o){var r,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)Ee(e,a,i,n,t[a],o);return e}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=p;else if(!s)return e;return 1===o&&(r=s,(s=function(e){return C().off(e),r.apply(this,arguments)}).guid=r.guid||(r.guid=C.guid++)),e.each(function(){C.event.add(this,t,s,n,i)})}function Ae(e,s,o){o?(_.set(e,s,!1),C.event.add(e,s,{namespace:!1,handler:function(e){var t,i,n=_.get(this,s);if(1&e.isTrigger&&this[s]){if(n.length)(C.event.special[s]||{}).delegateType&&e.stopPropagation();else if(n=a.call(arguments),_.set(this,s,n),t=o(this,s),this[s](),n!==(i=_.get(this,s))||t?_.set(this,s,!1):i={},n!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else n.length&&(_.set(this,s,{value:C.event.trigger(C.extend(n[0],C.Event.prototype),n.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===_.get(e,s)&&C.event.add(e,s,r)}C.event={global:{},add:function(t,e,i,n,s){var o,r,a,l,h,c,u,d,p,f=_.get(t);if(v(t))for(i.handler&&(i=(o=i).handler,s=o.selector),s&&C.find.matchesSelector(w,s),i.guid||(i.guid=C.guid++),a=(a=f.events)||(f.events=Object.create(null)),r=(r=f.handle)||(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(k)||[""]).length;l--;)u=p=(d=Ie.exec(e[l])||[])[1],d=(d[2]||"").split(".").sort(),u&&(h=C.event.special[u]||{},u=(s?h.delegateType:h.bindType)||u,h=C.event.special[u]||{},p=C.extend({type:u,origType:p,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&C.expr.match.needsContext.test(s),namespace:d.join(".")},o),(c=a[u])||((c=a[u]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,n,d,r))||t.addEventListener&&t.addEventListener(u,r),h.add&&(h.add.call(t,p),p.handler.guid||(p.handler.guid=i.guid)),s?c.splice(c.delegateCount++,0,p):c.push(p),C.event.global[u]=!0)},remove:function(e,t,i,n,s){var o,r,a,l,h,c,u,d,p,f,g,m=_.hasData(e)&&_.get(e);if(m&&(l=m.events)){for(h=(t=(t||"").match(k)||[""]).length;h--;)if(p=g=(a=Ie.exec(t[h])||[])[1],f=(a[2]||"").split(".").sort(),p){for(u=C.event.special[p]||{},d=l[p=(n?u.delegateType:u.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)c=d[o],!s&&g!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(e,c));r&&!d.length&&(u.teardown&&!1!==u.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[h],i,n,!0);C.isEmptyObject(l)&&_.remove(e,"handle events")}},dispatch:function(e){var t,i,n,s,o,r=new Array(arguments.length),a=C.event.fix(e),e=(_.get(this,"events")||Object.create(null))[a.type]||[],l=C.event.special[a.type]||{};for(r[0]=a,t=1;t<arguments.length;t++)r[t]=arguments[t];if(a.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,a)){for(o=C.event.handlers.call(this,a,e),t=0;(n=o[t++])&&!a.isPropagationStopped();)for(a.currentTarget=n.elem,i=0;(s=n.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==s.namespace&&!a.rnamespace.test(s.namespace)||(a.handleObj=s,a.data=s.data,void 0!==(s=((C.event.special[s.origType]||{}).handle||s.handler).apply(n.elem,r))&&!1===(a.result=s)&&(a.preventDefault(),a.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,a),a.result}},handlers:function(e,t){var i,n,s,o,r,a=[],l=t.delegateCount,h=e.target;if(l&&h.nodeType&&!("click"===e.type&&1<=e.button))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==e.type||!0!==h.disabled)){for(o=[],r={},i=0;i<l;i++)void 0===r[s=(n=t[i]).selector+" "]&&(r[s]=n.needsContext?-1<C(s,this).index(h):C.find(s,this,null,[h]).length),r[s]&&o.push(n);o.length&&a.push({elem:h,handlers:o})}return h=this,l<t.length&&a.push({elem:h,handlers:t.slice(l)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:b(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 we.test(e.type)&&e.click&&l(e,"input")&&Ae(e,"click",r),!1},trigger:function(e){e=this||e;return we.test(e.type)&&e.click&&l(e,"input")&&Ae(e,"click"),!0},_default:function(e){e=e.target;return we.test(e.type)&&e.click&&l(e,"input")&&_.get(e,"click")||l(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?r:p,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:p,isPropagationStopped:p,isImmediatePropagationStopped:p,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=r,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=r,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=r,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&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&De.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 Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,s){C.event.special[e]={delegateType:s,bindType:s,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=s),t}}}),C.fn.extend({on:function(e,t,i,n){return Ee(this,e,t,i,n)},one:function(e,t,i,n){return Ee(this,e,t,i,n,1)},off:function(e,t,i){var n,s;if(e&&e.preventDefault&&e.handleObj)n=e.handleObj,C(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler);else{if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=p),this.each(function(){C.event.remove(this,e,i,t)});for(s in e)this.off(s,t,e[s])}return this}});var Me=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function ze(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var i,n,s,o;if(1===t.nodeType){if(_.hasData(e)&&(o=_.get(e).events))for(s in _.remove(t,"handle events"),o)for(i=0,n=o[s].length;i<n;i++)C.event.add(t,s,o[s][i]);h.hasData(e)&&(e=h.access(e),e=C.extend({},e),h.set(t,e))}}function S(i,n,s,o){n=j(n);var e,t,r,a,l,h,c=0,u=i.length,d=u-1,p=n[0],f=b(p);if(f||1<u&&"string"==typeof p&&!m.checkClone&&Oe.test(p))return i.each(function(e){var t=i.eq(e);f&&(n[0]=p.call(this,e,t.html())),S(t,n,s,o)});if(u&&(t=(e=He(n,i[0].ownerDocument,!1,i,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(r=C.map(I(e,"script"),ze)).length;c<u;c++)l=e,c!==d&&(l=C.clone(l,!0,!0),a)&&C.merge(r,I(l,"script")),s.call(i[c],l,c);if(a)for(h=r[r.length-1].ownerDocument,C.map(r,je),c=0;c<a;c++)l=r[c],Pe.test(l.type||"")&&!_.access(l,"globalEval")&&C.contains(h,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?C._evalUrl&&!l.noModule&&C._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},h):Y(l.textContent.replace(Ne,""),l,h))}return i}function Re(e,t,i){for(var n,s=t?C.filter(t,e):e,o=0;null!=(n=s[o]);o++)i||1!==n.nodeType||C.cleanData(I(n)),n.parentNode&&(i&&H(n)&&Ce(I(n,"script")),n.parentNode.removeChild(n));return e}C.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,s,o,r,a,l,h,c=e.cloneNode(!0),u=H(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(r=I(c),n=0,s=(o=I(e)).length;n<s;n++)a=o[n],"input"===(h=(l=r[n]).nodeName.toLowerCase())&&we.test(a.type)?l.checked=a.checked:"input"!==h&&"textarea"!==h||(l.defaultValue=a.defaultValue);if(t)if(i)for(o=o||I(e),r=r||I(c),n=0,s=o.length;n<s;n++)Fe(o[n],r[n]);else Fe(e,c);return 0<(r=I(c,"script")).length&&Ce(r,!u&&I(e,"script")),c},cleanData:function(e){for(var t,i,n,s=C.event.special,o=0;void 0!==(i=e[o]);o++)if(v(i)){if(t=i[_.expando]){if(t.events)for(n in t.events)s[n]?C.event.remove(i,n):C.removeEvent(i,n,t.handle);i[_.expando]=void 0}i[h.expando]&&(i[h.expando]=void 0)}}}),C.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return u(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 S(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return S(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Le(this,e)).insertBefore(e,t.firstChild)})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(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(I(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 u(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&&!Me.test(e)&&!D[(xe.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(C.cleanData(I(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var i=[];return S(this,arguments,function(e){var t=this.parentNode;C.inArray(this,i)<0&&(C.cleanData(I(this)),t)&&t.replaceChild(e,this)},i)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,r){C.fn[e]=function(e){for(var t,i=[],n=C(e),s=n.length-1,o=0;o<=s;o++)t=o===s?this:this.clone(!0),C(n[o])[r](t),F.apply(i,t.get());return this.pushStack(i)}});function $e(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:x).getComputedStyle(e)}function qe(e,t,i){var n,s={};for(n in t)s[n]=e.style[n],e.style[n]=t[n];for(n in i=i.call(e),t)e.style[n]=s[n];return i}var We,Be,Ue,Ve,Ye,Qe,Ze,s,Xe=new RegExp("^("+e+")(?!px)[a-z%]+$","i"),Ke=new RegExp(d.join("|"),"i");function Ge(e,t,i){var n,s,o=e.style;return(i=i||$e(e))&&(""!==(s=i.getPropertyValue(t)||i[t])||H(e)||(s=C.style(e,t)),!m.pixelBoxStyles())&&Xe.test(s)&&Ke.test(t)&&(e=o.width,t=o.minWidth,n=o.maxWidth,o.minWidth=o.maxWidth=o.width=s,s=i.width,o.width=e,o.minWidth=t,o.maxWidth=n),void 0!==s?s+"":s}function Je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function et(){var e;s&&(Ze.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",s.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",w.appendChild(Ze).appendChild(s),e=x.getComputedStyle(s),We="1%"!==e.top,Qe=12===tt(e.marginLeft),s.style.right="60%",Ve=36===tt(e.right),Be=36===tt(e.width),s.style.position="absolute",Ue=12===tt(s.offsetWidth/3),w.removeChild(Ze),s=null)}function tt(e){return Math.round(parseFloat(e))}Ze=P.createElement("div"),(s=P.createElement("div")).style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===s.style.backgroundClip,C.extend(m,{boxSizingReliable:function(){return et(),Be},pixelBoxStyles:function(){return et(),Ve},pixelPosition:function(){return et(),We},reliableMarginLeft:function(){return et(),Qe},scrollboxSize:function(){return et(),Ue},reliableTrDimensions:function(){var e,t,i;return null==Ye&&(e=P.createElement("table"),t=P.createElement("tr"),i=P.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",i.style.height="9px",w.appendChild(e).appendChild(t).appendChild(i),i=x.getComputedStyle(t),Ye=3<parseInt(i.height),w.removeChild(e)),Ye}}));var it=["Webkit","Moz","ms"],nt=P.createElement("div").style,st={};function ot(e){return C.cssProps[e]||st[e]||(e in nt?e:st[e]=(e=>{for(var t=e[0].toUpperCase()+e.slice(1),i=it.length;i--;)if((e=it[i]+t)in nt)return e})(e)||e)}var rt=/^(none|table(?!-c[ea]).+)/,at=/^--/,lt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"};function ct(e,t,i){var n=ve.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function ut(e,t,i,n,s,o){var r="width"===t?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;r<4;r+=2)"margin"===i&&(l+=C.css(e,i+d[r],!0,s)),n?("content"===i&&(l-=C.css(e,"padding"+d[r],!0,s)),"margin"!==i&&(l-=C.css(e,"border"+d[r]+"Width",!0,s))):(l+=C.css(e,"padding"+d[r],!0,s),"padding"!==i?l+=C.css(e,"border"+d[r]+"Width",!0,s):a+=C.css(e,"border"+d[r]+"Width",!0,s));return!n&&0<=o&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function dt(e,t,i){var n=$e(e),s=(!m.boxSizingReliable()||i)&&"border-box"===C.css(e,"boxSizing",!1,n),o=s,r=Ge(e,t,n),a="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(r)){if(!i)return r;r="auto"}return(!m.boxSizingReliable()&&s||!m.reliableTrDimensions()&&l(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===C.css(e,"display",!1,n))&&e.getClientRects().length&&(s="border-box"===C.css(e,"boxSizing",!1,n),o=a in e)&&(r=e[a]),(r=parseFloat(r)||0)+ut(e,t,i||(s?"border":"content"),o,n,r)+"px"}function o(e,t,i,n,s){return new o.prototype.init(e,t,i,n,s)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t)return""===(t=Ge(e,"opacity"))?"1":t}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,r,a=y(t),l=at.test(t),h=e.style;if(l||(t=ot(a)),r=C.cssHooks[t]||C.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(e,!1,n))?s:h[t];"string"==(o=typeof i)&&(s=ve.exec(i))&&s[1]&&(i=ye(e,t,s),o="number"),null!=i&&i==i&&("number"!==o||l||(i+=s&&s[3]||(C.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==i||0!==t.indexOf("background")||(h[t]="inherit"),r&&"set"in r&&void 0===(i=r.set(e,i,n))||(l?h.setProperty(t,i):h[t]=i))}},css:function(e,t,i,n){var s,o=y(t);return at.test(t)||(t=ot(o)),"normal"===(s=void 0===(s=(o=C.cssHooks[t]||C.cssHooks[o])&&"get"in o?o.get(e,!0,i):s)?Ge(e,t,n):s)&&t in ht&&(s=ht[t]),(""===i||i)&&(o=parseFloat(s),!0===i||isFinite(o))?o||0:s}}),C.each(["height","width"],function(e,r){C.cssHooks[r]={get:function(e,t,i){if(t)return!rt.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?dt(e,r,i):qe(e,lt,function(){return dt(e,r,i)})},set:function(e,t,i){var n=$e(e),s=!m.scrollboxSize()&&"absolute"===n.position,o=(s||i)&&"border-box"===C.css(e,"boxSizing",!1,n),i=i?ut(e,r,i,o,n):0;return o&&s&&(i-=Math.ceil(e["offset"+r[0].toUpperCase()+r.slice(1)]-parseFloat(n[r])-ut(e,r,"border",!1,n)-.5)),i&&(o=ve.exec(t))&&"px"!==(o[3]||"px")&&(e.style[r]=t,t=C.css(e,r)),ct(0,t,i)}}}),C.cssHooks.marginLeft=Je(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(s,o){C.cssHooks[s+o]={expand:function(e){for(var t=0,i={},n="string"==typeof e?e.split(" "):[e];t<4;t++)i[s+d[t]+o]=n[t]||n[t-2]||n[0];return i}},"margin"!==s&&(C.cssHooks[s+o].set=ct)}),C.fn.extend({css:function(e,t){return u(this,function(e,t,i){var n,s,o={},r=0;if(Array.isArray(t)){for(n=$e(e),s=t.length;r<s;r++)o[t[r]]=C.css(e,t[r],!1,n);return o}return void 0!==i?C.style(e,t,i):C.css(e,t)},e,t,1<arguments.length)}}),((C.Tween=o).prototype={constructor:o,init:function(e,t,i,n,s,o){this.elem=e,this.prop=i,this.easing=s||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=o.propHooks[this.prop];return(e&&e.get?e:o.propHooks._default).get(this)},run:function(e){var t,i=o.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:o.propHooks._default).set(this),this}}).init.prototype=o.prototype,(o.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[ot(e.prop)]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=o.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.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=o.prototype.init,C.fx.step={};var E,pt,A,ft=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function mt(){pt&&(!1===P.hidden&&x.requestAnimationFrame?x.requestAnimationFrame(mt):x.setTimeout(mt,C.fx.interval),C.fx.tick())}function vt(){return x.setTimeout(function(){E=void 0}),E=Date.now()}function bt(e,t){var i,n=0,s={height:e};for(t=t?1:0;n<4;n+=2-t)s["margin"+(i=d[n])]=s["padding"+i]=e;return t&&(s.opacity=s.width=e),s}function yt(e,t,i){for(var n,s=(M.tweeners[t]||[]).concat(M.tweeners["*"]),o=0,r=s.length;o<r;o++)if(n=s[o].call(i,t,e))return n}function M(s,e,t){var i,o,n,r,a,l,h,c=0,u=M.prefilters.length,d=C.Deferred().always(function(){delete p.elem}),p=function(){if(o)return!1;for(var e=E||vt(),e=Math.max(0,f.startTime+f.duration-e),t=1-(e/f.duration||0),i=0,n=f.tweens.length;i<n;i++)f.tweens[i].run(t);return d.notifyWith(s,[f,t,e]),t<1&&n?e:(n||d.notifyWith(s,[f,1,0]),d.resolveWith(s,[f]),!1)},f=d.promise({elem:s,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},t),originalProperties:e,originalOptions:t,startTime:E||vt(),duration:t.duration,tweens:[],createTween:function(e,t){t=C.Tween(s,f.opts,e,t,f.opts.specialEasing[e]||f.opts.easing);return f.tweens.push(t),t},stop:function(e){var t=0,i=e?f.tweens.length:0;if(!o){for(o=!0;t<i;t++)f.tweens[t].run(1);e?(d.notifyWith(s,[f,1,0]),d.resolveWith(s,[f,e])):d.rejectWith(s,[f,e])}return this}}),g=f.props,m=g,v=f.opts.specialEasing;for(n in m)if(a=v[r=y(n)],l=m[n],Array.isArray(l)&&(a=l[1],l=m[n]=l[0]),n!==r&&(m[r]=l,delete m[n]),(h=C.cssHooks[r])&&"expand"in h)for(n in l=h.expand(l),delete m[r],l)n in m||(m[n]=l[n],v[n]=a);else v[r]=a;for(;c<u;c++)if(i=M.prefilters[c].call(f,s,g,f.opts))return b(i.stop)&&(C._queueHooks(f.elem,f.opts.queue).stop=i.stop.bind(i)),i;return C.map(g,yt,f),b(f.opts.start)&&f.opts.start.call(s,f),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always),C.fx.timer(C.extend(p,{elem:s,anim:f,queue:f.opts.queue})),f}C.Animation=C.extend(M,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ye(i.elem,e,ve.exec(t),i),i}]},tweener:function(e,t){for(var i,n=0,s=(e=b(e)?(t=e,["*"]):e.match(k)).length;n<s;n++)i=e[n],M.tweeners[i]=M.tweeners[i]||[],M.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,s,o,r,a,l,h,c="width"in t||"height"in t,u=this,d={},p=e.style,f=e.nodeType&&me(e),g=_.get(e,"fxshow");for(n in i.queue||(null==(r=C._queueHooks(e,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,u.always(function(){u.always(function(){r.unqueued--,C.queue(e,"fx").length||r.empty.fire()})})),t)if(s=t[n],ft.test(s)){if(delete t[n],o=o||"toggle"===s,s===(f?"hide":"show")){if("show"!==s||!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 c&&1===e.nodeType&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],null==(h=g&&g.display)&&(h=_.get(e,"display")),"none"===(c=C.css(e,"display"))&&(h?c=h:(T([e],!0),h=e.style.display||h,c=C.css(e,"display"),T([e]))),"inline"===c||"inline-block"===c&&null!=h)&&"none"===C.css(e,"float")&&(l||(u.done(function(){p.display=h}),null==h&&(c=p.display,h="none"===c?"":c)),p.display="inline-block"),i.overflow&&(p.overflow="hidden",u.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=_.access(e,"fxshow",{display:h}),o&&(g.hidden=!f),f&&T([e],!0),u.done(function(){for(n in f||T([e]),_.remove(e,"fxshow"),d)C.style(e,n,d[n])})),l=yt(f?g[n]:0,n,u),n in g||(g[n]=l.start,f&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?M.prefilters.unshift(e):M.prefilters.push(e)}}),C.speed=function(e,t,i){var n=e&&"object"==typeof e?C.extend({},e):{complete:i||!i&&t||b(e)&&e,duration:e,easing:i&&t||t&&!b(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(){b(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(me).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(t,e,i,n){function s(){var e=M(this,C.extend({},t),r);(o||_.get(this,"finish"))&&e.stop(!0)}var o=C.isEmptyObject(t),r=C.speed(e,i,n);return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(s,e,o){function r(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof s&&(o=e,e=s,s=void 0),e&&this.queue(s||"fx",[]),this.each(function(){var e=!0,t=null!=s&&s+"queueHooks",i=C.timers,n=_.get(this);if(t)n[t]&&n[t].stop&&r(n[t]);else for(t in n)n[t]&&n[t].stop&&gt.test(t)&&r(n[t]);for(t=i.length;t--;)i[t].elem!==this||null!=s&&i[t].queue!==s||(i[t].anim.stop(o),e=!1,i.splice(t,1));!e&&o||C.dequeue(this,s)})},finish:function(r){return!1!==r&&(r=r||"fx"),this.each(function(){var e,t=_.get(this),i=t[r+"queue"],n=t[r+"queueHooks"],s=C.timers,o=i?i.length:0;for(t.finish=!0,C.queue(this,r,[]),n&&n.stop&&n.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===r&&(s[e].anim.stop(!0),s.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 s=C.fn[n];C.fn[n]=function(e,t,i){return null==e||"boolean"==typeof e?s.apply(this,arguments):this.animate(bt(n,!0),e,t,i)}}),C.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("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(E=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||C.fx.stop(),E=void 0},C.fx.timer=function(e){C.timers.push(e),C.fx.start()},C.fx.interval=13,C.fx.start=function(){pt||(pt=!0,mt())},C.fx.stop=function(){pt=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)}})},A=P.createElement("input"),i=P.createElement("select").appendChild(P.createElement("option")),A.type="checkbox",m.checkOn=""!==A.value,m.optSelected=i.selected,(A=P.createElement("input")).value="t",A.type="radio",m.radioValue="t"===A.value;var _t,wt=C.expr.attrHandle,xt=(C.fn.extend({attr:function(e,t){return u(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,s,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)||(s=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?_t:void 0)),void 0!==i?null===i?void C.removeAttr(e,t):s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:(e.setAttribute(t,i+""),i):!(s&&"get"in s&&null!==(n=s.get(e,t)))&&null==(n=C.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){var i;if(!m.radioValue&&"radio"===t&&l(e,"input"))return i=e.value,e.setAttribute("type",t),i&&(e.value=i),t}}},removeAttr:function(e,t){var i,n=0,s=t&&t.match(k);if(s&&1===e.nodeType)for(;i=s[n++];)e.removeAttribute(i)}}),_t={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 r=wt[t]||C.find.attr;wt[t]=function(e,t,i){var n,s,o=t.toLowerCase();return i||(s=wt[o],wt[o]=n,n=null!=r(e,t,i)?o:null,wt[o]=s),n}}),/^(?:input|select|textarea|button)$/i),Pt=/^(?:a|area)$/i;function O(e){return(e.match(k)||[]).join(" ")}function N(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(k)||[]}C.fn.extend({prop:function(e,t){return u(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,s,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(e)||(t=C.propFix[t]||t,s=C.propHooks[t]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:e[t]=i:s&&"get"in s&&null!==(n=s.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||Pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.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,s,o,r,a=0;if(b(t))return this.each(function(e){C(this).addClass(t.call(this,e,N(this)))});if((e=Ct(t)).length)for(;i=this[a++];)if(r=N(i),n=1===i.nodeType&&" "+O(r)+" "){for(o=0;s=e[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");r!==(r=O(n))&&i.setAttribute("class",r)}return this},removeClass:function(t){var e,i,n,s,o,r,a=0;if(b(t))return this.each(function(e){C(this).removeClass(t.call(this,e,N(this)))});if(!arguments.length)return this.attr("class","");if((e=Ct(t)).length)for(;i=this[a++];)if(r=N(i),n=1===i.nodeType&&" "+O(r)+" "){for(o=0;s=e[o++];)for(;-1<n.indexOf(" "+s+" ");)n=n.replace(" "+s+" "," ");r!==(r=O(n))&&i.setAttribute("class",r)}return this},toggleClass:function(s,t){var o=typeof s,r="string"==o||Array.isArray(s);return"boolean"==typeof t&&r?t?this.addClass(s):this.removeClass(s):b(s)?this.each(function(e){C(this).toggleClass(s.call(this,e,N(this),t),t)}):this.each(function(){var e,t,i,n;if(r)for(t=0,i=C(this),n=Ct(s);e=n[t++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==s&&"boolean"!=o||((e=N(this))&&_.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==s&&_.get(this,"__className__")||""))})},hasClass:function(e){for(var t,i=0,n=" "+e+" ";t=this[i++];)if(1===t.nodeType&&-1<(" "+O(N(t))+" ").indexOf(n))return!0;return!1}});function kt(e){e.stopPropagation()}var Ht=/\r/g,Tt=(C.fn.extend({val:function(t){var i,e,n,s=this[0];return arguments.length?(n=b(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))})):s?(i=C.valHooks[s.type]||C.valHooks[s.nodeName.toLowerCase()])&&"get"in i&&void 0!==(e=i.get(s,"value"))?e:"string"==typeof(e=s.value)?e.replace(Ht,""):null==e?"":e:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:O(C.text(e))}},select:{get:function(e){for(var t,i=e.options,n=e.selectedIndex,s="select-one"===e.type,o=s?null:[],r=s?n+1:i.length,a=n<0?r:s?n:0;a<r;a++)if(((t=i[a]).selected||a===n)&&!t.disabled&&(!t.parentNode.disabled||!l(t.parentNode,"optgroup"))){if(t=C(t).val(),s)return t;o.push(t)}return o},set:function(e,t){for(var i,n,s=e.options,o=C.makeArray(t),r=s.length;r--;)((n=s[r]).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)}},m.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in x,/^(?:focusinfocus|focusoutblur)$/),Dt=(C.extend(C.event,{trigger:function(e,t,i,n){var s,o,r,a,l,h,c,u=[i||P],d=W.call(e,"type")?e.type:e,p=W.call(e,"namespace")?e.namespace.split("."):[],f=c=o=i=i||P;if(3!==i.nodeType&&8!==i.nodeType&&!Tt.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]),h=C.event.special[d]||{},n||!h.trigger||!1!==h.trigger.apply(i,t))){if(!n&&!h.noBubble&&!g(i)){for(r=h.delegateType||d,Tt.test(r+d)||(f=f.parentNode);f;f=f.parentNode)u.push(f),o=f;o===(i.ownerDocument||P)&&u.push(o.defaultView||o.parentWindow||x)}for(s=0;(f=u[s++])&&!e.isPropagationStopped();)c=f,e.type=1<s?r:h.bindType||d,(l=(_.get(f,"events")||Object.create(null))[e.type]&&_.get(f,"handle"))&&l.apply(f,t),(l=a&&f[a])&&l.apply&&v(f)&&(e.result=l.apply(f,t),!1===e.result)&&e.preventDefault();return e.type=d,n||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(u.pop(),t)||!v(i)||a&&b(i[d])&&!g(i)&&((o=i[a])&&(i[a]=null),C.event.triggered=d,e.isPropagationStopped()&&c.addEventListener(d,kt),i[d](),e.isPropagationStopped()&&c.removeEventListener(d,kt),C.event.triggered=void 0,o)&&(i[a]=o),e.result}},simulate:function(e,t,i){i=C.extend(new C.Event,i,{type:e,isSimulated:!0});C.event.trigger(i,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)}}),m.focusin||C.each({focus:"focusin",blur:"focusout"},function(i,n){function s(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=_.access(e,n);t||e.addEventListener(i,s,!0),_.access(e,n,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=_.access(e,n)-1;t?_.access(e,n,t):(e.removeEventListener(i,s,!0),_.remove(e,n))}}}),x.location),It={guid:Date.now()},St=/\?/,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},/\[\]$/),At=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;C.param=function(e,t){function i(e,t){t=b(t)?t():t,s[s.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==t?"":t)}var n,s=[];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,s,o){if(Array.isArray(e))C.each(e,function(e,t){s||Et.test(n)?o(n,t):i(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,s,o)});else if(s||"object"!==f(e))o(n,e);else for(var t in e)i(n+"["+t+"]",e[t],s,o)}(n,e[n],t,i);return s.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")&&Ot.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!we.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 Nt=/%20/g,Lt=/#.*$/,zt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,Rt=/^\/\//,$t={},qt={},Wt="*/".concat("*"),Bt=P.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var i,n=0,s=e.toLowerCase().match(k)||[];if(b(t))for(;i=s[n++];)"+"===i[0]?(i=i.slice(1)||"*",(o[i]=o[i]||[]).unshift(t)):(o[i]=o[i]||[]).push(t)}}function Vt(t,n,s,o){var r={},a=t===qt;function l(e){var i;return r[e]=!0,C.each(t[e]||[],function(e,t){t=t(n,s,o);return"string"!=typeof t||a||r[t]?a?!(i=t):void 0:(n.dataTypes.unshift(t),l(t),!1)}),i}return l(n.dataTypes[0])||!r["*"]&&l("*")}function Yt(e,t){var i,n,s=C.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((s[i]?e:n=n||{})[i]=t[i]);return n&&C.extend(!0,e,n),e}Bt.href=Dt.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wt,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($t),ajaxTransport:Ut(qt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var l,h,c,i,u,d,p,n,s,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={},r={},a="canceled",_={readyState:0,getResponseHeader:function(e){var t;if(d){if(!i)for(i={};t=jt.exec(c);)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?c:null},setRequestHeader:function(e,t){return null==d&&(e=r[e.toLowerCase()]=r[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||Dt.href)+"").replace(Rt,Dt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(k)||[""],null==f.crossDomain){s=P.createElement("a");try{s.href=f.url,s.href=s.href,f.crossDomain=Bt.protocol+"//"+Bt.host!=s.protocol+"//"+s.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=C.param(f.data,f.traditional)),Vt($t,f,t,_),!d){for(n in(p=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ft.test(f.type),h=f.url.replace(Lt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Nt,"+")):(s=f.url.slice(h.length),f.data&&(f.processData||"string"==typeof f.data)&&(h+=(St.test(h)?"&":"?")+f.data,delete f.data),!1===f.cache&&(h=h.replace(zt,"$1"),s=(St.test(h)?"&":"?")+"_="+It.guid+++s),f.url=h+s),f.ifModified&&(C.lastModified[h]&&_.setRequestHeader("If-Modified-Since",C.lastModified[h]),C.etag[h])&&_.setRequestHeader("If-None-Match",C.etag[h]),(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]?", "+Wt+"; 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&&(u=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")}return _;function w(e,t,i,n){var s,o,r,a=t;d||(d=!0,u&&x.clearTimeout(u),l=void 0,c=n||"",_.readyState=0<e?4:0,n=200<=e&&e<300||304===e,i&&(r=((e,t,i)=>{for(var n,s,o,r,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(s in a)if(a[s]&&a[s].test(n)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}r=r||s}o=o||r}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(){}),r=((e,t,i,n)=>{var s,o,r,a,l,h={},c=e.dataTypes.slice();if(c[1])for(r in e.converters)h[r.toLowerCase()]=e.converters[r];for(o=c.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(r=h[l+" "+o]||h["* "+o]))for(s in h)if((a=s.split(" "))[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){!0===r?r=h[s]:!0!==h[s]&&(o=a[0],c.unshift(a[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}})(f,r,_,n),n?(f.ifModified&&((i=_.getResponseHeader("Last-Modified"))&&(C.lastModified[h]=i),i=_.getResponseHeader("etag"))&&(C.etag[h]=i),204===e||"HEAD"===f.type?a="nocontent":304===e?a="notmodified":(a=r.state,s=r.data,n=!(o=r.error))):(o=a,!e&&a||(a="error",e<0&&(e=0))),_.status=e,_.statusText=(t||a)+"",n?v.resolveWith(g,[s,a,_]):v.rejectWith(g,[_,a,o]),_.statusCode(y),y=void 0,p&&m.trigger(n?"ajaxSuccess":"ajaxError",[_,f,n?s:o]),b.fireWith(g,[_,a]),p&&(m.trigger("ajaxComplete",[_,f]),--C.active||C.event.trigger("ajaxStop")))}},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,s){C[s]=function(e,t,i,n){return b(t)&&(n=n||i,i=t,t=void 0),C.ajax(C.extend({url:e,type:s,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]&&(b(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 b(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=b(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},Zt=C.ajaxSettings.xhr();m.cors=!!Zt&&"withCredentials"in Zt,m.ajax=Zt=!!Zt,C.ajaxTransport(function(s){var o,r;if(m.cors||Zt&&!s.crossDomain)return{send:function(e,t){var i,n=s.xhr();if(n.open(s.type,s.url,s.async,s.username,s.password),s.xhrFields)for(i in s.xhrFields)n[i]=s.xhrFields[i];for(i in s.mimeType&&n.overrideMimeType&&n.overrideMimeType(s.mimeType),s.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)n.setRequestHeader(i,e[i]);o=function(e){return function(){o&&(o=r=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(),r=n.onerror=n.ontimeout=o("error"),void 0!==n.onabort?n.onabort=r:n.onreadystatechange=function(){4===n.readyState&&x.setTimeout(function(){o&&r()})},o=o("abort");try{n.send(s.hasContent&&s.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,s;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",s=function(e){n.remove(),s=null,e&&t("error"===e.type?404:200,e.type)}),P.head.appendChild(n[0])},abort:function(){s&&s()}}});var Xt=[],Kt=/(=)\?(?=&|$)|\?\?/,Gt=(C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||C.expando+"_"+It.guid++;return this[e]=!0,e}}),C.ajaxPrefilter("json jsonp",function(e,t,i){var n,s,o,r=!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(r||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=b(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,r?e[r]=e[r].replace(Kt,"$1"+n):!1!==e.jsonp&&(e.url+=(St.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",s=x[n],x[n]=function(){o=arguments},i.always(function(){void 0===s?C(x).removeProp(n):x[n]=s,e[n]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(n)),o&&b(s)&&s(o[0]),o=s=void 0}),"script"}),m.createHTMLDocument=((e=P.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===e.childNodes.length),C.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(m.createHTMLDocument?((n=(t=P.implementation.createHTMLDocument("")).createElement("base")).href=P.location.href,t.head.appendChild(n)):t=P),n=!i&&[],(i=K.exec(e))?[t.createElement(i[1])]:(i=He([e],t,n),n&&n.length&&C(n).remove(),C.merge([],i.childNodes)));var n},C.fn.load=function(e,t,i){var n,s,o,r=this,a=e.indexOf(" ");return-1<a&&(n=O(e.slice(a)),e=e.slice(0,a)),b(t)?(i=t,t=void 0):t&&"object"==typeof t&&(s="POST"),0<r.length&&C.ajax({url:e,type:s||"GET",dataType:"html",data:t}).done(function(e){o=arguments,r.html(n?C("<div>").append(C.parseHTML(e)).find(n):e)}).always(i&&function(e,t){r.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,s,o,r,a=C.css(e,"position"),l=C(e),h={};"static"===a&&(e.style.position="relative"),o=l.offset(),n=C.css(e,"top"),r=C.css(e,"left"),a=("absolute"===a||"fixed"===a)&&-1<(n+r).indexOf("auto")?(s=(a=l.position()).top,a.left):(s=parseFloat(n)||0,parseFloat(r)||0),null!=(t=b(t)?t.call(e,i,C.extend({},o)):t).top&&(h.top=t.top-o.top+s),null!=t.left&&(h.left=t.left-o.left+a),"using"in t?t.using.call(e,h):("number"==typeof h.top&&(h.top+="px"),"number"==typeof h.left&&(h.left+="px"),l.css(h))}},C.fn.extend({offset:function(t){var e,i;return arguments.length?void 0===t?this:this.each(function(e){C.offset.setOffset(this,t,e)}):(i=this[0])?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],s={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&&((s=C(e).offset()).top+=C.css(e,"borderTopWidth",!0),s.left+=C.css(e,"borderLeftWidth",!0))}return{top:t.top-s.top-C.css(n,"marginTop",!0),left:t.left-s.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||w})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,s){var o="pageYOffset"===s;C.fn[t]=function(e){return u(this,function(e,t,i){var n;if(g(e)?n=e:9===e.nodeType&&(n=e.defaultView),void 0===i)return n?n[s]:e[t];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]=Je(m.pixelPosition,function(e,t){if(t)return t=Ge(e,i),Xe.test(t)?C(e).position()[i]+"px":t})}),C.each({Height:"height",Width:"width"},function(r,a){C.each({padding:"inner"+r,content:a,"":"outer"+r},function(n,o){C.fn[o]=function(e,t){var i=arguments.length&&(n||"boolean"!=typeof e),s=n||(!0===e||!0===t?"margin":"border");return u(this,function(e,t,i){var n;return g(e)?0===o.indexOf("outer")?e["inner"+r]:e.document.documentElement["client"+r]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+r],n["scroll"+r],e.body["offset"+r],n["offset"+r],n["client"+r])):void 0===i?C.css(e,t,s):C.style(e,t,i,s)},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)}}),/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g),Jt=(C.proxy=function(e,t){var i,n;if("string"==typeof t&&(n=e[t],t=e,e=n),b(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=l,C.isFunction=b,C.isWindow=g,C.camelCase=y,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}),x.jQuery),ei=x.$;return C.noConflict=function(e){return x.$===C&&(x.$=ei),e&&x.jQuery===C&&(x.jQuery=Jt),C},void 0===L&&(x.jQuery=x.$=C),C});{var H5P=window.H5P=window.H5P||{},H5P,H5P,H5P,H5P;H5P.jQuery=jQuery.noConflict(!0),H5P.jQuery.fn.__originalLoad=H5P.jQuery.load,H5P.jQuery.fn.load=function(e,t,i){return"function"==typeof e?(console.warn("You are using a deprecated H5P library. Please upgrade!"),(e=Array.prototype.slice.call(arguments)).unshift("load"),H5P.jQuery.fn.on.apply(this,e)):H5P.jQuery.fn.__originalLoad.apply(this,arguments)},(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),s=t.data("content-id"),o=H5PIntegration.contents["cid-"+s];if(void 0===o)return H5P.error("No data for content id "+s+". Perhaps the library is gone?");var e,n,r,a,l,h,c,u={library:o.library,params:JSON.parse(o.jsonContent),metadata:o.metadata},d=(H5P.getUserData(s,"state",function(e,t){var n;t?u.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(s,"state",0))}t.find(".h5p-dialog-ok-button").click(i).keypress(i),H5P.trigger(d,"resize")}).on("dialog-closed",function(){H5P.trigger(d,"resize")}),n.open())}),H5P.newRunnable(u,s,i,!0,{standalone:!0})),p=(H5P.offlineRequestQueue=new H5P.OfflineRequestQueue({instance:d}),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,d)}).keydown(function(e){if(32===e.which||13===e.which)return H5P.fullScreen(i,d),!1}),o.displayOptions),f=!1;p.frame&&(p.copyright&&!(e=H5P.getCopyrights(d,u.params,s,u.metadata))&&(p.copyright=!1),p=new H5P.ActionBar(p),n=p.getDOMElement(),p.on("reuse",function(){H5P.openReuseDialog(n,o,u,d,s),d.triggerXAPI("accessed-reuse")}),p.on("copyrights",function(){new H5P.Dialog("copyrights",H5P.t("copyrightInformation"),e,i).open(!0),d.triggerXAPI("accessed-copyright")}),p.on("embed",function(){H5P.openEmbedDialog(n,o.embedCode,o.resizeCode,{width:t.width(),height:t.height()},d),d.triggerXAPI("accessed-embed")}),p.hasActions())&&(f=!0,n.insertAfter(i)),t.addClass(f?"h5p-frame":"h5p-no-frame"),H5P.opened[s]=new Date,H5P.on(d,"finish",function(e){void 0!==e.data&&H5P.setFinished(s,e.data.score,e.data.maxScore,e.data.time)}),H5P.on(d,"xAPI",H5P.xAPICompletedListener),!1!==H5PIntegration.saveFreq&&(d.getCurrentState instanceof Function||"function"==typeof d.getCurrentState)&&(a=function(){var e=d.getCurrentState();void 0!==e&&H5P.setUserData(s,"state",e,{deleteOnChange:!0}),H5PIntegration.saveFreq&&(r=setTimeout(a,1e3*H5PIntegration.saveFreq))},H5PIntegration.saveFreq&&(r=setTimeout(a,1e3*H5PIntegration.saveFreq)),H5P.on(d,"xAPI",function(e){e=e.getVerb();"completed"!==e&&"progressed"!==e||(clearTimeout(r),r=setTimeout(a,3e3))})),H5P.isFramed&&(!1===H5P.externalEmbed?(h=window.frameElement,H5P.on(d,"resize",function(){clearTimeout(l),l=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&&(c=!1,H5P.communicator.on("ready",function(){H5P.communicator.send("hello")}),H5P.communicator.on("hello",function(){c=!0,document.body.style.height="auto",document.body.style.overflow="hidden",H5P.trigger(d,"resize")}),H5P.communicator.on("resizePrepared",function(){H5P.communicator.send("resize",{scrollHeight:document.body.scrollHeight})}),H5P.communicator.on("resize",function(){H5P.trigger(d,"resize")}),H5P.on(d,"resize",function(){H5P.isFullscreen||(clearTimeout(l),l=setTimeout(function(){c?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(){H5P.trigger(d,"resize")}),H5P.instances.push(d),H5P.trigger(d,"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(){let e=this;var t=H5P.jQuery(e);let i=t.data("content-id");var n=H5PIntegration.contents["cid-"+i];let s=n&&n.metadata&&n.metadata.defaultLanguage?n.metadata.defaultLanguage:"en";function o(){e.contentDocument.open(),e.contentDocument.write('<!doctype html><html class="h5p-iframe" lang="'+s+'"><head>'+H5P.getHeadTags(i)+'</head><body><div class="h5p-content" data-content-id="'+i+'"/></body></html>'),e.contentDocument.close()}t.addClass("h5p-initialized"),null===e.contentDocument?(t.on("load",o),t.attr("src","about:blank")):o()})},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,s){if(void 0===H5P.exitFullScreen)if(H5P.isFramed&&!1===H5P.externalEmbed)window.parent.H5P.fullScreen(e,t,i,H5P.$body.get(),s),H5P.isFullscreen=!0,H5P.exitFullScreen=function(){window.parent.H5P.exitFullScreen()},H5P.on(t,"exitFullScreen",function(){H5P.isFullscreen=!1,H5P.exitFullScreen=void 0});else{var o,r,a,l=e,n=(void 0===n?o=H5P.$body:(r=(o=H5P.jQuery(n)).add(e.get()),n="#h5p-iframe-"+e.parent().data("content-id"),e=(a=H5P.jQuery(n)).parent()),r=e.add(H5P.$body).add(r),function(e){r.addClass(e),void 0!==a&&a.css("height","")}),h=function(){H5P.trigger(t,"resize"),H5P.trigger(t,"focus"),H5P.trigger(t,"enterFullScreen")},c=function(e){H5P.isFullscreen=!1,r.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===s){if(!H5P.isFramed){n("h5p-semi-fullscreen");var u,d,p=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")),f=H5P.exitFullScreen=function(){u?d.content=u:m.removeChild(d),p.remove(),o.unbind("keyup",g),c("h5p-semi-fullscreen")},g=function(e){27===e.keyCode&&f()};p.click(f),o.keyup(g);for(var m,v=document.getElementsByTagName("meta"),b=0;b<v.length;b++)if("viewport"===v[b].name){d=v[b],u=d.content;break}u||((d=document.createElement("meta")).name="viewport"),d.content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0",u||(m=document.getElementsByTagName("head")[0]).appendChild(d),h()}}else{n("h5p-fullscreen");var y,_="ms"===H5P.fullScreenBrowserPrefix?"MSFullscreenChange":H5P.fullScreenBrowserPrefix+"fullscreenchange";document.addEventListener(_,function e(){void 0===y?(y=!1,h()):(c("h5p-fullscreen"),document.removeEventListener(_,e,!1))}),""===H5P.fullScreenBrowserPrefix?e[0].requestFullscreen():(s="ms"===H5P.fullScreenBrowserPrefix?"msRequestFullscreen":H5P.fullScreenBrowserPrefix+"RequestFullScreen",l="webkit"===H5P.fullScreenBrowserPrefix&&0===H5P.safariBrowser?Element.ALLOW_KEYBOARD_INPUT:void 0,e[0][s](l)),H5P.exitFullScreen=function(){""===H5P.fullScreenBrowserPrefix?document.exitFullscreen():"moz"===H5P.fullScreenBrowserPrefix?document.mozCancelFullScreen():document[H5P.fullScreenBrowserPrefix+"ExitFullscreen"]()}}}},(()=>{function s(e){return e.match(/^[a-z0-9]+:\/\//i)}H5P.addQueryParameter=function(e,t){let i,n;e=e.split("?");return i=e[1]?(n=e[1].split("#"),e[0]+"?"+n[0]+"&"):(n=e[0].split("#"))[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)},H5P.getCrossOrigin=function(e){return"object"!=typeof e?H5PIntegration.crossorigin&&H5PIntegration.crossoriginRegex&&e.match(H5PIntegration.crossoriginRegex)?H5PIntegration.crossorigin:null:H5PIntegration.crossorigin&&!s(e.path)?H5PIntegration.crossorigin:void 0},H5P.getPath=function(e,t){if(s(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=s(i)?i:window.location.protocol+"//"+window.location.host+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,s){var o,r;try{r=(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,h=0;h<a.length;h++)l=l[a[h]];if("function"!=typeof l)throw null}catch(e){return H5P.error("Unable to find constructor for: "+t.library)}void 0===s&&(s={}),t.subContentId&&(s.subContentId=t.subContentId),t.userDatas&&t.userDatas.state&&H5PIntegration.saveFreq&&(s.previousState=t.userDatas.state),t.metadata&&(s.metadata=t.metadata);var c,u=s.standalone||!1;return l.prototype=H5P.jQuery.extend({},H5P.ContentType(u).prototype,l.prototype),void 0===(c=-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,s)).$&&(c.$=H5P.jQuery(c)),void 0===c.contentId&&(c.contentId=e),void 0===c.subContentId&&t.subContentId&&(c.subContentId=t.subContentId),void 0===c.parent&&s&&s.parent&&(c.parent=s.parent),void 0===c.libraryInfo&&(c.libraryInfo={versionedName:t.library,versionedNameNoSpaces:r+"-"+o[0]+"."+o[1],machineName:r,majorVersion:o[0],minorVersion:o[1]}),void 0!==i&&(i.toggleClass("h5p-standalone",u),c.attach(i),H5P.trigger(c,"domChanged",{$target:i,library:r,key:"newLibrary"},{bubbles:!0,external:!0}),void 0!==n&&n||H5P.trigger(c,"resize")),c},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 s in t)n=n.replace(s,t[s]);return n},H5P.Dialog=function(e,t,i,n,s){var o=this,r=(this.activeElement=document.activeElement,H5P.jQuery('<div class="h5p-popup-dialog h5p-'+e+'-dialog" aria-labelledby="'+e+'-dialog-header" aria-modal="true" role="dialog" tabindex="-1">                              <div class="h5p-inner">                                <h2 id="'+e+'-dialog-header">'+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||o.close()}).children(".h5p-inner").click(function(e){e.originalEvent.preventClosing=!0}).find(".h5p-close").click(function(){o.close()}).keypress(function(e){if(13===e.which||32===e.which)return o.close(),!1}).end().find("a").click(function(e){e.stopPropagation()}).end().end());o.open=function(e){e&&r.css("height","100%"),setTimeout(function(){r.addClass("h5p-open"),H5P.jQuery(o).trigger("dialog-opened",[r]),r.focus()},1)},o.close=function(){r.removeClass("h5p-open"),setTimeout(function(){r.remove(),H5P.jQuery(o).trigger("dialog-closed",[r]),n.attr("tabindex","-1"),(s||o.activeElement||n).focus()},200)}},H5P.getCopyrights=function(e,t,i,n){var s;if(void 0!==e.getCopyrights)try{s=e.getCopyrights()}catch(e){}void 0===s&&(s=new H5P.ContentCopyrights,H5P.findCopyrights(s,t,i));t=H5P.buildMetadataCopyrights(n,e.libraryInfo.machineName);return void 0!==t&&s.addMediaInFront(t),s=void 0!==s?s.toString():s},H5P.findCopyrights=function(r,e,t,i){var n,s,o,a;for(s in i&&(i.params=e,l(i,i.machineName,t)),e)e.hasOwnProperty(s)&&("overrideSettings"===s?(console.warn("The semantics field 'overrideSettings' is DEPRECATED and should not be used."),console.warn(e)):((o=e[s])&&o.library&&"string"==typeof o.library?n=o.library.split(" ")[0]:o&&o.library&&"object"==typeof o.library&&(n=o.library.library&&"string"==typeof o.library.library?o.library.library.split(" ")[0]:n),o instanceof Array?H5P.findCopyrights(r,o,t):o instanceof Object&&(l(o,n,t),void 0===o.copyright||void 0===o.copyright.license||void 0===o.path||void 0===o.mime?H5P.findCopyrights(r,o,t):(a=new H5P.MediaCopyright(o.copyright),void 0!==o.width&&void 0!==o.height&&a.setThumbnail(new H5P.Thumbnail(H5P.getPath(o.path,t),o.width,o.height)),r.addMedia(a)))));function l(e,t,i){var n,s,o;e.metadata&&void 0!==(t=H5P.buildMetadataCopyrights(e.metadata,t))&&(e.params&&"Image"===e.params.contentName&&e.params.file&&(n=e.params.file.path,s=e.params.file.width,o=e.params.file.height,t.setThumbnail(new H5P.Thumbnail(H5P.getPath(n,i),s,o,e.params.alt))),r.addMedia(t))}},H5P.buildMetadataCopyrights=function(e){if(e&&void 0!==e.license&&"U"!==e.license)return 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},new H5P.MediaCopyright(e)},H5P.openReuseDialog=function(e,i,n,s,o){let t="",r=(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>'),new H5P.Dialog("reuse",H5P.t("reuseContent"),t,e));H5P.jQuery(r).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,s.triggerXAPI("downloaded"),r.close()}),t.find(".h5p-copy-button").click(function(){var e=new H5P.ClipboardItem(n);e.contentId=o,H5P.setClipboard(e),s.triggerXAPI("copied"),r.close(),H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0],H5P.t("contentCopied"),{position:{horizontal:"centered",vertical:"centered",noOverflowX:!0}})}),H5P.trigger(s,"resize")}).on("dialog-closed",function(){H5P.trigger(s,"resize")}),r.open()},H5P.openEmbedDialog=function(e,t,i,h,c){var u=t+i,t=new H5P.Dialog("embed",H5P.t("embed"),'<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>'+H5P.t("size")+': <input aria-label="'+H5P.t("width")+'" type="text" value="'+Math.ceil(h.width)+'" class="h5p-embed-size"/> × <input aria-label="'+H5P.t("width")+'" type="text" value="'+Math.ceil(h.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(t).on("dialog-opened",function(e,i){function n(){H5P.trigger(c,"resize")}function t(e,t){return e=parseFloat(e.val()),isNaN(e)?t:Math.ceil(e)}function s(){i.find(".h5p-embed-code-container:first").val(u.replace(":w",t(a,h.width)).replace(":h",t(l,h.height)))}function o(){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()}var r=i.find(".h5p-inner").find(".h5p-scroll-content"),a=(r.outerHeight(),r.innerHeight(),i.find(".h5p-embed-size:eq(0)")),l=i.find(".h5p-embed-size:eq(1)");a.change(s),l.change(s),s(),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();i.find(".h5p-expander").click(o).keypress(function(e){if(32===e.keyCode)return o.apply(this),!1})}).on("dialog-closed",function(){H5P.trigger(c,"resize")}),t.open()},H5P.attachToastTo=function(t,e,i){if(void 0===t||void 0===e)return;function n(e){-1===s(e).indexOf(t)&&(clearTimeout(l),o())}let s=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),r.parentNode&&r.parentNode.removeChild(r)};(i=i||{}).style=i.style||"h5p-toast",i.duration=i.duration||3e3;let r=document.createElement("div");r.setAttribute("id",i.style),r.classList.add("h5p-toast-disabled"),r.classList.add(i.style);var a=document.createElement("span"),e=(a.innerHTML=e,r.appendChild(a),document.body.appendChild(r),((e,t,i)=>{(i=i||{}).offsetHorizontal=i.offsetHorizontal||0,i.offsetVertical=i.offsetVertical||0;var n=t.getBoundingClientRect(),s=e.getBoundingClientRect();let o=0,r=0;switch(i.horizontal){case"before":o=s.left-n.width-i.offsetHorizontal;break;case"after":o=s.left+s.width+i.offsetHorizontal;break;case"left":o=s.left+i.offsetHorizontal;break;case"right":o=s.left+s.width-n.width-i.offsetHorizontal;break;default:o=s.left+s.width/2-n.width/2+i.offsetHorizontal}switch(i.vertical){case"above":r=s.top-n.height-i.offsetVertical;break;case"below":r=s.top+s.height+i.offsetVertical;break;case"top":r=s.top+i.offsetVertical;break;case"bottom":r=s.top+s.height-n.height-i.offsetVertical;break;case"centered":r=s.top+s.height/2-n.height/2+i.offsetVertical;break;default:r=s.top+s.height+i.offsetVertical}return t=document.body.getBoundingClientRect(),(i.noOverflowLeft||i.noOverflowX)&&o<t.x&&(o=t.x),(i.noOverflowRight||i.noOverflowX)&&o+n.width>t.x+t.width&&(o=t.x+t.width-n.width),(i.noOverflowTop||i.noOverflowY)&&r<t.y&&(r=t.y),{left:o=(i.noOverflowBottom||i.noOverflowY)&&r+n.height>t.y+t.height?t.y+t.height-n.height:o,top:r}})(t,r,i.position));r.style.left=Math.round(e.left)+"px",r.style.top=Math.round(e.top)+"px",r.classList.remove("h5p-toast-disabled");let l=setTimeout(o,i.duration);document.addEventListener("click",n)},H5P.ContentCopyrights=function(){var i,n=[],s=[];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&&s.push(e)},this.toString=function(){for(var e="",t=0;t<n.length;t++)e+=n[t];for(t=0;t<s.length;t++)e+=s[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 s(e){return void 0===t||void 0===t[e]?H5P.t(e):t[e]}function o(e,t){var i,n,s=H5P.copyrightLicenses[e],o="",s=("PD"===e&&t||(o+=s.hasOwnProperty("label")?s.label:s),(i=s.versions&&(t=!s.versions.default||t&&s.versions[t]?t:s.versions.default)&&s.versions[t]?s.versions[t]:i)&&(o&&(o+=" "),o+=i.hasOwnProperty("label")?i.label:i),s.hasOwnProperty("link")?n=s.link.replace(":version",s.linkVersions?s.linkVersions[t]:t):i&&s.hasOwnProperty("link")&&(n=i.link),n&&(o='<a href="'+n+'" target="_blank">'+o+"</a>"),"");return"PD"!==e&&"C"!==e&&(s+=e),t&&"CC0 1.0"!==t&&(s&&"GNU GPL"!==e&&(s+=" "),s+=t),s&&(o+=" ("+s+")"),"C"===e&&(o+=" &copy;"),o}var r,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 h=0;h<i.length;h++){var c,u=i[h];void 0!==e[u]&&""!==e[u]&&(c=e[u],"license"===u&&(c=o(e.license,e.version)),"source"===u&&(c=c?'<a href="'+c+'" target="_blank">'+c+"</a>":void 0),a.add(new H5P.Field(s(u),c)))}}this.setThumbnail=function(e){r=e},this.undisclosed=function(){if(1===a.size()){var e=a.get(0);if(e.getLabel()===s("license")&&e.getValue()===o("U"))return!0}return!1},this.toString=function(){var e="";return this.undisclosed()||(void 0!==r&&(e+=r),""!==(e+=a)&&(e='<div class="h5p-media-copyright">'+e+"</div>")),e}},H5P.Thumbnail=function(e,t,i,n){var s;void 0!==t&&(s=Math.round(t/i*100)),this.toString=function(){return'<img src="'+e+'" alt="'+(n||"")+'" class="h5p-thumbnail" height="100"'+(void 0===s?"":' width="'+s+'"')+"/>"}},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 H5PIntegration&&H5PIntegration.libraryDirectories&&e in H5PIntegration.libraryDirectories&&(e=H5PIntegration.libraryDirectories[e]),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.isEmpty=t=>{if(t||0===t||!1===t)if(Array.isArray(t)){for(let e=0;e<t.length;e++)if(!H5P.isEmpty(t[e]))return!1}else{if("object"!=typeof t)return!1;for(var e in t)if(t.hasOwnProperty(e)&&!H5P.isEmpty(t[e]))return!1}return!0},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=e.length;if(0===n)return!1;for(;--n;)t=Math.floor(Math.random()*(n+1)),i=e[n],e[n]=e[t],e[t]=i;return e}},H5P.setFinished=function(i,n,s,o){if(("number"==typeof n||n instanceof Number)&&!0===H5PIntegration.postUserStatistics){let e=function(e){return Math.round(e.getTime()/1e3)},t={contentId:i,score:n,maxScore:s,opened:e(H5P.opened[i]),finished:e(new Date),time:o};H5P.jQuery.post(H5PIntegration.ajax.setFinished,t).fail(function(){H5P.offlineRequestQueue.add(H5PIntegration.ajax.setFinished,t)})}},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},(l=>{function a(e,t,i,n,s,o,r,a){void 0===H5PIntegration.user?n("Not signed in."):(e={url:H5PIntegration.ajax.contentUserData.replace(":contentId",e).replace(":dataType",t).replace(":subContentId",i||0),dataType:"json",async:void 0===a||a},void 0!==s?(e.type="POST",e.data={data:null===s?0:s,preload:o?1:0,invalidate:r?1:0}):e.type="GET",void 0!==n&&(e.error=function(e,t){n(t)},e.success=function(e){e.success?!1===e.data||void 0===e.data?n():n(void 0,e.data):n(e.message)}),l.ajax(e))}H5P.getUserData=function(e,i,n,s){s=s||0,H5PIntegration.contents=H5PIntegration.contents||{};var o=H5PIntegration.contents["cid-"+e]||{},r=o.contentUserData;if(r&&r[s]&&void 0!==r[s][i])if("RESET"===r[s][i])n(void 0,null);else try{n(void 0,JSON.parse(r[s][i]))}catch(e){n(e)}else a(e,i,s,function(e,t){if(e||void 0===t)n(e,t);else{void 0===o.contentUserData&&(o.contentUserData=r={}),void 0===r[s]&&(r[s]={}),r[s][i]=t;try{n(void 0,JSON.parse(t))}catch(e){n(e)}}})},H5P.setUserData=function(e,t,i,n){var s=H5P.jQuery.extend(!0,{},{subContentId:0,preloaded:!0,deleteOnChange:!1,async:!0},n);try{i=JSON.stringify(i)}catch(e){return void(s.errorCallback&&s.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[s.subContentId]&&(n[s.subContentId]={}),i!==n[s.subContentId][t]&&(n[s.subContentId][t]=i,a(e,t,s.subContentId,function(e){s.errorCallback&&e&&s.errorCallback(e)},i,s.preloaded,s.deleteOnChange,s.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&&(e=n.specific[n.generic]).params.file&&e.params.file.width&&e.params.file.height&&(n.width=20,n.height=e.params.file.height/e.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 i=localStorage.getItem("h5pClipboard");if(i){try{i=JSON.parse(i)}catch(e){return void console.error("Unable to parse JSON from clipboard.",e)}return n(i.specific,function(t){if("#tmp"===t.substr(-4,4)||!i.contentId||t.match(/^https?:\/\//i))return t;{let e;return e=H5PEditor.contentId?"../"+i.contentId+"/":(H5PEditor.contentRelUrl||"../content/")+i.contentId+"/",t.substr(0,e.length)===e?t:e+t}}),i.generic&&(i.generic=i.specific[i.generic]),i}},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 s,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&&(s=0,e=function(){var e=(new Date).getTime();if(250<e-s){s=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,s=!1,o=!1;!0===(i=void 0===i?{}:i).bubbles&&(n=!0),!0===i.external&&(s=!0),this.preventBubbling=function(){n=!1},this.getBubbles=function(){return n},this.scheduleForExternal=function(){return!(!s||o)&&(o=!0)}},H5P.EventDispatcher=function(){function n(e,t){if(void 0!==r[e])for(var i=r[e].slice(),n=0;n<i.length;n++){var s=i[n],o=s.thisArg||this;s.listener.call(o,t)}}var s=this,r={};this.on=function(e,t,i){if("function"!=typeof t)throw TypeError("listener must be a function");s.trigger("newListener",{type:e,listener:t});t={listener:t,thisArg:i};r[e]?r[e].push(t):r[e]=[t]},this.once=function(e,t,i){if(!(t instanceof Function))throw TypeError("listener must be a function");var n=function(e){s.off(e.type,n),t.call(this,e)};s.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!==r[e])if(void 0===t)delete r[e],s.trigger("removeListener",e);else{for(var i=0;i<r[e].length;i++)if(r[e][i].listener===t){r[e].splice(i,1),s.trigger("removeListener",e,{listener:t});break}r[e].length||delete r[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),i=e.scheduleForExternal(),n.call(this,e.type,e),n.call(this,"*",e),e.getBubbles()&&s.parent instanceof H5P.EventDispatcher&&(s.parent.trigger instanceof Function||"function"==typeof s.parent.trigger)&&s.parent.trigger(e),i)&&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,s){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!==s&&(this.data.statement.result.success=s),i&&i.activityStartTime&&(e=Math.round((Date.now()-i.activityStartTime)/10)/100,this.data.statement.result.duration="PT"+e+"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,s){i=this.createXAPIEventTemplate(i);i.setScoredResult(e,t,this,n,s),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=(x=>{function e(i){x.call(this);var n=this,e=(H5P.ConfirmationDialog.uniqueId+=1,H5P.ConfirmationDialog.uniqueId);function t(e){n.hide(),n.trigger("canceled"),e.preventDefault()}function s(e,t){0===e?m.firstChild.focus():-1===e&&(i.hideExit?m.lastChild:o).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.closeText=i.closeText||H5P.t("close"),i.confirmText=i.confirmText||H5P.t("confirmLabel");var o,r,a,l,h=32,c=8,u=!1,d=document.createElement("div"),p=(d.classList.add("h5p-confirmation-dialog-background","hidden","hiding"),document.createElement("div")),f=(p.classList.add("h5p-confirmation-dialog-popup","hidden"),i.classes&&i.classes.forEach(function(e){p.classList.add(e)}),p.setAttribute("role","alertdialog"),p.setAttribute("aria-modal","true"),p.setAttribute("aria-labelledby","h5p-confirmation-dialog-header-text-"+e),p.setAttribute("aria-describedby","h5p-confirmation-dialog-text-"+e),d.appendChild(p),p.addEventListener("keydown",function(e){"Escape"===e.key&&t(e)}),document.createElement("div")),g=(f.classList.add("h5p-confirmation-dialog-header"),p.appendChild(f),document.createElement("div")),f=(g.classList.add("h5p-confirmation-dialog-header-text"),g.id="h5p-confirmation-dialog-dialog-header-text-"+e,g.innerHTML=i.headerText,f.appendChild(g),document.createElement("div")),g=(f.classList.add("h5p-confirmation-dialog-body"),p.appendChild(f),document.createElement("div")),m=(g.classList.add("h5p-confirmation-dialog-text"),g.innerHTML=i.dialogText,g.id="h5p-confirmation-dialog-dialog-text-"+e,f.appendChild(g),document.createElement("div")),g=(m.classList.add("h5p-confirmation-dialog-buttons"),f.appendChild(m),i.hideCancel?m.classList.add("center"):((e=document.createElement("button")).classList.add("h5p-core-cancel-button"),e.textContent=i.cancelText,e.addEventListener("click",t),m.appendChild(e)),document.createElement("button")),f=(g.classList.add("h5p-core-button"),g.classList.add("h5p-confirmation-dialog-confirm-button"),g.setAttribute("aria-label",i.confirmText),g.addEventListener("click",function(e){n.hide(),n.trigger("confirmed"),e.preventDefault()}),document.createElement("span")),v=(f.textContent=i.confirmText,g.appendChild(f),m.appendChild(g),i.hideExit?m.lastChild.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||s(0,e)}):((o=document.createElement("button")).classList.add("h5p-confirmation-dialog-exit"),o.setAttribute("aria-label",i.closeText),o.addEventListener("click",t),o.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||s(0,e)}),p.appendChild(o)),m.firstChild.addEventListener("keydown",e=>{"Tab"===e.key&&e.shiftKey&&s(-1,e)}),[]),b=[],y=(this.appendTo=function(e){return r=e,this},function(e){d.contains(e.target)||(e.preventDefault(),s(0))}),_=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].getAttribute("aria-live")?i[n].setAttribute("aria-busy",!0):i[n].setAttribute("aria-hidden",!0));return t},w=function(e,t){for(var i=e.parentNode.children,n=0;n<i.length;n+=1)i[n]===e||t[n]||(i[n].getAttribute("aria-live")?i[n].setAttribute("aria-busy",!1):i[n].removeAttribute("aria-hidden"))};this.show=function(e){var t;return l=document.activeElement,r.appendChild(d),(a=r.parentNode||r).addEventListener("focus",y,!0),d.classList.remove("hidden"),e=e,t=parseInt(p.style.top,10),(t=(t=(t=void 0!==e?e:t)||0)+p.offsetHeight>r.offsetHeight?r.offsetHeight-p.offsetHeight-c:t)-h<=0&&(t=h+c,u=!0),p.style.top=t+"px",p.classList.remove("hidden"),d.classList.remove("hiding"),s(0),v=_(r),b=_(d),u&&i.instance&&(e=parseInt(p.offsetHeight,10)+h+2*c,n.setViewPortMinimumHeight(e),i.instance.trigger("resize"),u=!1),this},this.hide=function(){return w(r,v),w(d,b),d.classList.add("hiding"),p.classList.add("hidden"),a.removeEventListener("focus",y,!0),i.skipRestoreFocus||l.focus(),d.classList.add("hidden"),r.removeChild(d),n.setViewPortMinimumHeight(null),this},this.getElement=function(){return p},this.getPreviouslyFocused=function(){return l},this.setViewPortMinimumHeight=function(e){(document.querySelector(".h5p-container")||document.body).style.minHeight="number"==typeof e?e+"px":e}}return(e.prototype=Object.create(x.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=(i=>{function e(e){i.call(this);function t(e,t){function i(){n.trigger(e)}t=H5P.jQuery("<li/>",{class:"h5p-button h5p-noselect h5p-"+(t||e),appendTo:o}),t=H5P.jQuery("<button/>",{tabindex:0,"aria-label":H5P.t(e+"Description"),html:H5P.t(e),on:{click:i,keypress:function(e){32===e.which&&(i(),e.preventDefault())}},appendTo:t}),H5P.Tooltip(t.get(0)),s=!0}var n=this,s=!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&&(e=H5P.jQuery('<li><a class="h5p-link" href="http://h5p.org" target="_blank" aria-label="'+H5P.t("h5pDescription")+'"></a></li>').appendTo(o),H5P.Tooltip(e.find(".h5p-link").get(0)),s=!0),n.getDOMElement=function(){return o},n.hasActions=function(){return s}}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=((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||[]).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(){var e;return!!window.localStorage&&((e=window.localStorage.getItem(this.itemName))?JSON.parse(e):[])},e.prototype.clearQueue=function(){return!!window.localStorage&&(window.localStorage.removeItem(this.itemName),!0)},e.prototype.resumeQueue=function(){var e,t;return!!(H5PIntegration&&window.navigator&&window.localStorage)&&!this.processingQueue&&(t=(e=this.getStoredRequests()).length,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)&&(t=H5P.jQuery.extend(!0,{},{position:{horizontal:"centered",vertical:"centered",noOverflowX:!0}},i),H5P.attachToastTo(H5P.jQuery(".h5p-content:first")[0],e,t))},e})(H5P.jQuery,H5P.EventDispatcher),H5P.OfflineRequestQueue=((b,y)=>function(e){let i=new b,t=(i.clearQueue(),null),n=[10,20,40,60,120,300,600],s=-1,o=null,r=!1,a=!1,l=!1;e=e.instance;let h=new y({headerText:H5P.t("offlineDialogHeader"),dialogText:H5P.t("offlineDialogBody"),confirmText:H5P.t("offlineDialogRetryButtonLabel"),hideCancel:!0,hideExit:!0,classes:["offline"],instance:e,skipRestoreFocus:!0});var e=h.getElement(),c=document.createElement("div");c.classList.add("count-down"),c.innerHTML=H5P.t("offlineDialogRetryMessage").replace(":num",'<span class="count-down-num">0</span>'),e.querySelector(".h5p-confirmation-dialog-text").appendChild(c);let u=c.querySelector(".count-down-num"),d=document.createElement("div");d.classList.add("throbber-wrapper");e=document.createElement("div");e.classList.add("sending-requests-throbber"),d.appendChild(e),i.on("requestQueued",function(e){if(!e.data||!e.data.processingQueue){if(!r){e=document.body.querySelector(".h5p-content");if(!e)return;h.appendTo(e),e.appendChild(d),r=!0}m()}}.bind(this)),i.on("queueEmptied",function(e){e.data&&e.data.length?m(!0):(clearInterval(o),p(!1),s=-1,a&&(h.hide(),a=!1),i.displayToastMessage(H5P.t("offlineSuccessfulSubmit"),!0,{position:{vertical:"top",offsetVertical:"100"}}))}.bind(this)),h.on("confirmed",function(){a=!1,setTimeout(function(){f()},100)}.bind(this)),window.addEventListener("online",function(){f()}.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));let p=function(e){l=!l,(l=void 0!==e?e:l)&&a&&(h.hide(),a=!1),l?d.classList.add("show"):d.classList.remove("show")},f=function(){clearInterval(o),p(!0),i.resumeQueue()},g=function(){(s+=1)>=n.length&&(s=n.length-1)},m=function(e){a||(p(!1),a||(e?setTimeout(function(){h.show(0)},100):h.show(0)),a=!0,t=(new Date).getTime(),g(),clearInterval(o),o=setInterval(v,100))},v=function(){var e=(new Date).getTime(),e=Math.floor((e-t)/1e3),e=n[s]-e;u.textContent=e.toString(),e<=0&&f()};this.add=function(e,t){if(window.navigator.onLine)return!1;i.add(e,t)}})(H5P.RequestQueue,H5P.ConfirmationDialog);var H5P,oldJQuery=((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){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""},H5P.Image})((H5P=H5P||{}).jQuery),jQuery),jQuery=H5P.jQuery;(e=>{"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(Y){Y.ui=Y.ui||{};Y.ui.version="1.13.0";var s,n,x,P,o,r,a,l,h,i,N=0,L=Array.prototype.hasOwnProperty,c=Array.prototype.slice;Y.cleanData=(s=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");s(e)}),Y.widget=function(e,i,t){var n,s,o,r={},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],s=Y[a][e]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t)},Y.extend(s,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 s(){return i.prototype[t].apply(this,arguments)}function o(e){return i.prototype[t].apply(this,e)}r[t]="function"!=typeof n?n:function(){var e,t=this._super,i=this._superApply;return this._super=s,this._superApply=o,e=n.apply(this,arguments),this._super=t,this._superApply=i,e}}),s.prototype=Y.widget.extend(o,{widgetEventPrefix:n&&o.widgetEventPrefix||e},r,{constructor:s,namespace:a,widgetName:e,widgetFullName:l}),n?(Y.each(n._childConstructors,function(e,t){var i=t.prototype;Y.widget(i.namespace+"."+i.widgetName,s,t._proto)}),delete n._childConstructors):i._childConstructors.push(s),Y.widget.bridge(e,s),s},Y.widget.extend=function(e){for(var t,i,n=c.call(arguments,1),s=0,o=n.length;s<o;s++)for(t in n[s])i=n[s][t],L.call(n[s],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 r=t.prototype.widgetFullName||o;Y.fn[o]=function(i){var e="string"==typeof i,n=c.call(arguments,1),s=this;return e?this.length||"instance"!==i?this.each(function(){var e,t=Y.data(this,r);return"instance"===i?(s=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?(s=e&&e.jquery?s.pushStack(e.get()):e,!1):void 0:Y.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):s=void 0:(n.length&&(i=Y.widget.extend.apply(null,[i].concat(n))),this.each(function(){var e=Y.data(this,r);e?(e.option(i||{}),e._init&&e._init()):Y.data(this,r,new t(i,this))})),s}},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=N++,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,s,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]),s=0;s<i.length-1;s++)n[i[s]]=n[i[s]]||{},n=n[i[s]];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(s){var o=[],r=this;function e(e,t){for(var i,n=0;n<e.length;n++)i=r.classesElementLookup[e[n]]||Y(),i=s.add?(s.element.each(function(e,t){Y.map(r.classesElementLookup,function(e){return e}).some(function(e){return e.is(t)})||r._on(Y(t),{remove:"_untrackClassesElement"})}),Y(Y.uniqueSort(i.get().concat(s.element.get())))):Y(i.not(s.element).get()),r.classesElementLookup[e[n]]=i,o.push(e[n]),t&&s.classes[e[n]]&&o.push(s.classes[e[n]])}return(s=Y.extend({element:this.element,classes:this.options.classes||{}},s)).keys&&e(s.keys.match(/\S+/g)||[],!0),s.extra&&e(s.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 s="string"==typeof e||null===e,t={extra:s?t:i,keys:s?e:t,element:s?this.element:e,add:n="boolean"==typeof n?n:i};return t.element.toggleClass(this._classes(t),n),this},_on:function(s,o,e){var r,a=this;"boolean"!=typeof s&&(e=o,o=s,s=!1),e?(o=r=Y(o),this.bindings=this.bindings.add(o)):(e=o,o=this.element,r=this.widget()),Y.each(e,function(e,t){function i(){if(s||!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 e=e.match(/^([\w:-]*)\s*(.*)$/),n=e[1]+a.eventNamespace,e=e[2];e?r.on(n,e,i):o.on(n,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,s,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],s=t.originalEvent)for(n in s)n in t||(t[n]=s[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,r){Y.Widget.prototype["_"+o]=function(t,e,i){var n,s=(e="string"==typeof e?{effect:e}:e)?!0!==e&&"number"!=typeof e&&e.effect||r: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[s]?t[o](e):s!==o&&t[s]?t[s](e.duration,e.easing,i):t.queue(function(e){Y(this)[o](),i&&i.call(t[0]),e()})}}),Y.widget;function C(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 k(e,t){return parseInt(Y.css(e,t),10)||0}function H(e){return null!=e&&e===e.window}x=Math.max,P=Math.abs,o=/left|center|right/,r=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,h=/%$/,i=Y.fn.position,Y.position={scrollbarWidth:function(){var e,t,i;return void 0!==n?n:(i=(t=Y("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],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=H(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(u){var d,p,f,g,m,v,b,y,_,w,e,t;return u&&u.of?(v="string"==typeof(u=Y.extend({},u)).of?Y(document).find(u.of):Y(u.of),b=Y.position.getWithinInfo(u.within),y=Y.position.getScrollInfo(b),_=(u.collision||"flip").split(" "),w={},t=9===(t=(e=v)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:H(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()},v[0].preventDefault&&(u.at="left top"),p=t.width,f=t.height,m=Y.extend({},g=t.offset),Y.each(["my","at"],function(){var e,t,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",e=a.exec(i[0]),t=a.exec(i[1]),w[this]=[e?e[0]:0,t?t[0]:0],u[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===_.length&&(_[1]=_[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=C(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,e,r=Y(this),a=r.outerWidth(),l=r.outerHeight(),t=k(this,"marginLeft"),n=k(this,"marginTop"),s=a+t+k(this,"marginRight")+y.width,o=l+n+k(this,"marginBottom")+y.height,h=Y.extend({},m),c=C(w.my,r.outerWidth(),r.outerHeight());"right"===u.my[0]?h.left-=a:"center"===u.my[0]&&(h.left-=a/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:t,marginTop:n},Y.each(["left","top"],function(e,t){Y.ui.position[_[e]]&&Y.ui.position[_[e]][t](h,{targetWidth:p,targetHeight:f,elemWidth:a,elemHeight:l,collisionPosition:i,collisionWidth:s,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:b,elem:r})}),u.using&&(e=function(e){var t=g.left-h.left,i=t+p-a,n=g.top-h.top,s=n+f-l,o={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:r,left:h.left,top:h.top,width:a,height:l},horizontal:i<0?"left":0<t?"right":"center",vertical:s<0?"top":0<n?"bottom":"middle"};p<a&&P(t+i)<p&&(o.horizontal="center"),f<l&&P(n+s)<f&&(o.vertical="middle"),x(P(t),P(i))>x(P(n),P(s))?o.important="horizontal":o.important="vertical",u.using.call(this,e,o)}),r.offset(Y.extend(h,{using:e}))})):i.apply(this,arguments)},Y.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,o=e.left-t.collisionPosition.marginLeft,r=s-o,a=o+t.collisionWidth-n-s;n<t.collisionWidth?0<r&&a<=0?(i=e.left+r+t.collisionWidth-n-s,e.left+=r-i):e.left=!(0<a&&r<=0)&&a<r?s+n-t.collisionWidth:s:0<r?e.left+=r:0<a?e.left-=a:e.left=x(e.left-o,e.left)},top:function(e,t){var i,n=t.within,n=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,r=n-o,a=o+t.collisionHeight-s-n;s<t.collisionHeight?0<r&&a<=0?(i=e.top+r+t.collisionHeight-s-n,e.top+=r-i):e.top=!(0<a&&r<=0)&&a<r?n+s-t.collisionHeight:n:0<r?e.top+=r: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,s=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,o=e.left-t.collisionPosition.marginLeft,r=o-i,o=o+t.collisionWidth-s-i,a="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,l="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];r<0?((s=e.left+a+l+h+t.collisionWidth-s-n)<0||s<P(r))&&(e.left+=a+l+h):0<o&&(0<(n=e.left-t.collisionPosition.marginLeft+a+l+h-i)||P(n)<o)&&(e.left+=a+l+h)},top:function(e,t){var i=t.within,n=i.offset.top+i.scrollTop,s=i.height,i=i.isWindow?i.scrollTop:i.offset.top,o=e.top-t.collisionPosition.marginTop,r=o-i,o=o+t.collisionHeight-s-i,a="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,l="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,h=-2*t.offset[1];r<0?((s=e.top+a+l+h+t.collisionHeight-s-n)<0||s<P(r))&&(e.top+=a+l+h):0<o&&(0<(n=e.top-t.collisionPosition.marginTop+a+l+h-i)||P(n)<o)&&(e.top+=a+l+h)}},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:(z="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(z+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var z,u=Y,d={},j=d.toString,F=/^([\-+])=\s*(\d+\.?\d*)/,R=[{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]]}}],p=u.Color=function(e,t,i,n){return new u.Color.fn.parse(e,t,i,n)},f={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"}}}},$={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},q=p.support={},e=u("<p>")[0],g=u.each;function m(e){return null==e?e+"":"object"==typeof e?d[j.call(e)]||"object":typeof e}function v(e,t,i){var n=$[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 W(n){var s=p(),o=s._rgba=[];return n=n.toLowerCase(),g(R,function(e,t){var i=t.re.exec(n),i=i&&t.parse(i),t=t.space||"rgba";if(i)return i=s[t](i),s[f[t].cache]=i[f[t].cache],o=s._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&u.extend(o,_.transparent),s):_[n]}function b(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}e.style.cssText="background-color:rgba(1,1,1,.5)",q.rgba=-1<e.style.backgroundColor.indexOf("rgba"),g(f,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),u.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),p.fn=u.extend(p.prototype,{parse:function(s,e,t,i){if(void 0===s)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=u(s).css(e),e=void 0);var o=this,n=m(s),r=this._rgba=[];return void 0!==e&&(s=[s,e,t,i],n="array"),"string"===n?this.parse(W(s)||_._default):"array"===n?(g(f.rgba.props,function(e,t){r[t.idx]=v(s[t.idx],t)}),this):"object"===n?(s instanceof p?g(f,function(e,t){s[t.cache]&&(o[t.cache]=s[t.cache].slice())}):g(f,function(e,i){var n=i.cache;g(i.props,function(e,t){if(!o[n]&&i.to){if("alpha"===e||null==s[e])return;o[n]=i.to(o._rgba)}o[n][t.idx]=v(s[e],t,!0)}),o[n]&&u.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 s=p(e),o=!0,r=this;return g(f,function(e,t){var i,n=s[t.cache];return n&&(i=r[t.cache]||t.to&&t.to(r._rgba)||[],g(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 g(f,function(e,t){n[t.cache]&&i.push(e)}),i.pop()},transition:function(e,r){var e=(h=p(e))._space(),t=f[e],i=0===this.alpha()?p("transparent"):this,a=i[t.cache]||t.to(i._rgba),l=a.slice(),h=h[t.cache];return g(t.props,function(e,t){var i=t.idx,n=a[i],s=h[i],o=$[t.type]||{};null!==s&&(null===n?l[i]=s:(o.mod&&(s-n>o.mod/2?n+=o.mod:n-s>o.mod/2&&(n-=o.mod)),l[i]=v((s-n)*r+n,t)))}),this[e](l)},blend:function(e){var t,i,n;return 1===this._rgba[3]?this:(t=this._rgba.slice(),i=t.pop(),n=p(e)._rgba,p(u.map(t,function(e,t){return(1-i)*n[t]+i*e})))},toRgbaString:function(){var e="rgba(",t=u.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=u.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)),"#"+u.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()}}),p.fn.parse.prototype=p.fn,f.hsla.to=function(e){var t,i,n,s,o,r,a,l;return null==e[0]||null==e[1]||null==e[2]?[null,null,null,e[3]]:(t=e[0]/255,i=e[1]/255,n=e[2]/255,e=e[3],s=(l=Math.max(t,i,n))-(a=Math.min(t,i,n)),r=.5*(o=l+a),a=a===l?0:t===l?60*(i-n)/s+360:i===l?60*(n-t)/s+120:60*(t-i)/s+240,l=0==s?0:r<=.5?s/o:s/(2-o),[Math.round(a)%360,l,r,null==e?1:e])},f.hsla.from=function(e){var t,i,n;return null==e[0]||null==e[1]||null==e[2]?[null,null,null,e[3]]:(t=e[0]/360,n=e[1],i=e[3],n=2*(e=e[2])-(e=e<=.5?e*(1+n):e+n-e*n),[Math.round(255*b(n,e,t+1/3)),Math.round(255*b(n,e,t)),Math.round(255*b(n,e,t-1/3)),i])},g(f,function(a,e){var t=e.props,o=e.cache,r=e.to,l=e.from;p.fn[a]=function(e){var i,n,s;return r&&!this[o]&&(this[o]=r(this._rgba)),void 0===e?this[o].slice():(i=m(e),n="array"===i||"object"===i?e:arguments,s=this[o].slice(),g(t,function(e,t){e=n["object"===i?e:t.idx];null==e&&(e=s[t.idx]),s[t.idx]=v(e,t)}),l?((e=p(l(s)))[o]=s,e):p(s))},g(t,function(o,r){p.fn[o]||(p.fn[o]=function(e){var t=m(e),i="alpha"===o?this._hsla?"hsla":"rgba":a,n=this[i](),s=n[r.idx];return"undefined"===t?s:("function"===t&&(t=m(e=e.call(this,s))),null==e&&r.empty?this:("string"===t&&(t=F.exec(e))&&(e=s+parseFloat(t[2])*("+"===t[1]?1:-1)),n[r.idx]=e,this[i](n)))})})}),p.hook=function(e){e=e.split(" ");g(e,function(e,o){u.cssHooks[o]={set:function(e,t){var i,n,s="";if("transparent"!==t&&("string"!==m(t)||(i=W(t)))){if(t=p(i||t),!q.rgba&&1!==t._rgba[3]){for(n="backgroundColor"===o?e.parentNode:e;(""===s||"transparent"===s)&&n&&n.style;)try{s=u.css(n,"backgroundColor"),n=n.parentNode}catch(e){}t=t.blend(s&&"transparent"!==s?s:"_default")}t=t.toRgbaString()}try{e.style[o]=t}catch(e){}}},u.fx.step[o]=function(e){e.colorInit||(e.start=p(e.elem,o),e.end=p(e.end),e.colorInit=!0),u.cssHooks[o].set(e.elem,e.start.transition(e.end,e.pos))}})},p.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(i){var n={};return g(["Top","Right","Bottom","Left"],function(e,t){n["border"+t+"Color"]=i}),n}};var B,U,V,Q,Z,X,K,G,J,y,_=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},w="ui-effects-",t="ui-effects-style",T="ui-effects-animated";function ee(e){var t,i,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,s={};if(n&&n.length&&n[0]&&n[n[0]])for(i=n.length;i--;)"string"==typeof n[t=n[i]]&&(s[t.replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]=n[t]);else for(t in n)"string"==typeof n[t]&&(s[t]=n[t]);return s}function D(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 I(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 te(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:{}},Q=["add","remove","toggle"],Z={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)&&(u.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(s,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:ee(this)}}),n=function(){Y.each(Q,function(e,t){s[t]&&i[t+"Class"](s[t])})};n(),t=t.map(function(){return this.end=ee(this.el[0]),this.diff=((e,t)=>{var i,n,s={};for(i in t)n=t[i],e[i]===n||Z[i]||!Y.fx.step[i]&&isNaN(parseFloat(n))||(s[i]=n);return s})(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:(V=Y.fn.addClass,function(e,t,i,n){return t?Y.effects.animateClass.call(this,{add:e},t,i,n):V.apply(this,arguments)}),removeClass:(U=Y.fn.removeClass,function(e,t,i,n){return 1<arguments.length?Y.effects.animateClass.call(this,{remove:e},t,i,n):U.apply(this,arguments)}),toggleClass:(B=Y.fn.toggleClass,function(e,t,i,n,s){return"boolean"==typeof t||void 0===t?i?Y.effects.animateClass.call(this,t?{add:e}:{remove:e},i,n,s):B.apply(this,arguments):Y.effects.animateClass.call(this,{toggle:e},t,i,n)}),switchClass:function(e,t,i,n,s){return Y.effects.animateClass.call(this,{add:t,remove:e},i,n,s)}}),Y.expr&&Y.expr.pseudos&&Y.expr.pseudos.animated&&(Y.expr.pseudos.animated=(X=Y.expr.pseudos.animated,function(e){return!!Y(e).data(T)||X(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(w+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,s=t.length;n<s;n++)null!==t[n]&&(i=e.data(w+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()},s=document.activeElement;try{s.id}catch(e){s=document.body}return i.wrap(e),i[0]!==s&&!Y.contains(i[0],s)||Y(s).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){var n;return 0===t?{height:0,width:0,outerHeight:0,outerWidth:0}:(n="horizontal"!==i?(t||100)/100:1,i="vertical"!==i?(t||100)/100:1,{height:e.height()*i,width:e.width()*n,outerHeight:e.outerHeight()*i,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(t,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(t)||"",e.removeData(t)},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=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.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(w+"placeholder",t)),e.css({position:i,left:n.left,top:n.top}),t},removePlaceholder:function(e){var t=w+"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,s,o){return o=o||{},Y.each(e,function(e,t){var i=n.cssUnit(t);0<i[0]&&(o[t]=i[0]*s+i[1])}),o}}),Y.fn.extend({effect:function(){function e(e){var t=Y(this),i=Y.effects.mode(t,a)||o;t.data(T,!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=D.apply(this,arguments),s=Y.effects.effect[n.effect],o=s.mode,t=n.queue,i=t||"fx",r=n.complete,a=n.mode,l=[];return Y.fx.off||!s?a?this[a](n.duration,r):this.each(function(){r&&r.call(this)}):!1===t?this.each(e).each(h):this.queue(i,e).queue(i,h);function h(e){var t=Y(this);function i(){"function"==typeof r&&r.call(t[0]),"function"==typeof e&&e()}n.mode=l.shift(),!1===Y.uiBackCompat||o?"none"===n.mode?(t[a](),i()):s.call(t[0],n,function(){t.removeData(T),Y.effects.cleanUp(t),"hide"===n.mode&&t.hide(),i()}):(t.is(":hidden")?"hide"===a:"show"===a)?(t[a](),i()):s.call(t[0],n,i)}},show:(J=Y.fn.show,function(e){return I(e)?J.apply(this,arguments):((e=D.apply(this,arguments)).mode="show",this.effect.call(this,e))}),hide:(G=Y.fn.hide,function(e){return I(e)?G.apply(this,arguments):((e=D.apply(this,arguments)).mode="hide",this.effect.call(this,e))}),toggle:(K=Y.fn.toggle,function(e){return I(e)||"boolean"==typeof e?K.apply(this,arguments):((e=D.apply(this,arguments)).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)"):te(this.css("clip"),this)},transfer:function(e,t){var i=Y(this),n=Y(e.to),s="fixed"===n.css("position"),o=Y("body"),r=s?o.scrollTop():0,o=s?o.scrollLeft():0,a=n.offset(),a={top:a.top-r,left:a.left-o,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-r,left:n.left-o,height:i.innerHeight(),width:i.innerWidth(),position:s?"fixed":"absolute"}).animate(a,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=te(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})},y={},Y.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){y[e]=function(e){return Math.pow(e,t+2)}}),Y.extend(y,{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(y,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<.5?t(2*e)/2:1-t(-2*e+2)/2}});e=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),s=e.direction||"up",o=n.cssClip(),r={clip:Y.extend({},o)},a=Y.effects.createPlaceholder(n);r.clip[i[s][0]]=r.clip[i[s][1]],"show"===e.mode&&(n.cssClip(r.clip),a&&a.css(Y.effects.clipToBox(r)),r.clip=o),a&&a.animate(Y.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),Y.effects.define("bounce",function(e,t){var i,n,s=Y(this),o=e.mode,r="hide"===o,o="show"===o,a=e.direction||"up",l=e.distance,h=e.times||5,c=2*h+(o||r?1:0),u=e.duration/c,d=e.easing,p="up"===a||"down"===a?"top":"left",f="up"===a||"left"===a,g=0,e=s.queue().length;for(Y.effects.createPlaceholder(s),a=s.css(p),l=l||s["top"==p?"outerHeight":"outerWidth"]()/3,o&&((n={opacity:1})[p]=a,s.css("opacity",0).css(p,f?2*-l:2*l).animate(n,u,d)),r&&(l/=Math.pow(2,h-1)),(n={})[p]=a;g<h;g++)(i={})[p]=(f?"-=":"+=")+l,s.animate(i,u,d).animate(n,u,d),l=r?2*l:l/2;r&&((i={opacity:0})[p]=(f?"-=":"+=")+l,s.animate(i,u,d)),s.queue(t),Y.effects.unshift(s,e,1+c)}),Y.effects.define("clip","hide",function(e,t){var i={},n=Y(this),s=e.direction||"vertical",o="both"===s,r=o||"horizontal"===s,o=o||"vertical"===s,s=n.cssClip();i.clip={top:o?(s.bottom-s.top)/2:s.top,right:r?(s.right-s.left)/2:s.right,bottom:o?(s.bottom-s.top)/2:s.bottom,left:r?(s.right-s.left)/2:s.left},Y.effects.createPlaceholder(n),"show"===e.mode&&(n.cssClip(i.clip),i.clip=s),n.animate(i,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),Y.effects.define("drop","hide",function(e,t){var i,n=Y(this),s="show"===e.mode,o=e.direction||"left",r="up"===o||"down"===o?"top":"left",o="up"===o||"left"===o?"-=":"+=",a="+="==o?"-=":"+=",l={opacity:0};Y.effects.createPlaceholder(n),i=e.distance||n["top"==r?"outerHeight":"outerWidth"](!0)/2,l[r]=o+i,s&&(n.css(l),l[r]=a+i,l.opacity=1),n.animate(l,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),Y.effects.define("explode","hide",function(e,t){var i,n,s,o,r,a,l=e.pieces?Math.round(Math.sqrt(e.pieces)):3,h=l,c=Y(this),u="show"===e.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.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<h;n++)s=d.left+n*p,r=n-(h-1)/2,c.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:s+(u?r*p:0),top:o+(u?a*f:0),opacity:u?0:1}).animate({left:s+(u?0:r*p),top:o+(u?0:a*f),opacity:u?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,s="show"===n,n="hide"===n,o=t.size||15,r=/([0-9]+)%/.exec(o),a=!!t.horizFirst?["right","bottom"]:["bottom","right"],l=t.duration/2,h=Y.effects.createPlaceholder(i),c=i.cssClip(),u={clip:Y.extend({},c)},d={clip:Y.extend({},c)},p=[c[a[0]],c[a[1]]],f=i.queue().length;r&&(o=parseInt(r[1],10)/100*p[n?0:1]),u.clip[a[0]]=o,d.clip[a[0]]=o,d.clip[a[1]]=0,s&&(i.cssClip(d.clip),h&&h.css(Y.effects.clipToBox(d)),d.clip=c),i.queue(function(e){h&&h.animate(Y.effects.clipToBox(u),l,t.easing).animate(Y.effects.clipToBox(d),l,t.easing),e()}).animate(u,l,t.easing).animate(d,l,t.easing).queue(e),Y.effects.unshift(i,f,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 s,i=Y(this),e=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],r=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],a=n.mode,l="effect"!==a,h=n.scale||"both",c=n.origin||["middle","center"],u=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),s={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(s.from.y!==s.to.y&&(f=Y.effects.setTransition(i,o,s.from.y,f),g=Y.effects.setTransition(i,o,s.to.y,g)),s.from.x!==s.to.x&&(f=Y.effects.setTransition(i,r,s.from.x,f),g=Y.effects.setTransition(i,r,s.to.x,g))),"content"!==h&&"both"!==h||s.from.y!==s.to.y&&(f=Y.effects.setTransition(i,e,s.from.y,f),g=Y.effects.setTransition(i,e,s.to.y,g)),c&&(a=Y.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*a.y+d.top,f.left=(p.outerWidth-f.outerWidth)*a.x+d.left,g.top=(p.outerHeight-g.outerHeight)*a.y+d.top,g.left=(p.outerWidth-g.outerWidth)*a.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(e),r=r.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var e=Y(this),t=Y.effects.scaledDimensions(e),i={height:t.height*s.from.y,width:t.width*s.from.x,outerHeight:t.outerHeight*s.from.y,outerWidth:t.outerWidth*s.from.x},t={height:t.height*s.to.y,width:t.width*s.to.x,outerHeight:t.height*s.to.y,outerWidth:t.width*s.to.x};s.from.y!==s.to.y&&(i=Y.effects.setTransition(e,o,s.from.y,i),t=Y.effects.setTransition(e,o,s.to.y,t)),s.from.x!==s.to.x&&(i=Y.effects.setTransition(e,r,s.from.x,i),t=Y.effects.setTransition(e,r,s.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"===u?"relative":u).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),i=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&&(i.from.opacity=1,i.to.opacity=0),Y.effects.effect.size.call(this,i,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,s="show"===n,o=2*(e.times||5)+(s||"hide"===n?1:0),r=e.duration/o,a=0,l=1,n=i.queue().length;for(!s&&i.is(":visible")||(i.css("opacity",0).show(),a=1);l<o;l++)i.animate({opacity:a},r,e.easing),a=1-a;i.animate({opacity:a},r,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),s=e.direction||"left",o=e.distance||20,r=e.times||3,a=2*r+1,l=Math.round(e.duration/a),h="up"===s||"down"===s?"top":"left",s="up"===s||"left"===s,c={},u={},d={},p=n.queue().length;for(Y.effects.createPlaceholder(n),c[h]=(s?"-=":"+=")+o,u[h]=(s?"+=":"-=")+2*o,d[h]=(s?"-=":"+=")+2*o,n.animate(c,l,e.easing);i<r;i++)n.animate(u,l,e.easing).animate(d,l,e.easing);n.animate(u,l,e.easing).animate(c,l/2,e.easing).queue(t),Y.effects.unshift(n,p,1+a)}),Y.effects.define("slide","show",function(e,t){var i,n,s=Y(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",h="up"===a||"left"===a,c=e.distance||s["top"==l?"outerHeight":"outerWidth"](!0),u={};Y.effects.createPlaceholder(s),i=s.cssClip(),n=s.position()[l],u[l]=(h?-1:1)*c+n,u.clip=s.cssClip(),u.clip[o[a][1]]=u.clip[o[a][0]],"show"===r&&(s.cssClip(u.clip),s.css(l,u[l]),u.clip=i,u[l]=n),s.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),e=!1!==Y.uiBackCompat?Y.effects.define("transfer",function(e,t){Y(this).transfer(e,t)}):e;Y.ui.focusable=function(e,t){var i,n,s,o=e.nodeName.toLowerCase();return"area"===o?(s=(i=e.parentNode).name,!(!e.href||!s||"map"!==i.nodeName.toLowerCase())&&0<(i=Y("img[usemap='#"+s+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(o)?(n=!e.disabled)&&(s=Y(e).closest("fieldset")[0])&&(n=!s.disabled):n="a"===o&&e.href||t,n&&Y(e).is(":visible")&&(e=>{for(var t=e.css("visibility");"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"))}});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||(ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ne=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(ie,ne)}),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})}}),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:(se=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++se)})}),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?this._activate(t):("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())},_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),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(n+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(n-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(Y(e.target).attr("tabIndex",-1),Y(s).attr("tabIndex",0),Y(s).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),s=n[0]===i[0],o=s&&t.collapsible,r=o?Y():n.next(),a=i.next(),a={oldHeader:i,oldPanel:a,newHeader:o?Y():n,newPanel:r};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,a)||(t.active=!o&&this.headers.index(n),this.active=s?Y():n,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),t.icons&&(r=i.children(".ui-accordion-header-icon"),this._removeClass(r,null,t.icons.activeHeader)._addClass(r,null,t.icons.header)),s)||(this._removeClass(n,"ui-accordion-header-collapsed")._addClass(n,"ui-accordion-header-active","ui-state-active"),t.icons&&(e=n.children(".ui-accordion-header-icon"),this._removeClass(e,null,t.icons.header)._addClass(e,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(){o._toggleComplete(t)}var s,o=this,r=0,a=e.css("box-sizing"),l=e.length&&(!i.length||e.index()<i.index()),h=this.options.animate||{},l=l&&h.down||h,c=(c="string"==typeof l?l:c)||l.easing||h.easing,u=(u="number"==typeof l?l:u)||l.duration||h.duration;return i.length?e.length?(s=e.show().outerHeight(),i.animate(this.hideProps,{duration:u,easing:c,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:u,easing:c,complete:n,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===a&&(r+=t.now):"content"!==o.options.heightStyle&&(t.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,u,c,n):e.animate(this.showProps,u,c,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?i:t.body},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,s=!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=s=!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}s&&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,s=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=Y(this),t=e.prev(),i=Y("<span>").data("ui-menu-submenu-caret",!0);n._addClass(i,"ui-menu-icon","ui-icon "+s),t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(e,"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")}),t=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(t,"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()&&(t=parseFloat(Y.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(Y.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-t-i,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,s,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=s=i=!0;else{n=s=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)i=!1,this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault();else 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){s?(s=!1,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;this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent)&&/^mouse/.test(e.originalEvent.type)?(this.menu.blur(),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),(t=t.item.attr("aria-label")||i.value)&&String.prototype.trim.call(t).length&&(this.liveRegion.children().hide(),Y("<div>").text(t).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]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_initSource:function(){var i,n,s=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){s.xhr&&s.xhr.abort(),s.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){this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur()):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){var t;return!!e.length&&("inherit"===(t=e.prop("contentEditable"))?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 ie,ne,se,oe,S,re=/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,r=[];Y.each(this.options.items,function(n,e){var t,s={};e&&("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"),r=r.concat(t.get())):Y.fn[n]&&(s=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({},s);"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")),r.push(i[0]))})))}),this.childWidgets=Y(Y.uniqueSort(r)),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 s={};return Y.each(i,function(e){var t=n.options.classes[e]||"",t=String.prototype.trim.call(t.replace(re,""));s[e]=(t+" "+i[e]).replace(/\s+/g," ")}),s},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"===e?this._callChildMethod(t?"disable":"enable"):this.refresh()},refresh:function(){var s,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),s=this.childWidgets,(s=this.options.onlyVisible?s.filter(":visible"):s).length&&(Y.each(["first","last"],function(e,t){var i,n=s[t]().data("ui-controlgroup-data");n&&o["_"+n.widgetName+"Options"]?((i=o["_"+n.widgetName+"Options"](1===s.length?"only":t)).classes=o._resolveClassesValues(i.classes,n),n.element[n.widgetName](i)):o._updateCornerClass(s[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){"label"===e&&!t||(this._super(e,t),"disabled"===e?(this._toggleClass(this.label,null,"ui-state-disabled",t),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})}}]),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 e="iconPosition"!==e,i=e?this.options.iconPosition:t,n="top"===i||"bottom"===i;this.icon?e&&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")),e&&this._addClass(this.icon,null,t),this._attachIcon(i),n?(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(i))},_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?this._super("showLabel",t):("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))}}),Y.fn.button=(oe=Y.fn.button,function(i){var e="string"==typeof i,n=Array.prototype.slice.call(arguments,1),s=this;return e?this.length||"instance"!==i?this.each(function(){var e,t=Y(this).attr("type"),t=Y.data(this,"ui-"+("checkbox"!==t&&"radio"!==t?"button":"checkboxradio"));return"instance"===i?(s=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?(s=e&&e.jquery?s.pushStack(e.get()):e,!1):void 0:Y.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):s=void 0:(n.length&&(i=Y.widget.extend.apply(null,[i].concat(n))),this.each(function(){var e=Y(this).attr("type"),e="checkbox"!==e&&"radio"!==e?"button":"checkboxradio",t=Y.data(this,"ui-"+e);t?(t.option(i||{}),t._init&&t._init()):"button"==e?oe.call(Y(this),i):Y(this).checkboxradio(Y.extend({icon:!1},i))})),s}),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))}),Y.ui.button;function ae(){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=le(Y("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function le(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,he)}function he(){Y.datepicker._isDisabledDatepicker((S.inline?S.dpDiv.parent():S.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 E(e,t){for(var i in Y.extend(e,t),t)null==t[i]&&(e[i]=t[i])}Y.extend(Y.ui,{datepicker:{version:"1.13.0"}}),Y.extend(ae.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return E(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var i,n=e.nodeName.toLowerCase(),s="div"===n||"span"===n;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(Y(e),s)).settings=Y.extend({},t||{}),"input"===n?this._connectDatepicker(e,i):s&&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?le(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"),s=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=Y("<span>").addClass(this._appendClass).text(n),e[s?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(n=this._get(t,"showOn"))&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(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[s?"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,s,o,r;this._get(e,"autoSize")&&!e.inline&&(o=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(o.setMonth((t=function(e){for(s=n=i=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n})(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(t(this._get(e,r.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,s){var o,r=this._dialogInst;return r||(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),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},Y.data(this._dialogInput[0],"datepicker",r)),E(r.settings,n||{}),t=t&&t.constructor===Date?this._formatDate(r,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(o=document.documentElement.clientWidth,n=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+t,n/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.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",r),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(),S===n)&&(S=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||((n=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.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||((n=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.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)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,s,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(),t=this._getDateDatepicker(e,!0),i=this._getMinMaxDate(o,"min"),s=this._getMinMaxDate(o,"max"),E(o.settings,n),null!==i&&void 0!==n.dateFormat&&void 0===n.minDate&&(o.settings.minDate=this._formatDate(o,i)),null!==s&&void 0!==n.dateFormat&&void 0===n.maxDate&&(o.settings.maxDate=this._formatDate(o,s)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(Y(e),o),this._autoSize(o),this._setDate(o,t),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),s=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,Y.datepicker._datepickerShowing)switch(e.keyCode){case 9:Y.datepicker._hideDatepicker(),s=!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]),(i=Y.datepicker._get(n,"onSelect"))?(t=Y.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[t,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),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&Y.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&Y.datepicker._adjustDate(e.target,o?1:-1,"D"),s=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"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&Y.datepicker._adjustDate(e.target,o?-1:1,"D"),s=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"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?Y.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,i=Y.datepicker._getInst(e.target);if(Y.datepicker._get(i,"constrainInput"))return i=Y.datepicker._possibleChars(Y.datepicker._get(i,"dateFormat")),t=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||t<" "||!i||-1<i.indexOf(t)},_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,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=Y("input",e.parentNode)[0]),Y.datepicker._isDisabledDatepicker(e)||Y.datepicker._lastInput===e||(s=Y.datepicker._getInst(e),Y.datepicker._curInst&&Y.datepicker._curInst!==s&&(Y.datepicker._curInst.dpDiv.stop(!0,!0),s)&&Y.datepicker._datepickerShowing&&Y.datepicker._hideDatepicker(Y.datepicker._curInst.input[0]),!1===(i=(i=Y.datepicker._get(s,"beforeShow"))?i.apply(e,[e,s]):{}))||(E(s.settings,i),s.lastVal=null,Y.datepicker._lastInput=e,Y.datepicker._setDateFromField(s),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"))}),i={left:Y.datepicker._pos[0],top:Y.datepicker._pos[1]},Y.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),Y.datepicker._updateDatepicker(s),i=Y.datepicker._checkOffset(s,i,t),s.dpDiv.css({position:Y.datepicker._inDialog&&Y.blockUI?"static":t?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"}),s.inline)||(i=Y.datepicker._get(s,"showAnim"),n=Y.datepicker._get(s,"duration"),s.dpDiv.css("z-index",(e=>{for(var t;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(t=parseInt(e.css("zIndex"),10),!isNaN(t))&&0!==t)return t;e=e.parent()}return 0})(Y(e))+1),Y.datepicker._datepickerShowing=!0,Y.effects&&Y.effects.effect[i]?s.dpDiv.show(i,Y.datepicker._get(s,"showOptions"),n):s.dpDiv[i||"show"](i?n:null),Y.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),Y.datepicker._curInst=s)},_updateDatepicker:function(e){this.maxRows=4,(S=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,i=this._getNumberOfMonths(e),n=i[1],s=e.dpDiv.find("."+this._dayOverClass+" a"),o=Y.datepicker._get(e,"onUpdateDatepicker");0<s.length&&he.apply(s.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(),s=e.dpDiv.outerHeight(),o=e.input?e.input.outerWidth():0,r=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+r?Y(document).scrollTop():0,t.left-=Math.min(t.left,a<t.left+n&&n<a?Math.abs(t.left+n-a):0),t.top-=Math.min(t.top,l<t.top+s&&s<l?Math.abs(s+r):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&&(e=this._get(n,"showAnim"),i=this._get(n,"duration"),t=function(){Y.datepicker._tidyDialog(n)},Y.effects&&(Y.effects.effect[e]||Y.effects[e])?n.dpDiv.hide(e,Y.datepicker._get(n,"showOptions"),i,t):n.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(i=this._get(n,"onClose"))&&i.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&&(e=Y(e.target),t=Y.datepicker._getInst(e[0]),!(e[0].id===Y.datepicker._mainDivId||0!==e.parents("#"+Y.datepicker._mainDivId).length||e.hasClass(Y.datepicker.markerClassName)||e.closest("."+Y.datepicker._triggerClass).length||!Y.datepicker._datepickerShowing||Y.datepicker._inDialog&&Y.blockUI)||e.hasClass(Y.datepicker.markerClassName)&&Y.datepicker._curInst!==t)&&Y.datepicker._hideDatepicker()},_adjustDate:function(e,t,i){var e=Y(e),n=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(n,t,i),this._updateDatepicker(n))},_gotoToday:function(e){var t,e=Y(e),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(e,t,i){var e=Y(e),n=this._getInst(e[0]);n["selected"+("M"===i?"Month":"Year")]=n["draw"+("M"===i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(e)},_selectDay:function(e,t,i,n){var s=Y(e);Y(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=parseInt(Y("a",n).attr("data-date")),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=i,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=Y(e);this._selectDate(e,"")},_selectDate:function(e,t){var i,e=Y(e),e=this._getInst(e[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&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),t=this._getDate(e),i=this.formatDate(i,t,this._getFormatConfig(e)),Y(document).find(n).val(i))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t,e=new Date(e.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;for(var i,n,o=0,r=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10),a=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,l=(e?e.dayNames:null)||this._defaults.dayNames,h=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,c=(e?e.monthNames:null)||this._defaults.monthNames,u=-1,d=-1,p=-1,f=-1,g=!1,m=function(e){e=_+1<t.length&&t.charAt(_+1)===e;return e&&_++,e},v=function(e){var t=m(e),t="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,e=new RegExp("^\\d{"+("y"===e?t:1)+","+t+"}"),t=s.substring(o).match(e);if(t)return o+=t[0].length,parseInt(t[0],10);throw"Missing number at position "+o},b=function(e,t,i){var n=-1,e=Y.map(m(e)?i:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(Y.each(e,function(e,t){var i=t[1];if(s.substr(o,i.length).toLowerCase()===i.toLowerCase())return n=t[0],o+=i.length,!1}),-1!==n)return n+1;throw"Unknown name at position "+o},y=function(){if(s.charAt(o)!==t.charAt(_))throw"Unexpected literal at position "+o;o++},_=0;_<t.length;_++)if(g)"'"!==t.charAt(_)||m("'")?y():g=!1;else switch(t.charAt(_)){case"d":p=v("d");break;case"D":b("D",a,l);break;case"o":f=v("o");break;case"m":d=v("m");break;case"M":d=b("M",h,c);break;case"y":u=v("y");break;case"@":u=(n=new Date(v("@"))).getFullYear(),d=n.getMonth()+1,p=n.getDate();break;case"!":u=(n=new Date((v("!")-this._ticksTo1970)/1e4)).getFullYear(),d=n.getMonth()+1,p=n.getDate();break;case"'":m("'")?y():g=!0;break;default:y()}if(o<s.length&&(e=s.substr(o),!/^\s+/.test(e)))throw"Extra/unparsed characters found in date: "+e;if(-1===u?u=(new Date).getFullYear():u<100&&(u+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u<=r?0:-100)),-1<f)for(d=1,p=f;;){if(p<=(i=this._getDaysInMonth(u,d-1)))break;d++,p-=i}if((n=this._daylightSavingAdjust(new Date(u,d-1,p))).getFullYear()!==u||n.getMonth()+1!==d||n.getDate()!==p)throw"Invalid date";return n},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(c(e))for(;n.length<i;)n="0"+n;return n}function s(e,t,i,n){return(c(e)?n:i)[t]}var o,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(e){e=o+1<t.length&&t.charAt(o+1)===e;return e&&o++,e},u="",d=!1;if(e)for(o=0;o<t.length;o++)if(d)"'"!==t.charAt(o)||c("'")?u+=t.charAt(o):d=!1;else switch(t.charAt(o)){case"d":u+=n("d",e.getDate(),2);break;case"D":u+=s("D",e.getDay(),r,a);break;case"o":u+=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":u+=n("m",e.getMonth()+1,2);break;case"M":u+=s("M",e.getMonth(),l,h);break;case"y":u+=c("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=t.charAt(o)}return u},_possibleChars:function(t){for(var e="",i=!1,n=function(e){e=s+1<t.length&&t.charAt(s+1)===e;return e&&s++,e},s=0;s<t.length;s++)if(i)"'"!==t.charAt(s)||n("'")?e+=t.charAt(s):i=!1;else switch(t.charAt(s)){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(s)}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,s=this._getDefaultDate(e),o=s,r=this._getFormatConfig(e);try{o=this.parseDate(i,n,r)||s}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=null==e||""===e?t:"string"==typeof e?(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(),s=t.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=o.exec(e);r;){switch(r[2]||"d"){case"d":case"D":s+=parseInt(r[1],10);break;case"w":case"W":s+=7*parseInt(r[1],10);break;case"m":case"M":n+=parseInt(r[1],10),s=Math.min(s,Y.datepicker._getDaysInMonth(i,n));break;case"y":case"Y":i+=parseInt(r[1],10),s=Math.min(s,Y.datepicker._getDaysInMonth(i,n))}r=o.exec(e)}return new Date(i,n,s)})(e):"number"==typeof e?isNaN(e)?t:(n=e,(i=new Date).setDate(i.getDate()+n),i):new Date(e.getTime());return(n=n&&"Invalid Date"===n.toString()?t:n)&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=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(),s===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,s,o,L,z,j,F,r,a,R,l,h,c,u,d,p,f,g,m,v,$,b,y,q,_,W,B,w,x,P,C=new Date,U=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth(),C.getDate())),k=this._get(e,"isRTL"),C=this._get(e,"showButtonPanel"),H=this._get(e,"hideIfNoPrevNext"),T=this._get(e,"navigationAsDateFormat"),D=this._getNumberOfMonths(e),I=this._get(e,"showCurrentAtPos"),S=this._get(e,"stepMonths"),V=1!==D[0]||1!==D[1],E=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),A=this._getMinMaxDate(e,"min"),M=this._getMinMaxDate(e,"max"),O=e.drawMonth-I,N=e.drawYear;if(O<0&&(O+=12,N--),M)for(t=this._daylightSavingAdjust(new Date(M.getFullYear(),M.getMonth()-D[0]*D[1]+1,M.getDate())),t=A&&t<A?A:t;this._daylightSavingAdjust(new Date(N,O,1))>t;)--O<0&&(O=11,N--);for(e.drawMonth=O,e.drawYear=N,I=this._get(e,"prevText"),I=T?this.formatDate(I,this._daylightSavingAdjust(new Date(N,O-S,1)),this._getFormatConfig(e)):I,i=this._canAdjustMonth(e,-1,N,O)?Y("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:I}).append(Y("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(k?"e":"w")).text(I))[0].outerHTML:H?"":Y("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:I}).append(Y("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(k?"e":"w")).text(I))[0].outerHTML,I=this._get(e,"nextText"),I=T?this.formatDate(I,this._daylightSavingAdjust(new Date(N,O+S,1)),this._getFormatConfig(e)):I,n=this._canAdjustMonth(e,1,N,O)?Y("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:I}).append(Y("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(k?"w":"e")).text(I))[0].outerHTML:H?"":Y("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:I}).append(Y("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(k?"w":"e")).text(I))[0].outerHTML,S=this._get(e,"currentText"),H=this._get(e,"gotoCurrent")&&e.currentDay?E:U,S=T?this.formatDate(S,H,this._getFormatConfig(e)):S,I="",e.inline||(I=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),T="",C&&(T=Y("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(k?I:"").append(this._isInRange(e,H)?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(S):"").append(k?"":I)[0].outerHTML),s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,o=this._get(e,"showWeek"),L=this._get(e,"dayNames"),z=this._get(e,"dayNamesMin"),j=this._get(e,"monthNames"),F=this._get(e,"monthNamesShort"),r=this._get(e,"beforeShowDay"),a=this._get(e,"showOtherMonths"),R=this._get(e,"selectOtherMonths"),l=this._getDefaultDate(e),h="",u=0;u<D[0];u++){for(d="",this.maxRows=4,p=0;p<D[1];p++){if(f=this._daylightSavingAdjust(new Date(N,O,e.selectedDay)),g=" ui-corner-all",m="",V){if(m+="<div class='ui-datepicker-group",1<D[1])switch(p){case 0:m+=" ui-datepicker-group-first",g=" ui-corner-"+(k?"right":"left");break;case D[1]-1:m+=" ui-datepicker-group-last",g=" ui-corner-"+(k?"left":"right");break;default:m+=" ui-datepicker-group-middle",g=""}m+="'>"}for(m+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+g+"'>"+(/all|left/.test(g)&&0===u?k?n:i:"")+(/all|right/.test(g)&&0===u?k?i:n:"")+this._generateMonthYearHeader(e,O,N,A,M,0<u||0<p,j,F)+"</div><table class='ui-datepicker-calendar'><thead><tr>",v=o?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",c=0;c<7;c++)v+="<th scope='col'"+(5<=(c+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+L[$=(c+s)%7]+"'>"+z[$]+"</span></th>";for(m+=v+"</tr></thead><tbody>",y=this._getDaysInMonth(N,O),N===e.selectedYear&&O===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,y)),b=(this._getFirstDayOfMonth(N,O)-s+7)%7,y=Math.ceil((b+y)/7),q=V&&this.maxRows>y?this.maxRows:y,this.maxRows=q,_=this._daylightSavingAdjust(new Date(N,O,1-b)),W=0;W<q;W++){for(m+="<tr>",B=o?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(_)+"</td>":"",c=0;c<7;c++)w=r?r.apply(e.input?e.input[0]:null,[_]):[!0,""],P=(x=_.getMonth()!==O)&&!R||!w[0]||A&&_<A||M&&M<_,B+="<td class='"+(5<=(c+s+6)%7?" ui-datepicker-week-end":"")+(x?" ui-datepicker-other-month":"")+(_.getTime()===f.getTime()&&O===e.selectedMonth&&e._keyEvent||l.getTime()===_.getTime()&&l.getTime()===f.getTime()?" "+this._dayOverClass:"")+(P?" "+this._unselectableClass+" ui-state-disabled":"")+(x&&!a?"":" "+w[1]+(_.getTime()===E.getTime()?" "+this._currentClass:"")+(_.getTime()===U.getTime()?" ui-datepicker-today":""))+"'"+(x&&!a||!w[2]?"":" title='"+w[2].replace(/'/g,"&#39;")+"'")+(P?"":" data-handler='selectDay' data-event='click' data-month='"+_.getMonth()+"' data-year='"+_.getFullYear()+"'")+">"+(x&&!a?"&#xa0;":P?"<span class='ui-state-default'>"+_.getDate()+"</span>":"<a class='ui-state-default"+(_.getTime()===U.getTime()?" ui-state-highlight":"")+(_.getTime()===E.getTime()?" ui-state-active":"")+(x?" ui-priority-secondary":"")+"' href='#' aria-current='"+(_.getTime()===E.getTime()?"true":"false")+"' data-date='"+_.getDate()+"'>"+_.getDate()+"</a>")+"</td>",_.setDate(_.getDate()+1),_=this._daylightSavingAdjust(_);m+=B+"</tr>"}11<++O&&(O=0,N++),d+=m+="</tbody></table>"+(V?"</div>"+(0<D[0]&&p===D[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}h+=d}return h+=T,e._keyEvent=!1,h},_generateMonthYearHeader:function(e,t,i,n,s,o,r,a){var l,h,c,u,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'>"+r[t]+"</span>";else{for(l=n&&n.getFullYear()===i,h=s&&s.getFullYear()===i,_+="<select class='ui-datepicker-month' aria-label='"+v+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!h||c<=s.getMonth())&&(_+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+a[c]+"</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(r=this._get(e,"yearRange").split(":"),u=(new Date).getFullYear(),d=(v=function(e){e=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?u+parseInt(e,10):parseInt(e,10);return isNaN(e)?u:e})(r[0]),p=Math.max(d,v(r[1]||"")),d=n?Math.max(d,n.getFullYear()):d,p=s?Math.min(p,s.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),s=e.selectedMonth+("M"===i?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),n=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,t)));e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),i=i&&t<i?i:t;return e&&e<i?e:i},_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 s=this._getNumberOfMonths(e),i=this._daylightSavingAdjust(new Date(i,n+(t<0?t:s[0]*s[1]),1));return t<0&&i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth())),this._isInRange(e,i)},_isInRange:function(e,t){var i,n=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),o=null,r=null,e=this._get(e,"yearRange");return e&&(e=e.split(":"),i=(new Date).getFullYear(),o=parseInt(e[0],10),r=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(o+=i),e[1].match(/[+\-].*/))&&(r+=i),(!n||t.getTime()>=n.getTime())&&(!s||t.getTime()<=s.getTime())&&(!o||t.getFullYear()>=o)&&(!r||t.getFullYear()<=r)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:"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);n=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"),n,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 ae,Y.datepicker.initialized=!1,Y.datepicker.uuid=(new Date).getTime(),Y.datepicker.version="1.13.0";Y.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var A=!1;Y(document).on("mouseup",function(){A=!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){var t,i,n;if(!A)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,n=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&Y(e.target).closest(this.options.cancel).length,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===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(),A=!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,A=!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,s=Y.ui[e].prototype;for(n in i)s.plugins[n]=s.plugins[n]||[],s.plugins[n].push([t,i[n]])},call:function(e,t,i,n){var s,o=e.plugins[t];if(o&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)e.options[o[s][0]]&&o[s][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(){var e,t;return"relative"!==this.cssPosition?{top:0,left:0}:(e=this.element.position(),t=this._isRootNode(this.scrollParent[0]),{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=this.options,i=this.document[0];this.relativeContainer=null,t.containment?"window"===t.containment?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()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===t.containment?this.containment=[0,0,Y(i).width()-this.helperProportions.width-this.margins.left,(Y(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:t.containment.constructor===Array?this.containment=t.containment:("parent"===t.containment&&(t.containment=this.helper[0].parentNode),(t=(i=Y(t.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=null},_convertPositionTo:function(e,t){t=t||this.position;var e="absolute"===e?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*e+this.offset.parent.top*e-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*e,left:t.left+this.offset.relative.left*e+this.offset.parent.left*e-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*e}},_generatePosition:function(e,t){var i,n=this.options,s=this._isRootNode(this.scrollParent[0]),o=e.pageX,r=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(r=t&&(this.containment&&(i=this.relativeContainer?(t=this.relativeContainer.offset(),[this.containment[0]+t.left,this.containment[1]+t.top,this.containment[2]+t.left,this.containment[3]+t.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]&&(r=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])&&(r=i[3]+this.offset.click.top),n.grid&&(t=n.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY,r=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-n.grid[1]:t+n.grid[1],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)?this.originalPageY:r)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?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:s?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,s){Y.each(s.sortables,function(){var e=!1,t=this;t.positionAbs=s.positionAbs,t.helperProportions=s.helperProportions,t.offset.click=s.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,Y.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.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,s._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=s.offset.click.top,t.offset.click.left=s.offset.click.left,t.offset.parent.left-=s.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=s.offset.parent.top-t.offset.parent.top,s._trigger("toSortable",i),s.dropped=t.element,Y.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,t.fromOutside=s),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(s._parent),s._refreshOffsets(i),n.position=s._generatePosition(i,!0),s._trigger("fromSortable",i),s.dropped=!1,Y.each(s.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,s=!1,o=i.scrollParentNotHidden[0],r=i.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+o.offsetHeight-e.pageY<n.scrollSensitivity?o.scrollTop=s=o.scrollTop+n.scrollSpeed:e.pageY-i.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=s=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+o.offsetWidth-e.pageX<n.scrollSensitivity?o.scrollLeft=s=o.scrollLeft+n.scrollSpeed:e.pageX-i.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=s=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-Y(r).scrollTop()<n.scrollSensitivity?s=Y(r).scrollTop(Y(r).scrollTop()-n.scrollSpeed):Y(window).height()-(e.pageY-Y(r).scrollTop())<n.scrollSensitivity&&(s=Y(r).scrollTop(Y(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-Y(r).scrollLeft()<n.scrollSensitivity?s=Y(r).scrollLeft(Y(r).scrollLeft()-n.scrollSpeed):Y(window).width()-(e.pageX-Y(r).scrollLeft())<n.scrollSensitivity&&(s=Y(r).scrollLeft(Y(r).scrollLeft()+n.scrollSpeed)))),!1!==s&&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,s,o,r,a,l,h,c,u,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,c=(h=i.snapElements[b].top-i.margins.top)+i.snapElements[b].height,g<a-p||l+p<f||v<h-p||c+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(h-v)<=p,s=Math.abs(c-m)<=p,o=Math.abs(a-g)<=p,r=Math.abs(l-f)<=p,n&&(t.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),s&&(t.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(t.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r)&&(t.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),u=n||s||o||r,"outer"!==d.snapMode&&(n=Math.abs(h-m)<=p,s=Math.abs(c-v)<=p,o=Math.abs(a-f)<=p,r=Math.abs(l-g)<=p,n&&(t.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),s&&(t.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(t.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r)&&(t.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),!i.snapElements[b].snapping&&(n||s||o||r||u)&&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||s||o||r||u)}}),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 t=t&&"left"===t?"scrollLeft":"scrollTop",i=!1;if(0<e[t])return!0;try{e[t]=1,i=0<e[t],e[t]=0}catch(e){}return i},_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,s,o=this.options,r=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])),s=Y("<div>"),this._addClass(s,"ui-resizable-handle "+n),s.css({zIndex:o.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.children(this.handles[e]).length||(this.element.append(s),this._addedHandles=this._addedHandles.add(s));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:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=Y(this.handles[t],this.element),n=/sw|ne|nw|se|n|s/.test(t)?n.outerHeight():n.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(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[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,s=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:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.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,s=Y(".ui-resizable-"+this.axis).css("cursor"),Y("body").css("cursor","auto"===s?this.axis+"-resize":s),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&&(i=i.apply(this,[e,n,t]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),Y.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,i,n,s=this.options,o=this;return this._helper&&(i=(t=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,t=t?0:o.sizeDiff.width,t={width:o.helper.width()-t,height:o.helper.height()-i},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,s.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)&&!s.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,s=this.options,s={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||e)&&(e=s.minHeight*this.aspectRatio,i=s.minWidth/this.aspectRatio,t=s.maxHeight*this.aspectRatio,n=s.maxWidth/this.aspectRatio,s.minWidth<e&&(s.minWidth=e),s.minHeight<i&&(s.minHeight=i),t<s.maxWidth&&(s.maxWidth=t),n<s.maxHeight)&&(s.maxHeight=n),this._vBoundaries=s},_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,s=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),o&&h&&(e.left=a-t.minWidth),n&&h&&(e.left=a-t.maxWidth),r&&i&&(e.top=l-t.minHeight),s&&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")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)i[t]=parseFloat(n[t])||0,i[t]+=parseFloat(s[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,s=n.length&&/textarea/i.test(n[0].nodeName),o=s&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,s=s?0:i.sizeDiff.width,s={width:i.size.width-s,height:i.size.height-o},o=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,r=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(Y.extend(s,r&&o?{top:r,left:o}:{}),{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,e,t,s=Y(this).resizable("instance"),o=s.options,r=s.element,o=o.containment,r=o instanceof Y?o.get(0):/parent/.test(o)?r.parent().get(0):o;r&&(s.containerElement=Y(r),/document/.test(o)||o===document?(s.containerOffset={left:0,top:0},s.containerPosition={left:0,top:0},s.parentData={element:Y(document),left:0,top:0,width:Y(document).width(),height:Y(document).height()||document.body.parentNode.scrollHeight}):(i=Y(r),n=[],Y(["Top","Right","Left","Bottom"]).each(function(e,t){n[e]=s._num(i.css("padding"+t))}),s.containerOffset=i.offset(),s.containerPosition=i.position(),s.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},o=s.containerOffset,t=s.containerSize.height,e=s.containerSize.width,e=s._hasScroll(r,"left")?r.scrollWidth:e,t=s._hasScroll(r)?r.scrollHeight:t,s.parentData={element:r,left:o.left,top:o.top,width:e,height:t}))},resize:function(e){var t=Y(this).resizable("instance"),i=t.options,n=t.containerOffset,s=t.position,e=t._aspectRatio||e.shiftKey,o={top:0,left:0},r=t.containerElement,a=!0;r[0]!==document&&/static/.test(r.css("position"))&&(o=n),s.left<(t._helper?n.left:0)&&(t.size.width=t.size.width+(t._helper?t.position.left-n.left:t.position.left-o.left),e&&(t.size.height=t.size.width/t.aspectRatio,a=!1),t.position.left=i.helper?n.left:0),s.top<(t._helper?n.top:0)&&(t.size.height=t.size.height+(t._helper?t.position.top-n.top:t.position.top),e&&(t.size.width=t.size.height*t.aspectRatio,a=!1),t.position.top=t._helper?n.top:0),r=t.containerElement.get(0)===t.element.parent().get(0),i=/relative|absolute/.test(t.containerElement.css("position")),r&&i?(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),s=Math.abs(t.sizeDiff.width+(t._helper?t.offset.left-o.left:t.offset.left-n.left)),r=Math.abs(t.sizeDiff.height+(t._helper?t.offset.top-o.top:t.offset.top-n.top)),s+t.size.width>=t.parentData.width&&(t.size.width=t.parentData.width-s,e)&&(t.size.height=t.size.width/t.aspectRatio,a=!1),r+t.size.height>=t.parentData.height&&(t.size.height=t.parentData.height-r,e)&&(t.size.width=t.size.height*t.aspectRatio,a=!1),a||(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,s=e.containerElement,o=Y(e.helper),r=o.offset(),a=o.outerWidth()-e.sizeDiff.width,o=o.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(s.css("position"))&&Y(this).css({left:r.left-n.left-i.left,width:a,height:o}),e._helper&&!t.animate&&/static/.test(s.css("position"))&&Y(this).css({left:r.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,s=t.originalSize,o=t.originalPosition,r={height:t.size.height-s.height||0,width:t.size.width-s.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"),s={},t=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];Y.each(t,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&0<=i&&(s[t]=i||null)}),e.css(s)})},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:.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,s=t.originalSize,o=t.originalPosition,r=t.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((n.width-s.width)/l)*l,n=Math.round((n.height-s.height)/h)*h,u=s.width+c,d=s.height+n,p=i.maxWidth&&i.maxWidth<u,f=i.maxHeight&&i.maxHeight<d,g=i.minWidth&&i.minWidth>u,m=i.minHeight&&i.minHeight>d;i.grid=a,g&&(u+=l),m&&(d+=h),p&&(u-=l),f&&(d-=h),/^(se|s|e)$/.test(r)?(t.size.width=u,t.size.height=d):/^(ne)$/.test(r)?(t.size.width=u,t.size.height=d,t.position.top=o.top-n):/^(sw)$/.test(r)?(t.size.width=u,t.size.height=d,t.position.left=o.left-c):((d-h<=0||u-l<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),0<d-h?(t.size.height=d,t.position.top=o.top-n):(d=h-e.height,t.size.height=d,t.position.top=o.top+s.height-d),0<u-l?(t.size.width=u,t.position.left=o.left-c):(u=l-e.width,t.size.width=u,t.position.left=o.left+s.width-u))}}),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?e:this.element.find(":tabbable")).length?e:this.uiDialogButtonPane.find(":tabbable")).length?e:this.uiDialogTitlebarClose.filter(":tabbable")).length?e:this.uiDialog).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){var t,i,n;this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===Y.ui.keyCode.ESCAPE?(e.preventDefault(),this.close(e)):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 s=this,o=this.options;function r(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){s._addClass(Y(this),"ui-dialog-dragging"),s._blockFrames(),s._trigger("dragStart",e,r(t))},drag:function(e,t){s._trigger("drag",e,r(t))},stop:function(e,t){var i=t.offset.left-s.document.scrollLeft(),n=t.offset.top-s.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=n?"+":"")+n,of:s.window},s._removeClass(Y(this),"ui-dialog-dragging"),s._unblockFrames(),s._trigger("dragStop",e,r(t))}})},_makeResizable:function(){var s=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 r(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){s._addClass(Y(this),"ui-dialog-resizing"),s._blockFrames(),s._trigger("resizeStart",e,r(t))},resize:function(e,t){s._trigger("resize",e,r(t))},stop:function(e,t){var i=s.uiDialog.offset(),n=i.left-s.document.scrollLeft(),i=i.top-s.document.scrollTop();o.height=s.uiDialog.height(),o.width=s.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=i?"+":"")+i,of:s.window},s._removeClass(Y(this),"ui-dialog-resizing"),s._unblockFrames(),s._trigger("resizeStop",e,r(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,s={};Y.each(e,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(n=!0),e in i.resizableRelatedOptions&&(s[e]=t)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_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 ce(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 s=(e.positionAbs||e.position.absolute).left+e.margins.left,o=(e.positionAbs||e.position.absolute).top+e.margins.top,r=s+e.helperProportions.width,a=o+e.helperProportions.height,l=t.offset.left,h=t.offset.top,c=l+t.proportions().width,u=h+t.proportions().height;switch(i){case"fit":return l<=s&&r<=c&&h<=o&&a<=u;case"intersect":return l<s+e.helperProportions.width/2&&r-e.helperProportions.width/2<c&&h<o+e.helperProportions.height/2&&a-e.helperProportions.height/2<u;case"pointer":return ce(n.pageY,h,t.proportions().height)&&ce(n.pageX,l,t.proportions().width);case"touch":return(h<=o&&o<=u||h<=a&&a<=u||o<h&&u<a)&&(l<=s&&s<=c||l<=r&&r<=c||s<l&&c<r);default:return!1}},!(Y.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var i,n,s=Y.ui.ddmanager.droppables[e.options.scope]||[],o=t?t.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(i=0;i<s.length;i++)if(!(s[i].options.disabled||e&&!s[i].accept.call(s[i].element[0],e.currentItem||e.element))){for(n=0;n<r.length;n++)if(r[n]===s[i].element[0]){s[i].proportions().height=0;continue e}s[i].visible="none"!==s[i].element.css("display"),s[i].visible&&("mousedown"===o&&s[i]._activate.call(s[i],t),s[i].offset=s[i].element.offset(),s[i].proportions({width:s[i].element[0].offsetWidth,height:s[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(s,o){s.options.refreshPositions&&Y.ui.ddmanager.prepareOffsets(s,o),Y.each(Y.ui.ddmanager.droppables[s.options.scope]||[],function(){var e,t,i,n;this.options.disabled||this.greedyChild||!this.visible||(n=!(n=Y.ui.intersect(s,this,this.options.tolerance,o))&&this.isover?"isout":n&&!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){var e,s,o,r,a,l,h;if(this.dragged=!0,!this.options.disabled)return o=(s=this).options,r=this.opos[0],a=this.opos[1],(l=n.pageX)<r&&(e=l,l=r,r=e),(h=n.pageY)<a&&(e=h,h=a,a=e),this.helper.css({left:r,top:a,width:l-r,height:h-a}),this.selectees.each(function(){var e=Y.data(this,"selectable-item"),t=!1,i={};e&&e.element!==s.element[0]&&(i.left=e.left+s.elementPos.left,i.right=e.right+s.elementPos.left,i.top=e.top+s.elementPos.top,i.bottom=e.bottom+s.elementPos.top,"touch"===o.tolerance?t=!(l<i.left||i.right<r||h<i.top||i.bottom<a):"fit"===o.tolerance&&(t=r<i.left&&i.right<l&&a<i.top&&i.bottom<h),t?(e.selected&&(s._removeClass(e.$element,"ui-selected"),e.selected=!1),e.unselecting&&(s._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1),e.selecting||(s._addClass(e.$element,"ui-selecting"),e.selecting=!0,s._trigger("selecting",n,{selecting:e.element}))):(e.selecting&&((n.metaKey||n.ctrlKey)&&e.startselected?(s._removeClass(e.$element,"ui-selecting"),e.selecting=!1,s._addClass(e.$element,"ui-selected"),e.selected=!0):(s._removeClass(e.$element,"ui-selecting"),e.selecting=!1,e.startselected&&(s._addClass(e.$element,"ui-unselecting"),e.unselecting=!0),s._trigger("unselecting",n,{unselecting:e.element}))),!e.selected||n.metaKey||n.ctrlKey||e.startselected||(s._removeClass(e.$element,"ui-selected"),e.selected=!1,s._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,s._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 s=this,o="";Y.each(e,function(e,t){var i;t.optgroup!==o&&(i=Y("<li>",{text:t.optgroup}),s._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(n),o=t.optgroup),s._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)"),(i="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0)).length&&this.menuInstance.focus(t,i)},_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]?e:this.element.closest(".ui-front, dialog")).length?e:this.document[0].body},_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?this.button.css("width",""):(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e))},_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=[],s=t.values&&t.values.length||1;for(i.length>s&&(i.slice(s).remove(),i=i.slice(0,s)),e=i.length;e<s;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,s,o,t,r,a=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),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,s=Y(this),o=e)}),!1!==this._start(e,o))&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(s,null,"ui-state-active"),s.trigger("focus"),t=s.offset(),r=!Y(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=r?{left:0,top:0}:{left:e.pageX-t.left-s.width()/2,top:e.pageY-t.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.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(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_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,s=this.value(),o=this.values();this._hasMultipleValues()&&(n=this.values(t?0:1),s=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!==s&&!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){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,n,s;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{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,s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(n[s]),this._change(null,s);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 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){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.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 e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,n,s,o=this.options.range,r=this.options,a=this,l=!this._animateOff&&r.animate,h={};this._hasMultipleValues()?this.handles.each(function(e){i=(a.values(e)-a._valueMin())/(a._valueMax()-a._valueMin())*100,h["horizontal"===a.orientation?"left":"bottom"]=i+"%",Y(this).stop(1,1)[l?"animate":"css"](h,r.animate),!0===a.options.range&&("horizontal"===a.orientation?(0===e&&a.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===e&&a.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===e&&a.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===e&&a.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(e=this.value(),n=this._valueMin(),s=this._valueMax(),i=s!==n?(e-n)/(s-n)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var t,i,n,s=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,s)))break;return}switch(n=this.options.step,t=i=this._hasMultipleValues()?this.values(s):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,s,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,s=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(e),Y(e.target).parents().each(function(){if(Y.data(this,s.widgetName+"-item")===s)return i=Y(this),!1}),!(i=Y.data(e.target,s.widgetName+"-item")===s?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,s,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&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",o.cursor),this.storedStylesheet=Y("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(s)),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,s,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],(s=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===s?"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===s?"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,s,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={},(s=this.options.axis)&&"x"!==s||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(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,s=n+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||a<n+h&&n+h<l,c="y"===this.options.axis||o<t+c&&t+c<r;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h&&c:o<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&s-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),e=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this.dragDirection.vertical,n=this.dragDirection.horizontal;return this.floating&&n?"right"===n&&e||"left"===n&&!e:i&&("down"===i&&t||"up"===i&&!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,s,o=[],r=[],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--)(s=Y.data(n[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&r.push(["function"==typeof s.options.items?s.options.items.call(s.element):Y(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);function l(){o.push(this)}for(r.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=r.length-1;0<=t;t--)r[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,s,o,r,a,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],e,{item:this.currentItem}):Y(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(t=u.length-1;0<=t;t--)for(i=(n=Y(u[t],this.document[0])).length-1;0<=i;i--)(s=Y.data(n[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&(c.push(["function"==typeof s.options.items?s.options.items.call(s.element[0],e,{item:this.currentItem}):Y(s.options.items,s.element),s]),this.containers.push(s));for(t=c.length-1;0<=t;t--)for(o=c[t][1],l=(r=c[t][i=0]).length;i<l;i++)(a=Y(r[i])).data(this.widgetName+"-item",o),h.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,s,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(n=o.placeholder,s=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var e=Y("<"+s+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",n||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===s?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),Y("<tr>",i.document[0]).appendTo(e)):"tr"===s?i._createTrPlaceholder(i.currentItem,e):"img"===s&&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"!==s&&"tr"!==s)||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,s,o,r,a,l,h,c=null,u=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)?c&&Y.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",e,this._uiHash(this)),this.containers[d].containerCache.over=0));if(this.innermostContainer=c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,n=null,s=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",t=this.items.length-1;0<=t;t--)Y.contains(this.containers[u].element[0],this.items[t].item[0])&&this.items[t].item[0]!==this.currentItem[0]&&(r=this.items[t].item.offset()[s],a=!1,e[h]-r>this.items[t][o]/2&&(a=!0),Math.abs(e[h]-r)<i)&&(i=Math.abs(e[h]-r),n=this.items[t],this.direction=a?"up":"down");(n||this.options.dropOnEmpty)&&(this.currentContainer===this.containers[u]?this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1):(n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[u].element,!0),this._trigger("change",e,this._uiHash()),this.containers[u]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[u],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[u]._trigger("over",e,this._uiHash(this)),this.containers[u].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(){var e;return"relative"===this.cssPosition?{top:(e=this.currentItem.position()).top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}:{top:0,left:0}},_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],i=Y(i.containment).offset(),t="hidden"!==Y(e).css("overflow"),this.containment=[i.left+(parseInt(Y(e).css("borderLeftWidth"),10)||0)+(parseInt(Y(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(Y(e).css("borderTopWidth"),10)||0)+(parseInt(Y(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(t?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,i.top+(t?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 e="absolute"===e?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&Y.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(i[0].tagName);return{top:t.top+this.offset.relative.top*e+this.offset.parent.top*e-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:i.scrollTop())*e,left:t.left+this.offset.relative.left*e+this.offset.parent.left*e-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:i.scrollLeft())*e}},_generatePosition:function(e){var t=this.options,i=e.pageX,n=e.pageY,s="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(s[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:s.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.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 s=this.counter;this._delay(function(){s===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 s(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(s("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(s("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 M(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(),s=this.element;return Y.each(["min","max","step"],function(e,t){var i=s.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(.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 e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-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;"culture"===e||"numberFormat"===e?(i=this._parse(this.element.val()),this.options[e]=t,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:M(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:M(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:M(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:M(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:M(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());M(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 O;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:(O=/#.*$/,function(e){var t=e.href.replace(O,""),i=location.href.replace(O,"");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._activate(t):(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))},_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,s,o=Y(t).uniqueId().attr("id"),r=Y(t).closest("li"),a=r.attr("aria-controls");l._isLocal(t)?(s=(i=t.hash).substring(1),n=l.element.find(l._sanitizeSelector(i))):(s=r.attr("aria-controls")||Y({}).uniqueId()[0].id,(n=l.element.find(i="#"+s)).length||(n=l._createPanel(s)).insertAfter(l.panels[e-1]||l.tablist),n.attr("aria-live","polite")),n.length&&(l.panels=l.panels.add(n)),a&&r.data("ui-tabs-aria-controls",a),r.attr({"aria-controls":s,"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"),s=n[0]===i[0],o=s&&t.collapsible,r=o?Y():this._getPanelForTab(n),a=i.length?this._getPanelForTab(i):Y(),i={oldTab:i,oldPanel:a,newTab:o?Y():n,newPanel:r};e.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||s&&!t.collapsible||!1===this._trigger("beforeActivate",e,i)||(t.active=!o&&this.tabs.index(n),this.active=s?Y():n,this.xhr&&this.xhr.abort(),a.length||r.length||Y.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(n),e),this._toggle(e,i))},_toggle:function(e,t){var i=this,n=t.newPanel,s=t.oldPanel;function o(){i.running=!1,i._trigger("activate",e,t)}function r(){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,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){i._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s.hide(),r()),s.attr("aria-hidden","true"),t.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&s.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?e:this.active).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 s(e,t){"abort"===t&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),r.removeAttr("aria-busy"),e===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(e),e=i.find(".ui-tabs-anchor"),r=this._getPanelForTab(i),a={tab:i,panel:r};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"),r.attr("aria-busy","true"),this.xhr.done(function(e,t,i){setTimeout(function(){r.html(e),o._trigger("load",n,a),s(i,t)},1)}).fail(function(e,t){setTimeout(function(){s(e,t)},1)})))},_ajaxSettings:function(e,i,n){var s=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,t){return s._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,s=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=s),this._open(i,t,e))})}))&&this._open(i,t,e)},_open:function(e,t,i){var n,s,o,r=Y.extend({},this.options.position);function a(e){r.of=e,n.is(":hidden")||n.position(r)}i&&((o=this._find(t))?o.tooltip.find(".ui-tooltip-content").html(i):(t.is("[title]")&&(e&&"mouseover"===e.type?t.attr("title",""):t.removeAttr("title")),o=this._tooltip(t),n=o.tooltip,this._addDescribedBy(t,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(o=Y("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:a}),a(e)):n.position(Y.extend({of:t},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(s=this.delayedShow=setInterval(function(){n.is(":visible")&&(a(r.of),clearInterval(s))},13)),this._trigger("open",e,{tooltip:n})))},_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),s=this._find(n);s?(t=s.tooltip,s.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),s.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]}),s.closing=!0,this._trigger("close",e,{tooltip:t}),s.hiding)||(s.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?e:this.document[0].body},_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}),(e=>{var t,i,n;function s(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,s(e,"mouseover"),s(e,"mousemove"),s(e,"mousedown"))},t._touchMove=function(e){n&&(this._touchMoved=!0,s(e,"mousemove"))},t._touchEnd=function(e){n&&(s(e,"mouseup"),s(e,"mouseout"),this._touchMoved||s(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),(e=>{e.widget("ui.dialog",e.ui.dialog,{_allowInteraction:function(e){return!0}}),e.ui.dialog.prototype._focusTabbable=function(){}})(jQuery),jQuery=oldJQuery}(H5P=H5P||{}).Transition=(()=>{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={transitionEndEventNames:{WebkitTransition:"webkitTransitionEnd",transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},cache:[],getVendorPropertyName:function(e){if(void 0===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 s=0;s<i.length;++s){var o=i[s]+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(){s||(e.off(Transition.transitionEndEventName,t),s=!0,clearTimeout(o),t())}var s=!1,o=setTimeout(function(){n()},i);e.on(Transition.transitionEndEventName,function(){n()})},sequence:function(e){n(e,0)}}})(),(H5P=H5P||{}).JoubelHelpTextDialog=(c=>{var u=0;function e(e,t,i){H5P.EventDispatcher.call(this);function n(){a.remove(),s.trigger("closed")}var s=this,o="joubel-help-text-header-"+ ++u,r="joubel-help-text-body-"+u,a=c("<div>",{class:"joubel-help-text-dialog-box",role:"dialog","aria-labelledby":o,"aria-describedby":r}),l=(c("<div>",{class:"joubel-help-text-dialog-background"}).appendTo(a),c("<div>",{class:"joubel-help-text-dialog-container"}).appendTo(a)),h=(c("<div>",{class:"joubel-help-text-header",id:o,role:"header",html:e}).appendTo(l),c("<div>",{class:"joubel-help-text-body",id:r,html:t,role:"document",tabindex:0}).appendTo(l),c("<div>",{class:"joubel-help-text-remove",role:"button",title:i,tabindex:1,click:n,keydown:function(e){-1!==[32,13].indexOf(e.which)&&(e.preventDefault(),n())}}).appendTo(l));s.getElement=function(){return a},s.focus=function(){h.focus()}}return(e.prototype=Object.create(H5P.EventDispatcher.prototype)).constructor=e})(H5P.jQuery),(H5P=H5P||{}).JoubelMessageDialog=(o=>function(e,t){function i(){n.remove(),clearTimeout(s),e.off("click.messageDialog")}var n=o("<div/>",{class:"joubel-message-dialog",text:t}).appendTo(e),s=setTimeout(i,3e3);return e.on("click.messageDialog",i),n})(H5P.jQuery),(H5P=H5P||{}).JoubelProgressCircle=(a=>{function e(t,e,i,n){i=i||"#f0f0f0",n=n||"#ffffff";e=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 e="rgb("+parseInt(e.r,10)+","+parseInt(e.g,10)+","+parseInt(e.b,10)+")",s=a("<div/>",{class:"joubel-progress-circle-wrapper"}),o=a("<div/>",{class:"joubel-progress-circle-active-border"}).appendTo(s),r=a("<div/>",{class:"joubel-progress-circle-circle"}).appendTo(o),t=(a("<span/>",{text:t+"%",class:"joubel-progress-circle-percentage"}).appendTo(r),3.6*t);return(t<=180?o.css("background-image","linear-gradient("+(90+t)+"deg, transparent 50%, "+i+" 50%),linear-gradient(90deg, "+i+" 50%, transparent 50%)"):o.css("background-image","linear-gradient("+(t-90)+"deg, transparent 50%, "+e+" 50%),linear-gradient(90deg, "+i+" 50%, transparent 50%)")).css("border","2px solid"+n).css("background-color",e),this.$activeBorder=o,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&&(n=parseInt(n.css("font-size"),10),t=(e=parseInt(n/4.5,10)%2==0?parseInt(n/4.5,10)+4:parseInt(n/4.5,10)+5)/2,this.$activeBorder.css({width:i=3.75*n,height:n=3.75*n}),this.$backgroundCircle.css({width:i-e,height:n-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=(i=>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=(o=>{var r,a,l,h,c,u,d=!!navigator.userAgent.match(/iPod|iPhone|iPad/g);function p(e){var t=e.closest(".h5p-frame");return t=t.length?t:e.closest(".h5p-container")}function f(){g(r,a,u,l,h)}function g(e,t,i,n,s){var o=((e,t)=>(e=e[0].getBoundingClientRect(),{top:(t=t[0].getBoundingClientRect()).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),r=o.bottom>o.top?"bottom":"top",a=.9*o.outerWidth,i=i<a?i:a,a=((e,t)=>{var i={},n=e/2;return 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,i})(i,o),o=((e,t,i,n)=>{var s={},e=e-20;return s.left=i.left-t.left+n/2-6,s.left<9&&(s.left=9),e<s.left&&(s.left=e),s.top=-6,s.bottom=-6,s})(i,a,o,t.width()),t=(e.css((t=i,e=a,i=16,"top"===r?{width:t+"px",bottom:e.bottom+"px",left:e.left+"px",fontSize:i+"px",top:""}:{width:t+"px",top:e.top+"px",left:e.left+"px",fontSize:i+"px",bottom:""})),a=o,"top"===r?{bottom:a.bottom+"px",left:a.left+"px",top:""}:{top:a.top+"px",left:a.left+"px",bottom:""});n.css(t),s.css(t)}H5P.externalDispatcher.on("domHidden",function(e){void 0!==r&&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!==r&&(r.removeClass("show"),clearTimeout(c),c=setTimeout(function(){r.remove(),r=void 0},500))};function v(e){e.target!==a[0]&&(m(),a=void 0)}return function(e,t,i){u=i=i||400,a=e,this.isCurrent=function(e){return e.is(a)},this.remove=function(){m()},void 0!==r&&m();var n,s=p(e),t=((n=r)&&(clearTimeout(c),n.removeClass("show"),setTimeout(function(){n&&(n.remove(),n=void 0)},500)),l=o('<div class="joubel-speech-bubble-tail"></div>'),h=o('<div class="joubel-speech-bubble-inner-tail"></div>'),o('<div class="joubel-speech-bubble-inner"><div class="joubel-speech-bubble-text">'+t+"</div></div>").prepend(h));return r=o('<div class="joubel-speech-bubble" aria-live="assertive">').append([l,t]).appendTo(s),setTimeout(function(){r.addClass("show")},0),g(r,a,i,l,h),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=(e=>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=(a=>{var t=a("<div/>");return function(i,n){var s,e=t.html(i).text().trim();if(""!==e){n=a.extend({tipLabel:e,helpIcon:!1,showSpeechBubble:!0,tabcontrol:!1},n);var o=a("<div/>",{class:"joubel-tip-container"+(n.showSpeechBubble?"":" be-quiet"),"aria-label":n.tipLabel,"aria-expanded":!1,role:"button",tabindex:n.tabcontrol?-1:0,click:function(e){r(),e.preventDefault()},keydown:function(e){32===e.which||13===e.which?(r(),e.stopPropagation(),e.preventDefault()):r(!1)},html:'<span class="joubel-icon-tip-normal '+(n.helpIcon?" help-icon":"")+'"><span class="h5p-icon-shadow"></span><span class="h5p-icon-speech-bubble"></span><span class="h5p-icon-info"></span></span>'});let t=a("<div>",{class:"hidden-but-read","aria-live":"polite",appendTo:o});var r=function(e){void 0!==s&&s.isCurrent(o)?(s.remove(),s=void 0,o.attr("aria-expanded",!1),t.html("")):!1!==e&&n.showSpeechBubble&&(s=H5P.JoubelSpeechBubble(o,i),o.attr("aria-expanded",!0),t.html(i))};return o}}})(H5P.jQuery),(H5P=H5P||{}).JoubelSlider=(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,i=(0===e&&t.trigger("first-slide"),e+1===t.numSlides&&t.trigger("last-slide"),t.trigger("move"),t.$slides[this.currentIndex]),n=(H5P.Transition.onTransitionEnd(this.$slider,function(){i.removeClass("current"),t.trigger("moved")}),this.$slides[e].addClass("current"),"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=(r=>{var a=0;return function(e,t,i,n){function s(e){return t?t.replace(":num",e).replace(":total",o.maxScore):""}var o=this;o.maxScore=e,o.score=0,a++,o.STAR_MARKUP='<svg tabindex="-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63.77 53.87" aria-hidden="true" focusable="false"><title>star</title><filter tabindex="-1" id="h5p-joubelui-score-bar-star-inner-shadow-'+a+'" x0="-50%" y0="-50%" width="200%" height="200%"><feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur><feOffset dy="2" dx="4"></feOffset><feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite><feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur><feOffset dy="-2" dx="-4"></feOffset><feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite><feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood><feComposite in2="shadowDiff" operator="in"></feComposite><feComposite in2="firstfilter" operator="over"></feComposite></filter><path tabindex="-1" class="h5p-joubelui-score-bar-star-shadow" d="M35.08,43.41V9.16H20.91v0L9.51,10.85,9,10.93C2.8,12.18,0,17,0,21.25a11.22,11.22,0,0,0,3,7.48l8.73,8.53-1.07,6.16Z"/><g tabindex="-1"><path tabindex="-1" class="h5p-joubelui-score-bar-star-border" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" class="h5p-joubelui-score-bar-star-fill" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/><path tabindex="-1" filter="url(#h5p-joubelui-score-bar-star-inner-shadow-'+a+')" class="h5p-joubelui-score-bar-star-fill-full-score" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/></g></svg>',o.appendTo=function(e){o.$scoreBar.appendTo(e)},o.setScore=function(e){e!==o.score&&(o.score=e>o.maxScore?o.maxScore:e,o.updateVisuals())},o.incrementScore=function(e){o.setScore(o.score+(e||1))},o.setMaxScore=function(e){o.maxScore=e},o.updateVisuals=function(){o.$progress.html(s(o.score)),o.$scoreCounter.text(o.score),o.$maxScore.text(o.maxScore),setTimeout(function(){o.$progress.css({width:o.score/o.maxScore*100+"%"}),H5P.Transition.onTransitionEnd(o.$progress,function(){o.$scoreBar.toggleClass("h5p-joubelui-score-bar-full-score",o.score===o.maxScore),o.$scoreBar.toggleClass("h5p-joubelui-score-bar-animation-active",o.score===o.maxScore),o.$scoreBar.one("animationend",function(){o.$scoreBar.removeClass("h5p-joubelui-score-bar-animation-active")})},600)},300)},o.reset=function(){o.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score")},o.$scoreBar=r("<div>",{class:"h5p-joubelui-score-bar"}),e=r("<div>",{class:"h5p-joubelui-score-bar-visuals",appendTo:o.$scoreBar}),o.$progressWrapper=r("<div>",{class:"h5p-joubelui-score-bar-progress-wrapper",appendTo:e}),o.$progress=r("<div>",{class:"h5p-joubelui-score-bar-progress",html:s(o.score),appendTo:o.$progressWrapper}),r("<div>",{class:"h5p-joubelui-score-bar-star",html:o.STAR_MARKUP}).appendTo(e),e=r("<div>",{class:"h5p-joubelui-score-numeric",appendTo:o.$scoreBar,"aria-hidden":!0}),o.$scoreCounter=r("<span>",{class:"h5p-joubelui-score-number h5p-joubelui-score-number-counter",text:0,appendTo:e}),r("<span>",{class:"h5p-joubelui-score-number-separator",text:"/",appendTo:e}),o.$maxScore=r("<span>",{class:"h5p-joubelui-score-number h5p-joubelui-score-max",text:o.maxScore,appendTo:e}),i&&(H5P.JoubelUI.createTip(i,{tipLabel:n||i,helpIcon:!0}).appendTo(o.$scoreBar),o.$scoreBar.addClass("h5p-score-bar-has-help"))}})(H5P.jQuery),(H5P=H5P||{}).JoubelProgressbar=(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=(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=((q,e,W)=>{function t(z){function d(e,t){w[e]={},e=w[e].$element=q("<div/>",{class:"h5p-question-"+e}),t&&e[t instanceof q?"append":"html"](t)}function p(e,t){t instanceof q?w[e].$element.html("").append(t):w[e].$element.html(t)}function f(){if(void 0!==w.buttons){clearTimeout(l);for(var e=0;e<x.length;e++)D(u,x[e].id,c,w.buttons.$element),c[x[e].id].isVisible=!0;for(var t=0,i=!(x=[]),n=0;n<h.length;n++){var s=c[h[n].id];s.isVisible&&(t+=1),s.$element.is(":focus")&&(i=!0)}var o=150;w.feedback&&w.feedback.$element.hasClass("h5p-question-popup")&&(o=0),t===w.buttons.$element.children().length?(L(w.buttons),E(i)):(E(i),w.buttons.$element.is(":empty")||(N(w.buttons),S(w.buttons.$element),l=setTimeout(function(){_.trigger("resize")},o)),O()),a=void 0}}function r(){var e=w.image.$element;clearTimeout(i),e.addClass("animatable"),i=(k=k?(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(){_.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 g,m,v,b,a,l,t,i,y,s,o,_=this,w=(e.call(_),_.order=["video","image","audio","introduction","content","explanation","feedback","scorebar","buttons","read"],{}),c={},u=[],h=[],x=[],P=!1,C={disableFeedback:!1,disableReadSpeaker:!1},k=!0,H=!1,T=!1,D=function(e,t,i,n){for(var s=0;s<e.length;s++)if(e[s]===t){for(;0<s&&(void 0===i[e[s-1]]||!i[e[s-1]].isVisible);)s--;0===s?i[t].$element.prependTo(n):i[t].$element.insertAfter(i[e[s-1]].$element),i[t].isVisible=!0;break}},I=function(e,t){var i,n,s,o,r=e.parent(),a=e.siblings(".h5p-question-feedback-tail"),l=e.outerWidth(),h=S(e),c=!1,u=r.height()/2-h/2,d=r.width()/2-l/2,p=0,f=0,g=0;(null==t||(i=t[0].offsetTop<15,n=t[0].offsetTop+t.height()>r.height()-15,s=t[0].offsetLeft<15,o=t[0].offsetLeft+t.width()>r.width()-15,d=t[0].offsetLeft-l/2+t.width()/2,u=t[0].offsetTop-h-15,p=d+l/2-a.width()/2,f=u+h-a.height()/2,g=225,h+15>t[0].offsetTop&&(f=(u=t[0].offsetTop+t.height()+15)-a.height()/2,g=45),(d=d<0?0:d)+l>r.width()&&(d=r.width()-l),i&&(s||o)?(d=t[0].offsetLeft+(s?t.width():-l),u=t[0].offsetTop+t.height(),c=!0):n&&(s||o)?(d=t[0].offsetLeft+(s?t.width():-l),u=t[0].offsetTop-h,c=!0):i||n||(s||o)&&(u=t[0].offsetTop-h/2+t.width()/2,(d=t[0].offsetLeft+(s?t.width()+15:-l-15))<0?c=!(d=0):(p=d+(s?-a.width()/2:l-a.width()/2),f=u+h/2-a.height()/2,g=s?315:135)),u+h>r.height()&&(u=r.height()-h,h>r.height()-(t[0].offsetTop+t.height()+15))))&&(c=!0),e.css({top:u=u<0?0:u,left:d}),a.css({top:f,left:p}),c?a.hide():a.css({left:p,top:f,transform:"rotate("+g+"deg)"}).show()},S=function(e){var t,i,n;if(e.is(":visible"))return t=e.hasClass("h5p-question-popup"),t=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")),i=t.css("width")?t.css("width"):"100%",t.css("width","calc("+i+" - "+n+"px)"),i=Math.round(t.get(0).getBoundingClientRect().height),n=parseFloat(e.css("fontSize")),e.css("max-height",i/n+"em"),t.remove(),0<i&&w.buttons&&w.buttons.$element===e&&(N(w.buttons),setTimeout(O,150)),i;e.css("max-height","none")},E=function(e){for(var t=0;t<h.length;t++)A(h[t].id);h=[],e&&_.focusButton()},A=function(e){c[e].$element.detach(),c[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)},O=function(){var e;c&&w.buttons&&(e=function(){if(w.buttons.$element.is(":visible")){var e,t={max:0,min:0,current:0};for(e in c){var i=c[e];i.isVisible&&($(c[e]),t.max+=i.width.max,t.min+=i.width.min,t.current+=i.isTruncated?i.width.min:i.width.max)}var n=function(e){return t.max<e?(t.max!==t.current&&R(t.current,e),!0):t.min<e&&((e<t.current?F:R)(t.current,e),!0)};j(!1),n(Math.floor(w.buttons.$element.width())-1)||(j(!0),n(Math.floor(w.buttons.$element.width())-1))}},w.buttons.$element.is(":visible")?e():(t&&clearTimeout(t),t=setTimeout(function(){t=void 0,e()},0)))},j=function(e){w.scorebar&&w.scorebar.$element&&w.scorebar.$element.hasClass("h5p-question-visible")?(w.buttons.$element.addClass("has-scorebar"),w.buttons.$element.toggleClass("wrap",e),w.scorebar.$element.toggleClass("full-width",e)):w.buttons.$element.removeClass("has-scorebar")},F=function(e,t){for(var i=u.length-1;0<=i;i--){var n=u[i],n=c[n];if(!n.isTruncated&&n.isVisible){var s=n.$element,o=(e-=n.width.max-n.width.min,s.text());if(s.attr("data-tooltip",o),n.ariaLabel||s.attr("aria-label",o),s.html("").addClass("truncated"),n.isTruncated=!0,e<=t)return}}},R=function(e,t){for(var i=0;i<u.length;i++){var n=u[i],n=c[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}}},N=function(e){e.$element.addClass("h5p-question-visible"),e.isVisible=!0},L=function(e){e.$element.css("max-height",""),e.isVisible=!1,setTimeout(function(){e.isVisible||e.$element.removeClass("h5p-question-visible")},150)},$=(_.setBehaviour=function(e){q.extend(C,e)},_.setVideo=function(e){w.video={$element:q("<div/>",{class:"h5p-question-video"})},T&&e.params.playback&&(e.params.playback.autoplay=!1),e.params.visuals||(e.params.visuals={}),e.params.visuals.fit=!1,w.video.instance=H5P.newRunnable(e,_.contentId,w.video.$element,!0);var t=!1;return w.video.instance.on("resize",function(){t=!0,_.trigger("resize"),t=!1}),_.on("resize",function(){t||w.video.instance.trigger("resize")}),_},_.setAudio=function(e){return e.params=e.params||{},w.audio={$element:q("<div/>",{class:"h5p-question-audio"})},T?e.params.autoplay=!1:"transparent"===e.params.playerMode&&(e.params.autoplay=!0),w.audio.instance=H5P.newRunnable(e,_.contentId,w.audio.$element,!0),w.audio.instance.audio&&(w.audio.instance.audio.style.height=""),_},_.pause=function(){w.video&&w.video.isVisible&&w.video.instance.pause(),w.audio&&w.audio.isVisible&&w.audio.instance.pause()},_.play=function(){w.video&&w.video.isVisible&&w.video.instance.play(),w.audio&&w.audio.isVisible&&w.audio.instance.play()},_.disableAutoPlay=function(){T=!0},_.massageAttributeOutput=function(e){var e=(new DOMParser).parseFromString(e,"text/html"),t=document.createElement("div");return t.innerHTML=e.documentElement.textContent,t.textContent||t.innerText||""},_.setImage=function(e,i){i=i||{},w.image={},w.image.$element=q("<div/>",{class:"h5p-question-image h5p-question-image-fill-width"});var n=q("<div/>",{class:"h5p-question-image-wrap",appendTo:w.image.$element}),s=q("<img/>",{src:H5P.getPath(e,_.contentId),alt:void 0===i.alt?"":_.massageAttributeOutput(i.alt),title:void 0===i.title?"":_.massageAttributeOutput(i.title),on:{load:function(){_.trigger("imageLoaded",this),_.trigger("resize")}},appendTo:n});if(!i.disableImageZooming){let t=()=>{var e="true"===n.attr("aria-expanded")?i.minimizeImage:i.expandImage;n.attr("aria-label",e+" "+i.alt)};var o=!1;return _.on("resize",function(){!o&&s.is(":visible")&&(n.addClass("h5p-question-image-scalable").attr("aria-expanded",!1).attr("role","button").attr("tabIndex","0").on("click",function(e){1===e.which&&(r.apply(this),t())}).on("keypress",function(e){32===e.which&&(e.preventDefault(),r.apply(this),t())}),t(),w.image.$element.removeClass("h5p-question-image-fill-width"),o=!0)}),_}s.css("maxHeight","none"),e=function(){var e=w.image.$element.get(0).getBoundingClientRect().width,t=(n.css({"-webkit-transition":"none",transition:"none"}),2*(n.get(0).getBoundingClientRect().left-w.image.$element.get(0).getBoundingClientRect().left));s.get(0).naturalWidth>=e-t?w.image.$element.addClass("h5p-question-image-fill-width"):w.image.$element.removeClass("h5p-question-image-fill-width"),n.css({"-webkit-transition":"",transition:""})},s.is(":visible")?e():s.on("load",e)},_.setIntroduction=function(e){return d("introduction",e),_},_.setContent=function(e,t){return d("content",e),t&&t.class&&w.content.$element.addClass(t.class),_},_.read=function(e){s&&(o?o+=("."===o.substr(-1,1)?" ":". ")+e:o=e,s.html(o),setTimeout(function(){o=null,s.html("")},100))},_.readFeedback=function(){var e;!C.disableReadSpeaker&&b&&w.feedback&&w.feedback.$element&&(e=q(".h5p-question-feedback-content-text",w.feedback.$element))&&e.html()&&e.html().length&&_.read(e.html())},_.removeFeedback=function(){return clearTimeout(y),w.feedback&&b&&(b=!1,L(w.scorebar),L(w.feedback),H=!0,y=setTimeout(function(){b||(w.feedback.$element.children().detach(),w.scorebar.$element.children().detach(),_.trigger("resize")),H=!1,v.setScore(0)},150),g)&&g.find(".h5p-question-feedback-tail").remove(),_},_.setFeedback=function(e,t,i,n,s,o,r){var a,l,h,c,u;return C.disableFeedback||(f(),m=null!=o&&null!=o.click?o.click:null,clearTimeout(y),a=q("<div>",{class:"h5p-question-feedback-container"}),c=q("<div>",{class:"h5p-question-feedback-content"}).appendTo(a),q("<div>",{class:"h5p-question-feedback-content-text",html:e}).appendTo(c),l=q("<div>",{class:"h5p-question-scorebar-container"}),(v=void 0===v?W.createScoreBar(i,n,s,r):v).appendTo(l),c.toggleClass("has-content",void 0!==e&&0<e.length),!C.disableReadSpeaker&&n&&_.read(n.replace(":num",t).replace(":total",i)+". "+(e||"")),b=!0,w.feedback?(p("feedback",a),p("scorebar",l)):(d("feedback",a),d("scorebar",l),P&&g&&(D(_.order,"feedback",w,g),D(_.order,"scorebar",w,g))),N(w.feedback),N(w.scorebar),O(),null!=o&&1==o.showAsPopup?(s=o.closeText,h=w.feedback.$element,r=w.content.$element,c=null!=m?m.$element:null,h.appendTo(r).addClass("h5p-question-popup"),w.scorebar&&w.scorebar.$element.appendTo(h),r.addClass("h5p-has-question-popup"),u=q("<div/>",{class:"h5p-question-feedback-tail"}).hide().appendTo(r),r=q("<div/>",{class:"h5p-question-feedback-close",tabindex:0,title:s,on:{click:function(e){h.remove(),u.remove(),e.preventDefault()},keydown:function(e){switch(e.which){case 13:case 32:h.remove(),u.remove(),e.preventDefault()}}}}).hide().appendTo(h),null!=c&&(c.hasClass("correct")?(h.addClass("h5p-question-feedback-correct"),r.show(),w.buttons.$element.hide()):w.buttons.$element.appendTo(w.feedback.$element)),I(h,c),v.setScore(t)):y=setTimeout(function(){var e;S(w.feedback.$element),S(w.scorebar.$element),H=!0,!g||g.hasClass("h5p-standalone")&&!H5P.isFullscreen||(e=M(g))&&e.animate({scrollTop:g.css("height")},"slow"),y=setTimeout(function(){H=!1,_.trigger("resize"),v.setScore(t)},150)},0)),_},_.updateFeedbackContent=function(e,t){return w.feedback&&w.feedback.$element&&(t&&(e=q(".h5p-question-feedback-content",w.feedback.$element).html()+" "+e),q(".h5p-question-feedback-content",w.feedback.$element).html(e).addClass("has-content"),S(w.feedback.$element),setTimeout(_.trigger.bind(_,"resize"),150)),_},_.setExplanation=function(e,t){return e?(t=new H5P.Question.Explainer(t,e),w.explanation?p("explanation",t.getElement()):(d("explanation",t.getElement()),P&&g&&D(_.order,"explanation",w,g))):w.explanation&&w.explanation.$element.children().detach(),_},_.hasButton=function(e){return void 0!==c[e]},_.addButton=function(e,t,i,n,s,o){var r,a,l,h;return!c[e]&&(void 0===w.buttons&&(d("buttons"),P)&&D(_.order,"buttons",w,g),(o=o||{}).confirmationDialog=o.confirmationDialog||{},s=s||{},r=_.addConfirmationDialogToButton(o.confirmationDialog,i),o.contentData&&o.contentData.standalone&&(o.contentData.isScoringEnabled||o.contentData.isReportingEnabled)&&o.textIfSubmitting&&(t=o.textIfSubmitting),c[e]={isTruncated:!(a=function(){o.confirmationDialog.enable&&r?(o.confirmationDialog.$parentElement||w.popups.$element.removeClass("hidden"),r.show(h.position().top)):i()}),text:t,isVisible:!1,ariaLabel:s["aria-label"]},l=void 0!==s.href,h=c[e].$element=W.createButton(q.extend({class:"h5p-question-"+e,html:t,on:{click:function(e){a(),l&&e.preventDefault()}}},s)),u.push(e),H5P.Tooltip(h.get(0),{tooltipSource:"data-tooltip"}),l&&h.on("keypress",function(e){32===e.which&&(a(),e.preventDefault())}),void 0===n||n)&&(h.appendTo(w.buttons.$element),c[e].isVisible=!0,N(w.buttons)),_},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()});_.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){var n=t.$parentElement.get(0);let e;n.classList.contains("h5p-content")&&(e=n.querySelector(".h5p-container")),i.appendTo(e??n)}else void 0===w.popups&&(d("popups"),P&&D(_.order,"popups",w,g),w.popups.$element.addClass("hidden"),_.order.push("popups")),i.appendTo(w.popups.$element.get(0));return i.on("confirmed",function(){t.$parentElement||w.popups.$element.addClass("hidden"),e(),_.trigger("confirmed")}),i.on("canceled",function(){t.$parentElement||w.popups.$element.addClass("hidden"),_.trigger("canceled")}),i}},_.showButton=function(e,t){var i=-1!==n(e,"id",h);return void 0===c[e]||!0===c[e].isVisible&&!i||(t=t||0,-1!==(i=n(e,"id",x))?x[i].priority<t&&(x[i].priority=t):(-1!==(i=n(e,"id",h))?h[i].priority<=t&&(h.splice(i,1),x.push({id:e,priority:t})):c[e].$element.is(":visible")||x.push({id:e,priority:t}),a=a||setTimeout(f,0))),_},_.hideButton=function(e,t){var i=-1!==n(e,"id",x);return void 0===c[e]||!1===c[e].isVisible&&!i||(t=t||0,-1!==(i=n(e,"id",h))?h[i].priority<t&&(h[i].priority=t):(-1!==(i=n(e,"id",x))?x[i].priority<=t&&(x.splice(i,1),h.push({id:e,priority:t})):c[e].$element.is(":visible")?h.push({id:e,priority:t}):A(e),a=a||setTimeout(f,0))),_},_.focusButton=function(e){if(void 0===e)for(var t=0;t<u.length;t++){var i=c[u[t]];if(i&&i.isVisible){i.$element.focus();break}}else c[e]&&c[e].$element.is(":visible")&&c[e].$element.focus();return _},_.toggleReadSpeaker=function(e){C.disableReadSpeaker=e||!C.disableReadSpeaker},_.insertSectionAtElement=function(e,t){return void 0===w[e]&&d(e),w[e].parent=t,P||D([e],e,w,t),_},_.attach=function(e){_.isRoot()&&_.setActivityStarted(),void 0===g&&(void 0!==_.registerDomElements&&(_.registerDomElements instanceof Function||"function"==typeof _.registerDomElements)&&_.registerDomElements(),s=q("<div/>",{"aria-live":"polite",class:"h5p-hidden-read"}),d("read",s),_.trigger("registerDomElements")),(g=e).html("").addClass("h5p-question h5p-"+z);for(var t=[],i=0;i<_.order.length;i++){var n=_.order[i];w[n]&&(w[n].parent?w[n].$element.appendTo(w[n].parent):t.push(w[n].$element),w[n].isVisible=!0)}return e.append(t),_.trigger("domChanged",{$target:e,library:_.libraryInfo.machineName,contentId:_.contentId,key:"newLibrary"},{bubbles:!0,external:!0}),P=!0,_},_.detachSections=function(){for(var e in P=!1,w)w[e].$element.detach();return _},_.on("resize",function(){!H&&w.feedback&&b&&S(w.feedback.$element);var e=w.feedback,t=m;null!=e&&null!=e.$element&&null!=t&&null!=t.$element&&setTimeout(function(){I(e.$element,t.$element)},10),O()})}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],s=void 0!==n.feedback&&0!==n.feedback.trim().length;if(n.from<=t&&n.to>=t&&s)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=(l=>function(e,t){var i=this;i.$explanation=l("<div>",{class:"h5p-question-explanation-container"}),l("<div>",{class:"h5p-question-explanation-title",role:"heading",html:e,appendTo:i.$explanation});for(var n=l("<ul>",{class:"h5p-question-explanation-list",appendTo:i.$explanation}),s=0;s<t.length;s++){var o=t[s],r=l("<li>",{class:"h5p-question-explanation-item",appendTo:n}),a=l("<div>",{class:"h5p-question-explanation-status"});o.correct&&l("<span>",{class:"h5p-question-explanation-correct",html:o.correct,appendTo:a}),o.wrong&&l("<span>",{class:"h5p-question-explanation-wrong",html:o.wrong,appendTo:a}),a.appendTo(r),o.text&&l("<div>",{class:"h5p-question-explanation-text",html:o.text,appendTo:r})}i.getElement=function(){return i.$explanation}})(H5P.jQuery),H5P.Question.ScorePoints=function(){var i,n=[],s=(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(s,0),t},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*/(()=>{function e(e){let n=e.length;return function t(){let 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))}}}let 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)})),s=e(function(e,t){return t.some(e)}),o=e(function(e,t){return-1!=t.indexOf(e)}),r=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)),h=e((e,t)=>t.removeAttribute(e)),c=e((e,t)=>t.hasAttribute(e)),L=e((e,t,i)=>i.getAttribute(e)===t),z=(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)=>(t=t.querySelectorAll(e),Array.prototype.slice.call(t))),e((e,t)=>e.removeChild(t)),e((e,t)=>t.classList.contains(e)),e((e,t)=>t.classList.add(e))),j=e((e,t)=>t.classList.remove(e)),F=z("hidden"),R=j("hidden"),u=(e((e,t)=>(e?R:F)(t)),e((e,t,i)=>{i.classList[t?"add":"remove"](e)}),h("tabindex")),$=(i(u),l("tabindex","0")),d=l("tabindex","-1"),q=c("tabindex");class p{constructor(e){Object.assign(this,{listeners:{},on:function(e,t,i){t={listener:t,scope:i};return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t),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=r([e],this.elements),q(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}){var t=e===this.elements.length-1,t=this.elements[t?0:e+1];this.setTabbable(t),t.focus()}firstElement(){var e=this.elements[0];this.setTabbable(e),e.focus()}lastElement(){var 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),$(e),this.tabbableElement=e}setUntabbable(e){e!==document.activeElement&&(this.negativeTabIndexAllowed?d:u)(e)}previousElement({index:e}){e=this.elements[0===e?this.elements.length-1:e-1];this.setTabbable(e),e.focus()}useNegativeTabIndex(){this.negativeTabIndexAllowed=!0,this.elements.forEach(e=>{e.hasAttribute("tabindex")||d(e)})}initPlugins(){this.plugins.forEach(function(e){void 0!==e.init&&e.init(this)},this)}}let f="aria-grabbed",g=l(f),m=L(f,"true"),v=n(c(f)),W=t(i(l(f,"false")),v),B=t(s(m),v);class U{init(e){this.controls=e,this.controls.on("select",this.select,this)}addElement(e){g("false",e),this.controls.addElement(e)}setAllGrabbedToFalse(){W(this.controls.elements)}hasAnyGrabbed(){return B(this.controls.elements)}select({element:e}){var t=m(e);this.setAllGrabbedToFalse(),t||g("true",e)}}let b="aria-dropeffect",V=l(b,"none"),Y=l(b,"move"),y=n(c(b)),Q=t(i(Y),y),Z=t(i(V),y);class _{init(e){this.controls=e}setAllToMove(){Q(this.controls.elements)}setAllToNone(){Z(this.controls.elements)}}_.DropEffect={COPY:"copy",MOVE:"move",EXECUTE:"execute",POPUP:"popup",NONE:"none"};class w{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 x{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 X(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)}}X(P=k,[{key:"setElementOpacity",value:function(e,t){k.setOpacity(e,"borderColor",t),k.setOpacity(e,"boxShadow",t),k.setOpacity(e,"background",t)}},{key:"setOpacity",value:function(e,t,i){if("background"===t)k.setOpacity(e,"backgroundColor",i),k.setOpacity(e,"backgroundImage",i);else{i=void 0===i?1:i/100;var n,s=e.css(t),o=r(t,"");for(n in e.css(o),o)break;o=e.css(n),o=k.setAlphas(o=""!==o&&"none"!==o?o:s,"rgba(",i);o=k.setAlphas(o,"rgb(",i),e.css(r(t,o))}function r(e,t){var i;return"borderColor"===e?{borderTopColor:t,borderRightColor:t,borderBottomColor:t,borderLeftColor:t}:((i={})[e]=t,i)}}},{key:"setAlphas",value:function(e,t,i){if(e){for(var n=e.indexOf(t);-1!==n;){var s=e.indexOf(")",n),o=e.substring(n+t.length,s).split(",");o[3]=void 0!==o[3]?parseFloat(o[3])*i:i,n=(e=e.substring(0,n)+"rgba("+o.join(",")+e.substring(s,e.length)).indexOf(t,s)}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")||k.setElementOpacity(e,t)},function(){e.parent().hasClass("h5p-dragging")||setTimeout(function(){e.removeClass("h5p-draggable-hover"),k.setElementOpacity(e,t)},1)}),k.setElementOpacity(e,t)}},{key:"strip",value:function(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}}]),Object.defineProperty(P,"prototype",{writable:!1});var P,C=k;function k(){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function")}var H=H5P.jQuery,K=(()=>{function s(e,t,i){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");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}for(var e=s,t=e.prototype,i=[{key:"appendTo",value:function(e,t){var n=this,i='<div class="h5p-inner"></div>',s="",o=(n.showLabel&&(i='<div class="h5p-label">'+n.label+'<span class="h5p-hidden-read"></span></div>'+i,s=" h5p-has-label"),i='<span class="h5p-hidden-read">'+n.l10n.prefix.replace("{num}",n.id+1)+(n.showLabel?"":n.label)+"</span>"+i,n.$dropZone=H("<div/>",{class:"h5p-dropzone"+s,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=C.elementToDraggable(t,e);return!!e&&n.accepts(e.draggable,t)},drop:function(e,t){var i=H(this);C.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(){C.setOpacity(H(this).addClass("h5p-over"),"background",n.backgroundOpacity)},out:function(){C.setOpacity(H(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")}),H5P.JoubelUI.createTip(n.tip,{tipLabel:n.l10n.tipLabel,tabcontrol:!0}));o instanceof H5P.jQuery&&H("<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(){C.setOpacity(this.$dropZone.children(".h5p-label"),"background",this.backgroundOpacity),C.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,s=n.$dropZone.parent()[0].getBoundingClientRect(),e=n.autoAlignable.spacing/n.autoAlignable.size.width*100,o=n.autoAlignable.spacing/n.autoAlignable.size.height*100,r={x:n.x+e,y:n.y+o},a=n.$dropZone[0].getBoundingClientRect(),l={x:a.width-2*e,y:a.height-2*o},h={x:l.x,y:l.y},c=0,u=function(){t.css({left:r.x+"%",top:r.y+"%"}),n.trigger("elementaligned",t);var e=i.width+n.autoAlignable.spacing,e=(h.x-=e,r.x+=e/s.width*100,i.height+n.autoAlignable.spacing);c<e&&(c=e)},d=0;d<n.alignables.length;d++){if(t=n.alignables[d],i=t[0].getBoundingClientRect(),!(h.x>=i.width)&&(h.x=l.x,r.x=n.x+e,c&&(h.y-=c,r.y+=c/s.height*100,c=0),h.y<=0))return;u()}}},{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=[]}}],n=0;n<i.length;n++){var o=i[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}return Object.defineProperty(e,"prototype",{writable:!1}),s})();function T(e){return(T="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 D(e,t){return(D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e){return e.stopPropagation()}var A=H5P.jQuery,G=(()=>{var e=c,t=H5P.EventDispatcher;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),i=c,n=(()=>{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}})();var i,n,h=function(){var e,t=S(i),t=(e=n?(e=S(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===T(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return I(t)};function c(e,t,i,n,s,o){var r;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a=I(r=h.call(this));if(a.$=A(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=s,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 r}for(var s=(e=c).prototype,o=[{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 s,o=this;null===i?(s={},o.elements.push(s),i=o.elements.length-1):s=o.elements[i],A.extend(s,{clone:function(){o.attachElement(null,n,e)},reset:function(){void 0!==s.dropZone&&(o.trigger("leavingDropZone",s),delete s.dropZone),o.multiple&&(s.$.remove(),delete o.elements[i],o.trigger("elementremove",s.$[0])),delete s.position}}),s.$=A("<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",E).on("touchstart",E).on("touchend",E).draggable({revert:function(e){n.removeClass("h5p-dragging");var t=A(this);return t.data("uiDraggable").originalPosition={top:o.y+"%",left:o.x+"%"},o.updatePlacement(s),t[0].setAttribute("aria-grabbed","false"),o.trigger("dragend"),!e},start:function(){var e=A(this),t=o.mustCopyElement(s);t&&s.clone(),e.removeClass("h5p-wrong").detach().appendTo(n),n.addClass("h5p-dragging"),C.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=A(this),t=(s.position=C.positionToPercentage(n,e),e.css(s.position),e.data("addToZone"));void 0!==t?(e.removeData("addToZone"),o.addToDropZone(i,s,t)):s.reset()}}).css("position",""),(o.element=s).position&&(s.$.css(s.position),o.updatePlacement(s)),C.addHover(s.$,o.backgroundOpacity),H5P.newRunnable(o.type,e,s.$),A('<span class="h5p-hidden-read">'+o.l10n.prefix.replace("{num}",o.draggableNum)+"</span>").prependTo(s.$),A('<span class="h5p-hidden-read"></span>').appendTo(s.$),setTimeout(function(){C.setElementOpacity(s.$,o.backgroundOpacity)},0),o.trigger("elementadd",s.$[0])}},{key:"setFeedback",value:function(t,i){this.elements.forEach(function(e){e.dropZone===i&&(void 0===e.$feedback&&(e.$feedback=A("<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 s=0;s<n.elements.length;s++)if(s!==e&&void 0!==n.elements[s]&&n.elements[s].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"),C.setElementOpacity(e.$,self.backgroundOpacity),i=(i=this.allDropzones[e.dropZone].label)?((t=document.createElement("div")).innerHTML=i,t.innerText):e.dropZone+1,e.$suffix=A('<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:""}),C.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,s,o,r,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--);else for(n=0;n<this.elements.length;n++)if(void 0!==(o=this.elements[n])&&void 0!==o.dropZone){for(r=!1,s=0;s<t.length;s++)if(o.dropZone===t[s]){!0!==e&&this.markElement(o,"correct",i),r=!0,this.rawPoints++,a++;break}r||(!0!==e&&this.markElement(o,"wrong",i),a--)}return a}},{key:"markElement",value:function(e,t,i){var n=A("<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),C.setElementOpacity(e.$,this.backgroundOpacity)}}],r=0;r<o.length;r++){var a=o[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}return Object.defineProperty(e,"prototype",{writable:!1}),c})(),M=H5P.jQuery,O=0;function N(e,t,i){function n(e){for(var t=0;t<s.drop.elements.length;t++)s.drop.elements[t].setAttribute("aria-dropeffect",e)}var r=this,s=(O++,this.id=this.contentId=t,this.contentData=i,H5P.Question.call(r,"dragquestion"),this.options=M.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,r.$noDropZone=M('<div class="h5p-dq-no-dz" role="button" style="display:none;"><span class="h5p-hidden-read">'+r.options.noDropzone+"</span></div>"),J(r.draggables,r.dropZones,r.$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,h=0;h<l.length;h++){var c=l[h];void 0===this.correctDZs[c]&&(this.correctDZs[c]=[]),this.correctDZs[c].push(f)}}this.weight=1;for(var u=function(e){return!(void 0===e.dropZones||!e.dropZones.length)},d={prefix:r.options.grabbablePrefix.replace("{total}",a.elements.filter(u).length),suffix:r.options.grabbableSuffix,correctAnswer:r.options.correctAnswer,wrongAnswer:r.options.wrongAnswer},p=1,f=0;f<a.elements.length;f++){var g=a.elements[f];if(u(g)){void 0!==this.backgroundOpacity&&(g.backgroundOpacity=this.backgroundOpacity);var m=null,m=(i&&void 0!==i.previousState&&void 0!==i.previousState.answers&&void 0!==i.previousState.answers[f]&&(m=i.previousState.answers[f]),new G(g,f,m,d,a.dropZones,p++)),v="dragging"===r.options.behaviour.dropZoneHighlighting;for(m.on("elementadd",function(e){s.drag.addElement(e.data)}),m.on("elementremove",function(e){s.drag.removeElement(e.data),"true"===e.data.getAttribute("aria-grabbed")&&(s.drag.firesEvent("select",e.data),e.data.removeAttribute("aria-grabbed"))}),m.on("focus",function(e){s.drag.setTabbable(e.data),e.data.focus()}),m.on("dragstart",function(e){v&&r.$container.addClass("h5p-dq-highlight-dz"),n(e.data)}),m.on("dragend",function(){v&&r.$container.removeClass("h5p-dq-highlight-dz"),n("none")}),m.on("interacted",function(){r.answered=!0,r.triggerXAPI("interacted")}),m.on("leavingDropZone",function(e){r.dropZones[e.data.dropZone].removeAlignable(e.data.$)}),this.draggables[f]=m,h=0;h<g.dropZones.length;h++)o[g.dropZones[h]]=!1}}this.numDropZonesWithoutElements=0;var b={prefix:r.options.dropzonePrefix.replace("{total}",a.dropZones.length),tipLabel:r.options.tipLabel,tipAvailable:r.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:r.options.behaviour.autoAlignSpacing,size:r.options.question.settings.size},this.dropZones[f]=new K(y,f,b),this.dropZones[f].on("elementaligned",function(e){for(var t=e.data,i=0;i<r.draggables.length;i++){var n=r.draggables[i];if(n&&n.elements&&n.elements.length)for(var s=0;s<n.elements.length;s++){var o=n.elements[s];if(o&&o.$[0]===t[0])return void(o.position=C.positionToPercentage(r.$container,o.$))}}})}this.on("resize",r.resize,r),this.on("domChanged",function(e){r.contentId===e.data.contentId&&r.trigger("resize")}),this.on("enterFullScreen",function(){r.$container&&(r.$container.parents(".h5p-content").css("height","100%"),r.trigger("resize"))}),this.on("exitFullScreen",function(){r.$container&&(r.$container.parents(".h5p-content").css("height","auto"),r.trigger("resize"))})}((N.prototype=Object.create(H5P.Question.prototype)).constructor=N).prototype.registerDomElements=function(){var t,e,i=this,n=(i.options.behaviour.showTitle&&(i.$introduction=M('<p class="h5p-dragquestion-introduction" id="dq-intro-'+O+'">'+i.options.question.settings.questionTitle+"</p>"),i.setIntroduction(i.$introduction)),"");void 0!==this.options.question.settings.background&&(n+="h5p-dragquestion-has-no-background"),"always"===i.options.behaviour.dropZoneHighlighting&&(n&&(n+=" "),n+="h5p-dq-highlight-dz-always"),i.setContent(i.createQuestionContent(),{class:n}),!1!==H5P.canHasFullScreen&&this.options.behaviour.enableFullScreen&&(e=M("<div/>",{class:"h5p-my-fullscreen-button-enter",title:this.options.localize.fullscreen,role:"button",tabindex:0,on:{click:t=function(){H5P.isFullscreen?H5P.exitFullScreen(i.$container):H5P.fullScreen(i.$container.parent().parent(),i)},keypress:function(e){13!==e.which&&32!==e.which||(t(),e.preventDefault())}},prependTo:this.$container.parent()}),this.on("enterFullScreen",function(){e.attr("class","h5p-my-fullscreen-button-exit"),e.attr("title",this.options.localize.exitFullscreen)}),this.on("exitFullScreen",function(){e.attr("class","h5p-my-fullscreen-button-enter"),e.attr("title",this.options.localize.fullscreen)})),i.registerButtons(),setTimeout(function(){i.trigger("resize")},200)},N.prototype.getXAPIData=function(){var e=this.createXAPIEventTemplate("answered");return this.addQuestionToXAPI(e),this.addResponseToXAPI(e),{statement:e.data.statement}},N.prototype.addQuestionToXAPI=function(e){e=e.getVerifiedStatementValue(["object","definition"]);M.extend(e,this.getXAPIDefinition())},N.prototype.getXAPIDefinition=function(){var e={};e.description={"en-US":M("<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":M("<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":M("<div>"+this.options.question.task.dropZones[t].label+"</div>").text()}}),this.options.question.task.dropZones[t].correctElements)for(var s=0;s<this.options.question.task.dropZones[t].correctElements.length;s++){var o=this.options.question.task,r=o.elements[o.dropZones[t].correctElements[s]];!r||r.dropZones.indexOf(t.toString())<0||(n||(e.correctResponsesPattern[0]+="[,]"),e.correctResponsesPattern[0]+=t+"[.]"+o.dropZones[t].correctElements[s],n=!1)}return e},N.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()},N.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("[,]"):""},N.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}})},N.prototype.createQuestionContent=function(){this.$container=M('<div class="h5p-inner" role="application" aria-labelledby="dq-intro-'+O+'"></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),((e,t)=>{setTimeout(function(){C.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},N.prototype.registerButtons=function(){this.options.behaviour.enableCheckButton&&this.addSolutionButton(),this.addRetryButton()},N.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})},N.prototype.addExplanation=function(){var e=this,t=this.options.question.task,a=[];t.dropZones.forEach(function(n,s){var i,o,r={correct:n.tipsAndFeedback.feedbackOnCorrect,incorrect:n.tipsAndFeedback.feedbackOnIncorrect};void 0===r.correct&&void 0===r.incorrect||(i=n.correctElements,o={},e.draggables.forEach(function(t){t.elements.forEach(function(e){e.dropZone==s&&(o[t.id]={instance:t,correct:-1!==i.indexOf(""+t.id)})})}),Object.keys(o).forEach(function(e){var e=o[e],t=C.strip(e.instance.type.params.alt||e.instance.type.params.text)||"?",i=C.strip(n.label);e.correct&&r.correct?(a.push({correct:i+" + "+t,text:r.correct}),e.instance.setFeedback(r.correct,s)):!e.correct&&r.incorrect&&(a.push({correct:i+" + ",wrong:t,text:r.incorrect}),e.instance.setFeedback(r.incorrect,s))}))}),0!==a.length&&this.setExplanation(a,this.options.feedbackHeader)},N.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})},N.prototype.addElement=function(e,t,i){return M('<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)},N.prototype.resize=function(e){var t,i,n,s,o=this;void 0!==this.$container&&this.$container.is(":visible")&&(o.dropZones.forEach(function(e){e.updateBackgroundOpacity()}),(e=e&&e.data&&e.data.decreaseSize)||o.$container.parents(".h5p-standalone.h5p-dragquestion").css("width",""),i=(t=this.options.question.settings.size).width/t.height,n=(n=this.$container.parent()).width()-parseFloat(n.css("margin-left"))-parseFloat(n.css("margin-right")),(s=o.$container.parents(".h5p-standalone.h5p-dragquestion.h5p-semi-fullscreen")).length&&(s.css("width",""),e||(o.$container.css("width","10px"),s.css("width",""),setTimeout(function(){o.trigger("resize",{decreaseSize:!0})},200)),e=M(window.frameElement))&&(n=e.parent().width(),s.css("width",n+"px")),e=n/i,n<=0&&(n=t.width,e=t.height),this.$container.css({width:n+"px",height:e+"px",fontSize:n/t.width*16+"px"}))},N.prototype.disableDraggables=function(){this.draggables.forEach(function(e){e.disable()})},N.prototype.enableDraggables=function(){this.draggables.forEach(function(e){e.enable()})},N.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")},N.prototype.showSolutions=function(){this.showAllSolutions(),this.showScore(),this.hideButton("check-answer"),this.hideButton("try-again"),this.disableDraggables()},N.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()},N.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},N.prototype.getMaxScore=function(){return this.options.behaviour.singlePoint?this.weight:this.calculateMaxScore()},N.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},N.prototype.getAnswerGiven=function(){return this.answered||this.blankIsCorrect},N.prototype.showScore=function(){var e=this.calculateMaxScore(),t=(this.options.behaviour.singlePoint&&(e=1),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)},N.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=[],s=0;s<i.elements.length;s++){var o=i.elements[s];void 0!==o&&void 0!==o.dropZone&&n.push({x:o.position?Number(o.position.left.replace("%","")):null,y:o.position?Number(o.position.top.replace("%","")):null,dz:o.dropZone})}n.length&&(e.answers[t]=n)}}return e},N.prototype.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"Drag and drop")};var J=function(r,a,l){function h(){c.draggable.trigger("dragend"),c.element.$.removeClass("h5p-draggable-hover"),C.setElementOpacity(c.element.$,c.draggable.backgroundOpacity),-1!==u.drop.elements.indexOf(l)&&(u.drop.removeElement(l),l.style.display="none");for(var e,t=0;t<a.length;t++){var i=a[t];i.dehighlight(),-1!==u.drop.elements.indexOf(i.$dropZone[0])&&u.drop.removeElement(i.$dropZone[0])}(c.element.$.is(":visible")?c.element.$:(e=c.draggable.elements[c.draggable.elements.length-1].$,u.drag.setTabbable(e[0]),e)).focus(),c=void 0}var c,u={drag:new p([new w,new x,new U]),drop:new p([new w,new x,new _])};u.drag.useNegativeTabIndex(),u.drop.useNegativeTabIndex();return u.drag.on("select",function(e){u.drag.removeElement(l);var t,i=C.elementToDraggable(r,e.element);if(c)h();else{(c=i).element.$.addClass("h5p-draggable-hover"),C.setElementOpacity(c.element.$,c.draggable.backgroundOpacity),c.draggable.trigger("dragstart",c.draggable.mustCopyElement(c.element)?"copy":"move"),u.drop.addElement(l),l.style.display="block",l.style.left=c.draggable.x+"%",l.style.top=c.draggable.y+"%",l.style.width=c.draggable.width+"em",l.style.height=c.draggable.height+"em";for(var n=0;n<a.length;n++){var s=a[n],o=c.draggable.isInDropZone(s.id)&&e.element!==c.draggable.element.$[0];(s.accepts(c.draggable,r)||o)&&(s.highlight(),u.drop.addElement(s.$dropZone[0]),t&&c.element.dropZone!==s.id||(t=s.$dropZone))}t?(u.drop.setTabbable(t[0]),t.focus()):u.drag.addElement(l)}}),u.drop.on("select",function(e){c&&(e.element===l?(void 0!==c.element.dropZone&&c.element.reset(),void 0!==c&&(c.element.$.css({left:c.draggable.x+"%",top:c.draggable.y+"%",width:c.draggable.width+"em",height:c.draggable.height+"em"}),c.draggable.updatePlacement(c.element),c.element.$[0].setAttribute("aria-grabbed","false"),h())):(e=C.elementToDropZone(a,e.element),c.draggable.mustCopyElement(c.element)&&c.element.clone(),c.draggable.addToDropZone(c.index,c.element,e.id),c.element.$.css({left:e.x+"%",top:e.y+"%"}),-1===e.getIndexOf(c.element.$)&&e.alignables.push(c.element.$),e.autoAlign(),c.element.$[0].setAttribute("aria-grabbed","false"),h()))}),u};H5P.DragQuestion=N})();let 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_0_aaaaaa_40x100.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAe0lEQVRoge3OMQHAIBAAMcC/kjdZJHTI0A4XBdkz86wfO18H3hRUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUBVVBVVAVVAVVQVVQFVQFVUFVUBVUF8O8A8WdY6opAAAAAElFTkSuQmCC","jQuery.ui-1.10/images/ui-bg_glass_55_fbf9ee_1x400.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAP0lEQVQ4je3PMQrAMABC0a/3v2zX0mCXNkOgc6C4PARd5DqPGKCU8luS8SbAQhiCQRgJE56kZTfbbP9RSvnkBsWcEAZRWcgqAAAAAElFTkSuQmCC","jQuery.ui-1.10/images/ui-bg_flat_75_ffffff_40x100.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAeUlEQVRoge3OMQHAIBAAsVL/nh8JDDfAkCjImpn5HvbfDpwIVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVoKVYCVYCVaClWAlWAlWgpVgJVgJVhtqiwTEKTLXTgAAAABJRU5ErkJggg==","jQuery.ui-1.10/images/ui-bg_glass_65_ffffff_1x400.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAAMElEQVQ4je3LIQ4AIBTD0O3f/8wrFgmKhMy8pKJKwkhSKeVbbGuAPU9f4PIopTxgAeS0DRtI4yK0AAAAAElFTkSuQmCC","jQuery.ui-1.10/images/ui-bg_glass_75_e6e6e6_1x400.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAGQCAYAAABvWArbAAAANUlEQVQ4je3LMQoAIBADwb38/6t5wFXaWAiCtUiaYZvF9hBACOFbuntVVe11B0CSjjeE8BwThQIJ8dhEl0YAAAAASUVORK5CYII=","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_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/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_222222_256x240.png":"data:image/png;base64, ","jQuery.ui-1.10/images/ui-icons_454545_256x240.png":"data:image/png;base64, ","jQuery.ui-1.10/images/ui-icons_2e83ff_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, ","H5P.FontIcons-1.0/selection.json":"data:application/json;base64, "};(()=>{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,n=(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)}}),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};

setTimeout(() => {
  const $h5p = $(".h5p-content");
  const $el = $("#inner_container");
  const VerticalScrollbar = $el[0].scrollHeight - $el[0].clientHeight;

  if (aspectRatio === 0) {
    const contentSize = $h5p[0].getBoundingClientRect();
    aspectRatio = contentSize.width / contentSize.height;
  }

  if (VerticalScrollbar > 0) {
    let introHeight = 0;
    $('.intro-text').each(function () {
      introHeight += $(this).outerHeight(true);
    });
    introHeight += ($('.h5p-question-introduction').height() || 0) + ($('.h5p-question-buttons').height() || 0);

    newHeight = $el.height() - introHeight;
    newWidth = Math.floor(newHeight * aspectRatio);

    if (newWidth > $el.width()) {
      newWidth = $el.width();
    }

    $h5p.css("width", newWidth + "px");
    H5P.instances[0].trigger("resize");
  }
}, 400);