[
  {
    "path": ".gitignore",
    "content": ".DS_Store\n.vimdir\nnode_modules\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "module.exports = function(grunt) {\n\t\"use strict\";\n\n\t// Project configuration.\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\tbanner:\n\t\t\t\t\t\t'/*! Respond.js v<%= pkg.version %>: <%= pkg.description %>\\n' +\n\t\t\t\t\t\t' * Copyright <%= grunt.template.today(\"yyyy\") %> <%= pkg.author.name %>\\n' +\n\t\t\t\t\t\t' * Licensed under <%= _.pluck(pkg.licenses, \"type\").join(\", \") %>\\n' + \n\t\t\t\t\t\t' * <%= pkg.homepageShortened %>' +\n\t\t\t\t\t\t' */\\n\\n',\n\t\tuglify: {\n\t\t\tnonMinMatchMedia: {\n\t\t\t\toptions: {\n\t\t\t\t\tbanner: '<%= banner %>',\n\t\t\t\t\tmangle: false,\n\t\t\t\t\tcompress: false,\n\t\t\t\t\tpreserveComments: 'some',\n\t\t\t\t\tbeautify: {\n\t\t\t\t\t\tbeautify: true,\n\t\t\t\t\t\tindent_level: 2\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'dest/respond.src.js': ['src/matchmedia.polyfill.js', 'src/respond.js']\n\t\t\t\t}\n\t\t\t},\n\t\t\tminMatchMedia: {\n\t\t\t\toptions: {\n\t\t\t\t\tbanner: '<%= banner %>'\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'dest/respond.min.js': ['src/matchmedia.polyfill.js', 'src/respond.js']\n\t\t\t\t}\n\t\t\t},\n\t\t\tnonMinMatchMediaListener: {\n\t\t\t\toptions: {\n\t\t\t\t\tbanner: '<%= banner %>',\n\t\t\t\t\tmangle: false,\n\t\t\t\t\tcompress: false,\n\t\t\t\t\tpreserveComments: 'some',\n\t\t\t\t\tbeautify: {\n\t\t\t\t\t\tbeautify: true,\n\t\t\t\t\t\tindent_level: 2\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'dest/respond.matchmedia.addListener.src.js': ['src/matchmedia.polyfill.js', 'src/matchmedia.addListener.js', 'src/respond.js']\n\t\t\t\t}\n\t\t\t},\n\t\t\tminMatchMediaListener: {\n\t\t\t\toptions: {\n\t\t\t\t\tbanner: '<%= banner %>'\n\t\t\t\t},\n\t\t\t\tfiles: {\n\t\t\t\t\t'dest/respond.matchmedia.addListener.min.js': ['src/matchmedia.polyfill.js', 'src/matchmedia.addListener.js', 'src/respond.js']\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tjshint: {\n\t\t\tfiles: ['src/respond.js', 'src/matchmedia.polyfill.js'],\n\t\t\toptions: {\n\t\t\t\tcurly: true,\n\t\t\t\teqeqeq: true,\n\t\t\t\timmed: true,\n\t\t\t\tlatedef: false,\n\t\t\t\tnewcap: true,\n\t\t\t\tnoarg: true,\n\t\t\t\tsub: true,\n\t\t\t\tundef: true,\n\t\t\t\tboss: true,\n\t\t\t\teqnull: true,\n\t\t\t\tsmarttabs: true,\n\t\t\t\tnode: true,\n\t\t\t\tes5: true,\n\t\t\t\tstrict: false\n\t\t\t},\n\t\t\tglobals: {\n\t\t\t\tImage: true,\n\t\t\t\twindow: true\n\t\t\t}\n\t\t}\n\t});\n\n\tgrunt.loadNpmTasks( 'grunt-contrib-jshint' );\n\tgrunt.loadNpmTasks( 'grunt-contrib-uglify' );\n\n\t// Default task.\n\tgrunt.registerTask('default', ['jshint', 'uglify']);\n\n};\n"
  },
  {
    "path": "LICENSE-MIT",
    "content": "Copyright (c) 2012 Scott Jehl\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Respond.js\n### A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)\n\n - Copyright 2011: Scott Jehl, scottjehl.com\n\n - Licensed under the MIT license.\n \nThe goal of this script is to provide a fast and lightweight (3kb minified / 1kb gzipped) script to enable [responsive web designs](http://www.alistapart.com/articles/responsive-web-design/) in browsers that don't support CSS3 Media Queries - in particular, Internet Explorer 8 and under. It's written in such a way that it will probably patch support for other non-supporting browsers as well (more information on that soon).\n\nIf you're unfamiliar with the concepts surrounding Responsive Web Design, you can read up [here](http://www.alistapart.com/articles/responsive-web-design/) and also [here](https://scottjehl.github.io/picturefill/)\n\n[Demo page](https://scottjehl.github.io/Respond/test/test.html) (the colors change to show media queries working)\n\n\nUsage Instructions\n======\n\n1. Craft your CSS with min/max-width media queries to adapt your layout from mobile (first) all the way up to desktop\n```css\n    @media screen and (min-width: 480px){\n        /** ...styles for 480px and up go here **/\n    }\n```\n\n2. Reference the respond.min.js script (1kb min/gzipped) after all of your CSS (the earlier it runs, the greater chance IE users will not see a flash of un-media'd content)\n\n3. Crack open Internet Explorer and pump fists in delight\n\n\nCDN/X-Domain Setup\n======\n\nRespond.js works by requesting a pristine copy of your CSS via AJAX, so if you host your stylesheets on a CDN (or a subdomain), you'll need to set up a local proxy to request the CSS for old IE browsers. Prior versions recommended a deprecated x-domain approach, but a local proxy is preferable (for performance and security reasons) to attempting to work around the cross-domain limitations.\n\n\nSupport & Caveats\n======\n\nSome notes to keep in mind:\n\n- This script's focus is purposely very narrow: only min-width and max-width media queries and all media types (screen, print, etc) are translated to non-supporting browsers. I wanted to keep things simple for filesize, maintenance, and performance, so I've intentionally limited support to queries that are essential to building a (mobile-first) responsive design. In the future, I may rework things a bit to include a hook for patching-in additional media query features - stay tuned!\n\n- Browsers that natively support CSS3 Media Queries are opted-out of running this script as quickly as possible. In testing for support, all other browsers are subjected to a quick  test to determine whether they support media queries or not before proceeding to run the script. This test is now included separately at the top, and uses the window.matchMedia polyfill found here: https://github.com/paulirish/matchMedia.js . If you are already including this polyfill via Modernizr or otherwise, feel free to remove that part.\n\n- This script relies on no other scripts or frameworks (aside from the included matchMedia polyfill), and is optimized for mobile delivery (~1kb total filesize min/gzip)\n\n- As you might guess, this implementation is quite dumb in regards to CSS parsing rules. This is a good thing, because that allows it to run really fast, but its looseness may also cause unexpected behavior. For example: if you enclose a whole media query in a comment intending to disable its rules, you'll probably find that those rules will end up enabled in non-media-query-supporting browsers.\n\n- Respond.js doesn't parse CSS referenced via @import, nor does it work with media queries within style elements, as those styles can't be re-requested for parsing.\n\n- Due to security restrictions, some browsers may not allow this script to work on file:// urls (because it uses xmlHttpRequest). Run it on a web server.\n\n- If the request for the CSS file that includes MQ-specific styling is\n  behind a redirect, Respond.js will fail silently. CSS files should\nrespond with a 200 status.\n\n- Currently, media attributes on link elements are supported, but only if the linked stylesheet contains no media queries. If it does contain queries, the media attribute will be ignored and the internal queries will be parsed normally. In other words, @media statements in the CSS take priority.\n\n- Reportedly, if CSS files are encoded in UTF-8 with Byte-Order-Mark (BOM), they will not work with Respond.js in IE7 or IE8. Noted in issue #97\n\n- WARNING: Including @font-face rules inside a media query will cause IE7 and IE8 to hang during load. To work around this, place @font-face rules in the wide open, as a sibling to other media queries.\n\n- If you have more than 32 stylesheets referenced, IE will throw an error, `Invalid procedure call or argument`. Concatenate your CSS and the issue should go away.\n\n- Sass/SCSS source maps are not supported; `@media -sass-debug-info` will break respond.js. Noted in issue [#148](https://github.com/scottjehl/Respond/issues/148)\n\n- Internet Explorer 9 supports css3 media queries, but not within frames when the CSS containing the media query is in an external file (this appears to be a bug in IE9 — see https://stackoverflow.com/questions/10316247/media-queries-fail-inside-ie9-iframe). See this commit for a fix if you're having this problem. https://github.com/NewSignature/Respond/commit/1c86c66075f0a2099451eb426702fc3540d2e603\n\n- Nested Media Queries are not supported\n\n\nHow's it work?\n======\nBasically, the script loops through the CSS referenced in the page and runs a regular expression or two on their contents to find media queries and their associated blocks of CSS. In Internet Explorer, the content of the stylesheet is impossible to retrieve in its pre-parsed state (which in IE 8-, means its media queries are removed from the text), so Respond.js re-requests the CSS files using Ajax and parses the text response from there. Be sure to configure your CSS files' caching properly so that this re-request doesn't actually go to the server, hitting your browser cache instead.\n\nFrom there, each media query block is appended to the head in order via style elements, and those style elements are enabled and disabled (read: appended and removed from the DOM) depending on how their min/max width compares with the browser width. The media attribute on the style elements will match that of the query in the CSS, so it could be \"screen\", \"projector\", or whatever you want. Any relative paths contained in the CSS will be prefixed by their stylesheet's href, so image paths will direct to their proper destination\n\nAPI Options?\n======\nSure, a couple:\n\n- respond.update() : rerun the parser (helpful if you added a stylesheet to the page and it needs to be translated)\n- respond.mediaQueriesSupported: set to true if the browser natively supports media queries.\n- respond.getEmValue() : returns the pixel value of one em\n\n\nAlternatives to this script\n======\nThis isn't the only CSS3 Media Query polyfill script out there; but it damn well may be the fastest.\n\nIf you're looking for more robust CSS3 Media Query support, you might check out https://code.google.com/p/css3-mediaqueries-js/. In testing, I've found that script to be noticeably slow when rendering complex responsive designs (both in filesize and performance), but it really does support a lot more media query features than this script. Big hat tip to the authors! :)\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"respond\",\n  \"version\": \"1.4.2\",\n  \"main\": \"dest/respond.src.js\",\n  \"description\": \"Fast and lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)\",\n  \"ignore\": [\n    \"**/.*\",\n    \"test\"\n  ]\n}\n"
  },
  {
    "path": "cross-domain/example-base.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n\t<!-- Change this to match your local server hostname and path -->\n\t<base href=\"http://localhost/Respond/cross-domain/\"><!--[if lte IE 6]></base><![endif]-->\n\t\t<meta charset=\"utf-8\" />\n\t<title>Respond JS Test Page</title>\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/test/test.css\" rel=\"stylesheet\"/>\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/test/test2.css\" media=\"screen and (min-width: 600px)\" rel=\"stylesheet\"/>\n\t<script src=\"../dest/respond.src.js\"></script>\n\t\n\t<!-- Respond.js proxy on external server -->\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/cross-domain/respond-proxy.html\" id=\"respond-proxy\" rel=\"respond-proxy\" />\n\t<link href=\"respond.proxy.gif\" id=\"respond-redirect\" rel=\"respond-redirect\" />\n\t<script src=\"respond.proxy.js\"></script>\n</head> \n<body>\n\t<p>This is a visual test file for cross-domain proxy and custom base tag. NB: For this test to work properly, you need to set the href attribute of the base tag to the fully-qualified path to cross-domain on your system, terminated with a slash (earlier versions of IE don't play nicely otherwise).</p>\n\n\t<p>The media queries in the included CSS file simply change the body's background color depending on the browser width. If you see any colors aside from black, then the media queries are working in your browser. You can resize your browser window to see it change on the fly.</p>\n\n\n\t<p id=\"attribute-test\">Media-attributes are working too! This should be visible above 600px.</p>\n\n</body>\n</html>\n"
  },
  {
    "path": "cross-domain/example.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t<title>Respond JS Test Page</title>\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/test/test.css\" rel=\"stylesheet\"/>\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/test/test2.css\" media=\"screen and (min-width: 600px)\" rel=\"stylesheet\"/>\n\t<script src=\"../dest/respond.src.js\"></script>\n\t\n\t<!-- Respond.js proxy on external server -->\n\t<link href=\"https://rawgithub.com/scottjehl/Respond/master/cross-domain/respond-proxy.html\" id=\"respond-proxy\" rel=\"respond-proxy\" />\n\t<link href=\"respond.proxy.gif\" id=\"respond-redirect\" rel=\"respond-redirect\" />\n\t<script src=\"respond.proxy.js\"></script>\n</head> \n<body>\n\t<p>This is a visual test file for cross-domain proxy.</p>\n\n\t<p>The media queries in the included CSS file simply change the body's background color depending on the browser width. If you see any colors aside from black, then the media queries are working in your browser. You can resize your browser window to see it change on the fly.</p>\n\n\n\t<p id=\"attribute-test\">Media-attributes are working too! This should be visible above 600px.</p>\n\n</body>\n</html>\n"
  },
  {
    "path": "cross-domain/respond-proxy.html",
    "content": "<!-- Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs -->\n<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t<title>Respond JS Proxy</title>\n</head> \n<body>\n\t<script>\n\t\t(function () {\n\t\t\tvar domain, css, query, getQueryString, ajax, xmlHttp;\n\n\t\t\t/*\n\t\t\t\thttps://stackoverflow.com/questions/4963673/get-url-array-variables-in-javascript-jquery/4963817#4963817\n\t\t\t*/\n\t\t\tgetQueryString = function() {\n\t\t\t\tvar ret = {}, parts, i, p;\n\n\t\t\t\tparts = (document.location.toString().split(\"?\")[1]).split(\"&\");\n\n\t\t\t\tfor (i = 0; i < parts.length; i++) {\n\n\t\t\t\t\tp = parts[i].split(\"=\");\n\t\t\t\t\t// so strings will be correctly parsed:\n\t\t\t\t\tp[1] = decodeURIComponent(p[1].replace(/\\+/g, \" \"));\n\n\t\t\t\t\tif (p[0].search(/\\[\\]/) >= 0) { // then it\"s an array\n\t\t\t\t\t\tp[0] = p[0].replace(\"[]\", \"\");\n\n\t\t\t\t\t\tif (typeof ret[p[0]] != \"object\") {\n\t\t\t\t\t\t\tret[p[0]] = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret[p[0]].push(p[1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret[p[0]] = p[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t\t};\n\n\t\t\tajax = function( url, callback ) {\n\t\t\t\tvar req = xmlHttp();\n\t\t\t\tif (!req){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treq.open( \"GET\", url, true );\n\t\t\t\treq.onreadystatechange = function () {\n\t\t\t\t\tif ( req.readyState != 4 || req.status != 200 && req.status != 304 ){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallback( req.responseText );\n\t\t\t\t};\n\t\t\t\tif ( req.readyState == 4 ){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treq.send();\n\t\t\t};\n\n\t\t\t//define ajax obj \n\t\t\txmlHttp = (function() {\n\t\t\t\tvar xmlhttpmethod = false,\n\t\t\t\t\tattempts = [\n\t\t\t\t\t\tfunction(){ return new XMLHttpRequest(); },\n\t\t\t\t\t\tfunction(){ return new ActiveXObject(\"Microsoft.XMLHTTP\"); },\n\t\t\t\t\t\tfunction(){ return new ActiveXObject(\"MSXML2.XMLHTTP.3.0\"); }\n\t\t\t\t\t],\n\t\t\t\t\tal = attempts.length;\n\n\t\t\t\twhile( al-- ){\n\t\t\t\t\ttry {\n\t\t\t\t\t\txmlhttpmethod = attempts[ al ]();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn function(){\n\t\t\t\t\treturn xmlhttpmethod;\n\t\t\t\t};\n\t\t\t})();\n\n\t\t\tquery = getQueryString();\n\t\t\tcss = query[\"css\"];\n\t\t\tdomain = query[\"url\"];\n\n\t\t\tif (css && domain) {\n\t\t\t\tajax(css, function (response) {\n\t\t\t\t\twindow.name = response;\n\t\t\t\t\twindow.location.href = domain;\n\t\t\t\t});\n\t\t\t}\n\t\t}());\n\t</script>\n</body>\n</html>\n"
  },
  {
    "path": "cross-domain/respond.proxy.js",
    "content": "/*! Respond.js: min/max-width media query polyfill. Remote proxy (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs  */\n(function(win, doc, undefined){\n\tvar docElem\t\t\t= doc.documentElement,\n\t\tproxyURL\t\t= doc.getElementById(\"respond-proxy\").href,\n\t\tredirectURL\t\t= (doc.getElementById(\"respond-redirect\") || location).href,\n\t\tbaseElem\t\t= doc.getElementsByTagName(\"base\")[0],\n\t\turls\t\t\t= [],\n\t\trefNode;\n\n\tfunction encode(url){\n\t\treturn win.encodeURIComponent(url);\n\t}\n\n\t function fakejax( url, callback ){\n\n\t\tvar iframe,\n\t\t\tAXO;\n\t\t\n\t\t// All hail Google https://j.mp/iKMI19\n\t\t// Behold, an iframe proxy without annoying clicky noises.\n\t\tif ( \"ActiveXObject\" in win ) {\n\t\t\tAXO = new ActiveXObject( \"htmlfile\" );\n\t\t\tAXO.open();\n\t\t\tAXO.write( '<iframe id=\"x\"></iframe>' );\n\t\t\tAXO.close();\n\t\t\tiframe = AXO.getElementById( \"x\" );\n\t\t} else {\n\t\t\tiframe = doc.createElement( \"iframe\" );\n\t\t\tiframe.style.cssText = \"position:absolute;top:-99em\";\n\t\t\tdocElem.insertBefore(iframe, docElem.firstElementChild || docElem.firstChild );\n\t\t}\n\n\t\tiframe.src = checkBaseURL(proxyURL) + \"?url=\" + encode(redirectURL) + \"&css=\" + encode(checkBaseURL(url));\n\t\t\n\t\tfunction checkFrameName() {\n\t\t\tvar cssText;\n\n\t\t\ttry {\n\t\t\t\tcssText = iframe.contentWindow.name;\n\t\t\t}\n\t\t\tcatch (e) { }\n\n\t\t\tif (cssText) {\n\t\t\t\t// We've got what we need. Stop the iframe from loading further content.\n\t\t\t\tiframe.src = \"about:blank\";\n\t\t\t\tiframe.parentNode.removeChild(iframe);\n\t\t\t\tiframe = null;\n\n\t\t\t\n\t\t\t\t// Per https://j.mp/kn9EPh, not taking any chances. Flushing the ActiveXObject\n\t\t\t\tif (AXO) {\n\t\t\t\t\tAXO = null;\n\n\t\t\t\t\tif (win.CollectGarbage) {\n\t\t\t\t\t\twin.CollectGarbage();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback(cssText);\n\t\t\t}\n\t\t\telse{\n\t\t\t\twin.setTimeout(checkFrameName, 100);\n\t\t\t}\n\t\t}\n\t\t\n\t\twin.setTimeout(checkFrameName, 500);\n\t}\n\n    // https://stackoverflow.com/a/472729\n\tfunction checkBaseURL(href) {\n        var el = document.createElement('div'),\n        escapedURL = href.split('&').join('&amp;').\n            split('<').join('&lt;').\n            split('\"').join('&quot;');\n\n        el.innerHTML = '<a href=\"' + escapedURL + '\">x</a>';\n        return el.firstChild.href;\n\t}\n\t\n\tfunction checkRedirectURL() {\n\t\t// IE6 & IE7 don't build out absolute urls in <link /> attributes.\n\t\t// So respond.proxy.gif remains relative instead of https://example.com/respond.proxy.gif.\n\t\t// This trickery resolves that issue.\n\t\tif (~ !redirectURL.indexOf(location.host)) {\n\n\t\t\tvar fakeLink = doc.createElement(\"div\");\n\n\t\t\tfakeLink.innerHTML = '<a href=\"' + redirectURL + '\"></a>';\n\t\t\tdocElem.insertBefore(fakeLink, docElem.firstElementChild || docElem.firstChild );\n\n\t\t\t// Grab the parsed URL from that dummy object\n\t\t\tredirectURL = fakeLink.firstChild.href;\n\n\t\t\t// Clean up\n\t\t\tfakeLink.parentNode.removeChild(fakeLink);\n\t\t\tfakeLink = null;\n\t\t}\n\t}\n\t\n\tfunction buildUrls(){\n\t\tvar links = doc.getElementsByTagName( \"link\" );\n\t\t\n\t\tfor( var i = 0, linkl = links.length; i < linkl; i++ ){\n\t\t\t\n\t\t\tvar thislink\t= links[i],\n\t\t\t\thref\t\t= links[i].href,\n\t\t\t\textreg\t\t= (/^([a-zA-Z:]*\\/\\/(www\\.)?)/).test( href ),\n\t\t\t\text\t\t\t= (baseElem && !extreg) || extreg;\n\n\t\t\t//make sure it's an external stylesheet\n\t\t\tif( thislink.rel.indexOf( \"stylesheet\" ) >= 0 && ext ){\n\t\t\t\t(function( link ){\t\t\t\n\t\t\t\t\tfakejax( href, function( css ){\n\t\t\t\t\t\tlink.styleSheet.rawCssText = css;\n\t\t\t\t\t\trespond.update();\n\t\t\t\t\t} );\n\t\t\t\t})( thislink );\n\t\t\t}\t\n\t\t}\n\n\t\t\n\t}\n\t\n\tif( !respond.mediaQueriesSupported ){\n\t\tcheckRedirectURL();\n\t\tbuildUrls();\n\t}\n\n})( window, document );\n"
  },
  {
    "path": "dest/respond.matchmedia.addListener.src.js",
    "content": "/*! Respond.js v1.4.2: min/max-width media query polyfill\n * Copyright 2014 Scott Jehl\n * Licensed under MIT\n * https://j.mp/respondjs */\n\n/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */\n/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */\n(function(w) {\n  \"use strict\";\n  w.matchMedia = w.matchMedia || function(doc, undefined) {\n    var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement(\"body\"), div = doc.createElement(\"div\");\n    div.id = \"mq-test-1\";\n    div.style.cssText = \"position:absolute;top:-100em\";\n    fakeBody.style.background = \"none\";\n    fakeBody.appendChild(div);\n    return function(q) {\n      div.innerHTML = '&shy;<style media=\"' + q + '\"> #mq-test-1 { width: 42px; }</style>';\n      docElem.insertBefore(fakeBody, refNode);\n      bool = div.offsetWidth === 42;\n      docElem.removeChild(fakeBody);\n      return {\n        matches: bool,\n        media: q\n      };\n    };\n  }(w.document);\n})(this);\n\n/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */\n(function(w) {\n  \"use strict\";\n  if (w.matchMedia && w.matchMedia(\"all\").addListener) {\n    return false;\n  }\n  var localMatchMedia = w.matchMedia, hasMediaQueries = localMatchMedia(\"only all\").matches, isListening = false, timeoutID = 0, queries = [], handleChange = function(evt) {\n    w.clearTimeout(timeoutID);\n    timeoutID = w.setTimeout(function() {\n      for (var i = 0, il = queries.length; i < il; i++) {\n        var mql = queries[i].mql, listeners = queries[i].listeners || [], matches = localMatchMedia(mql.media).matches;\n        if (matches !== mql.matches) {\n          mql.matches = matches;\n          for (var j = 0, jl = listeners.length; j < jl; j++) {\n            listeners[j].call(w, mql);\n          }\n        }\n      }\n    }, 30);\n  };\n  w.matchMedia = function(media) {\n    var mql = localMatchMedia(media), listeners = [], index = 0;\n    mql.addListener = function(listener) {\n      if (!hasMediaQueries) {\n        return;\n      }\n      if (!isListening) {\n        isListening = true;\n        w.addEventListener(\"resize\", handleChange, true);\n      }\n      if (index === 0) {\n        index = queries.push({\n          mql: mql,\n          listeners: listeners\n        });\n      }\n      listeners.push(listener);\n    };\n    mql.removeListener = function(listener) {\n      for (var i = 0, il = listeners.length; i < il; i++) {\n        if (listeners[i] === listener) {\n          listeners.splice(i, 1);\n        }\n      }\n    };\n    return mql;\n  };\n})(this);\n\n(function(w) {\n  \"use strict\";\n  var respond = {};\n  w.respond = respond;\n  respond.update = function() {};\n  var requestQueue = [], xmlHttp = function() {\n    var xmlhttpmethod = false;\n    try {\n      xmlhttpmethod = new w.XMLHttpRequest();\n    } catch (e) {\n      xmlhttpmethod = new w.ActiveXObject(\"Microsoft.XMLHTTP\");\n    }\n    return function() {\n      return xmlhttpmethod;\n    };\n  }(), ajax = function(url, callback) {\n    var req = xmlHttp();\n    if (!req) {\n      return;\n    }\n    req.open(\"GET\", url, true);\n    req.onreadystatechange = function() {\n      if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {\n        return;\n      }\n      callback(req.responseText);\n    };\n    if (req.readyState === 4) {\n      return;\n    }\n    req.send(null);\n  }, isUnsupportedMediaQuery = function(query) {\n    return query.replace(respond.regex.minmaxwh, \"\").match(respond.regex.other);\n  };\n  respond.ajax = ajax;\n  respond.queue = requestQueue;\n  respond.unsupportedmq = isUnsupportedMediaQuery;\n  respond.regex = {\n    media: /@media[^\\{]+\\{([^\\{\\}]*\\{[^\\}\\{]*\\})+/gi,\n    keyframes: /@(?:\\-(?:o|moz|webkit)\\-)?keyframes[^\\{]+\\{(?:[^\\{\\}]*\\{[^\\}\\{]*\\})+[^\\}]*\\}/gi,\n    comments: /\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//gi,\n    urls: /(url\\()['\"]?([^\\/\\)'\"][^:\\)'\"]+)['\"]?(\\))/g,\n    findStyles: /@media *([^\\{]+)\\{([\\S\\s]+?)$/,\n    only: /(only\\s+)?([a-zA-Z]+)\\s?/,\n    minw: /\\(\\s*min\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n    maxw: /\\(\\s*max\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n    minmaxwh: /\\(\\s*m(in|ax)\\-(height|width)\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/gi,\n    other: /\\([^\\)]*\\)/g\n  };\n  respond.mediaQueriesSupported = w.matchMedia && w.matchMedia(\"only all\") !== null && w.matchMedia(\"only all\").matches;\n  if (respond.mediaQueriesSupported) {\n    return;\n  }\n  var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName(\"head\")[0] || docElem, base = doc.getElementsByTagName(\"base\")[0], links = head.getElementsByTagName(\"link\"), lastCall, resizeDefer, eminpx, getEmValue = function() {\n    var ret, div = doc.createElement(\"div\"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;\n    div.style.cssText = \"position:absolute;font-size:1em;width:1em\";\n    if (!body) {\n      body = fakeUsed = doc.createElement(\"body\");\n      body.style.background = \"none\";\n    }\n    docElem.style.fontSize = \"100%\";\n    body.style.fontSize = \"100%\";\n    body.appendChild(div);\n    if (fakeUsed) {\n      docElem.insertBefore(body, docElem.firstChild);\n    }\n    ret = div.offsetWidth;\n    if (fakeUsed) {\n      docElem.removeChild(body);\n    } else {\n      body.removeChild(div);\n    }\n    docElem.style.fontSize = originalHTMLFontSize;\n    if (originalBodyFontSize) {\n      body.style.fontSize = originalBodyFontSize;\n    }\n    ret = eminpx = parseFloat(ret);\n    return ret;\n  }, applyMedia = function(fromResize) {\n    var name = \"clientWidth\", docElemProp = docElem[name], currWidth = doc.compatMode === \"CSS1Compat\" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();\n    if (fromResize && lastCall && now - lastCall < resizeThrottle) {\n      w.clearTimeout(resizeDefer);\n      resizeDefer = w.setTimeout(applyMedia, resizeThrottle);\n      return;\n    } else {\n      lastCall = now;\n    }\n    for (var i in mediastyles) {\n      if (mediastyles.hasOwnProperty(i)) {\n        var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = \"em\";\n        if (!!min) {\n          min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);\n        }\n        if (!!max) {\n          max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);\n        }\n        if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {\n          if (!styleBlocks[thisstyle.media]) {\n            styleBlocks[thisstyle.media] = [];\n          }\n          styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);\n        }\n      }\n    }\n    for (var j in appendedEls) {\n      if (appendedEls.hasOwnProperty(j)) {\n        if (appendedEls[j] && appendedEls[j].parentNode === head) {\n          head.removeChild(appendedEls[j]);\n        }\n      }\n    }\n    appendedEls.length = 0;\n    for (var k in styleBlocks) {\n      if (styleBlocks.hasOwnProperty(k)) {\n        var ss = doc.createElement(\"style\"), css = styleBlocks[k].join(\"\\n\");\n        ss.type = \"text/css\";\n        ss.media = k;\n        head.insertBefore(ss, lastLink.nextSibling);\n        if (ss.styleSheet) {\n          ss.styleSheet.cssText = css;\n        } else {\n          ss.appendChild(doc.createTextNode(css));\n        }\n        appendedEls.push(ss);\n      }\n    }\n  }, translate = function(styles, href, media) {\n    var qs = styles.replace(respond.regex.comments, \"\").replace(respond.regex.keyframes, \"\").match(respond.regex.media), ql = qs && qs.length || 0;\n    href = href.substring(0, href.lastIndexOf(\"/\"));\n    var repUrls = function(css) {\n      return css.replace(respond.regex.urls, \"$1\" + href + \"$2$3\");\n    }, useMedia = !ql && media;\n    if (href.length) {\n      href += \"/\";\n    }\n    if (useMedia) {\n      ql = 1;\n    }\n    for (var i = 0; i < ql; i++) {\n      var fullq, thisq, eachq, eql;\n      if (useMedia) {\n        fullq = media;\n        rules.push(repUrls(styles));\n      } else {\n        fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;\n        rules.push(RegExp.$2 && repUrls(RegExp.$2));\n      }\n      eachq = fullq.split(\",\");\n      eql = eachq.length;\n      for (var j = 0; j < eql; j++) {\n        thisq = eachq[j];\n        if (isUnsupportedMediaQuery(thisq)) {\n          continue;\n        }\n        mediastyles.push({\n          media: thisq.split(\"(\")[0].match(respond.regex.only) && RegExp.$2 || \"all\",\n          rules: rules.length - 1,\n          hasquery: thisq.indexOf(\"(\") > -1,\n          minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || \"\"),\n          maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || \"\")\n        });\n      }\n    }\n    applyMedia();\n  }, makeRequests = function() {\n    if (requestQueue.length) {\n      var thisRequest = requestQueue.shift();\n      ajax(thisRequest.href, function(styles) {\n        translate(styles, thisRequest.href, thisRequest.media);\n        parsedSheets[thisRequest.href] = true;\n        w.setTimeout(function() {\n          makeRequests();\n        }, 0);\n      });\n    }\n  }, ripCSS = function() {\n    for (var i = 0; i < links.length; i++) {\n      var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === \"stylesheet\";\n      if (!!href && isCSS && !parsedSheets[href]) {\n        if (sheet.styleSheet && sheet.styleSheet.rawCssText) {\n          translate(sheet.styleSheet.rawCssText, href, media);\n          parsedSheets[href] = true;\n        } else {\n          if (!/^([a-zA-Z:]*\\/\\/)/.test(href) && !base || href.replace(RegExp.$1, \"\").split(\"/\")[0] === w.location.host) {\n            if (href.substring(0, 2) === \"//\") {\n              href = w.location.protocol + href;\n            }\n            requestQueue.push({\n              href: href,\n              media: media\n            });\n          }\n        }\n      }\n    }\n    makeRequests();\n  };\n  ripCSS();\n  respond.update = ripCSS;\n  respond.getEmValue = getEmValue;\n  function callMedia() {\n    applyMedia(true);\n  }\n  if (w.addEventListener) {\n    w.addEventListener(\"resize\", callMedia, false);\n  } else if (w.attachEvent) {\n    w.attachEvent(\"onresize\", callMedia);\n  }\n})(this);\n"
  },
  {
    "path": "dest/respond.src.js",
    "content": "/*! Respond.js v1.4.2: min/max-width media query polyfill\n * Copyright 2014 Scott Jehl\n * Licensed under MIT\n * https://j.mp/respondjs */\n\n/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */\n/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */\n(function(w) {\n  \"use strict\";\n  w.matchMedia = w.matchMedia || function(doc, undefined) {\n    var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement(\"body\"), div = doc.createElement(\"div\");\n    div.id = \"mq-test-1\";\n    div.style.cssText = \"position:absolute;top:-100em\";\n    fakeBody.style.background = \"none\";\n    fakeBody.appendChild(div);\n    return function(q) {\n      div.innerHTML = '&shy;<style media=\"' + q + '\"> #mq-test-1 { width: 42px; }</style>';\n      docElem.insertBefore(fakeBody, refNode);\n      bool = div.offsetWidth === 42;\n      docElem.removeChild(fakeBody);\n      return {\n        matches: bool,\n        media: q\n      };\n    };\n  }(w.document);\n})(this);\n\n(function(w) {\n  \"use strict\";\n  var respond = {};\n  w.respond = respond;\n  respond.update = function() {};\n  var requestQueue = [], xmlHttp = function() {\n    var xmlhttpmethod = false;\n    try {\n      xmlhttpmethod = new w.XMLHttpRequest();\n    } catch (e) {\n      xmlhttpmethod = new w.ActiveXObject(\"Microsoft.XMLHTTP\");\n    }\n    return function() {\n      return xmlhttpmethod;\n    };\n  }(), ajax = function(url, callback) {\n    var req = xmlHttp();\n    if (!req) {\n      return;\n    }\n    req.open(\"GET\", url, true);\n    req.onreadystatechange = function() {\n      if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {\n        return;\n      }\n      callback(req.responseText);\n    };\n    if (req.readyState === 4) {\n      return;\n    }\n    req.send(null);\n  }, isUnsupportedMediaQuery = function(query) {\n    return query.replace(respond.regex.minmaxwh, \"\").match(respond.regex.other);\n  };\n  respond.ajax = ajax;\n  respond.queue = requestQueue;\n  respond.unsupportedmq = isUnsupportedMediaQuery;\n  respond.regex = {\n    media: /@media[^\\{]+\\{([^\\{\\}]*\\{[^\\}\\{]*\\})+/gi,\n    keyframes: /@(?:\\-(?:o|moz|webkit)\\-)?keyframes[^\\{]+\\{(?:[^\\{\\}]*\\{[^\\}\\{]*\\})+[^\\}]*\\}/gi,\n    comments: /\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//gi,\n    urls: /(url\\()['\"]?([^\\/\\)'\"][^:\\)'\"]+)['\"]?(\\))/g,\n    findStyles: /@media *([^\\{]+)\\{([\\S\\s]+?)$/,\n    only: /(only\\s+)?([a-zA-Z]+)\\s?/,\n    minw: /\\(\\s*min\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n    maxw: /\\(\\s*max\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n    minmaxwh: /\\(\\s*m(in|ax)\\-(height|width)\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/gi,\n    other: /\\([^\\)]*\\)/g\n  };\n  respond.mediaQueriesSupported = w.matchMedia && w.matchMedia(\"only all\") !== null && w.matchMedia(\"only all\").matches;\n  if (respond.mediaQueriesSupported) {\n    return;\n  }\n  var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName(\"head\")[0] || docElem, base = doc.getElementsByTagName(\"base\")[0], links = head.getElementsByTagName(\"link\"), lastCall, resizeDefer, eminpx, getEmValue = function() {\n    var ret, div = doc.createElement(\"div\"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;\n    div.style.cssText = \"position:absolute;font-size:1em;width:1em\";\n    if (!body) {\n      body = fakeUsed = doc.createElement(\"body\");\n      body.style.background = \"none\";\n    }\n    docElem.style.fontSize = \"100%\";\n    body.style.fontSize = \"100%\";\n    body.appendChild(div);\n    if (fakeUsed) {\n      docElem.insertBefore(body, docElem.firstChild);\n    }\n    ret = div.offsetWidth;\n    if (fakeUsed) {\n      docElem.removeChild(body);\n    } else {\n      body.removeChild(div);\n    }\n    docElem.style.fontSize = originalHTMLFontSize;\n    if (originalBodyFontSize) {\n      body.style.fontSize = originalBodyFontSize;\n    }\n    ret = eminpx = parseFloat(ret);\n    return ret;\n  }, applyMedia = function(fromResize) {\n    var name = \"clientWidth\", docElemProp = docElem[name], currWidth = doc.compatMode === \"CSS1Compat\" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();\n    if (fromResize && lastCall && now - lastCall < resizeThrottle) {\n      w.clearTimeout(resizeDefer);\n      resizeDefer = w.setTimeout(applyMedia, resizeThrottle);\n      return;\n    } else {\n      lastCall = now;\n    }\n    for (var i in mediastyles) {\n      if (mediastyles.hasOwnProperty(i)) {\n        var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = \"em\";\n        if (!!min) {\n          min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);\n        }\n        if (!!max) {\n          max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);\n        }\n        if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {\n          if (!styleBlocks[thisstyle.media]) {\n            styleBlocks[thisstyle.media] = [];\n          }\n          styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);\n        }\n      }\n    }\n    for (var j in appendedEls) {\n      if (appendedEls.hasOwnProperty(j)) {\n        if (appendedEls[j] && appendedEls[j].parentNode === head) {\n          head.removeChild(appendedEls[j]);\n        }\n      }\n    }\n    appendedEls.length = 0;\n    for (var k in styleBlocks) {\n      if (styleBlocks.hasOwnProperty(k)) {\n        var ss = doc.createElement(\"style\"), css = styleBlocks[k].join(\"\\n\");\n        ss.type = \"text/css\";\n        ss.media = k;\n        head.insertBefore(ss, lastLink.nextSibling);\n        if (ss.styleSheet) {\n          ss.styleSheet.cssText = css;\n        } else {\n          ss.appendChild(doc.createTextNode(css));\n        }\n        appendedEls.push(ss);\n      }\n    }\n  }, translate = function(styles, href, media) {\n    var qs = styles.replace(respond.regex.comments, \"\").replace(respond.regex.keyframes, \"\").match(respond.regex.media), ql = qs && qs.length || 0;\n    href = href.substring(0, href.lastIndexOf(\"/\"));\n    var repUrls = function(css) {\n      return css.replace(respond.regex.urls, \"$1\" + href + \"$2$3\");\n    }, useMedia = !ql && media;\n    if (href.length) {\n      href += \"/\";\n    }\n    if (useMedia) {\n      ql = 1;\n    }\n    for (var i = 0; i < ql; i++) {\n      var fullq, thisq, eachq, eql;\n      if (useMedia) {\n        fullq = media;\n        rules.push(repUrls(styles));\n      } else {\n        fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;\n        rules.push(RegExp.$2 && repUrls(RegExp.$2));\n      }\n      eachq = fullq.split(\",\");\n      eql = eachq.length;\n      for (var j = 0; j < eql; j++) {\n        thisq = eachq[j];\n        if (isUnsupportedMediaQuery(thisq)) {\n          continue;\n        }\n        mediastyles.push({\n          media: thisq.split(\"(\")[0].match(respond.regex.only) && RegExp.$2 || \"all\",\n          rules: rules.length - 1,\n          hasquery: thisq.indexOf(\"(\") > -1,\n          minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || \"\"),\n          maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || \"\")\n        });\n      }\n    }\n    applyMedia();\n  }, makeRequests = function() {\n    if (requestQueue.length) {\n      var thisRequest = requestQueue.shift();\n      ajax(thisRequest.href, function(styles) {\n        translate(styles, thisRequest.href, thisRequest.media);\n        parsedSheets[thisRequest.href] = true;\n        w.setTimeout(function() {\n          makeRequests();\n        }, 0);\n      });\n    }\n  }, ripCSS = function() {\n    for (var i = 0; i < links.length; i++) {\n      var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === \"stylesheet\";\n      if (!!href && isCSS && !parsedSheets[href]) {\n        if (sheet.styleSheet && sheet.styleSheet.rawCssText) {\n          translate(sheet.styleSheet.rawCssText, href, media);\n          parsedSheets[href] = true;\n        } else {\n          if (!/^([a-zA-Z:]*\\/\\/)/.test(href) && !base || href.replace(RegExp.$1, \"\").split(\"/\")[0] === w.location.host) {\n            if (href.substring(0, 2) === \"//\") {\n              href = w.location.protocol + href;\n            }\n            requestQueue.push({\n              href: href,\n              media: media\n            });\n          }\n        }\n      }\n    }\n    makeRequests();\n  };\n  ripCSS();\n  respond.update = ripCSS;\n  respond.getEmValue = getEmValue;\n  function callMedia() {\n    applyMedia(true);\n  }\n  if (w.addEventListener) {\n    w.addEventListener(\"resize\", callMedia, false);\n  } else if (w.attachEvent) {\n    w.attachEvent(\"onresize\", callMedia);\n  }\n})(this);\n"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"Respond.js\",\n\t\"description\": \"min/max-width media query polyfill\",\n\t\"version\": \"1.4.2\",\n\t\"homepage\": \"https://github.com/scottjehl/Respond\",\n\t\"homepageShortened\": \"https://j.mp/respondjs\",\n\t\"author\": {\n\t\t\"name\": \"Scott Jehl\",\n\t\t\"email\": \"scott@filamentgroup.com\",\n\t\t\"url\": \"https://filamentgroup.com\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/scottjehl/Respond.git\"\n\t},\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/scottjehl/Respond/issues\"\n\t},\n\t\"licenses\": [\n\t\t{\n\t\t\t\"type\": \"MIT\",\n\t\t\t\"url\": \"https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT\"\n\t\t}\n\t],\n\t\"devDependencies\": {\n\t\t\"grunt-cli\":\"~0.1\",\n\t\t\"grunt\": \"~0.4.0\",\n\t\t\"grunt-contrib-jshint\": \"~0.2.0\",\n\t\t\"grunt-contrib-qunit\": \"~0.3.0\",\n\t\t\"grunt-contrib-uglify\": \"0.2.7\"\n\t}\n\n}\n"
  },
  {
    "path": "src/matchmedia.addListener.js",
    "content": "/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */\n(function( w ){\n\t\"use strict\";\n\t// Bail out for browsers that have addListener support\n\tif (w.matchMedia && w.matchMedia('all').addListener) {\n\t\treturn false;\n\t}\n\n\tvar localMatchMedia = w.matchMedia,\n\t\thasMediaQueries = localMatchMedia('only all').matches,\n\t\tisListening     = false,\n\t\ttimeoutID       = 0,    // setTimeout for debouncing 'handleChange'\n\t\tqueries         = [],   // Contains each 'mql' and associated 'listeners' if 'addListener' is used\n\t\thandleChange    = function(evt) {\n\t\t\t// Debounce\n\t\t\tw.clearTimeout(timeoutID);\n\n\t\t\ttimeoutID = w.setTimeout(function() {\n\t\t\t\tfor (var i = 0, il = queries.length; i < il; i++) {\n\t\t\t\t\tvar mql         = queries[i].mql,\n\t\t\t\t\t\tlisteners   = queries[i].listeners || [],\n\t\t\t\t\t\tmatches     = localMatchMedia(mql.media).matches;\n\n\t\t\t\t\t// Update mql.matches value and call listeners\n\t\t\t\t\t// Fire listeners only if transitioning to or from matched state\n\t\t\t\t\tif (matches !== mql.matches) {\n\t\t\t\t\t\tmql.matches = matches;\n\n\t\t\t\t\t\tfor (var j = 0, jl = listeners.length; j < jl; j++) {\n\t\t\t\t\t\t\tlisteners[j].call(w, mql);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 30);\n\t\t};\n\n\tw.matchMedia = function(media) {\n\t\tvar mql         = localMatchMedia(media),\n\t\t\tlisteners   = [],\n\t\t\tindex       = 0;\n\n\t\tmql.addListener = function(listener) {\n\t\t\t// Changes would not occur to css media type so return now (Affects IE <= 8)\n\t\t\tif (!hasMediaQueries) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8)\n\t\t\t// There should only ever be 1 resize listener running for performance\n\t\t\tif (!isListening) {\n\t\t\t\tisListening = true;\n\t\t\t\tw.addEventListener('resize', handleChange, true);\n\t\t\t}\n\n\t\t\t// Push object only if it has not been pushed already\n\t\t\tif (index === 0) {\n\t\t\t\tindex = queries.push({\n\t\t\t\t\tmql         : mql,\n\t\t\t\t\tlisteners   : listeners\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlisteners.push(listener);\n\t\t};\n\n\t\tmql.removeListener = function(listener) {\n\t\t\tfor (var i = 0, il = listeners.length; i < il; i++){\n\t\t\t\tif (listeners[i] === listener){\n\t\t\t\t\tlisteners.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn mql;\n\t};\n}( this ));\n"
  },
  {
    "path": "src/matchmedia.polyfill.js",
    "content": "/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */\n/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */\n\n(function(w){\n\t\"use strict\";\n\tw.matchMedia = w.matchMedia || (function( doc, undefined ) {\n\n\t\tvar bool,\n\t\t\tdocElem = doc.documentElement,\n\t\t\trefNode = docElem.firstElementChild || docElem.firstChild,\n\t\t\t// fakeBody required for <FF4 when executed in <head>\n\t\t\tfakeBody = doc.createElement( \"body\" ),\n\t\t\tdiv = doc.createElement( \"div\" );\n\n\t\tdiv.id = \"mq-test-1\";\n\t\tdiv.style.cssText = \"position:absolute;top:-100em\";\n\t\tfakeBody.style.background = \"none\";\n\t\tfakeBody.appendChild(div);\n\n\t\treturn function(q){\n\n\t\t\tdiv.innerHTML = \"&shy;<style media=\\\"\" + q + \"\\\"> #mq-test-1 { width: 42px; }</style>\";\n\n\t\t\tdocElem.insertBefore( fakeBody, refNode );\n\t\t\tbool = div.offsetWidth === 42;\n\t\t\tdocElem.removeChild( fakeBody );\n\n\t\t\treturn {\n\t\t\t\tmatches: bool,\n\t\t\t\tmedia: q\n\t\t\t};\n\n\t\t};\n\n\t}( w.document ));\n}( this ));\n"
  },
  {
    "path": "src/respond.js",
    "content": "/* Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs  */\n(function( w ){\n\n\t\"use strict\";\n\n\t//exposed namespace\n\tvar respond = {};\n\tw.respond = respond;\n\n\t//define update even in native-mq-supporting browsers, to avoid errors\n\trespond.update = function(){};\n\n\t//define ajax obj\n\tvar requestQueue = [],\n\t\txmlHttp = (function() {\n\t\t\tvar xmlhttpmethod = false;\n\t\t\ttry {\n\t\t\t\txmlhttpmethod = new w.XMLHttpRequest();\n\t\t\t}\n\t\t\tcatch( e ){\n\t\t\t\txmlhttpmethod = new w.ActiveXObject( \"Microsoft.XMLHTTP\" );\n\t\t\t}\n\t\t\treturn function(){\n\t\t\t\treturn xmlhttpmethod;\n\t\t\t};\n\t\t})(),\n\n\t\t//tweaked Ajax functions from Quirksmode\n\t\tajax = function( url, callback ) {\n\t\t\tvar req = xmlHttp();\n\t\t\tif (!req){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treq.open( \"GET\", url, true );\n\t\t\treq.onreadystatechange = function () {\n\t\t\t\tif ( req.readyState !== 4 || req.status !== 200 && req.status !== 304 ){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcallback( req.responseText );\n\t\t\t};\n\t\t\tif ( req.readyState === 4 ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treq.send( null );\n\t\t},\n\t\tisUnsupportedMediaQuery = function( query ) {\n\t\t\treturn query.replace( respond.regex.minmaxwh, '' ).match( respond.regex.other );\n\t\t};\n\n\t//expose for testing\n\trespond.ajax = ajax;\n\trespond.queue = requestQueue;\n\trespond.unsupportedmq = isUnsupportedMediaQuery;\n\trespond.regex = {\n\t\tmedia: /@media[^\\{]+\\{([^\\{\\}]*\\{[^\\}\\{]*\\})+/gi,\n\t\tkeyframes: /@(?:\\-(?:o|moz|webkit)\\-)?keyframes[^\\{]+\\{(?:[^\\{\\}]*\\{[^\\}\\{]*\\})+[^\\}]*\\}/gi,\n\t\tcomments: /\\/\\*[^*]*\\*+([^/][^*]*\\*+)*\\//gi,\n\t\turls: /(url\\()['\"]?([^\\/\\)'\"][^:\\)'\"]+)['\"]?(\\))/g,\n\t\tfindStyles: /@media *([^\\{]+)\\{([\\S\\s]+?)$/,\n\t\tonly: /(only\\s+)?([a-zA-Z]+)\\s?/,\n\t\tminw: /\\(\\s*min\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n\t\tmaxw: /\\(\\s*max\\-width\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/,\n\t\tminmaxwh: /\\(\\s*m(in|ax)\\-(height|width)\\s*:\\s*(\\s*[0-9\\.]+)(px|em)\\s*\\)/gi,\n\t\tother: /\\([^\\)]*\\)/g\n\t};\n\n\t//expose media query support flag for external use\n\trespond.mediaQueriesSupported = w.matchMedia && w.matchMedia( \"only all\" ) !== null && w.matchMedia( \"only all\" ).matches;\n\n\t//if media queries are supported, exit here\n\tif( respond.mediaQueriesSupported ){\n\t\treturn;\n\t}\n\n\t//define vars\n\tvar doc = w.document,\n\t\tdocElem = doc.documentElement,\n\t\tmediastyles = [],\n\t\trules = [],\n\t\tappendedEls = [],\n\t\tparsedSheets = {},\n\t\tresizeThrottle = 30,\n\t\thead = doc.getElementsByTagName( \"head\" )[0] || docElem,\n\t\tbase = doc.getElementsByTagName( \"base\" )[0],\n\t\tlinks = head.getElementsByTagName( \"link\" ),\n\n\t\tlastCall,\n\t\tresizeDefer,\n\n\t\t//cached container for 1em value, populated the first time it's needed\n\t\teminpx,\n\n\t\t// returns the value of 1em in pixels\n\t\tgetEmValue = function() {\n\t\t\tvar ret,\n\t\t\t\tdiv = doc.createElement('div'),\n\t\t\t\tbody = doc.body,\n\t\t\t\toriginalHTMLFontSize = docElem.style.fontSize,\n\t\t\t\toriginalBodyFontSize = body && body.style.fontSize,\n\t\t\t\tfakeUsed = false;\n\n\t\t\tdiv.style.cssText = \"position:absolute;font-size:1em;width:1em\";\n\n\t\t\tif( !body ){\n\t\t\t\tbody = fakeUsed = doc.createElement( \"body\" );\n\t\t\t\tbody.style.background = \"none\";\n\t\t\t}\n\n\t\t\t// 1em in a media query is the value of the default font size of the browser\n\t\t\t// reset docElem and body to ensure the correct value is returned\n\t\t\tdocElem.style.fontSize = \"100%\";\n\t\t\tbody.style.fontSize = \"100%\";\n\n\t\t\tbody.appendChild( div );\n\n\t\t\tif( fakeUsed ){\n\t\t\t\tdocElem.insertBefore( body, docElem.firstChild );\n\t\t\t}\n\n\t\t\tret = div.offsetWidth;\n\n\t\t\tif( fakeUsed ){\n\t\t\t\tdocElem.removeChild( body );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbody.removeChild( div );\n\t\t\t}\n\n\t\t\t// restore the original values\n\t\t\tdocElem.style.fontSize = originalHTMLFontSize;\n\t\t\tif( originalBodyFontSize ) {\n\t\t\t\tbody.style.fontSize = originalBodyFontSize;\n\t\t\t}\n\n\n\t\t\t//also update eminpx before returning\n\t\t\tret = eminpx = parseFloat(ret);\n\n\t\t\treturn ret;\n\t\t},\n\n\t\t//enable/disable styles\n\t\tapplyMedia = function( fromResize ){\n\t\t\tvar name = \"clientWidth\",\n\t\t\t\tdocElemProp = docElem[ name ],\n\t\t\t\tcurrWidth = doc.compatMode === \"CSS1Compat\" && docElemProp || doc.body[ name ] || docElemProp,\n\t\t\t\tstyleBlocks\t= {},\n\t\t\t\tlastLink = links[ links.length-1 ],\n\t\t\t\tnow = (new Date()).getTime();\n\n\t\t\t//throttle resize calls\n\t\t\tif( fromResize && lastCall && now - lastCall < resizeThrottle ){\n\t\t\t\tw.clearTimeout( resizeDefer );\n\t\t\t\tresizeDefer = w.setTimeout( applyMedia, resizeThrottle );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlastCall = now;\n\t\t\t}\n\n\t\t\tfor( var i in mediastyles ){\n\t\t\t\tif( mediastyles.hasOwnProperty( i ) ){\n\t\t\t\t\tvar thisstyle = mediastyles[ i ],\n\t\t\t\t\t\tmin = thisstyle.minw,\n\t\t\t\t\t\tmax = thisstyle.maxw,\n\t\t\t\t\t\tminnull = min === null,\n\t\t\t\t\t\tmaxnull = max === null,\n\t\t\t\t\t\tem = \"em\";\n\n\t\t\t\t\tif( !!min ){\n\t\t\t\t\t\tmin = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );\n\t\t\t\t\t}\n\t\t\t\t\tif( !!max ){\n\t\t\t\t\t\tmax = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );\n\t\t\t\t\t}\n\n\t\t\t\t\t// if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true\n\t\t\t\t\tif( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){\n\t\t\t\t\t\tif( !styleBlocks[ thisstyle.media ] ){\n\t\t\t\t\t\t\tstyleBlocks[ thisstyle.media ] = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//remove any existing respond style element(s)\n\t\t\tfor( var j in appendedEls ){\n\t\t\t\tif( appendedEls.hasOwnProperty( j ) ){\n\t\t\t\t\tif( appendedEls[ j ] && appendedEls[ j ].parentNode === head ){\n\t\t\t\t\t\thead.removeChild( appendedEls[ j ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tappendedEls.length = 0;\n\n\t\t\t//inject active styles, grouped by media type\n\t\t\tfor( var k in styleBlocks ){\n\t\t\t\tif( styleBlocks.hasOwnProperty( k ) ){\n\t\t\t\t\tvar ss = doc.createElement( \"style\" ),\n\t\t\t\t\t\tcss = styleBlocks[ k ].join( \"\\n\" );\n\n\t\t\t\t\tss.type = \"text/css\";\n\t\t\t\t\tss.media = k;\n\n\t\t\t\t\t//originally, ss was appended to a documentFragment and sheets were appended in bulk.\n\t\t\t\t\t//this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!\n\t\t\t\t\thead.insertBefore( ss, lastLink.nextSibling );\n\n\t\t\t\t\tif ( ss.styleSheet ){\n\t\t\t\t\t\tss.styleSheet.cssText = css;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tss.appendChild( doc.createTextNode( css ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t//push to appendedEls to track for later removal\n\t\t\t\t\tappendedEls.push( ss );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t//find media blocks in css text, convert to style blocks\n\t\ttranslate = function( styles, href, media ){\n\t\t\tvar qs = styles.replace( respond.regex.comments, '' )\n\t\t\t\t\t.replace( respond.regex.keyframes, '' )\n\t\t\t\t\t.match( respond.regex.media ),\n\t\t\t\tql = qs && qs.length || 0;\n\n\t\t\t//try to get CSS path\n\t\t\thref = href.substring( 0, href.lastIndexOf( \"/\" ) );\n\n\t\t\tvar repUrls = function( css ){\n\t\t\t\t\treturn css.replace( respond.regex.urls, \"$1\" + href + \"$2$3\" );\n\t\t\t\t},\n\t\t\t\tuseMedia = !ql && media;\n\n\t\t\t//if path exists, tack on trailing slash\n\t\t\tif( href.length ){ href += \"/\"; }\n\n\t\t\t//if no internal queries exist, but media attr does, use that\n\t\t\t//note: this currently lacks support for situations where a media attr is specified on a link AND\n\t\t\t\t//its associated stylesheet has internal CSS media queries.\n\t\t\t\t//In those cases, the media attribute will currently be ignored.\n\t\t\tif( useMedia ){\n\t\t\t\tql = 1;\n\t\t\t}\n\n\t\t\tfor( var i = 0; i < ql; i++ ){\n\t\t\t\tvar fullq, thisq, eachq, eql;\n\n\t\t\t\t//media attr\n\t\t\t\tif( useMedia ){\n\t\t\t\t\tfullq = media;\n\t\t\t\t\trules.push( repUrls( styles ) );\n\t\t\t\t}\n\t\t\t\t//parse for styles\n\t\t\t\telse{\n\t\t\t\t\tfullq = qs[ i ].match( respond.regex.findStyles ) && RegExp.$1;\n\t\t\t\t\trules.push( RegExp.$2 && repUrls( RegExp.$2 ) );\n\t\t\t\t}\n\n\t\t\t\teachq = fullq.split( \",\" );\n\t\t\t\teql = eachq.length;\n\n\t\t\t\tfor( var j = 0; j < eql; j++ ){\n\t\t\t\t\tthisq = eachq[ j ];\n\n\t\t\t\t\tif( isUnsupportedMediaQuery( thisq ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tmediastyles.push( {\n\t\t\t\t\t\tmedia : thisq.split( \"(\" )[ 0 ].match( respond.regex.only ) && RegExp.$2 || \"all\",\n\t\t\t\t\t\trules : rules.length - 1,\n\t\t\t\t\t\thasquery : thisq.indexOf(\"(\") > -1,\n\t\t\t\t\t\tminw : thisq.match( respond.regex.minw ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || \"\" ),\n\t\t\t\t\t\tmaxw : thisq.match( respond.regex.maxw ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || \"\" )\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tapplyMedia();\n\t\t},\n\n\t\t//recurse through request queue, get css text\n\t\tmakeRequests = function(){\n\t\t\tif( requestQueue.length ){\n\t\t\t\tvar thisRequest = requestQueue.shift();\n\n\t\t\t\tajax( thisRequest.href, function( styles ){\n\t\t\t\t\ttranslate( styles, thisRequest.href, thisRequest.media );\n\t\t\t\t\tparsedSheets[ thisRequest.href ] = true;\n\n\t\t\t\t\t// by wrapping recursive function call in setTimeout\n\t\t\t\t\t// we prevent \"Stack overflow\" error in IE7\n\t\t\t\t\tw.setTimeout(function(){ makeRequests(); },0);\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\t//loop stylesheets, send text content to translate\n\t\tripCSS = function(){\n\n\t\t\tfor( var i = 0; i < links.length; i++ ){\n\t\t\t\tvar sheet = links[ i ],\n\t\t\t\thref = sheet.href,\n\t\t\t\tmedia = sheet.media,\n\t\t\t\tisCSS = sheet.rel && sheet.rel.toLowerCase() === \"stylesheet\";\n\n\t\t\t\t//only links plz and prevent re-parsing\n\t\t\t\tif( !!href && isCSS && !parsedSheets[ href ] ){\n\t\t\t\t\t// selectivizr exposes css through the rawCssText expando\n\t\t\t\t\tif (sheet.styleSheet && sheet.styleSheet.rawCssText) {\n\t\t\t\t\t\ttranslate( sheet.styleSheet.rawCssText, href, media );\n\t\t\t\t\t\tparsedSheets[ href ] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif( (!/^([a-zA-Z:]*\\/\\/)/.test( href ) && !base) ||\n\t\t\t\t\t\t\thref.replace( RegExp.$1, \"\" ).split( \"/\" )[0] === w.location.host ){\n\t\t\t\t\t\t\t// IE7 doesn't handle urls that start with '//' for ajax request\n\t\t\t\t\t\t\t// manually add in the protocol\n\t\t\t\t\t\t\tif ( href.substring(0,2) === \"//\" ) { href = w.location.protocol + href; }\n\t\t\t\t\t\t\trequestQueue.push( {\n\t\t\t\t\t\t\t\thref: href,\n\t\t\t\t\t\t\t\tmedia: media\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tmakeRequests();\n\t\t};\n\n\t//translate CSS\n\tripCSS();\n\n\t//expose update for re-running respond later on\n\trespond.update = ripCSS;\n\n\t//expose getEmValue\n\trespond.getEmValue = getEmValue;\n\n\t//adjust on resize\n\tfunction callMedia(){\n\t\tapplyMedia( true );\n\t}\n\n\tif( w.addEventListener ){\n\t\tw.addEventListener( \"resize\", callMedia, false );\n\t}\n\telse if( w.attachEvent ){\n\t\tw.attachEvent( \"onresize\", callMedia );\n\t}\n})(this);\n"
  },
  {
    "path": "test/test.css",
    "content": "/*\nThis is just a test file for making sure the script is working properly.\nIf it is, the media queries below will change the body's background color depending on the browser width.\nFor a realistic use case for media queries: read up on Responsive Web Design: \nhttp://www.alistapart.com/articles/responsive-web-design/\n*/\n\nbody {\n\tbackground: black;\n\tcolor: #333;\n\tfont-family: Helvetica, sans-serif;\n}\np {\n\twidth: 60%;\n\tmin-width: 18.75em; /* 300px @ 16px */\n\tmax-width: 43.75em; /* 700px @ 16px */\n\tmargin: 2em auto;\n\tbackground: #fff;\n\tpadding: 20px;\n}\na {\n\tcolor: #333;\n}\n\n/* hide the attribute-test element. test2.css will show it */\n#attribute-test {\n\tdisplay: none;\n}\n\n/*styles for 300 and up @ 16px!*/\n/* The max-width declaration below blocks this from ever working */\n@media only screen and (min-width: 18.75em){\n\tbody {\n\t\tbackground: yellow;\n\t}\n}\n\n\n/*styles for 480px - 620px @ 16px!*/\n@media only screen and (min-width: 30em) and (max-width: 38.75em) {\n\tbody {\n\t\tbackground: green;\n\t}\n}\n\n\n\n\n@media screen and (min-width: 38.75em),only print,projector{body{background:red;}}\n\n/*styles for 800px and up @ 16px!*/\n@media screen and (min-width: 50em){\n\tbody {\n\t\tbackground: blue;\n\t}\n}\n\n/*styles for 1100px and up @ 16px!*/\n@media screen and (min-width: 68.75em){\n\tbody {\n\t\tbackground: orange;\n\t}\n}\n\n/*one with pixels too! */\n/* NOTE - if the user were to increase his browser font size to 20px (chrome: Large), \n\t\t\tthe above (68.75em) media query will be incorrectly ignored!!!\n\t\t\t\n\t\t\tAssuming 20px browser setting, we would expect to see this progression:\n\t\t\tyellow > green > red > blue > NAVY > orange\n\t\t\t\n\t\t\tHowever, the orange never kicks in... which seems like a browser bug!\n\t\t\tHere's the math (assuming 20px browser setting):\n\t\t\t1200/20 = 60em     <     68.75em\n*/\n@media screen and (min-width: 1200px){\n\tbody {\n\t\tbackground: navy;\n\t}\n}\n\n@media only screen and (min-width: 1250px) and (min--moz-device-pixel-ratio: 1.5),\n\tonly screen and (min-width: 1250px) and (-moz-min-device-pixel-ratio: 1.5),\n\tonly screen and (min-width: 1250px) and (-o-min-device-pixel-ratio: 3/2),\n\tonly screen and (min-width: 1250px) and (-webkit-min-device-pixel-ratio: 1.5),\n\tonly screen and (min-width: 1250px) and (min-device-pixel-ratio: 1.5),\n\tonly screen and (min-width: 1250px) and (min-resolution: 1.5dppx),\n\tscreen and (min-width: 1250px) {\n\n\tbody {\n\t\tbackground-color: pink;\n\t}\n}"
  },
  {
    "path": "test/test.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t<title>Respond JS Test Page</title>\n\t<link href=\"test.css\" rel=\"stylesheet\"/>\n\t<link href=\"test2.css\" media=\"screen and (min-width: 37.5em)\" rel=\"stylesheet\"/> <!-- 37.5em = 600px @ 16px -->\n\t<script src=\"../dest/respond.src.js\"></script>\n</head>\n<body>\n\t<p>This is just a visual test file, and an ugly one at that! For unit tests, visit the <a href=\"unit/\"> Respond.js unit test suite</a></p>\n\n\t<p>The media queries in the included CSS file simply change the body's background color depending on the browser width. If you see any colors aside from black, then the media queries are working in your browser. You can resize your browser window to see it change on the fly.</p>\n\n\t<p>For a realistic use case for media queries: read up on <a href=\"http://www.alistapart.com/articles/responsive-web-design/\">Responsive Web Design</a></p>\n\n\t<p id=\"attribute-test\">Media-attributes are working too! This should be visible above 37.5em.</p>\n\n</body>\n</html>\n"
  },
  {
    "path": "test/test2.css",
    "content": "/* this stylesheet was referenced via a link that had a media attr defined\nit should only apply on screen > 600px */\n#attribute-test {\n\tdisplay: block;\n\tcolor: #fff;\n\tbackground: black;\n\ttext-align: center;\n}"
  },
  {
    "path": "test/unit/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t<title>Respond.js Test Suite</title>\n\t<link rel=\"stylesheet\" href=\"qunit/qunit.css\" media=\"screen\">\n\t<script src=\"qunit/qunit.js\"></script>\n\t<link href=\"test.css\" rel=\"stylesheet\" />\n\t<link href=\"test2.css\" media=\"screen and (min-width: 950px)\" rel=\"stylesheet\" />\n\t<link href=\"test3.css\" media=\"screen and (min-width: 68.75em)\" rel=\"stylesheet\" />\n\t<script src=\"../../dest/respond.src.js\"></script>\n\t<script src=\"tests.js\"></script>\n\n</head>\n<body>\n\t<h1 id=\"qunit-header\">Respond.js Test Suite</h1>\n\t<h2 id=\"qunit-banner\"></h2>\n\t<div id=\"qunit-testrunner-toolbar\"></div>\n\t<h2 id=\"qunit-userAgent\"></h2>\n\t<ol id=\"qunit-tests\"></ol>\n\t\n\t<!-- tests must run in new window -->\n\t<div id=\"launcher\"></div>\n\t\n\t<!-- elem for applying css via queries -->\n\t<div id=\"testelem\" class=\"foo\">test</div>\n\t\n</body>\n</html>"
  },
  {
    "path": "test/unit/qunit/qunit.css",
    "content": "/**\n * QUnit v1.3.0pre - A JavaScript Unit Testing Framework\n *\n * http://docs.jquery.com/QUnit\n *\n * Copyright (c) 2011 John Resig, Jörn Zaefferer\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * or GPL (GPL-LICENSE.txt) licenses.\n */\n\n/** Font Family and Sizes */\n\n#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {\n\tfont-family: \"Helvetica Neue Light\", \"HelveticaNeue-Light\", \"Helvetica Neue\", Calibri, Helvetica, Arial, sans-serif;\n}\n\n#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }\n#qunit-tests { font-size: smaller; }\n\n\n/** Resets */\n\n#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n\n/** Header */\n\n#qunit-header {\n\tpadding: 0.5em 0 0.5em 1em;\n\n\tcolor: #8699a4;\n\tbackground-color: #0d3349;\n\n\tfont-size: 1.5em;\n\tline-height: 1em;\n\tfont-weight: normal;\n\n\tborder-radius: 15px 15px 0 0;\n\t-moz-border-radius: 15px 15px 0 0;\n\t-webkit-border-top-right-radius: 15px;\n\t-webkit-border-top-left-radius: 15px;\n}\n\n#qunit-header a {\n\ttext-decoration: none;\n\tcolor: #c2ccd1;\n}\n\n#qunit-header a:hover,\n#qunit-header a:focus {\n\tcolor: #fff;\n}\n\n#qunit-banner {\n\theight: 5px;\n}\n\n#qunit-testrunner-toolbar {\n\tpadding: 0.5em 0 0.5em 2em;\n\tcolor: #5E740B;\n\tbackground-color: #eee;\n}\n\n#qunit-userAgent {\n\tpadding: 0.5em 0 0.5em 2.5em;\n\tbackground-color: #2b81af;\n\tcolor: #fff;\n\ttext-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;\n}\n\n\n/** Tests: Pass/Fail */\n\n#qunit-tests {\n\tlist-style-position: inside;\n}\n\n#qunit-tests li {\n\tpadding: 0.4em 0.5em 0.4em 2.5em;\n\tborder-bottom: 1px solid #fff;\n\tlist-style-position: inside;\n}\n\n#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running  {\n\tdisplay: none;\n}\n\n#qunit-tests li strong {\n\tcursor: pointer;\n}\n\n#qunit-tests li a {\n\tpadding: 0.5em;\n\tcolor: #c2ccd1;\n\ttext-decoration: none;\n}\n#qunit-tests li a:hover,\n#qunit-tests li a:focus {\n\tcolor: #000;\n}\n\n#qunit-tests ol {\n\tmargin-top: 0.5em;\n\tpadding: 0.5em;\n\n\tbackground-color: #fff;\n\n\tborder-radius: 15px;\n\t-moz-border-radius: 15px;\n\t-webkit-border-radius: 15px;\n\n\tbox-shadow: inset 0px 2px 13px #999;\n\t-moz-box-shadow: inset 0px 2px 13px #999;\n\t-webkit-box-shadow: inset 0px 2px 13px #999;\n}\n\n#qunit-tests table {\n\tborder-collapse: collapse;\n\tmargin-top: .2em;\n}\n\n#qunit-tests th {\n\ttext-align: right;\n\tvertical-align: top;\n\tpadding: 0 .5em 0 0;\n}\n\n#qunit-tests td {\n\tvertical-align: top;\n}\n\n#qunit-tests pre {\n\tmargin: 0;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n#qunit-tests del {\n\tbackground-color: #e0f2be;\n\tcolor: #374e0c;\n\ttext-decoration: none;\n}\n\n#qunit-tests ins {\n\tbackground-color: #ffcaca;\n\tcolor: #500;\n\ttext-decoration: none;\n}\n\n/*** Test Counts */\n\n#qunit-tests b.counts                       { color: black; }\n#qunit-tests b.passed                       { color: #5E740B; }\n#qunit-tests b.failed                       { color: #710909; }\n\n#qunit-tests li li {\n\tmargin: 0.5em;\n\tpadding: 0.4em 0.5em 0.4em 0.5em;\n\tbackground-color: #fff;\n\tborder-bottom: none;\n\tlist-style-position: inside;\n}\n\n/*** Passing Styles */\n\n#qunit-tests li li.pass {\n\tcolor: #5E740B;\n\tbackground-color: #fff;\n\tborder-left: 26px solid #C6E746;\n}\n\n#qunit-tests .pass                          { color: #528CE0; background-color: #D2E0E6; }\n#qunit-tests .pass .test-name               { color: #366097; }\n\n#qunit-tests .pass .test-actual,\n#qunit-tests .pass .test-expected           { color: #999999; }\n\n#qunit-banner.qunit-pass                    { background-color: #C6E746; }\n\n/*** Failing Styles */\n\n#qunit-tests li li.fail {\n\tcolor: #710909;\n\tbackground-color: #fff;\n\tborder-left: 26px solid #EE5757;\n\twhite-space: pre;\n}\n\n#qunit-tests > li:last-child {\n\tborder-radius: 0 0 15px 15px;\n\t-moz-border-radius: 0 0 15px 15px;\n\t-webkit-border-bottom-right-radius: 15px;\n\t-webkit-border-bottom-left-radius: 15px;\n}\n\n#qunit-tests .fail                          { color: #000000; background-color: #EE5757; }\n#qunit-tests .fail .test-name,\n#qunit-tests .fail .module-name             { color: #000000; }\n\n#qunit-tests .fail .test-actual             { color: #EE5757; }\n#qunit-tests .fail .test-expected           { color: green;   }\n\n#qunit-banner.qunit-fail                    { background-color: #EE5757; }\n\n\n/** Result */\n\n#qunit-testresult {\n\tpadding: 0.5em 0.5em 0.5em 2.5em;\n\n\tcolor: #2b81af;\n\tbackground-color: #D2E0E6;\n\n\tborder-bottom: 1px solid white;\n}\n\n/** Fixture */\n\n#qunit-fixture {\n\tposition: absolute;\n\ttop: -10000px;\n\tleft: -10000px;\n}"
  },
  {
    "path": "test/unit/qunit/qunit.js",
    "content": "/**\n * QUnit v1.3.0pre - A JavaScript Unit Testing Framework\n *\n * http://docs.jquery.com/QUnit\n *\n * Copyright (c) 2011 John Resig, Jörn Zaefferer\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * or GPL (GPL-LICENSE.txt) licenses.\n */\n\n(function(window) {\n\nvar defined = {\n\tsetTimeout: typeof window.setTimeout !== \"undefined\",\n\tsessionStorage: (function() {\n\t\ttry {\n\t\t\treturn !!sessionStorage.getItem;\n\t\t} catch(e) {\n\t\t\treturn false;\n\t\t}\n\t})()\n};\n\nvar\ttestId = 0,\n\ttoString = Object.prototype.toString,\n\thasOwn = Object.prototype.hasOwnProperty;\n\nvar Test = function(name, testName, expected, testEnvironmentArg, async, callback) {\n\tthis.name = name;\n\tthis.testName = testName;\n\tthis.expected = expected;\n\tthis.testEnvironmentArg = testEnvironmentArg;\n\tthis.async = async;\n\tthis.callback = callback;\n\tthis.assertions = [];\n};\nTest.prototype = {\n\tinit: function() {\n\t\tvar tests = id(\"qunit-tests\");\n\t\tif (tests) {\n\t\t\tvar b = document.createElement(\"strong\");\n\t\t\t\tb.innerHTML = \"Running \" + this.name;\n\t\t\tvar li = document.createElement(\"li\");\n\t\t\t\tli.appendChild( b );\n\t\t\t\tli.className = \"running\";\n\t\t\t\tli.id = this.id = \"test-output\" + testId++;\n\t\t\ttests.appendChild( li );\n\t\t}\n\t},\n\tsetup: function() {\n\t\tif (this.module != config.previousModule) {\n\t\t\tif ( config.previousModule ) {\n\t\t\t\trunLoggingCallbacks('moduleDone', QUnit, {\n\t\t\t\t\tname: config.previousModule,\n\t\t\t\t\tfailed: config.moduleStats.bad,\n\t\t\t\t\tpassed: config.moduleStats.all - config.moduleStats.bad,\n\t\t\t\t\ttotal: config.moduleStats.all\n\t\t\t\t} );\n\t\t\t}\n\t\t\tconfig.previousModule = this.module;\n\t\t\tconfig.moduleStats = { all: 0, bad: 0 };\n\t\t\trunLoggingCallbacks( 'moduleStart', QUnit, {\n\t\t\t\tname: this.module\n\t\t\t} );\n\t\t}\n\n\t\tconfig.current = this;\n\t\tthis.testEnvironment = extend({\n\t\t\tsetup: function() {},\n\t\t\tteardown: function() {}\n\t\t}, this.moduleTestEnvironment);\n\t\tif (this.testEnvironmentArg) {\n\t\t\textend(this.testEnvironment, this.testEnvironmentArg);\n\t\t}\n\n\t\trunLoggingCallbacks( 'testStart', QUnit, {\n\t\t\tname: this.testName,\n\t\t\tmodule: this.module\n\t\t});\n\n\t\t// allow utility functions to access the current test environment\n\t\t// TODO why??\n\t\tQUnit.current_testEnvironment = this.testEnvironment;\n\n\t\ttry {\n\t\t\tif ( !config.pollution ) {\n\t\t\t\tsaveGlobal();\n\t\t\t}\n\n\t\t\tthis.testEnvironment.setup.call(this.testEnvironment);\n\t\t} catch(e) {\n\t\t\tQUnit.ok( false, \"Setup failed on \" + this.testName + \": \" + e.message );\n\t\t}\n\t},\n\trun: function() {\n\t\tconfig.current = this;\n\t\tif ( this.async ) {\n\t\t\tQUnit.stop();\n\t\t}\n\n\t\tif ( config.notrycatch ) {\n\t\t\tthis.callback.call(this.testEnvironment);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tthis.callback.call(this.testEnvironment);\n\t\t} catch(e) {\n\t\t\tfail(\"Test \" + this.testName + \" died, exception and test follows\", e, this.callback);\n\t\t\tQUnit.ok( false, \"Died on test #\" + (this.assertions.length + 1) + \": \" + e.message + \" - \" + QUnit.jsDump.parse(e) );\n\t\t\t// else next test will carry the responsibility\n\t\t\tsaveGlobal();\n\n\t\t\t// Restart the tests if they're blocking\n\t\t\tif ( config.blocking ) {\n\t\t\t\tQUnit.start();\n\t\t\t}\n\t\t}\n\t},\n\tteardown: function() {\n\t\tconfig.current = this;\n\t\ttry {\n\t\t\tthis.testEnvironment.teardown.call(this.testEnvironment);\n\t\t\tcheckPollution();\n\t\t} catch(e) {\n\t\t\tQUnit.ok( false, \"Teardown failed on \" + this.testName + \": \" + e.message );\n\t\t}\n\t},\n\tfinish: function() {\n\t\tconfig.current = this;\n\t\tif ( this.expected != null && this.expected != this.assertions.length ) {\n\t\t\tQUnit.ok( false, \"Expected \" + this.expected + \" assertions, but \" + this.assertions.length + \" were run\" );\n\t\t}\n\n\t\tvar good = 0, bad = 0,\n\t\t\ttests = id(\"qunit-tests\");\n\n\t\tconfig.stats.all += this.assertions.length;\n\t\tconfig.moduleStats.all += this.assertions.length;\n\n\t\tif ( tests ) {\n\t\t\tvar ol = document.createElement(\"ol\");\n\n\t\t\tfor ( var i = 0; i < this.assertions.length; i++ ) {\n\t\t\t\tvar assertion = this.assertions[i];\n\n\t\t\t\tvar li = document.createElement(\"li\");\n\t\t\t\tli.className = assertion.result ? \"pass\" : \"fail\";\n\t\t\t\tli.innerHTML = assertion.message || (assertion.result ? \"okay\" : \"failed\");\n\t\t\t\tol.appendChild( li );\n\n\t\t\t\tif ( assertion.result ) {\n\t\t\t\t\tgood++;\n\t\t\t\t} else {\n\t\t\t\t\tbad++;\n\t\t\t\t\tconfig.stats.bad++;\n\t\t\t\t\tconfig.moduleStats.bad++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// store result when possible\n\t\t\tif ( QUnit.config.reorder && defined.sessionStorage ) {\n\t\t\t\tif (bad) {\n\t\t\t\t\tsessionStorage.setItem(\"qunit-\" + this.module + \"-\" + this.testName, bad);\n\t\t\t\t} else {\n\t\t\t\t\tsessionStorage.removeItem(\"qunit-\" + this.module + \"-\" + this.testName);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (bad == 0) {\n\t\t\t\tol.style.display = \"none\";\n\t\t\t}\n\n\t\t\tvar b = document.createElement(\"strong\");\n\t\t\tb.innerHTML = this.name + \" <b class='counts'>(<b class='failed'>\" + bad + \"</b>, <b class='passed'>\" + good + \"</b>, \" + this.assertions.length + \")</b>\";\n\n\t\t\tvar a = document.createElement(\"a\");\n\t\t\ta.innerHTML = \"Rerun\";\n\t\t\ta.href = QUnit.url({ filter: getText([b]).replace(/\\([^)]+\\)$/, \"\").replace(/(^\\s*|\\s*$)/g, \"\") });\n\n\t\t\taddEvent(b, \"click\", function() {\n\t\t\t\tvar next = b.nextSibling.nextSibling,\n\t\t\t\t\tdisplay = next.style.display;\n\t\t\t\tnext.style.display = display === \"none\" ? \"block\" : \"none\";\n\t\t\t});\n\n\t\t\taddEvent(b, \"dblclick\", function(e) {\n\t\t\t\tvar target = e && e.target ? e.target : window.event.srcElement;\n\t\t\t\tif ( target.nodeName.toLowerCase() == \"span\" || target.nodeName.toLowerCase() == \"b\" ) {\n\t\t\t\t\ttarget = target.parentNode;\n\t\t\t\t}\n\t\t\t\tif ( window.location && target.nodeName.toLowerCase() === \"strong\" ) {\n\t\t\t\t\twindow.location = QUnit.url({ filter: getText([target]).replace(/\\([^)]+\\)$/, \"\").replace(/(^\\s*|\\s*$)/g, \"\") });\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar li = id(this.id);\n\t\t\tli.className = bad ? \"fail\" : \"pass\";\n\t\t\tli.removeChild( li.firstChild );\n\t\t\tli.appendChild( b );\n\t\t\tli.appendChild( a );\n\t\t\tli.appendChild( ol );\n\n\t\t} else {\n\t\t\tfor ( var i = 0; i < this.assertions.length; i++ ) {\n\t\t\t\tif ( !this.assertions[i].result ) {\n\t\t\t\t\tbad++;\n\t\t\t\t\tconfig.stats.bad++;\n\t\t\t\t\tconfig.moduleStats.bad++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tQUnit.reset();\n\t\t} catch(e) {\n\t\t\tfail(\"reset() failed, following Test \" + this.testName + \", exception and reset fn follows\", e, QUnit.reset);\n\t\t}\n\n\t\trunLoggingCallbacks( 'testDone', QUnit, {\n\t\t\tname: this.testName,\n\t\t\tmodule: this.module,\n\t\t\tfailed: bad,\n\t\t\tpassed: this.assertions.length - bad,\n\t\t\ttotal: this.assertions.length\n\t\t} );\n\t},\n\n\tqueue: function() {\n\t\tvar test = this;\n\t\tsynchronize(function() {\n\t\t\ttest.init();\n\t\t});\n\t\tfunction run() {\n\t\t\t// each of these can by async\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.setup();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.run();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.teardown();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.finish();\n\t\t\t});\n\t\t}\n\t\t// defer when previous test run passed, if storage is available\n\t\tvar bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem(\"qunit-\" + this.module + \"-\" + this.testName);\n\t\tif (bad) {\n\t\t\trun();\n\t\t} else {\n\t\t\tsynchronize(run, true);\n\t\t};\n\t}\n\n};\n\nvar QUnit = {\n\n\t// call on start of module test to prepend name to all tests\n\tmodule: function(name, testEnvironment) {\n\t\tconfig.currentModule = name;\n\t\tconfig.currentModuleTestEnviroment = testEnvironment;\n\t},\n\n\tasyncTest: function(testName, expected, callback) {\n\t\tif ( arguments.length === 2 ) {\n\t\t\tcallback = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\tQUnit.test(testName, expected, callback, true);\n\t},\n\n\ttest: function(testName, expected, callback, async) {\n\t\tvar name = '<span class=\"test-name\">' + escapeInnerText(testName) + '</span>', testEnvironmentArg;\n\n\t\tif ( arguments.length === 2 ) {\n\t\t\tcallback = expected;\n\t\t\texpected = null;\n\t\t}\n\t\t// is 2nd argument a testEnvironment?\n\t\tif ( expected && typeof expected === 'object') {\n\t\t\ttestEnvironmentArg = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\tif ( config.currentModule ) {\n\t\t\tname = '<span class=\"module-name\">' + config.currentModule + \"</span>: \" + name;\n\t\t}\n\n\t\tif ( !validTest(config.currentModule + \": \" + testName) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar test = new Test(name, testName, expected, testEnvironmentArg, async, callback);\n\t\ttest.module = config.currentModule;\n\t\ttest.moduleTestEnvironment = config.currentModuleTestEnviroment;\n\t\ttest.queue();\n\t},\n\n\t/**\n\t * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.\n\t */\n\texpect: function(asserts) {\n\t\tconfig.current.expected = asserts;\n\t},\n\n\t/**\n\t * Asserts true.\n\t * @example ok( \"asdfasdf\".length > 5, \"There must be at least 5 chars\" );\n\t */\n\tok: function(a, msg) {\n\t\ta = !!a;\n\t\tvar details = {\n\t\t\tresult: a,\n\t\t\tmessage: msg\n\t\t};\n\t\tmsg = escapeInnerText(msg);\n\t\trunLoggingCallbacks( 'log', QUnit, details );\n\t\tconfig.current.assertions.push({\n\t\t\tresult: a,\n\t\t\tmessage: msg\n\t\t});\n\t},\n\n\t/**\n\t * Checks that the first two arguments are equal, with an optional message.\n\t * Prints out both actual and expected values.\n\t *\n\t * Prefered to ok( actual == expected, message )\n\t *\n\t * @example equal( format(\"Received {0} bytes.\", 2), \"Received 2 bytes.\" );\n\t *\n\t * @param Object actual\n\t * @param Object expected\n\t * @param String message (optional)\n\t */\n\tequal: function(actual, expected, message) {\n\t\tQUnit.push(expected == actual, actual, expected, message);\n\t},\n\n\tnotEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected != actual, actual, expected, message);\n\t},\n\n\tdeepEqual: function(actual, expected, message) {\n\t\tQUnit.push(QUnit.equiv(actual, expected), actual, expected, message);\n\t},\n\n\tnotDeepEqual: function(actual, expected, message) {\n\t\tQUnit.push(!QUnit.equiv(actual, expected), actual, expected, message);\n\t},\n\n\tstrictEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected === actual, actual, expected, message);\n\t},\n\n\tnotStrictEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected !== actual, actual, expected, message);\n\t},\n\n\traises: function(block, expected, message) {\n\t\tvar actual, ok = false;\n\n\t\tif (typeof expected === 'string') {\n\t\t\tmessage = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\ttry {\n\t\t\tblock();\n\t\t} catch (e) {\n\t\t\tactual = e;\n\t\t}\n\n\t\tif (actual) {\n\t\t\t// we don't want to validate thrown error\n\t\t\tif (!expected) {\n\t\t\t\tok = true;\n\t\t\t// expected is a regexp\n\t\t\t} else if (QUnit.objectType(expected) === \"regexp\") {\n\t\t\t\tok = expected.test(actual);\n\t\t\t// expected is a constructor\n\t\t\t} else if (actual instanceof expected) {\n\t\t\t\tok = true;\n\t\t\t// expected is a validation function which returns true is validation passed\n\t\t\t} else if (expected.call({}, actual) === true) {\n\t\t\t\tok = true;\n\t\t\t}\n\t\t}\n\n\t\tQUnit.ok(ok, message);\n\t},\n\n\tstart: function(count) {\n\t\tconfig.semaphore -= count || 1;\n\t\tif (config.semaphore > 0) {\n\t\t\t// don't start until equal number of stop-calls\n\t\t\treturn;\n\t\t}\n\t\tif (config.semaphore < 0) {\n\t\t\t// ignore if start is called more often then stop\n\t\t\tconfig.semaphore = 0;\n\t\t}\n\t\t// A slight delay, to avoid any current callbacks\n\t\tif ( defined.setTimeout ) {\n\t\t\twindow.setTimeout(function() {\n\t\t\t\tif (config.semaphore > 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( config.timeout ) {\n\t\t\t\t\tclearTimeout(config.timeout);\n\t\t\t\t}\n\n\t\t\t\tconfig.blocking = false;\n\t\t\t\tprocess(true);\n\t\t\t}, 13);\n\t\t} else {\n\t\t\tconfig.blocking = false;\n\t\t\tprocess(true);\n\t\t}\n\t},\n\n\tstop: function(count) {\n\t\tconfig.semaphore += count || 1;\n\t\tconfig.blocking = true;\n\n\t\tif ( config.testTimeout && defined.setTimeout ) {\n\t\t\tclearTimeout(config.timeout);\n\t\t\tconfig.timeout = window.setTimeout(function() {\n\t\t\t\tQUnit.ok( false, \"Test timed out\" );\n\t\t\t\tconfig.semaphore = 1;\n\t\t\t\tQUnit.start();\n\t\t\t}, config.testTimeout);\n\t\t}\n\t}\n};\n\n//We want access to the constructor's prototype\n(function() {\n\tfunction F(){};\n\tF.prototype = QUnit;\n\tQUnit = new F();\n\t//Make F QUnit's constructor so that we can add to the prototype later\n\tQUnit.constructor = F;\n})();\n\n// Backwards compatibility, deprecated\nQUnit.equals = QUnit.equal;\nQUnit.same = QUnit.deepEqual;\n\n// Maintain internal state\nvar config = {\n\t// The queue of tests to run\n\tqueue: [],\n\n\t// block until document ready\n\tblocking: true,\n\n\t// when enabled, show only failing tests\n\t// gets persisted through sessionStorage and can be changed in UI via checkbox\n\thidepassed: false,\n\n\t// by default, run previously failed tests first\n\t// very useful in combination with \"Hide passed tests\" checked\n\treorder: true,\n\n\t// by default, modify document.title when suite is done\n\taltertitle: true,\n\n\turlConfig: ['noglobals', 'notrycatch'],\n\n\t//logging callback queues\n\tbegin: [],\n\tdone: [],\n\tlog: [],\n\ttestStart: [],\n\ttestDone: [],\n\tmoduleStart: [],\n\tmoduleDone: []\n};\n\n// Load paramaters\n(function() {\n\tvar location = window.location || { search: \"\", protocol: \"file:\" },\n\t\tparams = location.search.slice( 1 ).split( \"&\" ),\n\t\tlength = params.length,\n\t\turlParams = {},\n\t\tcurrent;\n\n\tif ( params[ 0 ] ) {\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\tcurrent = params[ i ].split( \"=\" );\n\t\t\tcurrent[ 0 ] = decodeURIComponent( current[ 0 ] );\n\t\t\t// allow just a key to turn on a flag, e.g., test.html?noglobals\n\t\t\tcurrent[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;\n\t\t\turlParams[ current[ 0 ] ] = current[ 1 ];\n\t\t}\n\t}\n\n\tQUnit.urlParams = urlParams;\n\tconfig.filter = urlParams.filter;\n\n\t// Figure out if we're running the tests from a server or not\n\tQUnit.isLocal = !!(location.protocol === 'file:');\n})();\n\n// Expose the API as global variables, unless an 'exports'\n// object exists, in that case we assume we're in CommonJS\nif ( typeof exports === \"undefined\" || typeof require === \"undefined\" ) {\n\textend(window, QUnit);\n\twindow.QUnit = QUnit;\n} else {\n\textend(exports, QUnit);\n\texports.QUnit = QUnit;\n}\n\n// define these after exposing globals to keep them in these QUnit namespace only\nextend(QUnit, {\n\tconfig: config,\n\n\t// Initialize the configuration options\n\tinit: function() {\n\t\textend(config, {\n\t\t\tstats: { all: 0, bad: 0 },\n\t\t\tmoduleStats: { all: 0, bad: 0 },\n\t\t\tstarted: +new Date,\n\t\t\tupdateRate: 1000,\n\t\t\tblocking: false,\n\t\t\tautostart: true,\n\t\t\tautorun: false,\n\t\t\tfilter: \"\",\n\t\t\tqueue: [],\n\t\t\tsemaphore: 0\n\t\t});\n\n\t\tvar tests = id( \"qunit-tests\" ),\n\t\t\tbanner = id( \"qunit-banner\" ),\n\t\t\tresult = id( \"qunit-testresult\" );\n\n\t\tif ( tests ) {\n\t\t\ttests.innerHTML = \"\";\n\t\t}\n\n\t\tif ( banner ) {\n\t\t\tbanner.className = \"\";\n\t\t}\n\n\t\tif ( result ) {\n\t\t\tresult.parentNode.removeChild( result );\n\t\t}\n\n\t\tif ( tests ) {\n\t\t\tresult = document.createElement( \"p\" );\n\t\t\tresult.id = \"qunit-testresult\";\n\t\t\tresult.className = \"result\";\n\t\t\ttests.parentNode.insertBefore( result, tests );\n\t\t\tresult.innerHTML = 'Running...<br/>&nbsp;';\n\t\t}\n\t},\n\n\t/**\n\t * Resets the test setup. Useful for tests that modify the DOM.\n\t *\n\t * If jQuery is available, uses jQuery's html(), otherwise just innerHTML.\n\t */\n\treset: function() {\n\t\tif ( window.jQuery ) {\n\t\t\tjQuery( \"#qunit-fixture\" ).html( config.fixture );\n\t\t} else {\n\t\t\tvar main = id( 'qunit-fixture' );\n\t\t\tif ( main ) {\n\t\t\t\tmain.innerHTML = config.fixture;\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Trigger an event on an element.\n\t *\n\t * @example triggerEvent( document.body, \"click\" );\n\t *\n\t * @param DOMElement elem\n\t * @param String type\n\t */\n\ttriggerEvent: function( elem, type, event ) {\n\t\tif ( document.createEvent ) {\n\t\t\tevent = document.createEvent(\"MouseEvents\");\n\t\t\tevent.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,\n\t\t\t\t0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\t\t\telem.dispatchEvent( event );\n\n\t\t} else if ( elem.fireEvent ) {\n\t\t\telem.fireEvent(\"on\"+type);\n\t\t}\n\t},\n\n\t// Safe object type checking\n\tis: function( type, obj ) {\n\t\treturn QUnit.objectType( obj ) == type;\n\t},\n\n\tobjectType: function( obj ) {\n\t\tif (typeof obj === \"undefined\") {\n\t\t\t\treturn \"undefined\";\n\n\t\t// consider: typeof null === object\n\t\t}\n\t\tif (obj === null) {\n\t\t\t\treturn \"null\";\n\t\t}\n\n\t\tvar type = toString.call( obj ).match(/^\\[object\\s(.*)\\]$/)[1] || '';\n\n\t\tswitch (type) {\n\t\t\t\tcase 'Number':\n\t\t\t\t\t\tif (isNaN(obj)) {\n\t\t\t\t\t\t\t\treturn \"nan\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn \"number\";\n\t\t\t\t\t\t}\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'Array':\n\t\t\t\tcase 'Date':\n\t\t\t\tcase 'RegExp':\n\t\t\t\tcase 'Function':\n\t\t\t\t\t\treturn type.toLowerCase();\n\t\t}\n\t\tif (typeof obj === \"object\") {\n\t\t\t\treturn \"object\";\n\t\t}\n\t\treturn undefined;\n\t},\n\n\tpush: function(result, actual, expected, message) {\n\t\tvar details = {\n\t\t\tresult: result,\n\t\t\tmessage: message,\n\t\t\tactual: actual,\n\t\t\texpected: expected\n\t\t};\n\n\t\tmessage = escapeInnerText(message) || (result ? \"okay\" : \"failed\");\n\t\tmessage = '<span class=\"test-message\">' + message + \"</span>\";\n\t\texpected = escapeInnerText(QUnit.jsDump.parse(expected));\n\t\tactual = escapeInnerText(QUnit.jsDump.parse(actual));\n\t\tvar output = message + '<table><tr class=\"test-expected\"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>';\n\t\tif (actual != expected) {\n\t\t\toutput += '<tr class=\"test-actual\"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>';\n\t\t\toutput += '<tr class=\"test-diff\"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>';\n\t\t}\n\t\tif (!result) {\n\t\t\tvar source = sourceFromStacktrace();\n\t\t\tif (source) {\n\t\t\t\tdetails.source = source;\n\t\t\t\toutput += '<tr class=\"test-source\"><th>Source: </th><td><pre>' + escapeInnerText(source) + '</pre></td></tr>';\n\t\t\t}\n\t\t}\n\t\toutput += \"</table>\";\n\n\t\trunLoggingCallbacks( 'log', QUnit, details );\n\n\t\tconfig.current.assertions.push({\n\t\t\tresult: !!result,\n\t\t\tmessage: output\n\t\t});\n\t},\n\n\turl: function( params ) {\n\t\tparams = extend( extend( {}, QUnit.urlParams ), params );\n\t\tvar querystring = \"?\",\n\t\t\tkey;\n\t\tfor ( key in params ) {\n\t\t\tif ( !hasOwn.call( params, key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tquerystring += encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( params[ key ] ) + \"&\";\n\t\t}\n\t\treturn window.location.pathname + querystring.slice( 0, -1 );\n\t},\n\n\textend: extend,\n\tid: id,\n\taddEvent: addEvent\n});\n\n//QUnit.constructor is set to the empty F() above so that we can add to it's prototype later\n//Doing this allows us to tell if the following methods have been overwritten on the actual\n//QUnit object, which is a deprecated way of using the callbacks.\nextend(QUnit.constructor.prototype, {\n\t// Logging callbacks; all receive a single argument with the listed properties\n\t// run test/logs.html for any related changes\n\tbegin: registerLoggingCallback('begin'),\n\t// done: { failed, passed, total, runtime }\n\tdone: registerLoggingCallback('done'),\n\t// log: { result, actual, expected, message }\n\tlog: registerLoggingCallback('log'),\n\t// testStart: { name }\n\ttestStart: registerLoggingCallback('testStart'),\n\t// testDone: { name, failed, passed, total }\n\ttestDone: registerLoggingCallback('testDone'),\n\t// moduleStart: { name }\n\tmoduleStart: registerLoggingCallback('moduleStart'),\n\t// moduleDone: { name, failed, passed, total }\n\tmoduleDone: registerLoggingCallback('moduleDone')\n});\n\nif ( typeof document === \"undefined\" || document.readyState === \"complete\" ) {\n\tconfig.autorun = true;\n}\n\nQUnit.load = function() {\n\trunLoggingCallbacks( 'begin', QUnit, {} );\n\n\t// Initialize the config, saving the execution queue\n\tvar oldconfig = extend({}, config);\n\tQUnit.init();\n\textend(config, oldconfig);\n\n\tconfig.blocking = false;\n\n\tvar urlConfigHtml = '', len = config.urlConfig.length;\n\tfor ( var i = 0, val; i < len, val = config.urlConfig[i]; i++ ) {\n\t\tconfig[val] = QUnit.urlParams[val];\n\t\turlConfigHtml += '<label><input name=\"' + val + '\" type=\"checkbox\"' + ( config[val] ? ' checked=\"checked\"' : '' ) + '>' + val + '</label>';\n\t}\n\n\tvar userAgent = id(\"qunit-userAgent\");\n\tif ( userAgent ) {\n\t\tuserAgent.innerHTML = navigator.userAgent;\n\t}\n\tvar banner = id(\"qunit-header\");\n\tif ( banner ) {\n\t\tbanner.innerHTML = '<a href=\"' + QUnit.url({ filter: undefined }) + '\"> ' + banner.innerHTML + '</a> ' + urlConfigHtml;\n\t\taddEvent( banner, \"change\", function( event ) {\n\t\t\tvar params = {};\n\t\t\tparams[ event.target.name ] = event.target.checked ? true : undefined;\n\t\t\twindow.location = QUnit.url( params );\n\t\t});\n\t}\n\n\tvar toolbar = id(\"qunit-testrunner-toolbar\");\n\tif ( toolbar ) {\n\t\tvar filter = document.createElement(\"input\");\n\t\tfilter.type = \"checkbox\";\n\t\tfilter.id = \"qunit-filter-pass\";\n\t\taddEvent( filter, \"click\", function() {\n\t\t\tvar ol = document.getElementById(\"qunit-tests\");\n\t\t\tif ( filter.checked ) {\n\t\t\t\tol.className = ol.className + \" hidepass\";\n\t\t\t} else {\n\t\t\t\tvar tmp = \" \" + ol.className.replace( /[\\n\\t\\r]/g, \" \" ) + \" \";\n\t\t\t\tol.className = tmp.replace(/ hidepass /, \" \");\n\t\t\t}\n\t\t\tif ( defined.sessionStorage ) {\n\t\t\t\tif (filter.checked) {\n\t\t\t\t\tsessionStorage.setItem(\"qunit-filter-passed-tests\", \"true\");\n\t\t\t\t} else {\n\t\t\t\t\tsessionStorage.removeItem(\"qunit-filter-passed-tests\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem(\"qunit-filter-passed-tests\") ) {\n\t\t\tfilter.checked = true;\n\t\t\tvar ol = document.getElementById(\"qunit-tests\");\n\t\t\tol.className = ol.className + \" hidepass\";\n\t\t}\n\t\ttoolbar.appendChild( filter );\n\n\t\tvar label = document.createElement(\"label\");\n\t\tlabel.setAttribute(\"for\", \"qunit-filter-pass\");\n\t\tlabel.innerHTML = \"Hide passed tests\";\n\t\ttoolbar.appendChild( label );\n\t}\n\n\tvar main = id('qunit-fixture');\n\tif ( main ) {\n\t\tconfig.fixture = main.innerHTML;\n\t}\n\n\tif (config.autostart) {\n\t\tQUnit.start();\n\t}\n};\n\naddEvent(window, \"load\", QUnit.load);\n\n// addEvent(window, \"error\") gives us a useless event object\nwindow.onerror = function( message, file, line ) {\n\tif ( QUnit.config.current ) {\n\t\tok( false, message + \", \" + file + \":\" + line );\n\t} else {\n\t\ttest( \"global failure\", function() {\n\t\t\tok( false, message + \", \" + file + \":\" + line );\n\t\t});\n\t}\n};\n\nfunction done() {\n\tconfig.autorun = true;\n\n\t// Log the last module results\n\tif ( config.currentModule ) {\n\t\trunLoggingCallbacks( 'moduleDone', QUnit, {\n\t\t\tname: config.currentModule,\n\t\t\tfailed: config.moduleStats.bad,\n\t\t\tpassed: config.moduleStats.all - config.moduleStats.bad,\n\t\t\ttotal: config.moduleStats.all\n\t\t} );\n\t}\n\n\tvar banner = id(\"qunit-banner\"),\n\t\ttests = id(\"qunit-tests\"),\n\t\truntime = +new Date - config.started,\n\t\tpassed = config.stats.all - config.stats.bad,\n\t\thtml = [\n\t\t\t'Tests completed in ',\n\t\t\truntime,\n\t\t\t' milliseconds.<br/>',\n\t\t\t'<span class=\"passed\">',\n\t\t\tpassed,\n\t\t\t'</span> tests of <span class=\"total\">',\n\t\t\tconfig.stats.all,\n\t\t\t'</span> passed, <span class=\"failed\">',\n\t\t\tconfig.stats.bad,\n\t\t\t'</span> failed.'\n\t\t].join('');\n\n\tif ( banner ) {\n\t\tbanner.className = (config.stats.bad ? \"qunit-fail\" : \"qunit-pass\");\n\t}\n\n\tif ( tests ) {\n\t\tid( \"qunit-testresult\" ).innerHTML = html;\n\t}\n\n\tif ( config.altertitle && typeof document !== \"undefined\" && document.title ) {\n\t\t// show ✖ for good, ✔ for bad suite result in title\n\t\t// use escape sequences in case file gets loaded with non-utf-8-charset\n\t\tdocument.title = [\n\t\t\t(config.stats.bad ? \"\\u2716\" : \"\\u2714\"),\n\t\t\tdocument.title.replace(/^[\\u2714\\u2716] /i, \"\")\n\t\t].join(\" \");\n\t}\n\n\trunLoggingCallbacks( 'done', QUnit, {\n\t\tfailed: config.stats.bad,\n\t\tpassed: passed,\n\t\ttotal: config.stats.all,\n\t\truntime: runtime\n\t} );\n}\n\nfunction validTest( name ) {\n\tvar filter = config.filter,\n\t\trun = false;\n\n\tif ( !filter ) {\n\t\treturn true;\n\t}\n\n\tvar not = filter.charAt( 0 ) === \"!\";\n\tif ( not ) {\n\t\tfilter = filter.slice( 1 );\n\t}\n\n\tif ( name.indexOf( filter ) !== -1 ) {\n\t\treturn !not;\n\t}\n\n\tif ( not ) {\n\t\trun = true;\n\t}\n\n\treturn run;\n}\n\n// so far supports only Firefox, Chrome and Opera (buggy)\n// could be extended in the future to use something like https://github.com/csnover/TraceKit\nfunction sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t} else if (e.sourceURL) {\n\t\t\t// Safari, PhantomJS\n\t\t\t// TODO sourceURL points at the 'throw new Error' line above, useless\n\t\t\t//return e.sourceURL + \":\" + e.line;\n\t\t}\n\t}\n}\n\nfunction escapeInnerText(s) {\n\tif (!s) {\n\t\treturn \"\";\n\t}\n\ts = s + \"\";\n\treturn s.replace(/[\\&<>]/g, function(s) {\n\t\tswitch(s) {\n\t\t\tcase \"&\": return \"&amp;\";\n\t\t\tcase \"<\": return \"&lt;\";\n\t\t\tcase \">\": return \"&gt;\";\n\t\t\tdefault: return s;\n\t\t}\n\t});\n}\n\nfunction synchronize( callback, last ) {\n\tconfig.queue.push( callback );\n\n\tif ( config.autorun && !config.blocking ) {\n\t\tprocess(last);\n\t}\n}\n\nfunction process( last ) {\n\tvar start = new Date().getTime();\n\tconfig.depth = config.depth ? config.depth + 1 : 1;\n\n\twhile ( config.queue.length && !config.blocking ) {\n\t\tif ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {\n\t\t\tconfig.queue.shift()();\n\t\t} else {\n\t\t\twindow.setTimeout( function(){\n\t\t\t\tprocess( last );\n\t\t\t}, 13 );\n\t\t\tbreak;\n\t\t}\n\t}\n\tconfig.depth--;\n\tif ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {\n\t\tdone();\n\t}\n}\n\nfunction saveGlobal() {\n\tconfig.pollution = [];\n\n\tif ( config.noglobals ) {\n\t\tfor ( var key in window ) {\n\t\t\tif ( !hasOwn.call( window, key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconfig.pollution.push( key );\n\t\t}\n\t}\n}\n\nfunction checkPollution( name ) {\n\tvar old = config.pollution;\n\tsaveGlobal();\n\n\tvar newGlobals = diff( config.pollution, old );\n\tif ( newGlobals.length > 0 ) {\n\t\tok( false, \"Introduced global variable(s): \" + newGlobals.join(\", \") );\n\t}\n\n\tvar deletedGlobals = diff( old, config.pollution );\n\tif ( deletedGlobals.length > 0 ) {\n\t\tok( false, \"Deleted global variable(s): \" + deletedGlobals.join(\", \") );\n\t}\n}\n\n// returns a new Array with the elements that are in a but not in b\nfunction diff( a, b ) {\n\tvar result = a.slice();\n\tfor ( var i = 0; i < result.length; i++ ) {\n\t\tfor ( var j = 0; j < b.length; j++ ) {\n\t\t\tif ( result[i] === b[j] ) {\n\t\t\t\tresult.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction fail(message, exception, callback) {\n\tif ( typeof console !== \"undefined\" && console.error && console.warn ) {\n\t\tconsole.error(message);\n\t\tconsole.error(exception);\n\t\tconsole.error(exception.stack);\n\t\tconsole.warn(callback.toString());\n\n\t} else if ( window.opera && opera.postError ) {\n\t\topera.postError(message, exception, callback.toString);\n\t}\n}\n\nfunction extend(a, b) {\n\tfor ( var prop in b ) {\n\t\tif ( b[prop] === undefined ) {\n\t\t\tdelete a[prop];\n\n\t\t// Avoid \"Member not found\" error in IE8 caused by setting window.constructor\n\t\t} else if ( prop !== \"constructor\" || a !== window ) {\n\t\t\ta[prop] = b[prop];\n\t\t}\n\t}\n\n\treturn a;\n}\n\nfunction addEvent(elem, type, fn) {\n\tif ( elem.addEventListener ) {\n\t\telem.addEventListener( type, fn, false );\n\t} else if ( elem.attachEvent ) {\n\t\telem.attachEvent( \"on\" + type, fn );\n\t} else {\n\t\tfn();\n\t}\n}\n\nfunction id(name) {\n\treturn !!(typeof document !== \"undefined\" && document && document.getElementById) &&\n\t\tdocument.getElementById( name );\n}\n\nfunction registerLoggingCallback(key){\n\treturn function(callback){\n\t\tconfig[key].push( callback );\n\t};\n}\n\n// Supports deprecated method of completely overwriting logging callbacks\nfunction runLoggingCallbacks(key, scope, args) {\n\t//debugger;\n\tvar callbacks;\n\tif ( QUnit.hasOwnProperty(key) ) {\n\t\tQUnit[key].call(scope, args);\n\t} else {\n\t\tcallbacks = config[key];\n\t\tfor( var i = 0; i < callbacks.length; i++ ) {\n\t\t\tcallbacks[i].call( scope, args );\n\t\t}\n\t}\n}\n\n// Test for equality any JavaScript type.\n// Author: Philippe Rathé <prathe@gmail.com>\nQUnit.equiv = function () {\n\n\tvar innerEquiv; // the real equiv function\n\tvar callers = []; // stack to decide between skip/abort functions\n\tvar parents = []; // stack to avoiding loops from circular referencing\n\n\t// Call the o related callback with the given arguments.\n\tfunction bindCallbacks(o, callbacks, args) {\n\t\tvar prop = QUnit.objectType(o);\n\t\tif (prop) {\n\t\t\tif (QUnit.objectType(callbacks[prop]) === \"function\") {\n\t\t\t\treturn callbacks[prop].apply(callbacks, args);\n\t\t\t} else {\n\t\t\t\treturn callbacks[prop]; // or undefined\n\t\t\t}\n\t\t}\n\t}\n\n\tvar getProto = Object.getPrototypeOf || function (obj) {\n\t\treturn obj.__proto__;\n\t};\n\n\tvar callbacks = function () {\n\n\t\t// for string, boolean, number and null\n\t\tfunction useStrictEquality(b, a) {\n\t\t\tif (b instanceof a.constructor || a instanceof b.constructor) {\n\t\t\t\t// to catch short annotaion VS 'new' annotation of a\n\t\t\t\t// declaration\n\t\t\t\t// e.g. var i = 1;\n\t\t\t\t// var j = new Number(1);\n\t\t\t\treturn a == b;\n\t\t\t} else {\n\t\t\t\treturn a === b;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t\"string\" : useStrictEquality,\n\t\t\t\"boolean\" : useStrictEquality,\n\t\t\t\"number\" : useStrictEquality,\n\t\t\t\"null\" : useStrictEquality,\n\t\t\t\"undefined\" : useStrictEquality,\n\n\t\t\t\"nan\" : function(b) {\n\t\t\t\treturn isNaN(b);\n\t\t\t},\n\n\t\t\t\"date\" : function(b, a) {\n\t\t\t\treturn QUnit.objectType(b) === \"date\"\n\t\t\t\t\t\t&& a.valueOf() === b.valueOf();\n\t\t\t},\n\n\t\t\t\"regexp\" : function(b, a) {\n\t\t\t\treturn QUnit.objectType(b) === \"regexp\"\n\t\t\t\t\t\t&& a.source === b.source && // the regex itself\n\t\t\t\t\t\ta.global === b.global && // and its modifers\n\t\t\t\t\t\t\t\t\t\t\t\t\t// (gmi) ...\n\t\t\t\t\t\ta.ignoreCase === b.ignoreCase\n\t\t\t\t\t\t&& a.multiline === b.multiline;\n\t\t\t},\n\n\t\t\t// - skip when the property is a method of an instance (OOP)\n\t\t\t// - abort otherwise,\n\t\t\t// initial === would have catch identical references anyway\n\t\t\t\"function\" : function() {\n\t\t\t\tvar caller = callers[callers.length - 1];\n\t\t\t\treturn caller !== Object && typeof caller !== \"undefined\";\n\t\t\t},\n\n\t\t\t\"array\" : function(b, a) {\n\t\t\t\tvar i, j, loop;\n\t\t\t\tvar len;\n\n\t\t\t\t// b could be an object literal here\n\t\t\t\tif (!(QUnit.objectType(b) === \"array\")) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tlen = a.length;\n\t\t\t\tif (len !== b.length) { // safe and faster\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// track reference to avoid circular references\n\t\t\t\tparents.push(a);\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tloop = false;\n\t\t\t\t\tfor (j = 0; j < parents.length; j++) {\n\t\t\t\t\t\tif (parents[j] === a[i]) {\n\t\t\t\t\t\t\tloop = true;// dont rewalk array\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!loop && !innerEquiv(a[i], b[i])) {\n\t\t\t\t\t\tparents.pop();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tparents.pop();\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t\"object\" : function(b, a) {\n\t\t\t\tvar i, j, loop;\n\t\t\t\tvar eq = true; // unless we can proove it\n\t\t\t\tvar aProperties = [], bProperties = []; // collection of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// strings\n\n\t\t\t\t// comparing constructors is more strict than using\n\t\t\t\t// instanceof\n\t\t\t\tif (a.constructor !== b.constructor) {\n\t\t\t\t\t// Allow objects with no prototype to be equivalent to\n\t\t\t\t\t// objects with Object as their constructor.\n\t\t\t\t\tif (!((getProto(a) === null && getProto(b) === Object.prototype) ||\n\t\t\t\t\t\t  (getProto(b) === null && getProto(a) === Object.prototype)))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// stack constructor before traversing properties\n\t\t\t\tcallers.push(a.constructor);\n\t\t\t\t// track reference to avoid circular references\n\t\t\t\tparents.push(a);\n\n\t\t\t\tfor (i in a) { // be strict: don't ensures hasOwnProperty\n\t\t\t\t\t\t\t\t// and go deep\n\t\t\t\t\tloop = false;\n\t\t\t\t\tfor (j = 0; j < parents.length; j++) {\n\t\t\t\t\t\tif (parents[j] === a[i])\n\t\t\t\t\t\t\tloop = true; // don't go down the same path\n\t\t\t\t\t\t\t\t\t\t\t// twice\n\t\t\t\t\t}\n\t\t\t\t\taProperties.push(i); // collect a's properties\n\n\t\t\t\t\tif (!loop && !innerEquiv(a[i], b[i])) {\n\t\t\t\t\t\teq = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallers.pop(); // unstack, we are done\n\t\t\t\tparents.pop();\n\n\t\t\t\tfor (i in b) {\n\t\t\t\t\tbProperties.push(i); // collect b's properties\n\t\t\t\t}\n\n\t\t\t\t// Ensures identical properties name\n\t\t\t\treturn eq\n\t\t\t\t\t\t&& innerEquiv(aProperties.sort(), bProperties\n\t\t\t\t\t\t\t\t.sort());\n\t\t\t}\n\t\t};\n\t}();\n\n\tinnerEquiv = function() { // can take multiple arguments\n\t\tvar args = Array.prototype.slice.apply(arguments);\n\t\tif (args.length < 2) {\n\t\t\treturn true; // end transition\n\t\t}\n\n\t\treturn (function(a, b) {\n\t\t\tif (a === b) {\n\t\t\t\treturn true; // catch the most you can\n\t\t\t} else if (a === null || b === null || typeof a === \"undefined\"\n\t\t\t\t\t|| typeof b === \"undefined\"\n\t\t\t\t\t|| QUnit.objectType(a) !== QUnit.objectType(b)) {\n\t\t\t\treturn false; // don't lose time with error prone cases\n\t\t\t} else {\n\t\t\t\treturn bindCallbacks(a, callbacks, [ b, a ]);\n\t\t\t}\n\n\t\t\t// apply transition with (1..n) arguments\n\t\t})(args[0], args[1])\n\t\t\t\t&& arguments.callee.apply(this, args.splice(1,\n\t\t\t\t\t\targs.length - 1));\n\t};\n\n\treturn innerEquiv;\n\n}();\n\n/**\n * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |\n * http://flesler.blogspot.com Licensed under BSD\n * (https://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008\n *\n * @projectDescription Advanced and extensible data dumping for Javascript.\n * @version 1.0.0\n * @author Ariel Flesler\n * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}\n */\nQUnit.jsDump = (function() {\n\tfunction quote( str ) {\n\t\treturn '\"' + str.toString().replace(/\"/g, '\\\\\"') + '\"';\n\t};\n\tfunction literal( o ) {\n\t\treturn o + '';\n\t};\n\tfunction join( pre, arr, post ) {\n\t\tvar s = jsDump.separator(),\n\t\t\tbase = jsDump.indent(),\n\t\t\tinner = jsDump.indent(1);\n\t\tif ( arr.join )\n\t\t\tarr = arr.join( ',' + s + inner );\n\t\tif ( !arr )\n\t\t\treturn pre + post;\n\t\treturn [ pre, inner + arr, base + post ].join(s);\n\t};\n\tfunction array( arr, stack ) {\n\t\tvar i = arr.length, ret = Array(i);\n\t\tthis.up();\n\t\twhile ( i-- )\n\t\t\tret[i] = this.parse( arr[i] , undefined , stack);\n\t\tthis.down();\n\t\treturn join( '[', ret, ']' );\n\t};\n\n\tvar reName = /^function (\\w+)/;\n\n\tvar jsDump = {\n\t\tparse:function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance\n\t\t\tstack = stack || [ ];\n\t\t\tvar parser = this.parsers[ type || this.typeOf(obj) ];\n\t\t\ttype = typeof parser;\n\t\t\tvar inStack = inArray(obj, stack);\n\t\t\tif (inStack != -1) {\n\t\t\t\treturn 'recursion('+(inStack - stack.length)+')';\n\t\t\t}\n\t\t\t//else\n\t\t\tif (type == 'function')  {\n\t\t\t\t\tstack.push(obj);\n\t\t\t\t\tvar res = parser.call( this, obj, stack );\n\t\t\t\t\tstack.pop();\n\t\t\t\t\treturn res;\n\t\t\t}\n\t\t\t// else\n\t\t\treturn (type == 'string') ? parser : this.parsers.error;\n\t\t},\n\t\ttypeOf:function( obj ) {\n\t\t\tvar type;\n\t\t\tif ( obj === null ) {\n\t\t\t\ttype = \"null\";\n\t\t\t} else if (typeof obj === \"undefined\") {\n\t\t\t\ttype = \"undefined\";\n\t\t\t} else if (QUnit.is(\"RegExp\", obj)) {\n\t\t\t\ttype = \"regexp\";\n\t\t\t} else if (QUnit.is(\"Date\", obj)) {\n\t\t\t\ttype = \"date\";\n\t\t\t} else if (QUnit.is(\"Function\", obj)) {\n\t\t\t\ttype = \"function\";\n\t\t\t} else if (typeof obj.setInterval !== undefined && typeof obj.document !== \"undefined\" && typeof obj.nodeType === \"undefined\") {\n\t\t\t\ttype = \"window\";\n\t\t\t} else if (obj.nodeType === 9) {\n\t\t\t\ttype = \"document\";\n\t\t\t} else if (obj.nodeType) {\n\t\t\t\ttype = \"node\";\n\t\t\t} else if (\n\t\t\t\t// native arrays\n\t\t\t\ttoString.call( obj ) === \"[object Array]\" ||\n\t\t\t\t// NodeList objects\n\t\t\t\t( typeof obj.length === \"number\" && typeof obj.item !== \"undefined\" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === \"undefined\" ) ) )\n\t\t\t) {\n\t\t\t\ttype = \"array\";\n\t\t\t} else {\n\t\t\t\ttype = typeof obj;\n\t\t\t}\n\t\t\treturn type;\n\t\t},\n\t\tseparator:function() {\n\t\t\treturn this.multiline ?\tthis.HTML ? '<br />' : '\\n' : this.HTML ? '&nbsp;' : ' ';\n\t\t},\n\t\tindent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing\n\t\t\tif ( !this.multiline )\n\t\t\t\treturn '';\n\t\t\tvar chr = this.indentChar;\n\t\t\tif ( this.HTML )\n\t\t\t\tchr = chr.replace(/\\t/g,'   ').replace(/ /g,'&nbsp;');\n\t\t\treturn Array( this._depth_ + (extra||0) ).join(chr);\n\t\t},\n\t\tup:function( a ) {\n\t\t\tthis._depth_ += a || 1;\n\t\t},\n\t\tdown:function( a ) {\n\t\t\tthis._depth_ -= a || 1;\n\t\t},\n\t\tsetParser:function( name, parser ) {\n\t\t\tthis.parsers[name] = parser;\n\t\t},\n\t\t// The next 3 are exposed so you can use them\n\t\tquote:quote,\n\t\tliteral:literal,\n\t\tjoin:join,\n\t\t//\n\t\t_depth_: 1,\n\t\t// This is the list of parsers, to modify them, use jsDump.setParser\n\t\tparsers:{\n\t\t\twindow: '[Window]',\n\t\t\tdocument: '[Document]',\n\t\t\terror:'[ERROR]', //when no parser is found, shouldn't happen\n\t\t\tunknown: '[Unknown]',\n\t\t\t'null':'null',\n\t\t\t'undefined':'undefined',\n\t\t\t'function':function( fn ) {\n\t\t\t\tvar ret = 'function',\n\t\t\t\t\tname = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE\n\t\t\t\tif ( name )\n\t\t\t\t\tret += ' ' + name;\n\t\t\t\tret += '(';\n\n\t\t\t\tret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join('');\n\t\t\t\treturn join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' );\n\t\t\t},\n\t\t\tarray: array,\n\t\t\tnodelist: array,\n\t\t\targuments: array,\n\t\t\tobject:function( map, stack ) {\n\t\t\t\tvar ret = [ ];\n\t\t\t\tQUnit.jsDump.up();\n\t\t\t\tfor ( var key in map ) {\n\t\t\t\t    var val = map[key];\n\t\t\t\t\tret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(val, undefined, stack));\n                }\n\t\t\t\tQUnit.jsDump.down();\n\t\t\t\treturn join( '{', ret, '}' );\n\t\t\t},\n\t\t\tnode:function( node ) {\n\t\t\t\tvar open = QUnit.jsDump.HTML ? '&lt;' : '<',\n\t\t\t\t\tclose = QUnit.jsDump.HTML ? '&gt;' : '>';\n\n\t\t\t\tvar tag = node.nodeName.toLowerCase(),\n\t\t\t\t\tret = open + tag;\n\n\t\t\t\tfor ( var a in QUnit.jsDump.DOMAttrs ) {\n\t\t\t\t\tvar val = node[QUnit.jsDump.DOMAttrs[a]];\n\t\t\t\t\tif ( val )\n\t\t\t\t\t\tret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' );\n\t\t\t\t}\n\t\t\t\treturn ret + close + open + '/' + tag + close;\n\t\t\t},\n\t\t\tfunctionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function\n\t\t\t\tvar l = fn.length;\n\t\t\t\tif ( !l ) return '';\n\n\t\t\t\tvar args = Array(l);\n\t\t\t\twhile ( l-- )\n\t\t\t\t\targs[l] = String.fromCharCode(97+l);//97 is 'a'\n\t\t\t\treturn ' ' + args.join(', ') + ' ';\n\t\t\t},\n\t\t\tkey:quote, //object calls it internally, the key part of an item in a map\n\t\t\tfunctionCode:'[code]', //function calls it internally, it's the content of the function\n\t\t\tattribute:quote, //node calls it internally, it's an html attribute value\n\t\t\tstring:quote,\n\t\t\tdate:quote,\n\t\t\tregexp:literal, //regex\n\t\t\tnumber:literal,\n\t\t\t'boolean':literal\n\t\t},\n\t\tDOMAttrs:{//attributes to dump from nodes, name=>realName\n\t\t\tid:'id',\n\t\t\tname:'name',\n\t\t\t'class':'className'\n\t\t},\n\t\tHTML:false,//if true, entities are escaped ( <, >, \\t, space and \\n )\n\t\tindentChar:'  ',//indentation unit\n\t\tmultiline:true //if true, items in a collection, are separated by a \\n, else just a space.\n\t};\n\n\treturn jsDump;\n})();\n\n// from Sizzle.js\nfunction getText( elems ) {\n\tvar ret = \"\", elem;\n\n\tfor ( var i = 0; elems[i]; i++ ) {\n\t\telem = elems[i];\n\n\t\t// Get the text from text nodes and CDATA nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\tret += elem.nodeValue;\n\n\t\t// Traverse everything else, except comment nodes\n\t\t} else if ( elem.nodeType !== 8 ) {\n\t\t\tret += getText( elem.childNodes );\n\t\t}\n\t}\n\n\treturn ret;\n};\n\n//from jquery.js\nfunction inArray( elem, array ) {\n\tif ( array.indexOf ) {\n\t\treturn array.indexOf( elem );\n\t}\n\n\tfor ( var i = 0, length = array.length; i < length; i++ ) {\n\t\tif ( array[ i ] === elem ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/*\n * Javascript Diff Algorithm\n *  By John Resig (http://ejohn.org/)\n *  Modified by Chu Alan \"sprite\"\n *\n * Released under the MIT license.\n *\n * More Info:\n *  http://ejohn.org/projects/javascript-diff-algorithm/\n *\n * Usage: QUnit.diff(expected, actual)\n *\n * QUnit.diff(\"the quick brown fox jumped over\", \"the quick fox jumps over\") == \"the  quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over\"\n */\nQUnit.diff = (function() {\n\tfunction diff(o, n) {\n\t\tvar ns = {};\n\t\tvar os = {};\n\n\t\tfor (var i = 0; i < n.length; i++) {\n\t\t\tif (ns[n[i]] == null)\n\t\t\t\tns[n[i]] = {\n\t\t\t\t\trows: [],\n\t\t\t\t\to: null\n\t\t\t\t};\n\t\t\tns[n[i]].rows.push(i);\n\t\t}\n\n\t\tfor (var i = 0; i < o.length; i++) {\n\t\t\tif (os[o[i]] == null)\n\t\t\t\tos[o[i]] = {\n\t\t\t\t\trows: [],\n\t\t\t\t\tn: null\n\t\t\t\t};\n\t\t\tos[o[i]].rows.push(i);\n\t\t}\n\n\t\tfor (var i in ns) {\n\t\t\tif ( !hasOwn.call( ns, i ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (ns[i].rows.length == 1 && typeof(os[i]) != \"undefined\" && os[i].rows.length == 1) {\n\t\t\t\tn[ns[i].rows[0]] = {\n\t\t\t\t\ttext: n[ns[i].rows[0]],\n\t\t\t\t\trow: os[i].rows[0]\n\t\t\t\t};\n\t\t\t\to[os[i].rows[0]] = {\n\t\t\t\t\ttext: o[os[i].rows[0]],\n\t\t\t\t\trow: ns[i].rows[0]\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = 0; i < n.length - 1; i++) {\n\t\t\tif (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&\n\t\t\tn[i + 1] == o[n[i].row + 1]) {\n\t\t\t\tn[i + 1] = {\n\t\t\t\t\ttext: n[i + 1],\n\t\t\t\t\trow: n[i].row + 1\n\t\t\t\t};\n\t\t\t\to[n[i].row + 1] = {\n\t\t\t\t\ttext: o[n[i].row + 1],\n\t\t\t\t\trow: i + 1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = n.length - 1; i > 0; i--) {\n\t\t\tif (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&\n\t\t\tn[i - 1] == o[n[i].row - 1]) {\n\t\t\t\tn[i - 1] = {\n\t\t\t\t\ttext: n[i - 1],\n\t\t\t\t\trow: n[i].row - 1\n\t\t\t\t};\n\t\t\t\to[n[i].row - 1] = {\n\t\t\t\t\ttext: o[n[i].row - 1],\n\t\t\t\t\trow: i - 1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\to: o,\n\t\t\tn: n\n\t\t};\n\t}\n\n\treturn function(o, n) {\n\t\to = o.replace(/\\s+$/, '');\n\t\tn = n.replace(/\\s+$/, '');\n\t\tvar out = diff(o == \"\" ? [] : o.split(/\\s+/), n == \"\" ? [] : n.split(/\\s+/));\n\n\t\tvar str = \"\";\n\n\t\tvar oSpace = o.match(/\\s+/g);\n\t\tif (oSpace == null) {\n\t\t\toSpace = [\" \"];\n\t\t}\n\t\telse {\n\t\t\toSpace.push(\" \");\n\t\t}\n\t\tvar nSpace = n.match(/\\s+/g);\n\t\tif (nSpace == null) {\n\t\t\tnSpace = [\" \"];\n\t\t}\n\t\telse {\n\t\t\tnSpace.push(\" \");\n\t\t}\n\n\t\tif (out.n.length == 0) {\n\t\t\tfor (var i = 0; i < out.o.length; i++) {\n\t\t\t\tstr += '<del>' + out.o[i] + oSpace[i] + \"</del>\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (out.n[0].text == null) {\n\t\t\t\tfor (n = 0; n < out.o.length && out.o[n].text == null; n++) {\n\t\t\t\t\tstr += '<del>' + out.o[n] + oSpace[n] + \"</del>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < out.n.length; i++) {\n\t\t\t\tif (out.n[i].text == null) {\n\t\t\t\t\tstr += '<ins>' + out.n[i] + nSpace[i] + \"</ins>\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar pre = \"\";\n\n\t\t\t\t\tfor (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {\n\t\t\t\t\t\tpre += '<del>' + out.o[n] + oSpace[n] + \"</del>\";\n\t\t\t\t\t}\n\t\t\t\t\tstr += \" \" + out.n[i].text + nSpace[i] + pre;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn str;\n\t};\n})();\n\n})(this);\n"
  },
  {
    "path": "test/unit/test-with-comment.css",
    "content": "/* this is a comment\n\t *\n\t */\n\n@media (min-width: 1px) {\n\n\t/* see issue #22 */\n\t/* @media {} */\n\t/* @media {\n\t} */\n\n\t/* this is a comment\n\t *\n\t */\n\n\t/* * / /*\n\t\tWill this strip right?\n\t */\n\tbody {\n\t\tcolor: red;\n\t\t/* TODO This edge case is not currently supported */\n\t\tcontent: \"content /* this should not strip */\";\n\t}\n\n\t/* this is a comment */\n\n\t/* see issue #22 */\n\t/* @media */\n}\n"
  },
  {
    "path": "test/unit/test-with-dpr.css",
    "content": "@media \nonly screen and (max-width: 1004px) and (min--moz-device-pixel-ratio: 1.5),\nonly screen and (max-width: 1004px) and (-moz-min-device-pixel-ratio: 1.5),\nonly screen and (max-width: 1004px) and (-o-min-device-pixel-ratio: 3/2),\nonly screen and (max-width: 1004px) and (-webkit-min-device-pixel-ratio: 1.5),\nonly screen and (max-width: 1004px) and (min-device-pixel-ratio: 1.5),\nonly screen and (max-width: 1004px) and (min-resolution: 1.5dppx) {\n\t\n\t\n}"
  },
  {
    "path": "test/unit/test-with-keyframe.css",
    "content": "@media (min-width: 1px) {\n\n\t@-webkit-keyframes NAME-YOUR-ANIMATION {\n\t\t0%   { opacity: 0; }\n\t\t100% { opacity: 1; }\n\t}\n\t@keyframes NAME-YOUR-ANIMATION {\n\t\t0%   { opacity: 0; }\n\t\t100% { opacity: 1; }\n\t}\n\n\tbody {\n\t\tcolor: red;\n\t}\n}"
  },
  {
    "path": "test/unit/test.css",
    "content": "\n\n.launcher #qunit-testrunner-toolbar,\n.launcher #qunit-userAgent,\n.launcher #qunit-tests,\n.launcher #qunit-testresult {\n\tdisplay: none;\n}\n.launcher #launcher {\n\n\tfont: 1.5em/1 bold Helvetica, sans-serif;\n}\n\n#testelem {\n\twidth: 50px;\n\toverflow: hidden;\n\tdisplay: block;\n}\n\n/* a style like this should never apply in IE. If it does, tests will fail */\n@media screen and (view-mode: minimized) {\n\t#testelem {\n\t\twidth: 10px !important;\n\t}\n}\n\n/*styles for 480px and up - media type purposely left out here to test that in the process */\n@media (min-width: 480px) {\n\t#testelem {\n\t\twidth: 150px;\n\t}\n\t#testelem[class=foo] {\n\t\theight: 200px;\n\t}\n}\n\n/*styles for 500px and under*/\n@media screen and (max-width: 460px) {\n\t#testelem {\n\t\theight: 150px;\n\t}\n}\n\n/* testing em unit support - 33em should be 528px and 35em should be 560px in IE with default font settings */\n@media screen and (min-width: 33em) and (max-width: 38em) {\n\t#testelem {\n\t\twidth: 75px;\n\t}\n}\n\n\n\n/*styles for 620px and up */\n@media only screen and (min-width: 620px) {\n\t#testelem {\n\t\twidth: 250px;\n\t}\n}\n\n\n/*styles for 760px and up */\n@media only print, only screen and (min-width: 760px) {\n\t#testelem {\n\t\twidth: 350px;\n\t}\n}\n\n\n/*styles for print that shouldn't apply */\n@media only print and (min-width: 800px) {\n\t#testelem {\n\t\twidth: 500px;\n\t}\n}"
  },
  {
    "path": "test/unit/test2.css",
    "content": "/* this stylesheet was referenced via a link that had a media attr defined\nit should only apply on window > 950px */\n#testelem {\n\twidth: 16px;\n}"
  },
  {
    "path": "test/unit/test3.css",
    "content": "/* this stylesheet was referenced via a link that had a media attr defined\nit should only apply on screen > 87.5em (1400px) */\n#testelem {\n\twidth: 25px;\n}"
  },
  {
    "path": "test/unit/tests.js",
    "content": "/*\n Respond.js unit tests - based on qUnit\n*/\n\nQUnit.config.reorder = false;\n\nwindow.onload = function(){\n\n\tfunction getNormalizedUrl( filename ) {\n\t\tvar url = window.location.href;\n\t\treturn url.substr( 0, url.lastIndexOf( '/' ) + 1 ) + ( filename || '' );\n\t}\n\n\t// ajax doesn’t finish if you queue them while respond is already ajaxing\n\tfunction queueRequest( callback ) {\n\t\tvar clearQueue = window.setInterval( function() {\n\t\t\tif( !respond.queue.length ) {\n\t\t\t\twindow.clearInterval( clearQueue );\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}, 50 );\n\t}\n\n\tif( !window.opener ){\n\n\t\tdocument.documentElement.className = \"launcher\";\n\n\t\tdocument.getElementById(\"launcher\").innerHTML = '<p>Tests must run in a popup window. <a href=\"suite.html\" id=\"suitelink\">Open test suite</a></p>';\n\n\t\tdocument.getElementById( \"suitelink\" ).onclick = function(){\n\t\t\twindow.open( location.href + \"?\" + Math.random(), 'win', 'width=800,height=600,scrollbars=1,resizable=1' );\n\t\t\treturn false;\n\t\t};\n\n\t}\n\telse {\n\n\t\tvar testElem = document.getElementById(\"testelem\");\n\n\t\tfunction getWidth(){\n\t\t\treturn testElem.offsetWidth;\n\t\t}\n\t\tfunction getHeight(){\n\t\t\treturn testElem.offsetHeight;\n\t\t}\n\t\t\n\t\t// A short snippet for detecting versions of IE in JavaScript - author: @padolsey\n\t\tvar ie = (function(){\n\n\t\t\t\tvar undef,\n\t\t\t\t\t\tv = 3,\n\t\t\t\t\t\tdiv = document.createElement('div'),\n\t\t\t\t\t\tall = div.getElementsByTagName('i');\n\t\t\n\t\t\t\twhile (\n\t\t\t\t\t\tdiv.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',\n\t\t\t\t\t\tall[0]\n\t\t\t\t);\n\t\t\n\t\t\t\treturn v > 4 ? v : undef;\n\t\t\n\t\t}());\n\n\t\twindow.moveTo(0,0);\n\t\t\n\t\t/* TESTS HERE */ \n\t\tasyncTest( 'Styles not nested in media queries apply as expected', function() { \n\t\t\twindow.resizeTo(200,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 50, \"testelem is 50px wide when window is 200px wide\" );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\t\t\n\t\tasyncTest( 'styles within min-width media queries apply properly', function() { \n\t\t\twindow.resizeTo(520,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 150, 'testelem is 150px wide when window is 500px wide'  );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\t\t\n\t\t// // This test is for a feature in IE7 and up\n\t\tif( ie >= 7 ){\n\t\t\tasyncTest( \"attribute selectors still work (where supported) after respond runs its course\", function() { \n\t\t\t\twindow.resizeTo(520,800);\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tstrictEqual( getHeight(), 200, \"testelem is 200px tall when window is 500px wide\" );\n\t\t\t\t\tstart();\n\t\t\t\t}, 900);\n\t\t\t});\n\t\t}\n\t\t\n\t\t\n\t\tasyncTest( 'styles within max-width media queries apply properly', function() { \n\t\t\twindow.resizeTo(300,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getHeight(), 150, 'testelem is 150px tall when window is under 480px wide'  );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\n\n\t\t\n\t\tasyncTest( 'min and max-width media queries that use EM units apply properly', function() { \n\t\t\twindow.resizeTo(580,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 75, 'testelem is 75px wide when window is 580px wide (between 33em and 38em)'  );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tasyncTest( \"styles within a min-width media query with an \\\"only\\\" keyword apply properly\", function() { \n\t\t\twindow.resizeTo(660,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 250, \"testelem is 250px wide when window is 650px wide\" );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\t\t\n\t\tasyncTest( \"styles within a media query with a one true query among other false queries apply properly\", function() { \n\t\t\twindow.resizeTo(800,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 350, \"testelem is 350px wide when window is > 620px wide\" );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tasyncTest( \"Styles within a false media query do not apply\", function() { \n\t\t\twindow.resizeTo(800,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tnotStrictEqual( getWidth(), 500, \"testelem is not 500px wide when window is 800px wide\" );\n\t\t\t\tstart();\n\n\t\t\t}, 900);\n\t\t});\n\n\t\tasyncTest( \"stylesheets with a media query in a media attribute apply when they should\", function() { \n\t\t\twindow.resizeTo(1000,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 16, \"testelem is 16px wide when window is wider than 950px\" );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\n\t\t// Careful, browserstack has a default resolution of 1024x768\n\t\tasyncTest( \"stylesheets with an EM-based media query in a media attribute apply when they should\", function() { \n\t\t\twindow.resizeTo(1150,800);\n\t\t\tsetTimeout(function(){\n\t\t\t\tstrictEqual( getWidth(), 25, \"testelem is 25px wide when window is wider than 1100px wide. Does your screen width go that wide?\" );\n\t\t\t\tstart();\n\t\t\t}, 900);\n\t\t});\n\n\t\tasyncTest( 'Test keyframe animation inside of media query', function() { \n\t\t\tqueueRequest( function() {\n\t\t\t\trespond.ajax( getNormalizedUrl( 'test-with-keyframe.css' ),\n\t\t\t\t\tfunction( data ) {\n\t\t\t\t\t\tok( data.replace( respond.regex.keyframes, '' ).match( respond.regex.media ), 'A keyframe animation doesn\\'t bust the media regex.' );\n\t\t\t\t\t\tstart();\n\t\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tasyncTest( 'Test comments inside of a media query', function() { \n\t\t\tqueueRequest( function() {\n\t\t\t\trespond.ajax( getNormalizedUrl( 'test-with-comment.css' ),\n\t\t\t\t\tfunction( data ) {\n\t\t\t\t\t\tvar stripped = data.replace( respond.regex.comments, '' );\n\t\t\t\t\t\t// TODO allow /* */ inside of CSS content strings.\n\t\t\t\t\t\tok( stripped.match( respond.regex.media ), 'Comments don\\'t bust the media regex.' );\n\t\t\t\t\t\tok( !stripped.match( /\\/\\*/gi ), 'No start comments exist in the result.' );\n\t\t\t\t\t\tok( !stripped.match( /\\*\\//gi ), 'No end comments exist in the result.' );\n\t\t\t\t\t\tstart();\n\t\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\ttest( 'Issue #242 overly agressive keyframes regex', function() {\n\t\t\tstrictEqual( '@media(q1){ @keyframes abc{ from{ }to{ } } } @media(q2){}'.replace( respond.regex.keyframes, '' ), '@media(q1){  } @media(q2){}' );\n\t\t\tstrictEqual( '@media(q1){} @keyframes abc{ from{ }to{ } } @media(q2){}'.replace( respond.regex.keyframes, '' ), '@media(q1){}  @media(q2){}' );\n\t\t\tstrictEqual( '@media(q1){} @media(q2){ @keyframes abc{ from{ }to{ } } }'.replace( respond.regex.keyframes, '' ), '@media(q1){} @media(q2){  }' );\n\t\t});\n\n\t\ttest( 'Test spaces around min-width/max-width', function() {\n\t\t\tok( '@media only screen and (min-width: 1px) { }'.match( respond.regex.maxw ) === null );\n\t\t\tok( '@media only screen and ( min-width: 1px ) { }'.match( respond.regex.maxw ) === null );\n\t\t\tok( '@media only screen and (min-width: 1px) { }'.match( respond.regex.minw ).length );\n\t\t\tok( '@media only screen and ( min-width: 1px ) { }'.match( respond.regex.minw ).length );\n\n\t\t\tok( '@media only screen and (max-width: 1280px) { }'.match( respond.regex.minw ) === null );\n\t\t\tok( '@media only screen and ( max-width: 1280px ) { }'.match( respond.regex.minw ) === null );\n\t\t\tok( '@media only screen and (max-width: 1280px) { }'.match( respond.regex.maxw ).length );\n\t\t\tok( '@media only screen and ( max-width: 1280px ) { }'.match( respond.regex.maxw ).length );\n\t\t});\n\n\n\t\ttest( 'Issue #161: spaces around inside min-width/max-width', function() {\n\t\t\tok( '@media only screen and (min-width : 1px) { }'.match( respond.regex.min ) !== null );\n\t\t\tok( '@media only screen and (max-width : 1px ) { }'.match( respond.regex.maxw ) !== null );\n\t\t});\n\n\t\ttest( 'Issue #181: non-min-width and non-max-width queries', function() {\n\t\t\tvar others = ['(min--moz-device-pixel-ratio: 1.5)',\n\t\t\t\t'(-moz-min-device-pixel-ratio: 1.5)',\n\t\t\t\t'(-o-min-device-pixel-ratio: 1.5)',\n\t\t\t\t'(-webkit-min-device-pixel-ratio: 1.5)',\n\t\t\t\t'(min-device-pixel-ratio: 1.5)',\n\t\t\t\t'(min-resolution: 1.5dppx)'],\n\t\t\t\tstr,\n\t\t\t\tmq;\n\n\t\t\tfor( var j = 0, k = others.length; j<k; j++ ) {\n\t\t\t\tstr = 'only screen and (max-width: 1319px) and ' + others[ j ] + ' {}';\n\t\t\t\tmq = str.match( respond.regex.minmaxwh );\n\t\t\t\tequal( mq && mq[ 0 ], '(max-width: 1319px)' );\n\t\t\t\tequal( respond.unsupportedmq( str )[ 0 ], others[ j ] );\n\n\t\t\t\tequal( ( 'only screen and (max-width: 1319px) and (min-width: 1px) and ' + others[ j ] + ' {}' ).replace( respond.regex.minmaxwh, '' ).match( respond.regex.other )[ 0 ], others[ j ] );\n\t\t\t\tequal( ( 'only screen and (max-width: 1319px) and (min-height: 1px) and ' + others[ j ] + ' {}' ).replace( respond.regex.minmaxwh, '' ).match( respond.regex.other )[ 0 ], others[ j ] );\n\t\t\t}\n\t\t});\n\n\t\t// At this point the media queries are already divided by commas\n\t\ttest( 'Issue #181: unsupported MQ tests', function() { \n\t\t\t// should pass\n\t\t\tstrictEqual( respond.unsupportedmq( '(min-width: 1151px)' ), null );\n\t\t\tstrictEqual( respond.unsupportedmq( 'all and (max-width: 699px) and (min-width: 520px)' ), null );\n\t\t\tstrictEqual( respond.unsupportedmq( 'print' ), null );\n\n\t\t\t// source: http://www.w3.org/TR/css3-mediaqueries/\n\t\t\t// should fail: looks for anything in parens that is not min/max-height/width\n\t\t\tok( respond.unsupportedmq( 'all and (orientation:portrait)' ) );\n\t\t\tok( respond.unsupportedmq( 'screen and (device-aspect-ratio: 16/9)' ) );\n\t\t\tok( respond.unsupportedmq( 'all and (color)' ) );\n\t\t\tok( respond.unsupportedmq( 'all and (min-color: 1)' ) );\n\t\t\tok( respond.unsupportedmq( 'all and (monochrome)' ) );\n\t\t\tok( respond.unsupportedmq( 'print and (min-resolution: 300dpi)' ) );\n\t\t\tok( respond.unsupportedmq( 'tv and (scan: progressive)' ) );\n\t\t\tok( respond.unsupportedmq( 'handheld and (grid) and (device-max-height: 7em)' ) );\n\t\t});\n\n\t\tasyncTest( 'Issue #181: full MQ with DPR', function() { \n\t\t\tqueueRequest( function() {\n\t\t\t\trespond.ajax( getNormalizedUrl( 'test-with-dpr.css' ),\n\t\t\t\t\tfunction( data ) {\n\t\t\t\t\t\tok( respond.unsupportedmq( data ) );\n\t\t\t\t\t\tstart();\n\t\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\t\n};"
  }
]