1customDropdownWithLinks={CLASS_OPEN:"open",CLASS_ACTIVE:"active",CLASS_HAS_BEEN_OPENED:"has-been-opened",KEYCODE_ENTER:13,KEYCODE_ESC:27,KEYCODE_TAB:9,KEYCODE_UP:38,KEYCODE_DOWN:40,OPTION_LIST:"UL",OPTION_WRAP:"LI",FIRST_OPTION_WRAP:"LI:first-child",LAST_OPTION_WRAP:"LI:last-child",LINK:"A",initDropdown:function(a){customDropdownWithLinks.makeDropdownFocusable(a);customDropdownWithLinks.addAccessibilityAttributes(a);customDropdownWithLinks.initOnClickListener(a);customDropdownWithLinks.initDropdownFocusedListeners(a)}, 2makeDropdownFocusable:function(a){customDropdownWithLinks.isAttributeMissing(a,"tabindex")&&$(a).attr("tabindex","0")},addAccessibilityAttributes:function(a){customDropdownWithLinks.isAttributeMissing(a,"aria-haspopup")&&$(a).attr("aria-haspopup","listbox");customDropdownWithLinks.isAttributeMissing(a,WcmsConstants.ATTR_ARIA_EXPANDED)&&$(a).attr(WcmsConstants.ATTR_ARIA_EXPANDED,"false");var b=$(a).find(customDropdownWithLinks.OPTION_LIST);customDropdownWithLinks.isAttributeMissing(b,"role")&&b.attr("role", 3"listbox");customDropdownWithLinks.isAttributeMissing(b,"tabindex")&&b.attr("tabindex","-1");b=$(a).find(customDropdownWithLinks.OPTION_LIST).find(customDropdownWithLinks.LINK);var c=!customDropdownWithLinks.isAttributeMissing(a,"id");b.each(function(){var b=!customDropdownWithLinks.isAttributeMissing(this,"id");customDropdownWithLinks.isAttributeMissing(this,"role")&&$(this).attr("role","option");customDropdownWithLinks.isAttributeMissing(this,"aria-labelledby")&&b&&c&&$(this).attr("aria-labelledby", 4$(a).attr("id")+" "+$(this).attr("id"))})},isAttributeMissing:function(a,b){a=$(a).attr(b);return"undefined"===typeof a||!1===a},initOnClickListener:function(a){$(a).on("click",function(){customDropdownWithLinks.toggle(a)})},initDropdownFocusedListeners:function(a){function b(a){return customDropdownWithLinks.isOpen(a)&&!customDropdownWithLinks.areOptionsActive(a)}$(a).off(WcmsConstants.keydown).on(WcmsConstants.keydown,function(c){switch(c.keyCode||c.which){case customDropdownWithLinks.KEYCODE_ENTER:if(!customDropdownWithLinks.isOpen(a)&& 5customDropdownWithLinks.hasBeenOpenedBefore(a))customDropdownWithLinks.showOptions(a);else if(!customDropdownWithLinks.isOpen(a)||b(a))customDropdownWithLinks.setAsOpenedBefore(a),customDropdownWithLinks.toggle(a);break;case customDropdownWithLinks.KEYCODE_UP:case customDropdownWithLinks.KEYCODE_DOWN:b(a)&&(c.preventDefault(),customDropdownWithLinks.focusFirstOption(a));break;case customDropdownWithLinks.KEYCODE_ESC:customDropdownWithLinks.isOpen(a)&&customDropdownWithLinks.closeDropdown(a)}})},focusFirstOption:function(a){$(a).find(customDropdownWithLinks.OPTION_LIST).find(customDropdownWithLinks.FIRST_OPTION_WRAP).find(customDropdownWithLinks.LINK).focus(); 6customDropdownWithLinks.setOptionsActive(a)},setOptionsActive:function(a){$(a).find(customDropdownWithLinks.OPTION_LIST).addClass(customDropdownWithLinks.CLASS_ACTIVE)},setOptionsInactive:function(a){$(a).find(customDropdownWithLinks.OPTION_LIST).removeClass(customDropdownWithLinks.CLASS_ACTIVE)},areOptionsActive:function(a){return $(a).find(customDropdownWithLinks.OPTION_LIST).hasClass(customDropdownWithLinks.CLASS_ACTIVE)},toggle:function(a){customDropdownWithLinks.isOpen(a)?customDropdownWithLinks.closeDropdown(a): 7customDropdownWithLinks.openDropdownAndInitListeners(a)},openDropdownAndInitListeners:function(a){customDropdownWithLinks.showOptions(a);customDropdownWithLinks.initOptionSelectingListeners(a);customDropdownWithLinks.initCloseOnBodyClickListener(a)},showOptions:function(a){$(a).addClass(customDropdownWithLinks.CLASS_OPEN);$(a).attr(WcmsConstants.ATTR_ARIA_EXPANDED,!0)},isOpen:function(a){return $(a).hasClass(customDropdownWithLinks.CLASS_OPEN)},setAsOpenedBefore:function(a){$(a).addClass(customDropdownWithLinks.CLASS_HAS_BEEN_OPENED)}, 8hasBeenOpenedBefore:function(a){return $(a).hasClass(customDropdownWithLinks.CLASS_HAS_BEEN_OPENED)},closeDropdown:function(a){customDropdownWithLinks.hideOptions(a);customDropdownWithLinks.setOptionsInactive(a);$(a).focus()},hideOptions:function(a){$(a).removeClass(customDropdownWithLinks.CLASS_OPEN);$(a).attr(WcmsConstants.ATTR_ARIA_EXPANDED,!1)},initOptionSelectingListeners:function(a){var b=$(a).find(customDropdownWithLinks.OPTION_LIST).find(customDropdownWithLinks.OPTION_WRAP).find(customDropdownWithLinks.LINK);
9$(b).on(WcmsConstants.keydown,function(b){var c=$(this).closest("LI");switch(b.keyCode||b.which){case customDropdownWithLinks.KEYCODE_UP:b.preventDefault();c.prev().length&&c.prev().find(customDropdownWithLinks.LINK).focus();break;case customDropdownWithLinks.KEYCODE_DOWN:b.preventDefault();c.next().length&&c.next().find(customDropdownWithLinks.LINK).focus();break;case customDropdownWithLinks.KEYCODE_ESC:customDropdownWithLinks.closeDropdown(a)}})},initCloseOnBodyClickListener:function(a){$("body").on("click", 10function(b){if(customDropdownWithLinks.isOpen(a)){var c=a.replace("[","").replace("]","");customDropdownWithLinks.isAttributeMissing(b.target,c)&&customDropdownWithLinks.closeDropdown(a)}})}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.