/*! HTML_CodeSniffer - v2.0.7 - 2016-09-07 */
/**
* +--------------------------------------------------------------------+
* | This HTML_CodeSniffer file is Copyright (c) |
* | Squiz Pty Ltd (ABN 77 084 670 600) |
* +--------------------------------------------------------------------+
* | IMPORTANT: Your use of this Software is subject to the terms of |
* | the Licence provided in the file licence.txt. If you cannot find |
* | this file please contact Squiz (www.squiz.com.au) so we may |
* | provide you a copy. |
* +--------------------------------------------------------------------+
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['htmlcs'], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
var exports = factory();
for (var prop in exports) {
root[prop] = exports[prop];
}
}
}(this, function () {
var _global = {}
_global.HTMLCS_Section508={name:"Section508",description:"U.S. Section 508 Standard",sniffs:["A","B","C","D","G","H","I","J","K","L","M","N","O","P"],getMsgInfo:function(a){var b=a.split(".",3),c=b[1].toLowerCase(),d=[["Section","1194.22 ("+c+")"]];return d}},_global.HTMLCS_Section508_Sniffs_A={register:function(){return["_top","img","object","bgsound","audio"]},process:function(a,b){if(a===b)this.addNullAltTextResults(b),this.addMediaAlternativesResults(b);else{var c=a.nodeName.toLowerCase();"object"!==c&&"bgsound"!==c&&"audio"!==c||HTMLCS.addMessage(HTMLCS.NOTICE,a,"For multimedia containing audio only, ensure an alternative is available, such as a full text transcript.","Audio")}},testNullAltText:function(a){var b={img:{generalAlt:[],missingAlt:[],ignored:[],nullAltWithTitle:[],emptyAltInLink:[]},inputImage:{generalAlt:[],missingAlt:[]},area:{generalAlt:[],missingAlt:[]}};elements=HTMLCS.util.getAllElements(a,'img, area, input[type="image"]');for(var c=0;c0&&HTMLCS.addMessage(HTMLCS.NOTICE,b,'If content is hidden and made visible using scripting (such as "click to expand" sections), ensure this content is readable when scripts and style sheets are disabled.',"HiddenText")}},testPresentationMarkup:function(a){_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1.testPresentationMarkup(a)},testHeadingOrder:function(a){for(var b=0,c=HTMLCS.util.getAllElements(a,"h1, h2, h3, h4, h5, h6"),d=0;d1){var f="should be an h"+(b+1)+" to be properly nested";0===b&&(f="appears to be the primary document heading, so should be an h1 element"),HTMLCS.addMessage(HTMLCS.ERROR,c[d],"The heading structure is not logically nested. This h"+e+" element "+f+".","HeadingOrder")}b=e}}},_global.HTMLCS_Section508_Sniffs_G={register:function(){return["table"]},process:function(a,b){HTMLCS.util.isLayoutTable(a)===!0&&HTMLCS.addMessage(HTMLCS.NOTICE,a,"This table has no headers. If this is a data table, ensure row and column headers are identified using th elements.","TableHeaders")}},_global.HTMLCS_Section508_Sniffs_H={register:function(){return["table"]},process:function(a,b){for(var c=HTMLCS.util.testTableHeaders(a),d=0;d0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all th elements in this table contain an id attribute. These cells should contain ids so that they may be referenced by td elements' headers attributes.","MissingHeaderIds"),c.missingTd.length>0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all td elements in this table contain a headers attribute. Each headers attribute should list the ids of all th elements associated with that cell.","IncompleteHeadersAttrs")))}},_global.HTMLCS_Section508_Sniffs_I={register:function(){return["frame","iframe","object"]},process:function(a,b){var c=a.nodeName.toLowerCase(),d=a.hasAttribute("title"),e=!0;d===!0&&(e=HTMLCS.util.isStringEmpty(a.getAttribute("title"))),e===!0&&HTMLCS.addMessage(HTMLCS.ERROR,b,"This "+c+" element is missing title text. Frames should be titled with text that facilitates frame identification and navigation.","Frames")}},_global.HTMLCS_Section508_Sniffs_J={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that no component of the content flickers at a rate of greater than 2 and less than 55 times per second.","Flicker")}},_global.HTMLCS_Section508_Sniffs_K={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"If this page cannot be made compliant, a text-only page with equivalent information or functionality should be provided. The alternative page needs to be updated in line with this page's content.","AltVersion")}},_global.HTMLCS_Section508_Sniffs_L={register:function(){return["_top"]},process:function(a,b){a===b&&(this.addProcessLinksMessages(b),this.testKeyboard(b))},addProcessLinksMessages:function(a){for(var b=this.processLinks(a),c=0;c1&&"#"===c.charAt(0)){var d=c.substr(1);try{var e=b;e.ownerDocument&&(e=e.ownerDocument);var f=e.getElementById(d);null===f&&(f=e.querySelector('a[name="'+d+'"]')),null!==f&&HTMLCS.util.contains(b,f)!==!1||(HTMLCS.isFullDoc(b)===!0||"body"===b.nodeName.toLowerCase()?HTMLCS.addMessage(HTMLCS.ERROR,a,'This link points to a named anchor "'+d+'" within the document, but no anchor exists with that name.',"NoSuchID"):HTMLCS.addMessage(HTMLCS.WARNING,a,'This link points to a named anchor "'+d+'" within the document, but no anchor exists with that name in the fragment tested.',"NoSuchIDFragment"))}catch(a){}}}}},_global.HTMLCS_Section508_Sniffs_P={register:function(){return["_top","meta"]},process:function(a,b){a===b?HTMLCS.addMessage(HTMLCS.NOTICE,b,"If a timed response is required on this page, alert the user and provide sufficient time to allow them to indicate that more time is required.","TimeLimit"):a.hasAttribute("http-equiv")===!0&&"refresh"===String(a.getAttribute("http-equiv")).toLowerCase()&&/^[1-9]\d*/.test(a.getAttribute("content").toLowerCase())===!0&&(/url=/.test(a.getAttribute("content").toLowerCase())===!0?HTMLCS.addMessage(HTMLCS.ERROR,a,"Meta refresh tag used to redirect to another page, with a time limit that is not zero. Users cannot control this time limit.","MetaRedirect"):HTMLCS.addMessage(HTMLCS.ERROR,a,"Meta refresh tag used to refresh the current page. Users cannot control the time limit for this refresh.","MetaRefresh"))}},_global.HTMLCS_WCAG2A={name:"WCAG2A",description:"Web Content Accessibility Guidelines (WCAG) 2.0 A",sniffs:[{standard:"WCAG2AAA",include:["Principle1.Guideline1_1.1_1_1","Principle1.Guideline1_2.1_2_1","Principle1.Guideline1_2.1_2_2","Principle1.Guideline1_2.1_2_3","Principle1.Guideline1_3.1_3_1","Principle1.Guideline1_3.1_3_1_A","Principle1.Guideline1_3.1_3_2","Principle1.Guideline1_3.1_3_3","Principle1.Guideline1_4.1_4_1","Principle1.Guideline1_4.1_4_2","Principle2.Guideline2_1.2_1_1","Principle2.Guideline2_1.2_1_2","Principle2.Guideline2_2.2_2_1","Principle2.Guideline2_2.2_2_2","Principle2.Guideline2_3.2_3_1","Principle2.Guideline2_4.2_4_1","Principle2.Guideline2_4.2_4_2","Principle2.Guideline2_4.2_4_3","Principle2.Guideline2_4.2_4_4","Principle3.Guideline3_1.3_1_1","Principle3.Guideline3_2.3_2_1","Principle3.Guideline3_2.3_2_2","Principle3.Guideline3_3.3_3_1","Principle3.Guideline3_3.3_3_2","Principle4.Guideline4_1.4_1_1","Principle4.Guideline4_1.4_1_2"]}],getMsgInfo:function(a){return HTMLCS_WCAG2AAA.getMsgInfo(a)}},_global.HTMLCS_WCAG2AA={name:"WCAG2AA",description:"Web Content Accessibility Guidelines (WCAG) 2.0 AA",sniffs:[{standard:"WCAG2AAA",include:["Principle1.Guideline1_1.1_1_1","Principle1.Guideline1_2.1_2_1","Principle1.Guideline1_2.1_2_2","Principle1.Guideline1_2.1_2_4","Principle1.Guideline1_2.1_2_5","Principle1.Guideline1_3.1_3_1","Principle1.Guideline1_3.1_3_1_A","Principle1.Guideline1_3.1_3_2","Principle1.Guideline1_3.1_3_3","Principle1.Guideline1_4.1_4_1","Principle1.Guideline1_4.1_4_2","Principle1.Guideline1_4.1_4_3","Principle1.Guideline1_4.1_4_3_F24","Principle1.Guideline1_4.1_4_3_Contrast","Principle1.Guideline1_4.1_4_4","Principle1.Guideline1_4.1_4_5","Principle2.Guideline2_1.2_1_1","Principle2.Guideline2_1.2_1_2","Principle2.Guideline2_2.2_2_1","Principle2.Guideline2_2.2_2_2","Principle2.Guideline2_3.2_3_1","Principle2.Guideline2_4.2_4_1","Principle2.Guideline2_4.2_4_2","Principle2.Guideline2_4.2_4_3","Principle2.Guideline2_4.2_4_4","Principle2.Guideline2_4.2_4_5","Principle2.Guideline2_4.2_4_6","Principle2.Guideline2_4.2_4_7","Principle3.Guideline3_1.3_1_1","Principle3.Guideline3_1.3_1_2","Principle3.Guideline3_2.3_2_1","Principle3.Guideline3_2.3_2_2","Principle3.Guideline3_2.3_2_3","Principle3.Guideline3_2.3_2_4","Principle3.Guideline3_3.3_3_1","Principle3.Guideline3_3.3_3_2","Principle3.Guideline3_3.3_3_3","Principle3.Guideline3_3.3_3_4","Principle4.Guideline4_1.4_1_1","Principle4.Guideline4_1.4_1_2"]}],getMsgInfo:function(a){return HTMLCS_WCAG2AAA.getMsgInfo(a)}},_global.HTMLCS_WCAG2AAA={name:"WCAG2AAA",description:"Web Content Accessibility Guidelines (WCAG) 2.0 AAA",sniffs:["Principle1.Guideline1_1.1_1_1","Principle1.Guideline1_2.1_2_1","Principle1.Guideline1_2.1_2_2","Principle1.Guideline1_2.1_2_4","Principle1.Guideline1_2.1_2_5","Principle1.Guideline1_2.1_2_6","Principle1.Guideline1_2.1_2_7","Principle1.Guideline1_2.1_2_8","Principle1.Guideline1_2.1_2_9","Principle1.Guideline1_3.1_3_1","Principle1.Guideline1_3.1_3_1_AAA","Principle1.Guideline1_3.1_3_2","Principle1.Guideline1_3.1_3_3","Principle1.Guideline1_4.1_4_1","Principle1.Guideline1_4.1_4_2","Principle1.Guideline1_4.1_4_3_F24","Principle1.Guideline1_4.1_4_3_Contrast","Principle1.Guideline1_4.1_4_6","Principle1.Guideline1_4.1_4_7","Principle1.Guideline1_4.1_4_8","Principle1.Guideline1_4.1_4_9","Principle2.Guideline2_1.2_1_1","Principle2.Guideline2_1.2_1_2","Principle2.Guideline2_2.2_2_2","Principle2.Guideline2_2.2_2_3","Principle2.Guideline2_2.2_2_4","Principle2.Guideline2_2.2_2_5","Principle2.Guideline2_3.2_3_2","Principle2.Guideline2_4.2_4_1","Principle2.Guideline2_4.2_4_2","Principle2.Guideline2_4.2_4_3","Principle2.Guideline2_4.2_4_5","Principle2.Guideline2_4.2_4_6","Principle2.Guideline2_4.2_4_7","Principle2.Guideline2_4.2_4_8","Principle2.Guideline2_4.2_4_9","Principle3.Guideline3_1.3_1_1","Principle3.Guideline3_1.3_1_2","Principle3.Guideline3_1.3_1_3","Principle3.Guideline3_1.3_1_4","Principle3.Guideline3_1.3_1_5","Principle3.Guideline3_1.3_1_6","Principle3.Guideline3_2.3_2_1","Principle3.Guideline3_2.3_2_2","Principle3.Guideline3_2.3_2_3","Principle3.Guideline3_2.3_2_4","Principle3.Guideline3_2.3_2_5","Principle3.Guideline3_3.3_3_1","Principle3.Guideline3_3.3_3_2","Principle3.Guideline3_3.3_3_3","Principle3.Guideline3_3.3_3_5","Principle3.Guideline3_3.3_3_6","Principle4.Guideline4_1.4_1_1","Principle4.Guideline4_1.4_1_2"],getMsgInfo:function(a){for(var b={Principle1:{name:"Perceivable",link:"http://www.w3.org/TR/WCAG20/#perceivable"},Principle2:{name:"Operable",link:"http://www.w3.org/TR/WCAG20/#operable"},Principle3:{name:"Understandable",link:"http://www.w3.org/TR/WCAG20/#understandable"},Principle4:{name:"Robust",link:"http://www.w3.org/TR/WCAG20/#robust"}},c={CR2:{name:"Full pages",landmark:"cc2",priority:0},CR3:{name:"Complete processes",landmark:"cc3",priority:0},CR4:{name:"Only Accessibility-Supported Ways of Using Technologies",landmark:"cc4",priority:0},CR5:{name:"Non-Interference",landmark:"cc5",priority:0},"1.1.1":{name:"Non-Text Content",landmark:"text-equiv-all",priority:1},"1.2.1":{name:"Audio-only and Video-only (Prerecorded)",landmark:"media-equiv-av-only-alt",priority:1},"1.2.2":{name:"Captions (Prerecorded)",landmark:"media-equiv-captions",priority:1},"1.2.3":{name:"Audio Description or Media Alternative (Prerecorded)",landmark:"media-equiv-audio-desc",priority:1},"1.2.4":{name:"Captions (Live)",landmark:"media-equiv-captions",priority:2},"1.2.5":{name:"Audio Description (Prerecorded)",landmark:"media-equiv-audio-desc",priority:2},"1.2.6":{name:"Sign Language (Prerecorded)",landmark:"media-equiv-sign",priority:3},"1.2.7":{name:"Extended Audio Description (Prerecorded)",landmark:"media-equiv-extended-ad",priority:3},"1.2.8":{name:"Media Alternative (Prerecorded)",landmark:"media-equiv-text-doc",priority:3},"1.2.9":{name:"Audio-only (Live)",landmark:"media-equiv-live-audio-only",priority:3},"1.3.1":{name:"Info and Relationships",landmark:"content-structure-separation-programmatic",priority:1},"1.3.2":{name:"Meaningful Sequence",landmark:"content-structure-separation-sequence",priority:1},"1.3.3":{name:"Sensory Characteristics",landmark:"content-structure-separation-understanding",priority:1},"1.4.1":{name:"Use of Colour",landmark:"visual-audio-contrast-without-color",priority:1},"1.4.2":{name:"Audio Control",landmark:"visual-audio-contrast-dis-audio",priority:1},"1.4.3":{name:"Contrast (Minimum)",landmark:"visual-audio-contrast-contrast",priority:1},"1.4.4":{name:"Resize Text",landmark:"visual-audio-contrast-scale",priority:1},"1.4.5":{name:"Images of Text",landmark:"visual-audio-contrast-text-presentation",priority:1},"1.4.6":{name:"Contrast (Enhanced)",landmark:"visual-audio-contrast7",priority:3},"1.4.7":{name:"Low or No Background Audio",landmark:"visual-audio-contrast-noaudio",priority:3},"1.4.8":{name:"Visual Presentation",landmark:"visual-audio-contrast-visual-presentation",priority:3},"1.4.9":{name:"Images of Text (No Exception)",landmark:"visual-audio-contrast-text-images",priority:3},"2.1.1":{name:"Keyboard",landmark:"keyboard-operation-keyboard-operable",priority:1},"2.1.2":{name:"No Keyboard Trap",landmark:"keyboard-operation-trapping",priority:1},"2.1.3":{name:"Keyboard (No Exception)",landmark:"keyboard-operation-all-funcs",priority:3},"2.2.1":{name:"Timing Adjustable",landmark:"time-limits-required-behaviors",priority:1},"2.2.2":{name:"Pause, Stop, Hide",landmark:"time-limits-pause",priority:1},"2.2.3":{name:"No Timing",landmark:"time-limits-no-exceptions",priority:3},"2.2.4":{name:"Interruptions",landmark:"time-limits-postponed",priority:3},"2.2.5":{name:"Re-authenticating",landmark:"time-limits-server-timeout",priority:3},"2.3.1":{name:"Three Flashes or Below Threshold",landmark:"seizure-does-not-violate",priority:1},"2.3.2":{name:"Three Flashes",landmark:"seizure-three-times",priority:3},"2.4.1":{name:"Bypass Blocks",landmark:"navigation-mechanisms-skip",priority:1},"2.4.2":{name:"Page Titled",landmark:"navigation-mechanisms-title",priority:1},"2.4.3":{name:"Focus Order",landmark:"navigation-mechanisms-focus-order",priority:1},"2.4.4":{name:"Link Purpose (In Context)",landmark:"navigation-mechanisms-refs",priority:1},"2.4.5":{name:"Multiple Ways",landmark:"navigation-mechanisms-mult-loc",priority:2},"2.4.6":{name:"Headings and Labels",landmark:"navigation-mechanisms-descriptive",priority:2},"2.4.7":{name:"Focus Visible",landmark:"navigation-mechanisms-focus-visible",priority:2},"2.4.8":{name:"Location",landmark:"navigation-mechanisms-location",priority:3},"2.4.9":{name:"Link Purpose (Link Only)",landmark:"navigation-mechanisms-link",priority:3},"2.4.10":{name:"Section Headings",landmark:"navigation-mechanisms-headings",priority:3},"3.1.1":{name:"Language of Page",landmark:"meaning-doc-lang-id",priority:1},"3.1.2":{name:"Language of Parts",landmark:"meaning-other-lang-id",priority:2},"3.1.3":{name:"Unusual Words",landmark:"meaning-idioms",priority:3},"3.1.4":{name:"Abbreviations",landmark:"meaning-located",priority:3},"3.1.5":{name:"Reading Level",landmark:"meaning-supplements",priority:3},"3.1.6":{name:"Pronunciation",landmark:"meaning-pronunciation",priority:3},"3.2.1":{name:"On Focus",landmark:"consistent-behavior-receive-focus",priority:1},"3.2.2":{name:"On Input",landmark:"consistent-behavior-unpredictable-change",priority:1},"3.2.3":{name:"Consistent Navigation",landmark:"consistent-behavior-consistent-locations",priority:2},"3.2.4":{name:"Consistent Navigation",landmark:"consistent-behavior-consistent-functionality",priority:2},"3.2.5":{name:"Change on Request",landmark:"consistent-behavior-no-extreme-changes-context",priority:3},"3.3.1":{name:"Error Identification",landmark:"minimize-error-identified",priority:1},"3.3.2":{name:"Labels or Instructions",landmark:"minimize-error-cues",priority:1},"3.3.3":{name:"Error Suggestion",landmark:"minimize-error-suggestions",priority:2},"3.3.4":{name:"Error Prevention (Legal, Financial, Data)",landmark:"minimize-error-reversible",priority:2},"3.3.5":{name:"Help",landmark:"minimize-error-context-help",priority:3},"3.3.6":{name:"Error Prevention (All)",landmark:"minimize-error-reversible-all",priority:3},"4.1.1":{name:"Parsing",landmark:"ensure-compat-parses",priority:1},"4.1.2":{name:"Name, Role, Value",landmark:"ensure-compat-rsv",priority:1}},d=a.split(".",5),e=d[1],f=d[3].split("_").slice(0,3).join("."),g=d[4].split(","),h=[],i=0;i'+g[i][0]+"");var j=['',f,": ",c[f].name,""].join(""),k=(['',b[e].name,""].join(""),[["Success Criterion",j],["Suggested Techniques",h.join(" ")]]);return k}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_1_1_1_1={register:function(){return["_top","img"]},process:function(a,b){if(a===b)this.addNullAltTextResults(b),this.addMediaAlternativesResults(b);else{var c=a.nodeName.toLowerCase();switch(c){case"img":this.testLinkStutter(a),this.testLongdesc(a)}}},addNullAltTextResults:function(a){for(var b=this.testNullAltText(a),c=0;c0;){var e=b.shift();if(1===e.nodeType&&"img"===e.nodeName.toLowerCase()&&e.hasAttribute("alt")===!0){d=e.getAttribute("alt"),d=d?d.replace(/^\s+|\s+$/g,""):"";break}}return d}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_1={register:function(){return["object","embed","applet","bgsound","audio","video"]},process:function(a,b){var c=a.nodeName.toLowerCase();"video"!==c&&HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded audio only, and is not provided as an alternative for text content, check that an alternative text version is available.","G158"),"bgsound"!==c&&"audio"!==c&&HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded video only, and is not provided as an alternative for text content, check that an alternative text version is available, or an audio track is provided that presents equivalent information.","G159,G166")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_2={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded synchronised media and is not provided as an alternative for text content, check that captions are provided for audio content.","G87,G93")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_3={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded synchronised media and is not provided as an alternative for text content, check that an audio description of its video, and/or an alternative text version of the content is provided.","G69,G78,G173,G8")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_4={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains synchronised media, check that captions are provided for live audio content.","G9,G87,G93")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_5={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded synchronised media, check that an audio description is provided for its video content.","G78,G173,G8")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_6={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded synchronised media, check that a sign language interpretation is provided for its audio.","G54,G81")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_7={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains synchronised media, and where pauses in foreground audio is not sufficient to allow audio descriptions to convey the sense of pre-recorded video, check that an extended audio description is provided, either through scripting or an alternate version.","G8")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_8={register:function(){return["object","embed","applet","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains pre-recorded synchronised media or video-only content, check that an alternative text version of the content is provided.","G69,G159")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_2_1_2_9={register:function(){return["object","embed","applet","bgsound","audio"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this embedded object contains live audio-only content, check that an alternative text version of the content is provided.","G150,G151,G157")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1_A={_labelNames:null,register:function(){return["_top"]},process:function(a,b){var c=HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1;a===b&&c.testHeadingOrder(b,HTMLCS.WARNING)}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1_AAA={_labelNames:null,register:function(){return["_top"]},process:function(a,b){var c=HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1;a===b&&c.testHeadingOrder(b,HTMLCS.ERROR)}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1={_labelNames:null,register:function(){return["_top","p","div","input","select","textarea","button","table","fieldset","form","h1","h2","h3","h4","h5","h6"]},process:function(a,b){var c=a.nodeName.toLowerCase();if(a===b)this.testPresentationMarkup(b),this.testEmptyDupeLabelForAttrs(b);else switch(c){case"input":case"textarea":case"button":this.testLabelsOnInputs(a,b);break;case"form":this.testRequiredFieldsets(a);break;case"select":this.testLabelsOnInputs(a,b),this.testOptgroup(a);break;case"p":case"div":this.testNonSemanticHeading(a),this.testListsWithBreaks(a),this.testUnstructuredNavLinks(a);break;case"table":this.testGeneralTable(a),this.testTableHeaders(a),this.testTableCaptionSummary(a);break;case"fieldset":this.testFieldsetLegend(a);break;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":this.testEmptyHeading(a)}},testSemanticPresentationRole:function(a){if(a.hasAttribute("role")&&"presentation"===a.getAttribute("role")){var b=["div","span","b","i"],c=a.querySelectorAll("*:not("+b.join("):not(")+")");c=[].filter.call(c,function(a){return a.hasAttribute("role")===!1}),c.length&&HTMLCS.addMessage(HTMLCS.ERROR,a,'This element\'s role is "presentation" but contains child elements with semantic meaning.',"F92,ARIA4")}},testEmptyDupeLabelForAttrs:function(a){this._labelNames={};for(var b=a.getElementsByTagName("label"),c=0;c0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all th elements in this table contain an id attribute. These cells should contain ids so that they may be referenced by td elements' headers attributes.","H43.MissingHeaderIds"),b.missingTd.length>0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all td elements in this table contain a headers attribute. Each headers attribute should list the ids of all th elements associated with that cell.","H43.MissingHeadersAttrs"))),b.required===!0&&b.allowScope===!0&&b.correct===!1&&c.correct===!1&&(c.used===!1&&b.used===!1?HTMLCS.addMessage(HTMLCS.ERROR,a,"The relationship between td elements and their associated th elements is not defined. Use either the scope attribute on th elements, or the headers attribute on td elements.","H43,H63"):c.used===!1&&(b.missingThId.length>0||b.missingTd.length>0)?(b.missingThId.length>0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all th elements in this table contain an id attribute. These cells should contain ids so that they may be referenced by td elements' headers attributes.","H43.MissingHeaderIds"),b.missingTd.length>0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all td elements in this table contain a headers attribute. Each headers attribute should list the ids of all th elements associated with that cell.","H43.MissingHeadersAttrs")):c.missing.length>0&&b.used===!1?HTMLCS.addMessage(HTMLCS.ERROR,a,"Not all th elements in this table have a scope attribute. These cells should contain a scope attribute to identify their association with td elements.","H63.1"):c.missing.length>0&&(b.missingThId.length>0||b.missingTd.length>0)&&HTMLCS.addMessage(HTMLCS.ERROR,a,"The relationship between td elements and their associated th elements is not defined. Use either the scope attribute on th elements, or the headers attribute on td elements.","H43,H63"))},_testTableScopeAttrs:function(a){var b={th:a.getElementsByTagName("th"),td:a.getElementsByTagName("td")},c={used:!1,correct:!0,missing:[],invalid:[],obsoleteTd:[]};for(var d in b)for(var e=0;e0&&(d=c[0].innerHTML.replace(/^\s*(.*?)\s*$/g,"$1"));var e=HTMLCS.util.getDocumentType(a.ownerDocument);e&&e.indexOf("html5")===-1&&(b=b.replace(/^\s*(.*?)\s*$/g,"$1"),""!==b?HTMLCS.util.isLayoutTable(a)===!0?HTMLCS.addMessage(HTMLCS.ERROR,a,"This table appears to be used for layout, but contains a summary attribute. Layout tables must not contain summary attributes, or if supplied, must be empty.","H73.3.LayoutTable"):(d===b&&HTMLCS.addMessage(HTMLCS.ERROR,a,"If this table is a data table, and both a summary attribute and a caption element are present, the summary should not duplicate the caption.","H39,H73.4"),HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this table is a data table, check that the summary attribute describes the table's organization or explains how to use the table.","H73.3.Check")):HTMLCS.util.isLayoutTable(a)===!1&&HTMLCS.addMessage(HTMLCS.WARNING,a,"If this table is a data table, consider using the summary attribute of the table element to give an overview of this table.","H73.3.NoSummary")),""!==d?HTMLCS.util.isLayoutTable(a)===!0?HTMLCS.addMessage(HTMLCS.ERROR,a,"This table appears to be used for layout, but contains a caption element. Layout tables must not contain captions.","H39.3.LayoutTable"):HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this table is a data table, check that the caption element accurately describes this table.","H39.3.Check"):HTMLCS.util.isLayoutTable(a)===!1&&HTMLCS.addMessage(HTMLCS.WARNING,a,"If this table is a data table, consider using a caption element to the table element to identify this table.","H39.3.NoCaption")},testFieldsetLegend:function(a){var b=a.querySelector("legend");null!==b&&b.parentNode===a||HTMLCS.addMessage(HTMLCS.ERROR,a,"Fieldset does not contain a legend element. All fieldsets should contain a legend element that describes a description of the field group.","H71.NoLegend")},testOptgroup:function(a){var b=a.querySelector("optgroup");null===b&&HTMLCS.addMessage(HTMLCS.WARNING,a,"If this selection list contains groups of related options, they should be grouped with optgroup.","H85.2")},testRequiredFieldsets:function(a){for(var b=a.querySelectorAll("input[type=radio], input[type=checkbox]"),c={},d=0;d0;){var g=d.shift();if(1===g.nodeType)if("br"===g.nodeName.toLowerCase())c.push(f.join(" ").replace(/^\s*(.*?)\s*$/g,"$1")),f=[];else for(var e=g.childNodes.length-1;e>=0;--e)d.unshift(g.childNodes[e]);else 3===g.nodeType&&f.push(g.nodeValue)}f.length>0&&c.push(f.join(" ").replace(/^\s*(.*?)\s*$/g,"$1"));for(var e=0;e1){var g="should be an h"+(c+1)+" to be properly nested";0===c&&(g="appears to be the primary document heading, so should be an h1 element"),HTMLCS.addMessage(b,d[e],"The heading structure is not logically nested. This h"+f+" element "+g+".","G141")}c=f}},testEmptyHeading:function(a){var b=HTMLCS.util.getElementTextContent(a,!0);/^\s*$/.test(b)===!0&&HTMLCS.addMessage(HTMLCS.ERROR,a,"Heading tag found with no content. Text that is not intended as a heading should not be marked up with heading tags.","H42.2")},testUnstructuredNavLinks:function(a){for(var b=(a.nodeName.toLowerCase(),0),c=a.childNodes,d=0;d1));d++);if(b>1){for(var e=a.parentNode;null!==e&&"ul"!==e.nodeName.toLowerCase()&&"ol"!==e.nodeName.toLowerCase();)e=e.parentNode;null===e&&HTMLCS.addMessage(HTMLCS.WARNING,a,"If this element contains a navigation section, it is recommended that it be marked up as a list.","H48")}},testGeneralTable:function(a){HTMLCS.util.isLayoutTable(a)===!0?HTMLCS.addMessage(HTMLCS.NOTICE,a,"This table appears to be a layout table. If it is meant to instead be a data table, ensure header cells are identified using th elements.","LayoutTable"):HTMLCS.addMessage(HTMLCS.NOTICE,a,"This table appears to be a data table. If it is meant to instead be a layout table, ensure there are no th elements, and no summary or caption.","DataTable")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_2={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that the content is ordered in a meaningful sequence when linearised, such as when style sheets are disabled.","G57")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_3={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Where instructions are provided for understanding the content, do not rely on sensory characteristics alone (such as shape, size or location) to describe objects.","G96")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_1={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that any information conveyed using colour alone is also available in text, or through other visual cues.","G14,G182")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_2={register:function(){return["object","embed","applet","bgsound","audio","video"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"If this element contains audio that plays automatically for longer than 3 seconds, check that there is the ability to pause, stop or mute the audio.","F23")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_3_Contrast={testContrastRatio:function(a,b,c){var d=(new Date,[]);if(a.ownerDocument)var e=[a];else var e=[a.getElementsByTagName("body")[0]];for(;e.length>0;){var f=e.shift();if(f&&1===f.nodeType&&HTMLCS.util.isVisuallyHidden(f)===!1&&HTMLCS.util.isDisabled(f)===!1){for(var g=!1,h=0;h=600)var p=14;var q=b;for(o>=p&&(q=c);("transparent"===j||"rgba(0, 0, 0, 0)"===j)&&n&&n.ownerDocument;){var r=HTMLCS.util.style(n),j=r.backgroundColor;"none"!==r.backgroundImage&&(l=!0),"absolute"==r.position&&(m=!0),n=n.parentNode}if(l===!0){d.push({element:f,colour:i.color,bgColour:void 0,value:void 0,required:q,hasBgImage:!0});continue}if(m===!0){d.push({element:f,colour:k,bgColour:void 0,value:void 0,required:q,isAbsolute:!0});continue}if("transparent"===j||"rgba(0, 0, 0, 0)"===j)continue;var s=HTMLCS.util.contrastRatio(j,i.color);if(s0&&(l=" Recommendation: change "+l.join(", ")+"."),j===!0?(k+=".Abs",HTMLCS.addMessage(HTMLCS.WARNING,a,"This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least "+g+":1.",k)):i===!0?(k+=".BgImage",HTMLCS.addMessage(HTMLCS.WARNING,a,"This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least "+g+":1.",k)):(k+=".Fail",HTMLCS.addMessage(HTMLCS.ERROR,a,"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least "+g+":1, but text in this element has a contrast ratio of "+f+":1."+l,k))}}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_4={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that text can be resized without assistive technology up to 200 percent without loss of content or functionality.","G142")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_5={register:function(){return["_top"]},process:function(a,b){var c=b.querySelector("img");null!==c&&HTMLCS.addMessage(HTMLCS.NOTICE,b,"If the technologies being used can achieve the visual presentation, check that text is used to convey information rather than images of text, except when the image of text is essential to the information being conveyed, or can be visually customised to the user's requirements.","G140,C22,C30.AALevel")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_6={register:function(){return["_top"]},process:function(a,b){if(a===b)for(var c=HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_3_Contrast.testContrastRatio(b,7,4.5),d=0;d0&&(l=" Recommendation: change "+l.join(", ")+"."),j===!0?(k+=".Abs",HTMLCS.addMessage(HTMLCS.WARNING,a,"This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least "+g+":1.",k)):i===!0?(k+=".BgImage",HTMLCS.addMessage(HTMLCS.WARNING,a,"This element's text is placed on a background image. Ensure the contrast ratio between the text and all covered parts of the image are at least "+g+":1.",k)):(k+=".Fail",HTMLCS.addMessage(HTMLCS.ERROR,a,"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least "+g+":1, but text in this element has a contrast ratio of "+f+":1."+l,k))}}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_7={register:function(){
return["object","embed","applet","bgsound","audio"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"For pre-recorded audio-only content in this element that is primarily speech (such as narration), any background sounds should be muteable, or be at least 20 dB (or about 4 times) quieter than the speech.","G56")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_8={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that a mechanism is available for the user to select foreground and background colours for blocks of text, either through the Web page or the browser.","G148,G156,G175"),HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that a mechanism exists to reduce the width of a block of text to no more than 80 characters (or 40 in Chinese, Japanese or Korean script).","H87,C20"),HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that blocks of text are not fully justified - that is, to both left and right edges - or a mechanism exists to remove full justification.","C19,G172,G169"),HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that line spacing in blocks of text are at least 150% in paragraphs, and paragraph spacing is at least 1.5 times the line spacing, or that a mechanism is available to achieve this.","G188,C21"),HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that text can be resized without assistive technology up to 200 percent without requiring the user to scroll horizontally on a full-screen window.","H87,G146,C26")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_4_1_4_9={register:function(){return["_top"]},process:function(a,b){var c=b.querySelector("img");null!==c&&HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that images of text are only used for pure decoration or where a particular presentation of text is essential to the information being conveyed.","G140,C22,C30.NoException")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle2_Guideline2_1_2_1_1={register:function(){return["_top"]},process:function(a,b){if(a===b){var c=HTMLCS.util.getAllElements(b,"*[onclick], *[onkeyup], *[onkeydown], *[onkeypress], *[onfocus], *[onblur]");c.forEach(function(a){HTMLCS.util.isKeyboardNavigable(a)===!1&&HTMLCS.addMessage(HTMLCS.WARNING,a,"Ensure the functionality provided by an event handler for this element is available through the keyboard","G90")});for(var d=HTMLCS.util.getAllElements(b,"*[ondblclick]"),e=0;e1&&"#"===c.charAt(0)){var d=c.substr(1);try{var e=b;e.ownerDocument&&(e=e.ownerDocument);var f=e.getElementById(d);if(null===f){var g=HTMLCS.util.getElementWindow(b).document,h=HTMLCS.util.getDocumentType(g),i="a";h&&h.indexOf("html5")===-1&&(i="*"),f=e.querySelector(i+'[name="'+d+'"]')}null!==f&&HTMLCS.util.contains(b,f)!==!1||(HTMLCS.isFullDoc(b)===!0||"body"===b.nodeName.toLowerCase()?HTMLCS.addMessage(HTMLCS.ERROR,a,'This link points to a named anchor "'+d+'" within the document, but no anchor exists with that name.',"G1,G123,G124.NoSuchID"):HTMLCS.addMessage(HTMLCS.WARNING,a,'This link points to a named anchor "'+d+'" within the document, but no anchor exists with that name in the fragment tested.',"G1,G123,G124.NoSuchIDFragment"))}catch(a){}}}}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle2_Guideline2_4_2_4_2={register:function(){return["html"]},process:function(a,b){for(var c=a.childNodes,d=null,e=0;e0)b=!0;else{var d=a.querySelectorAll("button"),e=a.querySelectorAll("button[type=reset], button[type=button]");d.length>e.length&&(b=!0)}b===!1&&HTMLCS.addMessage(HTMLCS.ERROR,a,'This form does not contain a submit button, which creates issues for those who cannot submit the form using the keyboard. Submit buttons are INPUT elements with type attribute "submit" or "image", or BUTTON elements with type "submit" or omitted/invalid.',"H32.2")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_2_3_2_3={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that navigational mechanisms that are repeated on multiple Web pages occur in the same relative order each time they are repeated, unless a change is initiated by the user.","G61")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_2_3_2_4={register:function(){return["_top"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,b,"Check that components that have the same functionality within this Web page are identified consistently in the set of Web pages to which it belongs.","G197")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_2_3_2_5={register:function(){return["a"]},process:function(a,b){var c=a.nodeName.toLowerCase();"a"===c&&this.checkNewWindowTarget(a)},checkNewWindowTarget:function(a){var b=a.hasAttribute("target");if(b===!0){var c=a.getAttribute("target")||"";"_blank"===c&&/new window/i.test(a.innerHTML)===!1&&HTMLCS.addMessage(HTMLCS.WARNING,a,"Check that this link's link text contains information indicating that the link will open in a new window.","H83.3")}}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_1={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If an input error is automatically detected in this form, check that the item(s) in error are identified and the error(s) are described to the user in text.","G83,G84,G85")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_2={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"Check that descriptive labels or instructions (including for required fields) are provided for user input in this form.","G131,G89,G184,H90")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_3={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"Check that this form provides suggested corrections to errors in user input, unless it would jeopardize the security or purpose of the content.","G177")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_4={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"If this form would bind a user to a financial or legal commitment, modify/delete user-controllable data, or submit test responses, ensure that submissions are either reversible, checked for input errors, and/or confirmed by the user.","G98,G99,G155,G164,G168.LegalForms")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_5={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"Check that context-sensitive help is available for this form, at a Web-page and/or control level.","G71,G184,G193")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle3_Guideline3_3_3_3_6={register:function(){return["form"]},process:function(a,b){HTMLCS.addMessage(HTMLCS.NOTICE,a,"Check that submissions to this form are either reversible, checked for input errors, and/or confirmed by the user.","G98,G99,G155,G164,G168.AllForms")}},_global.HTMLCS_WCAG2AAA_Sniffs_Principle4_Guideline4_1_4_1_1={register:function(){return["_top"]},process:function(a,b){if(a===b)for(var c=HTMLCS.util.getAllElements(b,"*[id]"),d={},e=0;e'+b+""):c.write(b),c.close()}else c=b;if(!c)return void a.call(this);a=a||function(){},f=[];var g=HTMLCS.util.getAllElements(c);g.unshift(c),d===!1&&h(g,c,a)},this.isFullDoc=function(a){var b=!1;return"string"==typeof a?a.toLowerCase().indexOf("0;){var h=a.shift();if(h===b)var j="_top";else var j=h.tagName.toLowerCase();for(var k=0;k0&&(i(h,c[j].concat([]),b),"_top"===j&&(g=f,f=[]))}var l=b.querySelectorAll('[role="presentation"]');e=HTMLCS_WCAG2AAA_Sniffs_Principle1_Guideline1_3_1_3_1,[].forEach.call(l,function(a){e.testSemanticPresentationRole(a)}),d instanceof Function==!0&&d.call(this)},i=function(a,b,c,d){for(;b.length>0;){var f=b.shift();e=f,f.useCallback===!0?f.process(a,c,function(){i(a,b,c),b=[]}):f.process(a,c)}d instanceof Function==!0&&d.call(this)},j=function(a,b,c,d){0!==a.indexOf("http")&&(a=p(a));var e=a.split("/"),f=_global["HTMLCS_"+e[e.length-2]];f?k(a,b,c,d):s(a,function(){k(a,b,c,d)},c)},k=function(b,c,d,e){var f=b.split("/"),g=_global["HTMLCS_"+f[f.length-2]],h={};for(var i in g)g.hasOwnProperty(i)===!0&&(h[i]=g[i]);if(!h)return!1;if(a[b]=h,e)if(e.include&&e.include.length>0)h.sniffs=e.include;else if(e.exclude)for(var j=0;j=0&&h.sniffs.splice(k,1)}var m=h.sniffs.slice(0,h.sniffs.length);l(b,m,c,d)},l=function(a,b,c,d){if(0===b.length)return void c.call(this);var e=b.shift();m(a,e,function(){l(a,b,c,d)},d)},m=function(a,b,c,d){if("string"==typeof b){var e=q(a,b),f=function(){n(a,b),c.call(this)};e?f():s(o(a,b),f,d)}else j(b.standard,function(){if(b.messages)for(var a in b.messages)g[a]=b.messages[a];c.call(this)},d,{exclude:b.exclude,include:b.include})},n=function(a,d){var e=q(a,d);if(!e)return!1;if(e.register)for(var f=e.register(),g=0;g0&&(c=!0):b.ownerDocument&&b.ownerDocument===a&&(c=!0)),c},a.isLayoutTable=function(a){var b=a.querySelector("th");return null===b},a.contrastRatio=function(b,c){var d=(.05+a.relativeLum(b))/(.05+a.relativeLum(c));return d<1&&(d=1/d),d},a.relativeLum=function(b){if(b.charAt)var b=a.colourStrToRGB(b);var c={};for(var d in b)b[d]<=.03928?c[d]=b[d]/12.92:c[d]=Math.pow((b[d]+.055)/1.055,2.4);var e=.2126*c.red+.7152*c.green+.0722*c.blue;return e},a.colourStrToRGB=function(a){if(a=a.toLowerCase(),"rgb"===a.substring(0,3)){var b=/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)([^)]*)\)$/.exec(a);a={red:b[1]/255,green:b[2]/255,blue:b[3]/255}}else"#"===a.charAt(0)&&(a=a.substr(1)),3===a.length&&(a=a.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3")),a={red:parseInt(a.substr(0,2),16)/255,green:parseInt(a.substr(2,2),16)/255,blue:parseInt(a.substr(4,2),16)/255};return a},a.RGBtoColourStr=function(a){return colourStr="#",a.red=Math.round(255*a.red),a.green=Math.round(255*a.green),a.blue=Math.round(255*a.blue),a.red%17===0&&a.green%17===0&&a.blue%17===0?(colourStr+=(a.red/17).toString(16),colourStr+=(a.green/17).toString(16),colourStr+=(a.blue/17).toString(16)):(a.red<16&&(colourStr+="0"),colourStr+=a.red.toString(16),a.green<16&&(colourStr+="0"),colourStr+=a.green.toString(16),a.blue<16&&(colourStr+="0"),colourStr+=a.blue.toString(16)),colourStr},a.sRGBtoHSV=function(b){b.charAt&&(b=a.colourStrToRGB(b));var c={hue:0,saturation:0,value:0},d=Math.max(b.red,b.green,b.blue),e=Math.min(b.red,b.green,b.blue),f=d-e;return 0===f?c.value=b.red:(c.value=d,d===b.red?c.hue=(b.green-b.blue)/f:d===b.green?c.hue=2+(b.blue-b.red)/f:c.hue=4+(b.red-b.green)/f,c.hue=60*c.hue,c.hue>=360&&(c.hue-=360),c.saturation=f/c.value),c},a.HSVtosRGB=function(a){var b={red:0,green:0,blue:0};if(0===a.saturation)b.red=a.value,b.green=a.value,b.blue=a.value;else{var c=a.value*a.saturation,d=a.value-c,e=a.hue/60,f=e-2*Math.floor(e/2),g=c*(1-Math.abs(f-1));switch(Math.floor(e)){case 0:b.red=c,b.green=g;break;case 1:b.green=c,b.red=g;break;case 2:b.green=c,b.blue=g;break;case 3:b.blue=c,b.green=g;break;case 4:b.blue=c,b.red=g;break;case 5:b.red=c,b.blue=g}b.red=b.red+d,b.green=b.green+d,b.blue=b.blue+d}return b},a.getElementTextContent=function(a,b){void 0===b&&(b=!0);for(var a=a.cloneNode(!0),c=[],d=0;d0;){var f=c.shift();if(1===f.nodeType)if("img"===f.nodeName.toLowerCase())b===!0&&f.hasAttribute("alt")===!0&&e.push(f.getAttribute("alt"));else for(var d=0;d1)for(var o=g+1;o1&&n>1?b.allowScope=!1:b.allowScope===!0&&(void 0===e.cols[i]&&(e.cols[i]=0),void 0===e.rows[g]&&(e.rows[g]=0),e.rows[g]+=n,e.cols[i]+=m)}else"td"===l&&k.hasAttribute("headers")===!0&&/^\s*$/.test(k.getAttribute("headers"))===!1&&(b.used=!0);i+=n}}for(var o=0;o1&&f.rows++;for(var o=0;o1&&f.cols++;f.rows>1||f.cols>1?b.allowScope=!1:b.allowScope!==!0||0!==f.rows&&0!==f.cols||(b.required=!1);for(var r=HTMLCS.util.getCellHeaders(a),o=0;o1)for(var q=i+1;q=d.rows[q].first&&(t=t.concat(d.rows[q].ids)),d.cols[r]&&q>=d.cols[r].first&&(t=t.concat(d.cols[r].ids));t.length>0&&(t=" "+t.sort().join(" ")+" ",t=t.replace(/\s+/g," ").replace(/(\w+\s)\1+/g,"$1").replace(/^\s*(.*?)\s*$/g,"$1"),e.push({cell:m,headers:t}))}k+=p}}return e},a.getPreviousSiblingElement=function(a,b,c){void 0===b&&(b=null),void 0===c&&(c=!1);for(var d=a.previousSibling;null!==d;){if(3===d.nodeType){if(HTMLCS.util.isStringEmpty(d.nodeValue)===!1&&c===!0){d=null;break}}else if(1===d.nodeType){if(null===b||d.nodeName.toLowerCase()===b)break;if(c===!0){d=null;break}break}d=d.previousSibling}return d},a.getNextSiblingElement=function(a,b,c){void 0===b&&(b=null),void 0===c&&(c=!1);for(var d=a.nextSibling;null!==d;){if(3===d.nodeType){if(HTMLCS.util.isStringEmpty(d.nodeValue)===!1&&c===!0){d=null;break}}else if(1===d.nodeType){if(null===b||d.nodeName.toLowerCase()===b)break;if(c===!0){d=null;break}break}d=d.nextSibling}return d},a}();var HTMLCS_RUNNER=_global.HTMLCS_RUNNER=new function(){this.run=function(a,b){var c=this;HTMLCS.process(a,document,function(){var a=HTMLCS.getMessages(),b=a.length,d={};d[HTMLCS.ERROR]=0,d[HTMLCS.WARNING]=0,d[HTMLCS.NOTICE]=0;for(var e=0;e',i+='',i+='',h.innerHTML=i;var j=h.getElementsByTagName("input")[0];return h.onclick=function(a){return e===!1&&(j.checked=!j.checked,j.checked===!0?h.className+=" active":h.className=h.className.replace("active",""),g instanceof Function==!0&&g(j)),!1},h},o=function(b,c){var d=f.createElement("div");d.className=a+"header",d.innerHTML="HTML_CodeSniffer by Squiz",d.setAttribute("title","Using standard "+b);var e=!1,g=0,h=0;d.onmousedown=function(a){return a=a||window.event,e=!0,g=a.clientX,h=a.clientY,!1},f.onmousemove=function(a){if(a=a||window.event,e===!0){var b=c.offsetTop,d=c.offsetLeft;ha.clientY&&(b-=h-a.clientY,c.style.top=b+"px"),ga.clientX&&(d-=g-a.clientX,c.style.left=d+"px"),g=a.clientX,h=a.clientY}},f.onmouseup=function(a){e=!1};var i=f.createElement("div");return i.className=a+"close",i.setAttribute("title","Close"),i.onmousedown=function(){l.close.call(l)},d.appendChild(i),d},p=function(b,g,h){var i=f.createElement("div");i.className=a+"summary";var j=f.createElement("div");j.className=a+"summary-left",i.appendChild(j);var k=f.createElement("div");k.className=a+"summary-right",i.appendChild(k);var m=[],n=', ';if(b>0){var o="Errors";1===b&&(o="Error"),m.push(""+b+" "+o)}if(g>0){var o="Warnings";1===g&&(o="Warning"),m.push(""+g+" "+o)}if(h>0){var o="Notices";1===h&&(o="Notice"),m.push(""+h+" "+o)}var p=f.createElement("ol");p.className=a+"lineage";var q=f.createElement("li");q.className=a+"lineage-item";var r=f.createElement("a");r.className=a+"lineage-link",r.href="javascript:";var s=f.createElement("span");s.innerHTML="Home",r.appendChild(s),r.onmousedown=function(){l.run(c,d,e)};var t=f.createElement("li");return t.className=a+"lineage-item",t.innerHTML=m.join(n),q.appendChild(r),p.appendChild(q),p.appendChild(t),j.appendChild(p),k.appendChild(f.createTextNode(String.fromCharCode(160))),i},q=function(b,g){var i=f.createElement("div");i.className=a+"summary-detail";var j=f.createElement("div");j.className=a+"summary-left";var k=f.createElement("div");k.className=a+"summary-right";var n=f.createElement("ol");n.className=a+"lineage";var o=f.createElement("li");o.className=a+"lineage-item";var p=f.createElement("a");p.className=a+"lineage-link",p.href="javascript:";var r=f.createElement("span");r.innerHTML="Home",p.appendChild(r),p.onmousedown=function(){l.run(c,d,e)};var s=f.createElement("li");s.className=a+"lineage-item";var t=f.createElement("a");t.className=a+"lineage-link",t.href="javascript:",t.innerHTML="Report",t.setAttribute("title","Back to Report"),t.onmousedown=function(){var a=f.querySelectorAll(".HTMLCS-inner-wrapper")[0];a.style.marginLeft="0px",a.style.maxHeight=null,i.style.display="none";var b=f.querySelectorAll(".HTMLCS-summary")[0];b.style.display="block"};var u=f.createElement("li");u.className=a+"lineage-item",u.innerHTML="Issue "+b+" of "+g,o.appendChild(p),s.appendChild(t),n.appendChild(o),n.appendChild(s),n.appendChild(u),j.appendChild(n);var w=f.createElement("div");w.className=a+"button-group";var x=m(a+"button-previous-issue","previous","Previous Issue",function(a){var c=Number(b)-1;if(c>=1){v(c-1),wrapper=i.parentNode;var d=q(c,g);wrapper.replaceChild(d,i),d.style.display="block";var e=f.querySelectorAll(".HTMLCS-issue-detail-list")[0];e.firstChild.style.marginLeft=parseInt(e.firstChild.style.marginLeft,10)+300+"px",y(c-1)}}),z=m(a+"button-next-issue","next","Next Issue",function(a){var c=Number(b)+1;if(c<=h.length){v(c-1),wrapper=i.parentNode;var d=q(c,g);wrapper.replaceChild(d,i),d.style.display="block";var e=f.querySelectorAll(".HTMLCS-issue-detail-list")[0];e.firstChild.style.marginLeft=parseInt(e.firstChild.style.marginLeft,10)-300+"px",y(c-1)}});return 1===b&&(x.className+=" disabled"),b===g&&(z.className+=" disabled"),w.appendChild(x),w.appendChild(z),k.appendChild(w),i.appendChild(j),i.appendChild(k),i},r=function(b){var c=300*Math.ceil(b.length/5),d=f.createElement("div");d.id=a+"issues",d.className=a+"details",d.setAttribute("style","width: "+c+"px");var e=f.createElement("ol");e.className=a+"issue-list",e.setAttribute("style","margin-left: 0");for(var g=0;g0&&g%5===0){d.appendChild(e);var e=f.createElement("ol");e.className=a+"issue-list"}var h=u(g,b[g]);e.appendChild(h)}return d.appendChild(e),d},s=function(b){var c=300*b.length,d=f.createElement("div");d.id=a+"issues-detail",d.className=a+"details",d.setAttribute("style","width: "+c+"px");var e=f.createElement("ol");e.className=a+"issue-detail-list",e.setAttribute("style","margin-left: 0");for(var g=0;g0&&(e.show={error:!0,warning:!0,notice:!1},0===t.error&&0===t.warning&&(e.show.notice=!0));for(var u in t){var v=t[u],w=f.createElement("div");w.className=a+"issue-tile "+a+u.toLowerCase();var x=f.createElement("div");x.className="HTMLCS-tile-text";var y=""+v+" "+u.substr(0,1).toUpperCase()+u.substr(1);if(1!==v&&(y+="s"),x.innerHTML=y,void 0===e.show)var z=!1,A=!0;else{var z=e.show[u],A=!1;0===v&&(z=!1,A=!0)}var B=n(a+"include-"+u,"Toggle display of "+u+" messages",z,A,function(b){var c=!1;f.getElementById(a+"include-error").disabled===!1&&(e.show.error=f.getElementById(a+"include-error").checked,c=c||e.show.error),f.getElementById(a+"include-warning").disabled===!1&&(e.show.warning=f.getElementById(a+"include-warning").checked,c=c||e.show.warning),f.getElementById(a+"include-notice").disabled===!1&&(e.show.notice=f.getElementById(a+"include-notice").checked,c=c||e.show.notice),c===!0?s.className=s.className.replace(/ disabled/g,""):s.className+=" disabled"});w.appendChild(x),w.appendChild(B),q.appendChild(w)}if(void 0!==e.show){var C=e.show.error||e.show.warning||e.show.notice;C===!1&&(s.className+=" disabled")}else s.className+=" disabled";return g.appendChild(i),g.appendChild(j),b.appendChild(g),b.appendChild(q),b.appendChild(r),b.appendChild(s),b},u=function(b,c){var d="",e="",g="";switch(c.type){case HTMLCS.ERROR:e="Error";break;case HTMLCS.WARNING:e="Warning";break;case HTMLCS.NOTICE:e="Notice"}var g=e.toLowerCase(),i=c.msg;i.length>115&&(i=i.substr(0,115)+"...");var d=f.createElement("li");d.id=a+"msg-"+b;var j=f.createElement("span");j.className=a+"issue-type "+a+g,j.setAttribute("title",e),d.appendChild(j);var k=f.createElement("span");return k.className=a+"issue-title",k.innerHTML=i,d.appendChild(k),d.onclick=function(){var b=this.id.replace(new RegExp(a+"msg-"),"");v(b);var c=f.querySelectorAll(".HTMLCS-issue-detail-list")[0];c.className+=" "+a+"transition-disabled",c.firstChild.style.marginLeft=b*-300+"px",y(b),setTimeout(function(){c.className=c.className.replace(new RegExp(" "+a+"transition-disabled"),"")},500);var d=f.querySelectorAll(".HTMLCS-inner-wrapper")[0];d.style.marginLeft="-300px",d.style.maxHeight="15em",summary=f.querySelectorAll(".HTMLCS-summary-detail")[0];var e=q(parseInt(b)+1,h.length);summary.parentNode.replaceChild(e,summary),e.style.display="block";var g=f.querySelectorAll(".HTMLCS-summary")[0];g.style.display="none"},d},v=function(b){for(var c=f.querySelectorAll(".HTMLCS-issue-detail-list")[0],d=c.getElementsByTagName("li"),g=0;g"+n[u][0]+": "+n[u][1]+" ";if(s.innerHTML=t,p.appendChild(q),p.appendChild(r),p.appendChild(s),o.appendChild(p),A.isPointable(d.element)===!1){var v=f.createElement("div");v.className=a+"issue-source",o.appendChild(v);var w=f.createElement("div");w.className=a+"issue-source-inner-u2p";var x="Unable to point to the element associated with this issue.";if(null===d.element.ownerDocument)x="Unable to point to this issue, as it relates to the entire document.";else{var y=d.element.ownerDocument.getElementsByTagName("body")[0];HTMLCS.util.isInDocument(d.element)===!1?x+="Unable to point to this element as it has been removed from the document since the report was generated.":HTMLCS.util.contains(y,d.element)===!1?x="Unable to point to this element because it is located outside the document's body element.":x+="Unable to point to this element because it is hidden from view, or does not have a visual representation."}void 0!==w.textContent?w.textContent=x:w.innerText=x,v.appendChild(w)}if(e.customIssueSource){var v=f.createElement("div");v.className=a+"issue-source",o.appendChild(v),e.customIssueSource.call(this,b,d,h,v,p)}else{var v=f.createElement("div");v.className=a+"issue-source";var z=f.createElement("div");z.className=a+"issue-source-header";var B=f.createElement("strong");B.innerHTML="Code Snippet";var C=m(a+"button-point-to-element-"+b,"pointer","Point to Element",function(){l.pointToElement(d.element)});if(z.appendChild(B),z.appendChild(C),v.appendChild(z),d.element.outerHTML){var D="",E="";if(d.element.innerHTML.length>31)var F=d.element.outerHTML.replace(d.element.innerHTML,d.element.innerHTML.substr(0,31)+"...");else var F=d.element.outerHTML;for(var G=d.element.previousSibling;D.length<=31&&null!==G;)1===G.nodeType?D=G.outerHTML:3===G.nodeType&&(D=void 0!==G.textContent?G.textContent+D:G.nodeValue+D),D.length>31&&(D="..."+D.substr(D.length-31)),G=G.previousSibling;for(var H=d.element.nextSibling;E.length<=31&&null!==H;)1===H.nodeType?E+=H.outerHTML:3===H.nodeType&&(E+=void 0!==H.textContent?H.textContent:H.nodeValue),E.length>31&&(E=E.substr(0,31)+"..."),H=H.nextSibling;var w=f.createElement("div");w.className=a+"issue-source-inner";var I=f.createElement("strong");void 0!==I.textContent?I.textContent=F:I.innerText=F,w.appendChild(f.createTextNode(D)),w.appendChild(I),w.appendChild(f.createTextNode(E)),v.appendChild(w)}else{var w=f.createElement("div");w.className=a+"issue-source-not-supported";var J="The code snippet functionality is not supported in this browser.";w.appendChild(f.createTextNode(J)),v.appendChild(w)}o.appendChild(v)}return o},x=function(b,c){var d=f.createElement("div");d.className=a+"navigation";var e=f.createElement("span");e.className=a+"nav-button "+a+"previous",e.innerHTML=String.fromCharCode(160),1===b&&(e.className+=" "+a+"disabled"),d.appendChild(e);var g=f.createElement("span");g.className=a+"page-number",g.innerHTML="Page "+b+" of "+c,d.appendChild(g);var h=f.createElement("span");return h.className=a+"nav-button "+a+"next",h.innerHTML=String.fromCharCode(160),b===c&&(h.className+=" "+a+"disabled"),d.appendChild(h),e.onclick=function(){j>1&&(j--,1===j&&(e.className+=" "+a+"disabled")),c>1&&(h.className=h.className.replace(new RegExp(" "+a+"disabled"),"")),g.innerHTML="",g.appendChild(document.createTextNode("Page "+j+" of "+c));var b=f.querySelectorAll(".HTMLCS-issue-list")[0];b.style.marginLeft=(j-1)*-300+"px"},h.onclick=function(){j1&&(e.className=e.className.replace(new RegExp(" "+a+"disabled"),"")),g.innerHTML="",g.appendChild(document.createTextNode("Page "+j+" of "+c));var b=f.querySelectorAll(".HTMLCS-issue-list")[0];b.style.marginLeft=(j-1)*-300+"px"},d},y=function(b){var c=h[Number(b)];if(c.element){var d=f.getElementById(a+"button-point-to-element-"+b);if(A.container=l.pointerContainer||f.getElementById("HTMLCS-wrapper"),A.isPointable(c.element)===!1){var e=A.getPointer(c.element);A.pointer&&(e.className+=" HTMLCS-pointer-hidden"),d&&(d.className+=" disabled")}else d&&(d.className=d.className.replace(" disabled","")),A.pointTo(c.element)}},z=function(a,b){if(0===a.length)return void b.call(this);var c=a.shift();HTMLCS.loadStandard(c,function(){z(a,b)})};this.setOption=function(a,b){e[a]=b},this.getIssue=function(a){return h[a]},this.countIssues=function(a){for(var b={error:0,warning:0,notice:0},c=0;c"),n+=u(l,c[l]),l%5!==4&&l!==c.length-1||(n+=""),t+=w(l,c[l],b);var g=f.createElement("div");if(g.id=a+"wrapper",g.className="showing-issue-list",e.noHeader!==!0){var v=o(b,g);g.appendChild(v)}var y=p(i,j,k),z=q(1,c.length),A=f.createElement("div");A.id=a+"issues-wrapper",A.className=a+"inner-wrapper";var B=r(c);A.appendChild(B);var C=Math.ceil(c.length/5),D=x(1,C);A.appendChild(D);var E=f.createElement("div");E.className=a+"outer-wrapper",E.appendChild(A);var A=f.createElement("div");A.id=a+"issues-detail-wrapper",A.className=a+"inner-wrapper";var F=s(c);return A.appendChild(F),E.appendChild(A),g.appendChild(y),g.appendChild(z),g.appendChild(E),g},this.buildSummaryPage=function(){var b=f.createElement("div");if(b.id=a+"wrapper",b.className="showing-settings",e.noHeader!==!0){var d=o(c,b);b.appendChild(d)}var g=t();return b.appendChild(g),b},this.changeScreen=function(c){var d=f.getElementById(a+"wrapper");d.className=d.className.replace(new RegExp("showing-"+b),""),d.className+=" showing-"+c,d.className=d.className.replace(/\s+/," "),b=c},this.includeCss=function(a,b){if(e.includeCss!==!1){void 0===b&&(b=f);for(var c=b.querySelector("head"),d=c.getElementsByTagName("link"),g=!1,h=0;h0){for(var b=-1,c=null,d=0;db&&(b=f,c=window.frames[d].document.body)}}catch(a){}a=null===c?document.body:c}else a=document.body;return a},this.getOwnerDocument=function(){var a=this.getParentElement();return a.ownerDocument&&(a=a.ownerDocument),a},this.run=function(i,k,m){g=window;for(var n=this.getStandardList(),o=[],p=0;p0)return void z(o,function(){l.run(i,k,m)});if(null===k||void 0===k){if(k=[],0===document.querySelectorAll("frameset").length&&k.push(document),g.frames.length>0)for(var p=0;p0&&(c=!0));for(var d=0;db.currentVersion){var c=f.createElement("div");c.id=a+"settings-updated-notification",f.documentElement.querySelector(".HTMLCS-settings").appendChild(c);var d="HTML_CodeSniffer has been updated to version "+b.newVersion+".";d+=' View the changelog',c.innerHTML=d}},this.close=function(){if(f){var a=f.getElementById("HTMLCS-wrapper");if(a){var b=A.getPointer(a);b&&b.parentNode&&b.parentNode.removeChild(b),a.parentNode.removeChild(a),e.closeCallback&&(h=e.closeCallback.call(this))}}},this.pointToElement=function(a){A.container=l.pointerContainer||f.getElementById("HTMLCS-wrapper"),A.pointTo(a)},this.getCurrentStandard=function(){return c};var A={pointerDim:{},container:null,getBoundingRectangle:function(a){if(!a)return null;var b=this.getElementCoords(a),c=this.getElementDimensions(a),d={x1:b.x,y1:b.y,x2:b.x+c.width,y2:b.y+c.height};return d},getElementDimensions:function(a){var b={width:a.offsetWidth,height:a.offsetHeight};return b},getElementCoords:function(a,b){var c=0,d=0,e=HTMLCS.util.getElementWindow(a);if(b===!0)var f=e.top;else var f=e;for(;;){do c+=a.offsetLeft,d+=a.offsetTop;while(a=a.offsetParent);if(e===f)break;if(a=e.frameElement,e=e.parent,"frame"===a.nodeName.toLowerCase())break}return{x:c,y:d}},getWindowDimensions:function(a){var b=HTMLCS.util.getElementWindow(a),c=a.ownerDocument,d=0,e=0;if(b.innerWidth){d=b.innerWidth,e=b.innerHeight;var f=this.getScrollbarWidth(a);c.documentElement.scrollHeight>e&&"number"==typeof f&&(d-=f),c.body.scrollWidth>d&&"number"==typeof f&&(e-=f)}else c.documentElement&&(c.documentElement.clientWidth||c.documentElement.clientHeight)?(d=c.documentElement.clientWidth,e=c.documentElement.clientHeight):c.body&&(c.body.clientWidth||c.body.clientHeight)&&(d=c.body.clientWidth,e=c.body.clientHeight);var g={width:d,height:e};return g},getScrollbarWidth:function(a){if(null!==k)return k;doc=a.ownerDocument;var b=null,c=null,d=0,e=0;b=doc.createElement("div"),b.style.position="absolute",b.style.top="-1000px",b.style.left="-1000px",b.style.width="100px",b.style.height="50px",b.style.overflow="hidden",c=doc.createElement("div"),c.style.width="100%",c.style.height="200px",b.appendChild(c),f.body.appendChild(b),d=c.offsetWidth,b.style.overflow="auto",e=c.offsetWidth,doc.body.removeChild(doc.body.lastChild);var g=d-e;return k=g,g},getScrollCoords:function(a){var b=HTMLCS.util.getElementWindow(a);doc=a.ownerDocument;var c=0,d=0;b.pageYOffset?(c=b.pageXOffset,d=b.pageYOffset):doc.body&&(doc.body.scrollLeft||doc.body.scrollTop)?(c=doc.body.scrollLeft,d=doc.body.scrollTop):(c=doc.documentElement.scrollLeft,d=doc.documentElement.scrollTop);var e={x:c,y:d};return e},isPointable:function(a){if(null===a.ownerDocument)return!1;for(var b=a.parentNode;b&&b.ownerDocument;)b=b.parentNode;return null!==b&&(HTMLCS.util.isVisuallyHidden(a)!==!0&&null!==this.getPointerDirection(a));
},getPointerDirection:function(a){var b=null,c=this.getBoundingRectangle(a),d=this.getPointer(a),e=a.ownerDocument;d.className=d.className.replace("HTMLCS-pointer-hidden",""),d.className+=" HTMLCS-pointer-hidden-block",this.pointerDim.height=62,this.pointerDim.width=62;var f=20,g=this.getWindowDimensions(a),h=(HTMLCS.util.getElementWindow(a),Math.max(0,Math.min(c.y1-100,e.documentElement.offsetHeight-g.height)));return c.y1-this.pointerDim.height-f>h?b="down":c.y2+this.pointerDim.height0&&(b="right"),d.className=d.className.replace("HTMLCS-pointer-hidden-block",""),d.className+=" HTMLCS-pointer-hidden",b},pointTo:function(a){if(a.ownerDocument)var b=a.ownerDocument;else var b=a;var c=b.getElementById("HTMLCS-pointer");if(c&&c.parentNode.removeChild(c),this.isPointable(a)!==!1){var d=HTMLCS.util.getElementWindow(a).top,e=(this.getWindowDimensions(d.document.documentElement),this.getPointerDirection(a)),f=this.getPointer(a);if(f.className=f.className.replace("HTMLCS-pointer-hidden-block",""),null===e)f.className+=" HTMLCS-pointer-hidden";else{var g=!1;if("fixed"===HTMLCS.util.style(a).position)var g=!0;for(var h=a.parentNode;h.ownerDocument;){if("fixed"===HTMLCS.util.style(h).position){g=!0;break}h=h.parentNode}if(g===!0)f.style.position="fixed";else{f.style.position="absolute";for(var i=this.getElementCoords(a,!0),j=HTMLCS.util.getElementWindow(a),k=Math.max(i.y-100,0);k>=0;){j.scrollTo(0,k);var l=this.getScrollCoords(j.document.documentElement);if(k-=l.y,k=Math.max(k,0),j===d)break;j=j.parent}}this.showPointer(a,e)}}},getPointer:function(a){try{var b=a.ownerDocument;HTMLCSAuditor.includeCss("HTMLCS",b);var c="HTMLCS",d=b.getElementById(c+"-pointer");d||(d=b.createElement("div"),d.id=c+"-pointer",d.className=c+"-pointer "+c+"-pointer-hidden",b.body.appendChild(d))}catch(a){}return d},showPointer:function(a,b){var c="HTMLCS",d=this.getPointer(a);this._removeDirectionClasses(d),d.className+=" "+c+"-pointer-"+b,d.className=d.className.replace(c+"-pointer-hidden","");var e=this.getBoundingRectangle(a),f=0,g=0,h=20;switch(b){case"up":h=-h,f=e.y2,g=e.x2-e.x1<250?this.getRectMidPnt(e)-this.pointerDim.width/2:e.x1;break;case"down":default:f=e.y1-this.pointerDim.height,g=e.x2-e.x1<250?this.getRectMidPnt(e)-this.pointerDim.width/2:e.x1;break;case"left":g=e.x2,f=this.getRectMidPnt(e,!0)-this.pointerDim.height/2;break;case"right":h=-h,g=e.x1-this.pointerDim.width,f=this.getRectMidPnt(e,!0)-this.pointerDim.height/2}var i=this.getScrollCoords(a);d.style.top=f+"px",d.style.left=g+"px";var j=this.getBoundingRectangle(this.container);e=this.getBoundingRectangle(d);var k=e.x1+(e.x2-e.x1)/2,l=e.y1+(e.y2-e.y1)/2;if("fixed"!==HTMLCS.util.style(d).position&&(l-=i.y),j.x1<=k&&j.x2>=k&&j.y1<=l&&j.y2>=l){var m=this;this.container.className+=" HTMLCS-translucent",setTimeout(function(){m.container.className=m.container.className.replace("HTMLCS-translucent","")},4e3)}this.bounce(d,function(){setTimeout(function(){d.parentNode&&d.parentNode.removeChild(d)},1500)},b)},bounce:function(a,b,c){var d=c,e=0,f="",g=0,h=30,i=5;switch(c){case"up":d=c+"-op",g=h;case"down":f="top";break;case"left":d=c+"-op",g=h;case"right":f="left"}e=Number(a.style[f].replace("px",""))+g;var j=e,k=e-h,l=0,m=setInterval(function(){if(d===c){if(j--,a.style[f]=j+"px",j=e&&(d=c,l++,l===i&&0===g))return clearInterval(m),void b.call(this)},10)},getRectMidPnt:function(a,b){var c=0;return c=b===!0?a.y1+(a.y2-a.y1)/2:a.x1+(a.x2-a.x1)/2},_removeDirectionClasses:function(a){for(var b="HTMLCS",c=["down","up","left","right"],d=c.length,e=0;e