{"version":3,"file":"modernizr.js","sources":["../../../../assets/www/javascripts/modernizr.js"],"sourcesContent":["/*!\n * modernizr v3.6.0\n * Build https://modernizr.com/download?-setclasses-dontmin\n *\n * Copyright (c)\n * Faruk Ates\n * Paul Irish\n * Alex Sexton\n * Ryan Seddon\n * Patrick Kettner\n * Stu Cox\n * Richard Herrera\n\n * MIT License\n */\n\n/*\n * Modernizr tests which native CSS3 and HTML5 features are available in the\n * current UA and makes the results available to you in two ways: as properties on\n * a global `Modernizr` object, and as classes on the `` element. This\n * information allows you to progressively enhance your pages with a granular level\n * of control over the experience.\n*/\n\n;(function(window, document, undefined){\n var classes = [];\n \n\n var tests = [];\n \n\n /**\n *\n * ModernizrProto is the constructor for Modernizr\n *\n * @class\n * @access public\n */\n\n var ModernizrProto = {\n // The current version, dummy\n _version: '3.6.0',\n\n // Any settings that don't work as separate modules\n // can go in here as configuration.\n _config: {\n 'classPrefix': '',\n 'enableClasses': true,\n 'enableJSClass': true,\n 'usePrefixes': true\n },\n\n // Queue of tests\n _q: [],\n\n // Stub these for people who are listening\n on: function(test, cb) {\n // I don't really think people should do this, but we can\n // safe guard it a bit.\n // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.\n // This is in case people listen to synchronous tests. I would leave it out,\n // but the code to *disallow* sync tests in the real version of this\n // function is actually larger than this.\n var self = this;\n setTimeout(function() {\n cb(self[test]);\n }, 0);\n },\n\n addTest: function(name, fn, options) {\n tests.push({name: name, fn: fn, options: options});\n },\n\n addAsyncTest: function(fn) {\n tests.push({name: null, fn: fn});\n }\n };\n\n \n\n // Fake some of Object.create so we can force non test results to be non \"own\" properties.\n var Modernizr = function() {};\n Modernizr.prototype = ModernizrProto;\n\n // Leak modernizr globally when you `require` it rather than force it here.\n // Overwrite name so constructor name is nicer :D\n Modernizr = new Modernizr();\n\n \n\n /**\n * is returns a boolean if the typeof an obj is exactly type.\n *\n * @access private\n * @function is\n * @param {*} obj - A thing we want to check the type of\n * @param {string} type - A string to compare the typeof against\n * @returns {boolean}\n */\n\n function is(obj, type) {\n return typeof obj === type;\n }\n ;\n\n /**\n * Run through all tests and detect their support in the current UA.\n *\n * @access private\n */\n\n function testRunner() {\n var featureNames;\n var feature;\n var aliasIdx;\n var result;\n var nameIdx;\n var featureName;\n var featureNameSplit;\n\n for (var featureIdx in tests) {\n if (tests.hasOwnProperty(featureIdx)) {\n featureNames = [];\n feature = tests[featureIdx];\n // run the test, throw the return value into the Modernizr,\n // then based on that boolean, define an appropriate className\n // and push it into an array of classes we'll join later.\n //\n // If there is no name, it's an 'async' test that is run,\n // but not directly added to the object. That should\n // be done with a post-run addTest call.\n if (feature.name) {\n featureNames.push(feature.name.toLowerCase());\n\n if (feature.options && feature.options.aliases && feature.options.aliases.length) {\n // Add all the aliases into the names list\n for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {\n featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());\n }\n }\n }\n\n // Run the test, or use the raw value if it's not a function\n result = is(feature.fn, 'function') ? feature.fn() : feature.fn;\n\n\n // Set each of the names on the Modernizr object\n for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {\n featureName = featureNames[nameIdx];\n // Support dot properties as sub tests. We don't do checking to make sure\n // that the implied parent tests have been added. You must call them in\n // order (either in the test, or make the parent test a dependency).\n //\n // Cap it to TWO to make the logic simple and because who needs that kind of subtesting\n // hashtag famous last words\n featureNameSplit = featureName.split('.');\n\n if (featureNameSplit.length === 1) {\n Modernizr[featureNameSplit[0]] = result;\n } else {\n // cast to a Boolean, if not one already\n if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {\n Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);\n }\n\n Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;\n }\n\n classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));\n }\n }\n }\n }\n ;\n\n /**\n * docElement is a convenience wrapper to grab the root element of the document\n *\n * @access private\n * @returns {HTMLElement|SVGElement} The root element of the document\n */\n\n var docElement = document.documentElement;\n \n\n /**\n * A convenience helper to check if the document we are running in is an SVG document\n *\n * @access private\n * @returns {boolean}\n */\n\n var isSVG = docElement.nodeName.toLowerCase() === 'svg';\n \n\n /**\n * setClasses takes an array of class names and adds them to the root element\n *\n * @access private\n * @function setClasses\n * @param {string[]} classes - Array of class names\n */\n\n // Pass in an and array of class names, e.g.:\n // ['no-webp', 'borderradius', ...]\n function setClasses(classes) {\n var className = docElement.className;\n var classPrefix = Modernizr._config.classPrefix || '';\n\n if (isSVG) {\n className = className.baseVal;\n }\n\n // Change `no-js` to `js` (independently of the `enableClasses` option)\n // Handle classPrefix on this too\n if (Modernizr._config.enableJSClass) {\n var reJS = new RegExp('(^|\\\\s)' + classPrefix + 'no-js(\\\\s|$)');\n className = className.replace(reJS, '$1' + classPrefix + 'js$2');\n }\n\n if (Modernizr._config.enableClasses) {\n // Add the new classes\n className += ' ' + classPrefix + classes.join(' ' + classPrefix);\n if (isSVG) {\n docElement.className.baseVal = className;\n } else {\n docElement.className = className;\n }\n }\n\n }\n\n ;\n\n // Run each test\n testRunner();\n\n // Remove the \"no-js\" class if it exists\n setClasses(classes);\n\n delete ModernizrProto.addTest;\n delete ModernizrProto.addAsyncTest;\n\n // Run the things that are supposed to run after the tests\n for (var i = 0; i < Modernizr._q.length; i++) {\n Modernizr._q[i]();\n }\n\n // Leak Modernizr namespace\n window.Modernizr = Modernizr;\n\n\n;\n\n})(window, document);"],"names":["window","document","undefined","classes","tests","ModernizrProto","_version","_config","classPrefix","enableClasses","enableJSClass","usePrefixes","_q","on","test","cb","self","this","setTimeout","addTest","name","fn","options","push","addAsyncTest","Modernizr","prototype","docElement","documentElement","isSVG","nodeName","toLowerCase","featureNames","feature","aliasIdx","result","nameIdx","featureNameSplit","featureIdx","hasOwnProperty","aliases","length","split","Boolean","join","testRunner","className","baseVal","reJS","RegExp","replace","setClasses","i"],"mappings":";;;;;;;;;;;;;;;MAw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