5 * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
6 * Available under the BSD and MIT licenses: www.modernizr.com/license/
8 window
.Modernizr = function (a
, b
, c
) {
14 return d(x
.join(a
+ ";") + (b
|| ""))
22 return !!~("" + a
).indexOf(b
)
28 if (!g(e
, "-") && t
[e
] !== c
)return "pfx" == b
? e
: !0
36 if (g
!== c
)return d
=== !1 ? a
[e
] : f(g
, "function") ? g
.bind(d
|| b
) : g
42 var d
= a
.charAt(0).toUpperCase() + a
.slice(1), e
= (a
+ " " + z
.join(d
+ " ") + d
).split(" ");
43 return f(b
, "string") || f(b
, "undefined") ? h(e
, b
) : (e
= (a
+ " " + A
.join(d
+ " ") + d
).split(" "), i(e
, b
, c
))
47 o
.input = function (c
) {
48 for (var d
= 0, e
= c
.length
; e
> d
; d
++)E
[c
[d
]] = !!(c
[d
]in u
);
49 return E
.list
&& (E
.list
= !(!b
.createElement("datalist") || !a
.HTMLDataListElement
)), E
50 }("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), o
.inputtypes = function (a
) {
51 for (var d
, e
, f
, g
= 0, h
= a
.length
; h
> g
; g
++)u
.setAttribute("type", e
= a
[g
]), d
= "text" !== u
.type
, d
&& (u
.value
= v
, u
.style
.cssText
= "position:absolute;visibility:hidden;", /^range$/.test(e
) && u
.style
.WebkitAppearance
!== c
? (q
.appendChild(u
), f
= b
.defaultView
, d
= f
.getComputedStyle
&& "textfield" !== f
.getComputedStyle(u
, null).WebkitAppearance
&& 0 !== u
.offsetHeight
, q
.removeChild(u
)) : /^(search|tel)$/.test(e
) || (d
= /^(url|email)$/.test(e
) ? u
.checkValidity
&& u
.checkValidity() === !1 : u
.value
!= v
)), D
[a
[g
]] = !!d
;
53 }("search tel url email datetime date month week time datetime-local number range color".split(" "))
56 var l
, m
, n
= "2.8.3", o
= {}, p
= !0, q
= b
.documentElement
, r
= "modernizr", s
= b
.createElement(r
), t
= s
.style
, u
= b
.createElement("input"), v
= ":)", w
= {}.toString
, x
= " -webkit- -moz- -o- -ms- ".split(" "), y
= "Webkit Moz O ms", z
= y
.split(" "), A
= y
.toLowerCase().split(" "), B
= {svg
: "http://www.w3.org/2000/svg"}, C
= {}, D
= {}, E
= {}, F
= [], G
= F
.slice
, H = function (a
, c
, d
, e
) {
57 var f
, g
, h
, i
, j
= b
.createElement("div"), k
= b
.body
, l
= k
|| b
.createElement("body");
58 if (parseInt(d
, 10))for (; d
--;)h
= b
.createElement("div"), h
.id
= e
? e
[d
] : r
+ (d
+ 1), j
.appendChild(h
);
59 return f
= ["­", '<style id="s', r
, '">', a
, "</style>"].join(""), j
.id
= r
, (k
? j
: l
).innerHTML
+= f
, l
.appendChild(j
), k
|| (l
.style
.background
= "", l
.style
.overflow
= "hidden", i
= q
.style
.overflow
, q
.style
.overflow
= "hidden", q
.appendChild(l
)), g
= c(j
, a
), k
? j
.parentNode
.removeChild(j
) : (l
.parentNode
.removeChild(l
), q
.style
.overflow
= i
), !!g
61 var c
= a
.matchMedia
|| a
.msMatchMedia
;
62 if (c
)return c(b
) && c(b
).matches
|| !1;
64 return H("@media " + b
+ " { #" + r
+ " { position: absolute; } }", function (b
) {
65 d
= "absolute" == (a
.getComputedStyle
? getComputedStyle(b
, null) : b
.currentStyle
).position
69 e
= e
|| b
.createElement(d
[a
] || "div"), a
= "on" + a
;
71 return g
|| (e
.setAttribute
|| (e
= b
.createElement("div")), e
.setAttribute
&& e
.removeAttribute
&& (e
.setAttribute(a
, ""), g
= f(e
[a
], "function"), f(e
[a
], "undefined") || (e
[a
] = c
), e
.removeAttribute(a
))), e
= null, g
84 }(), K
= {}.hasOwnProperty
;
85 m
= f(K
, "undefined") || f(K
.call
, "undefined") ? function (a
, b
) {
86 return b
in a
&& f(a
.constructor.prototype[b
], "undefined")
89 }, Function
.prototype.bind
|| (Function
.prototype.bind = function (a
) {
91 if ("function" != typeof b
)throw new TypeError
;
92 var c
= G
.call(arguments
, 1), d = function () {
93 if (this instanceof d
) {
96 e
.prototype = b
.prototype;
97 var f
= new e
, g
= b
.apply(f
, c
.concat(G
.call(arguments
)));
98 return Object(g
) === g
? g
: f
100 return b
.apply(a
, c
.concat(G
.call(arguments
)))
103 }), C
.flexbox = function () {
105 }, C
.flexboxlegacy = function () {
106 return j("boxDirection")
107 }, C
.canvas = function () {
108 var a
= b
.createElement("canvas");
109 return !(!a
.getContext
|| !a
.getContext("2d"))
110 }, C
.canvastext = function () {
111 return !(!o
.canvas
|| !f(b
.createElement("canvas").getContext("2d").fillText
, "function"))
112 }, C
.webgl = function () {
113 return !!a
.WebGLRenderingContext
114 }, C
.touch = function () {
116 return "ontouchstart"in a
|| a
.DocumentTouch
&& b
instanceof DocumentTouch
? c
= !0 : H(["@media (", x
.join("touch-enabled),("), r
, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function (a
) {
117 c
= 9 === a
.offsetTop
119 }, C
.geolocation = function () {
120 return "geolocation"in navigator
121 }, C
.postmessage = function () {
122 return !!a
.postMessage
123 }, C
.websqldatabase = function () {
124 return !!a
.openDatabase
125 }, C
.indexedDB = function () {
126 return !!j("indexedDB", a
)
127 }, C
.hashchange = function () {
128 return J("hashchange", a
) && (b
.documentMode
=== c
|| b
.documentMode
> 7)
129 }, C
.history = function () {
130 return !(!a
.history
|| !history
.pushState
)
131 }, C
.draganddrop = function () {
132 var a
= b
.createElement("div");
133 return "draggable"in a
|| "ondragstart"in a
&& "ondrop"in a
134 }, C
.websockets = function () {
135 return "WebSocket"in a
|| "MozWebSocket"in a
136 }, C
.rgba = function () {
137 return d("background-color:rgba(150,255,150,.5)"), g(t
.backgroundColor
, "rgba")
138 }, C
.hsla = function () {
139 return d("background-color:hsla(120,40%,100%,.5)"), g(t
.backgroundColor
, "rgba") || g(t
.backgroundColor
, "hsla")
140 }, C
.multiplebgs = function () {
141 return d("background:url(https://),url(https://),red url(https://)"), /(url
\s
*\(.*?){3}/.test(t
.background
)
142 }, C
.backgroundsize = function () {
143 return j("backgroundSize")
144 }, C
.borderimage = function () {
145 return j("borderImage")
146 }, C
.borderradius = function () {
147 return j("borderRadius")
148 }, C
.boxshadow = function () {
149 return j("boxShadow")
150 }, C
.textshadow = function () {
151 return "" === b
.createElement("div").style
.textShadow
152 }, C
.opacity = function () {
153 return e("opacity:.55"), /^0.55$/.test(t
.opacity
)
154 }, C
.cssanimations = function () {
155 return j("animationName")
156 }, C
.csscolumns = function () {
157 return j("columnCount")
158 }, C
.cssgradients = function () {
159 var a
= "background-image:", b
= "gradient(linear,left top,right bottom,from(#9f9),to(white));", c
= "linear-gradient(left top,#9f9, white);";
160 return d((a
+ "-webkit- ".split(" ").join(b
+ a
) + x
.join(c
+ a
)).slice(0, -a
.length
)), g(t
.backgroundImage
, "gradient")
161 }, C
.cssreflections = function () {
162 return j("boxReflect")
163 }, C
.csstransforms = function () {
164 return !!j("transform")
165 }, C
.csstransforms3d = function () {
166 var a
= !!j("perspective");
167 return a
&& "webkitPerspective"in q
.style
&& H("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function (b
) {
168 a
= 9 === b
.offsetLeft
&& 3 === b
.offsetHeight
170 }, C
.csstransitions = function () {
171 return j("transition")
172 }, C
.fontface = function () {
174 return H('@font-face {font-family:"font";src:url("https://")}', function (c
, d
) {
175 var e
= b
.getElementById("smodernizr"), f
= e
.sheet
|| e
.styleSheet
, g
= f
? f
.cssRules
&& f
.cssRules
[0] ? f
.cssRules
[0].cssText
: f
.cssText
|| "" : "";
176 a
= /src/i.test(g
) && 0 === g
.indexOf(d
.split(" ")[0])
178 }, C
.generatedcontent = function () {
180 return H(["#", r
, "{font:0/0 a}#", r
, ':after{content:"', v
, '";visibility:hidden;font:3px/1 a}'].join(""), function (b
) {
181 a
= b
.offsetHeight
>= 3
183 }, C
.video = function () {
184 var a
= b
.createElement("video"), c
= !1;
186 (c
= !!a
.canPlayType
) && (c
= new Boolean(c
), c
.ogg
= a
.canPlayType('video/ogg; codecs="theora"').replace(/^no
$/, ""), c.h264 = a.canPlayType('video/mp4; codecs
="avc1.42E01E"').replace(/^no$/, ""), c.webm = a.canPlayType('video
/webm; codecs="vp8, vorbis"').replace(/^no
$/, ""))
190 }, C
.audio = function () {
191 var a
= b
.createElement("audio"), c
= !1;
193 (c
= !!a
.canPlayType
) && (c
= new Boolean(c
), c
.ogg
= a
.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no
$/, ""), c.mp3 = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), c.wav = a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), c.m4a = (a.canPlayType("audio
/x
-m4a
;") || a.canPlayType("audio
/aac;")).replace(/^no
$/, ""))
197 }, C
.localstorage = function () {
199 return localStorage
.setItem(r
, r
), localStorage
.removeItem(r
), !0
203 }, C
.sessionstorage = function () {
205 return sessionStorage
.setItem(r
, r
), sessionStorage
.removeItem(r
), !0
209 }, C
.webworkers = function () {
211 }, C
.applicationcache = function () {
212 return !!a
.applicationCache
213 }, C
.svg = function () {
214 return !!b
.createElementNS
&& !!b
.createElementNS(B
.svg
, "svg").createSVGRect
215 }, C
.inlinesvg = function () {
216 var a
= b
.createElement("div");
217 return a
.innerHTML
= "<svg/>", (a
.firstChild
&& a
.firstChild
.namespaceURI
) == B
.svg
218 }, C
.smil = function () {
219 return !!b
.createElementNS
&& /SVGAnimate/.test(w
.call(b
.createElementNS(B
.svg
, "animate")))
220 }, C
.svgclippaths = function () {
221 return !!b
.createElementNS
&& /SVGClipPath/.test(w
.call(b
.createElementNS(B
.svg
, "clipPath")))
223 for (var L
in C
)m(C
, L
) && (l
= L
.toLowerCase(), o
[l
] = C
[L
](), F
.push((o
[l
] ? "" : "no-") + l
));
224 return o
.input
|| k(), o
.addTest = function (a
, b
) {
225 if ("object" == typeof a
)for (var d
in a
)m(a
, d
) && o
.addTest(d
, a
[d
]); else {
226 if (a
= a
.toLowerCase(), o
[a
] !== c
)return o
;
227 b
= "function" == typeof b
? b() : b
, "undefined" != typeof p
&& p
&& (q
.className
+= " " + (b
? "" : "no-") + a
), o
[a
] = b
230 }, d(""), s
= u
= null, function (a
, b
) {
232 var c
= a
.createElement("p"), d
= a
.getElementsByTagName("head")[0] || a
.documentElement
;
233 return c
.innerHTML
= "x<style>" + b
+ "</style>", d
.insertBefore(c
.lastChild
, d
.firstChild
)
238 return "string" == typeof a
? a
.split(" ") : a
243 return b
|| (b
= {}, q
++, a
[p
] = q
, r
[q
] = b
), b
246 function f(a
, c
, d
) {
247 if (c
|| (c
= b
), k
)return c
.createElement(a
);
250 return f
= d
.cache
[a
] ? d
.cache
[a
].cloneNode() : o
.test(a
) ? (d
.cache
[a
] = d
.createElem(a
)).cloneNode() : d
.createElem(a
), !f
.canHaveChildren
|| n
.test(a
) || f
.tagUrn
? f
: d
.frag
.appendChild(f
)
254 if (a
|| (a
= b
), k
)return a
.createDocumentFragment();
256 for (var f
= c
.frag
.cloneNode(), g
= 0, h
= d(), i
= h
.length
; i
> g
; g
++)f
.createElement(h
[g
]);
261 b
.cache
|| (b
.cache
= {}, b
.createElem
= a
.createElement
, b
.createFrag
= a
.createDocumentFragment
, b
.frag
= b
.createFrag()), a
.createElement = function (c
) {
262 return s
.shivMethods
? f(c
, a
, b
) : b
.createElem(c
)
263 }, a
.createDocumentFragment
= Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + d().join().replace(/[\w\-]+/g, function (a
) {
264 return b
.createElem(a
), b
.frag
.createElement(a
), 'c("' + a
+ '")'
265 }) + ");return n}")(s
, b
.frag
)
271 return !s
.shivCSS
|| j
|| d
.hasCSS
|| (d
.hasCSS
= !!c(a
, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k
|| h(a
, d
), a
274 var j
, k
, l
= "3.7.0", m
= a
.html5
|| {}, n
= /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, o
= /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, p
= "_html5shiv", q
= 0, r
= {};
277 var a
= b
.createElement("a");
278 a
.innerHTML
= "<xyz></xyz>", j
= "hidden"in a
, k
= 1 == a
.childNodes
.length
|| function () {
279 b
.createElement("a");
280 var a
= b
.createDocumentFragment();
281 return "undefined" == typeof a
.cloneNode
|| "undefined" == typeof a
.createDocumentFragment
|| "undefined" == typeof a
.createElement
288 elements
: m
.elements
|| "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
290 shivCSS
: m
.shivCSS
!== !1,
291 supportsUnknownElements
: k
,
292 shivMethods
: m
.shivMethods
!== !1,
296 createDocumentFragment
: g
299 }(this, b
), o
._version
= n
, o
._prefixes
= x
, o
._domPrefixes
= A
, o
._cssomPrefixes
= z
, o
.mq
= I
, o
.hasEvent
= J
, o
.testProp = function (a
) {
301 }, o
.testAllProps
= j
, o
.testStyles
= H
, o
.prefixed = function (a
, b
, c
) {
302 return b
? j(a
, b
, c
) : j(a
, "pfx")
303 }, q
.className
= q
.className
.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (p
? " js " + F
.join(" ") : ""), o
304 }(this, this.document
);