diff --git a/css/main.css b/css/main.css index 602b559..bfdbb64 100644 --- a/css/main.css +++ b/css/main.css @@ -5,13 +5,40 @@ --accent-color-1: #ff91d8; --accent-color-1-light: #ffcdff; --accent-color-2: #ffff7d; + + --crossfader-thumb-width: 30px; + --crossfader-thumb-height: 60px; + --crossfader-thumb-radius: 15px; + } +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(fonts/Roboto Regular.woff2) format('woff2'); +} +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 100; + font-display: swap; + src: url(fonts/Roboto Thin.woff2) format('woff2'); +} +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 900; + font-display: swap; + src: url(fonts/Roboto Black.woff2) format('woff2'); +} html { color: var(--text-color); font-size: 1em; line-height: 1.4; + font-family: Roboto, Arial, sans-serif; } ::-moz-selection { @@ -52,14 +79,6 @@ textarea { resize: vertical; } -/* ========================================================================== - Author's custom styles - ========================================================================== */ - -html { - font-family: Arial, sans-serif; -} - #bg { z-index: -2; overflow: hidden; @@ -73,11 +92,8 @@ html { #bg img { z-index: -1; position: fixed; - /* max-width: 100%; - max-height: 100%; */ } - #desk { /* display: none; */ display: flex; @@ -92,6 +108,10 @@ html { padding-bottom: 2em; gap: 15px; } + +.hidden { + display: none; +} .player { max-width: 480px; display: flex; @@ -124,9 +144,11 @@ iframe { .load-button { /* flex-grow: 2; */ + cursor: pointer; border: none; background-color: var(--accent-color-2); color: var(--bg-color); + font-weight: 900; border-radius: 5px; /* padding: 2em; */ width: 50%; @@ -137,10 +159,12 @@ iframe { font-size: 0.8em; margin: auto; + font-weight: 100; color: var(--text-color-light); } .control-label span { + font-weight: 400; color: var(--accent-color-2); } @@ -179,10 +203,35 @@ span.volume-value { display: inline-block; } -#crossfader { + +#crossfader-wrapper { width: 30em; padding: 3em 0; } +#crossfader { + width: 100%; + z-index: 2; +} + +.graduations { + z-index: 0; + width: 100; + margin: 0 13px 0 13px; + display: flex; + justify-content: space-between; +} +.graduation { + z-index: 0; + width: 3px; + height: 23px; + border-radius: 23px; + background-color: var(--accent-color-1-light); +} + +.graduation-small { + width: 2px; + height: 8px; +} /* Custom crossfader styling made using http://danielstern.ca/range.css */ input[type=range] { @@ -216,10 +265,10 @@ input[type=range]::-moz-range-track { } input[type=range]::-moz-range-thumb { background: var(--accent-color-2); - border: solid var(--accent-color-1-light); + /* border: solid var(--accent-color-1-light); */ cursor: pointer; border-width: 0px; - border-radius: 25px; + border-radius: var(--crossfader-thumb-radius); } input[type=range]::-ms-track { background: transparent; @@ -238,7 +287,7 @@ input[type=range]::-ms-fill-upper { } input[type=range]::-ms-thumb { background: var(--accent-color-2); - border: solid var(--accent-color-1-light); + /* border: solid var(--accent-color-1-light); */ cursor: pointer; margin-top: 0px; /*Needed to keep the Edge thumb centred*/ @@ -256,47 +305,50 @@ input[type=range]#crossfader::-webkit-slider-runnable-track { } input[type=range]#crossfader::-webkit-slider-thumb { margin-top: -20.65px; - width: 30px; - height: 50px; - border-width: 5px; - border-radius: 12px; + width: var(--crossfader-thumb-width); + height: var(--crossfader-thumb-height); + /* border-width: 5px; + border-radius: 12px; */ } input[type=range]#crossfader::-moz-range-track { - border-radius: 25px; + /* border-radius: 25px; */ width: 100%; height: 13.3px; cursor: pointer; } input[type=range]#crossfader::-moz-range-thumb { - width: 30px; - height: 50px; - border-width: 5px; - border-radius: 12px; + width: var(--crossfader-thumb-width); + height: var(--crossfader-thumb-height); + /* border-width: 5px; */ + /* border-radius: 12px; */ cursor: pointer; } input[type=range]#crossfader::-ms-track { - border-width: 18.75px 0; + /* border-width: 18.75px 0; */ height: 13.3px; } input[type=range]#crossfader::-ms-fill-lower { - border-width: 2.3px; - border-radius: 50px; + /* border-width: 2.3px; + border-radius: 50px; */ } input[type=range]#crossfader::-ms-fill-upper { - border-radius: 50px; + /* border-radius: 50px; */ } input[type=range]#crossfader::-ms-thumb { - width: 30px; - height: 50px; - border-width: 5px; - border-radius: 12px; + width: var(--crossfader-thumb-width); + height: var(--crossfader-thumb-height); + /* border-width: 5px; + border-radius: 12px; */ cursor: pointer; margin-top: 0px; /*Needed to keep the Edge thumb centred*/ } +.footer { + font-weight: 100; +} .footer a, .footer a:visited { color: var(--text-color); text-decoration: none; @@ -305,176 +357,3 @@ input[type=range]#crossfader::-ms-thumb { .footer span { cursor: pointer; } -/* ========================================================================== - Helper classes - ========================================================================== */ - -/* - * Hide visually and from screen readers - */ - -.hidden, -[hidden] { - display: none !important; -} - -/* - * Hide only visually, but have it available for screen readers: - * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility - * - * 1. For long content, line feeds are not interpreted as spaces and small width - * causes content to wrap 1 word per line: - * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe - */ - -.sr-only { - border: 0; - clip: rect(0, 0, 0, 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - white-space: nowrap; - width: 1px; - /* 1 */ -} - -/* - * Extends the .sr-only class to allow the element - * to be focusable when navigated to via the keyboard: - * https://www.drupal.org/node/897638 - */ - -.sr-only.focusable:active, -.sr-only.focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - white-space: inherit; - width: auto; -} - -/* - * Hide visually and from screen readers, but maintain layout - */ - -.invisible { - visibility: hidden; -} - -/* - * Clearfix: contain floats - * - * For modern browsers - * 1. The space content is one way to avoid an Opera bug when the - * `contenteditable` attribute is included anywhere else in the document. - * Otherwise it causes space to appear at the top and bottom of elements - * that receive the `clearfix` class. - * 2. The use of `table` rather than `block` is only necessary if using - * `:before` to contain the top-margins of child elements. - */ - -.clearfix::before, -.clearfix::after { - content: " "; - display: table; -} - -.clearfix::after { - clear: both; -} - -/* ========================================================================== - EXAMPLE Media Queries for Responsive Design. - These examples override the primary ('mobile first') styles. - Modify as content requires. - ========================================================================== */ - -@media only screen and (min-width: 35em) { - /* Style adjustments for viewports that meet the condition */ -} - -@media print, - (-webkit-min-device-pixel-ratio: 1.25), - (min-resolution: 1.25dppx), - (min-resolution: 120dpi) { - /* Style adjustments for high resolution devices */ -} - -/* ========================================================================== - Print styles. - Inlined to avoid the additional HTTP request: - https://www.phpied.com/delay-loading-your-print-css/ - ========================================================================== */ - -@media print { - *, - *::before, - *::after { - background: #fff !important; - color: #000 !important; - /* Black prints faster */ - box-shadow: none !important; - text-shadow: none !important; - } - - a, - a:visited { - text-decoration: underline; - } - - a[href]::after { - content: " (" attr(href) ")"; - } - - abbr[title]::after { - content: " (" attr(title) ")"; - } - - /* - * Don't show links that are fragment identifiers, - * or use the `javascript:` pseudo protocol - */ - a[href^="#"]::after, - a[href^="javascript:"]::after { - content: ""; - } - - pre { - white-space: pre-wrap !important; - } - - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - - /* - * Printing Tables: - * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables - */ - thead { - display: table-header-group; - } - - tr, - img { - page-break-inside: avoid; - } - - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - - h2, - h3 { - page-break-after: avoid; - } -} diff --git a/css/shooting-star.css b/css/shooting-star.css new file mode 100644 index 0000000..bcf11e2 --- /dev/null +++ b/css/shooting-star.css @@ -0,0 +1,160 @@ +:root { + --shooting-star-duration: 3000ms; + --shooting-star-angle: 10deg; + --shooting-star-translate: 300px; + --shooting-star-direction: 1; /* 1 or -1 */ +} + + +/* From https://www.geeksforgeeks.org/how-to-create-shooting-star-animation-effect-using-css/ */ +.shooting-stars-wrapper { + position: fixed; + width: 100%; + height: 100%; + -webkit-transform: scaleX(var(--shooting-star-direction)) rotateZ(var(--shooting-star-angle)); + + transform: scaleX(var(--shooting-star-direction)) rotateZ(var(--shooting-star-angle)); + +} + +.shooting-star { + position: absolute; + /* left: 50%; */ + top: 50%; + height: 2px; + border-radius: 885px; + background: linear-gradient(-45deg, #eef0f5, rgba(0, 0, 255, 0)); + + -webkit-filter: drop-shadow(0 0 6px #eef1f8); + filter: drop-shadow(0 0 6px #d7dff0); + + -webkit-animation: tail var(--shooting-star-duration) ease-in-out 1, + shooting var(--shooting-star-duration) ease-in-out 1; + animation: tail var(--shooting-star-duration) ease-in-out 1, + shooting var(--shooting-star-duration) ease-in-out 1; +} + +/* .shooting-star.is-shooting { + -webkit-animation: tail var(--shooting-star-duration) ease-in-out 1, + shooting var(--shooting-star-duration) ease-in-out 1; + animation: tail var(--shooting-star-duration) ease-in-out 1, + shooting var(--shooting-star-duration) ease-in-out 1; +} */ + +/* Here we add before and after effect to star */ +.shooting-star::before, +.shooting-star::after { + content: ""; + position: absolute; + top: calc(50% - 1px); + right: 0; + height: 2px; + background: linear-gradient( + -45deg, + rgba(0, 0, 255, 0), + #eaeef8, + rgba(0, 0, 255, 0) + ); + -webkit-transform: translateX(50%) rotateZ(45deg); + transform: translateX(50%) rotateZ(45deg); + border-radius: 100%; + -webkit-animation: shining var(--shooting-star-duration) ease-in-out 1; + animation: shining var(--shooting-star-duration) ease-in-out 1; +} +/* .shooting-star.is-shooting::before, +.shooting-star.is-shooting::after { + -webkit-animation: shining var(--shooting-star-duration) ease-in-out 1; + animation: shining var(--shooting-star-duration) ease-in-out 1; +} */ +.shooting-star::after { + -webkit-transform: translateX(50%) rotateZ(-45deg); + transform: translateX(50%) rotateZ(-45deg); +} + +/* Here we are adding location of each +nth-child, animations, delays, and +before and after effects to each +and every balls(stars) */ +/* .shooting-star:nth-child(1) { + top: calc(50% - -119px); + left: calc(50% - 43px); + -webkit-animation-delay: 4000ms; + animation-delay: 4000ms; +} +.shooting-star:nth-child(1)::before, +.shooting-star:nth-child(1)::after { + -webkit-animation-delay: 4000ms; + animation-delay: 4000ms; +} */ + +/* This code will help to generate +effect in tail of star */ +@keyframes tail { + 0% { + width: 0; + } + 30% { + width: 100px; + } + 100% { + width: 0; + } +} +@-webkit-keyframes tail { + 0% { + width: 0; + } + 30% { + width: 100px; + } + 100% { + width: 0; + } +} + +/* This code will generate shining +effect in head of star */ +@keyframes shining { + 0% { + width: 0; + } + 50% { + width: 30px; + } + 100% { + width: 0; + } +} +@-webkit-keyframes shining { + 0% { + width: 0; + } + 50% { + width: 30px; + } + 100% { + width: 0; + } +} + +/* Here we make shooting effect */ +@keyframes shooting { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + 100% { + -webkit-transform: translateX(var(--shooting-star-translate)); + transform: translateX(var(--shooting-star-translate)); + } +} +@-webkit-keyframes shooting { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + 100% { + -webkit-transform: translateX(var(--shooting-star-translate)); + transform: translateX(var(--shooting-star-translate)); + } +} diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..1466051 Binary files /dev/null and b/favicon.ico differ diff --git a/fonts/Roboto Black.woff2 b/fonts/Roboto Black.woff2 new file mode 100644 index 0000000..067cb32 Binary files /dev/null and b/fonts/Roboto Black.woff2 differ diff --git a/fonts/Roboto Regular.woff2 b/fonts/Roboto Regular.woff2 new file mode 100644 index 0000000..020729e Binary files /dev/null and b/fonts/Roboto Regular.woff2 differ diff --git a/fonts/Roboto Thin.woff2 b/fonts/Roboto Thin.woff2 new file mode 100644 index 0000000..71c9bb7 Binary files /dev/null and b/fonts/Roboto Thin.woff2 differ diff --git a/img/icon/android-chrome-192x192.png b/img/icon/android-chrome-192x192.png new file mode 100644 index 0000000..ffab06a Binary files /dev/null and b/img/icon/android-chrome-192x192.png differ diff --git a/img/icon/android-chrome-512x512.png b/img/icon/android-chrome-512x512.png new file mode 100644 index 0000000..86689d6 Binary files /dev/null and b/img/icon/android-chrome-512x512.png differ diff --git a/img/icon/apple-touch-icon.png b/img/icon/apple-touch-icon.png new file mode 100644 index 0000000..890f718 Binary files /dev/null and b/img/icon/apple-touch-icon.png differ diff --git a/img/icon/favicon-16x16.png b/img/icon/favicon-16x16.png new file mode 100644 index 0000000..96c7329 Binary files /dev/null and b/img/icon/favicon-16x16.png differ diff --git a/img/icon/favicon-32x32.png b/img/icon/favicon-32x32.png new file mode 100644 index 0000000..e1fb806 Binary files /dev/null and b/img/icon/favicon-32x32.png differ diff --git a/index.html b/index.html index 458af08..2664b86 100644 --- a/index.html +++ b/index.html @@ -12,12 +12,14 @@ - - - + + + + - - + + + @@ -26,6 +28,9 @@
A night sky with plenty of stars +
+ +
@@ -54,36 +59,43 @@
+ - - -

Mix like a pro youtube DJ!

+ + +

🔊 Mix like a pro youtube DJ! 🎧

- - - + + diff --git a/js/main.js b/js/main.js index e3c1d11..e3c4a93 100644 --- a/js/main.js +++ b/js/main.js @@ -51,19 +51,28 @@ class player { let url = prompt('Enter a YouTube URL (track or playlist):', 'https://www.youtube.com/watch?v=' + this.trackID); if (url) { - let newTrackID = get_video_id(url); - let newPlaylistID = get_playlist_id(url); - - if (newPlaylistID[0] != 0) { - console.log('playlistid to load: ' + newPlaylistID); - this.loadPlaylist(newPlaylistID); - } else if (newTrackID != 0) { - console.log('track to load: ' + newTrackID); - this.load(newTrackID); - } else { + let resp = check_url(url); + + if (resp < 0) { console.log('Nothing to load!'); + } else if (resp == 0) { + let newTrackID = get_video_id(url); + let newPlaylistID = get_playlist_id(url); + + if (newPlaylistID[0] != 0) { + console.log('playlistid to load: ' + newPlaylistID); + this.loadPlaylist(newPlaylistID); + } else if (newTrackID != 0) { + console.log('track to load: ' + newTrackID); + this.load(newTrackID); + } else { + console.log('Nothing to load!'); + } + } else if (resp == 1) { + fetch_bandcamp_url(url); } + } }); @@ -124,7 +133,7 @@ calcCrossfaderCoefs(crossfader.value); crossfader.addEventListener('input', (e) => { //Makes the slider stick on the middle - if (Math.abs(crossfader.value - 500) < 15) { + if (Math.abs(crossfader.value - 500) < 20) { crossfader.value = 500; } @@ -155,6 +164,16 @@ function calcCrossfaderCoefs(input) { playerB.crossfaderCoef = coefB; } +function check_url(url) { + let test = url.indexOf('youtu'); + if (test > -1 && test < 13) { + return 0; //It's most likely a youtube link + } else if (url.indexOf('.bandcamp') > -1 || url.indexOf('/album/') > -1 || url.indexOf('/track/') > -1) { + return 1; //It's most likely a bandcamp link + } else { + return -1; //Wrong link + } +} // From https://stackoverflow.com/a/55616161/14182148 function get_playlist_id(url) { @@ -184,16 +203,15 @@ function get_video_id(url) { //originally 'video_id_from_playlist' } } -// From https://thomaspark.co/projects/needledrop/ by Thomas Park -// function getYouTubeID(url){ -// url = url.split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); -// return (url[2] !== undefined) ? url[2].split(/[^0-9a-z_\-]/i)[0] : false; -// } - -// function get_video_id(url) { -// url = url.split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); -// return (url[2] !== undefined) ? url[2].split(/[^0-9a-z_\-]/i)[0] : url[0]; -// } +function fetch_bandcamp_url(url) { + let iframe = document.createElement('iframe'); + iframe.setAttribute('class','hidden'); + iframe.setAttribute('src',url); + playerB.node.parentNode.appendChild(iframe); + console.log(iframe); + let scrap = iframe.contentWindow.document.querySelector('script[data-tralbum]'); + console.log('scrap: ' + scrap); +} function componentToHex(c) { var hex = c.toString(16); @@ -201,20 +219,101 @@ function componentToHex(c) { } // Thumbnails: https://i1.ytimg.com/vi/{trackID}/mqdefault.jpg -if (typeof variable !== 'undefined') { - let separatorSpan = document.createElement('span'); - separatorSpan.innerHTML = ' - '; - document.getElementById('shooting-stars-enable').after(separatorSpan); - document.getElementById('shooting-stars-enable').innerHTML = 'Disable shooting stars⭐️'; + +let bcURL = 'https://clett.bandcamp.com/track/placenta'; +// let html = async await fetch(bcURL).text(); // html as text +// let doc = new DOMParser().parseFromString(html, 'text/html'); +// doc.title; doc.body; + +// let Http = new XMLHttpRequest(); +// Http.open("GET", bcURL); +// Http.send(); +// +// Http.onreadystatechange = (e) => { +// console.log(Http.responseText) +// } + +let areStarsShooting = true; +let shootingStarWrapper = document.getElementsByClassName('shooting-stars-wrapper')[0]; +let shootingStar; + +function newShootingStar() { + shootingStar = document.createElement('div'); + + let topStart = Math.floor(0.6 * window.innerHeight * Math.random()); + let leftStart = Math.floor(window.innerWidth * (0.1 + 0.8 * Math.random())); + let duration = 1000 + Math.floor(Math.random() * 5000); + let distance = 200 + Math.floor(Math.random() * 500); + let angle = Math.floor(Math.random() * 30) - 15; + let direction = Math.random() < 0.5 ? -1 : 1; + + shootingStar.style.top = topStart + 'px'; + shootingStar.style.left = leftStart + 'px'; + // root.style.setProperty('--shooting-star-duration', duration + "px"); + // shootingStarCSS.insertRule(':root{--shooting-star-duration: '+ duration + 'ms}'); + + document.documentElement.style.setProperty('--shooting-star-duration', duration + "ms"); + document.documentElement.style.setProperty('--shooting-star-translate', distance + "px"); + document.documentElement.style.setProperty('--shooting-star-angle', angle + "deg"); + document.documentElement.style.setProperty('--shooting-star-direction', direction); + + + + shootingStarWrapper.appendChild(shootingStar); + shootingStar.classList.add('shooting-star'); + + setTimeout(() => { + shootingStar.remove(); + // let nextIn = 10; + let nextIn = 7000 + Math.floor(Math.random() * 5000); + if (areStarsShooting) { + setTimeout('newShootingStar()', nextIn); + } + }, duration); + // setTimeout('newShootingStar()', duration + nextIn); } +// function endShootingStar(el) { +// el.remove(); +// console.log('removed!'); +// let nextIn = 4000; +// setTimeout('newShootingStar()', nextIn); +// } + +newShootingStar(); + +// Enable/disable shooting stars +let separatorSpan = document.createElement('span'); +separatorSpan.innerHTML = ' - '; +document.getElementById('shooting-stars-enable').after(separatorSpan); +document.getElementById('shooting-stars-enable').innerHTML = '⭐️Disable shooting stars⭐️'; + document.getElementById('shooting-stars-enable').addEventListener('click', () => { - if (processingIsOn) { - processingSketch.frameRate(0); - document.getElementById('shooting-stars-enable').innerHTML = 'Enable shooting stars⭐️'; - processingIsOn = false; + if (areStarsShooting) { + document.getElementById('shooting-stars-enable').innerHTML = '⭐️Enable shooting stars⭐️'; + areStarsShooting = false; } else { - processingSketch.frameRate(24); - document.getElementById('shooting-stars-enable').innerHTML = 'Disable shooting stars⭐️'; - processingIsOn = true; + document.getElementById('shooting-stars-enable').innerHTML = '⭐️Disable shooting stars⭐️'; + areStarsShooting = true; + newShootingStar(); } }); + + +// Enable/disable shooting stars (with P5JS background) +// if (typeof processingSketch !== 'undefined') { +// let separatorSpan = document.createElement('span'); +// separatorSpan.innerHTML = ' - '; +// document.getElementById('shooting-stars-enable').after(separatorSpan); +// document.getElementById('shooting-stars-enable').innerHTML = 'Disable shooting stars⭐️'; +// } +// document.getElementById('shooting-stars-enable').addEventListener('click', () => { +// if (processingIsOn) { +// processingSketch.frameRate(0); +// document.getElementById('shooting-stars-enable').innerHTML = 'Enable shooting stars⭐️'; +// processingIsOn = false; +// } else { +// processingSketch.frameRate(24); +// document.getElementById('shooting-stars-enable').innerHTML = 'Disable shooting stars⭐️'; +// processingIsOn = true; +// } +// }); diff --git a/js/sketch.js b/js/sketch.js index 70a26dd..1f9812d 100644 --- a/js/sketch.js +++ b/js/sketch.js @@ -1,6 +1,7 @@ // Another possible inspiration: https://www.khanacademy.org/computer-programming/twinkle-twinkle/6280832014565376 - let sketch = function(p) { + let svgExport = false; // To export the result to SVG + let bgCol = hexToRgb('#222233'); let starCol = [hexToRgb('#ffcdff'), hexToRgb('#804442'), hexToRgb('#ffff7d')] @@ -25,9 +26,13 @@ let sketch = function(p) { p.frameRate(24); currentWidth = p.windowWidth; currentHeight = p.windowHeight; - // p.createCanvas(currentWidth, currentHeight); - p.createCanvas(1920, 1080, p.SVG) // To export the result to SVG - p.noLoop(); // To export the result to SVG + + if (svgExport) { + p.createCanvas(1920, 1080, p.SVG) // To export the result to SVG + p.noLoop(); // To export the result to SVG + } else { + p.createCanvas(currentWidth, currentHeight); + } bgInit(); @@ -57,8 +62,10 @@ let sketch = function(p) { time += 1; - p.save(); // To export the result to SVG + if (svgExport) { + p.save(); // To export the result to SVG + } } //End of draw() class Stars { diff --git a/js/vendor/modernizr-3.11.2.min.js b/js/vendor/modernizr-3.11.2.min.js deleted file mode 100644 index feada51..0000000 --- a/js/vendor/modernizr-3.11.2.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! modernizr 3.11.2 (Custom Build) | MIT * - * https://modernizr.com/download/?-cssanimations-csscolumns-customelements-flexbox-history-picture-pointerevents-postmessage-sizes-srcset-webgl-websockets-webworkers-addtest-domprefixes-hasevent-mq-prefixedcssvalue-prefixes-setclasses-testallprops-testprop-teststyles !*/ -!function(e,t,n,r){function o(e,t){return typeof e===t}function i(e){var t=_.className,n=Modernizr._config.classPrefix||"";if(S&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(e.length>0&&(t+=" "+n+e.join(" "+n)),S?_.className.baseVal=t:_.className=t)}function s(e,t){if("object"==typeof e)for(var n in e)k(e,n)&&s(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2===r.length&&(o=o[r[1]]),void 0!==o)return Modernizr;t="function"==typeof t?t():t,1===r.length?Modernizr[r[0]]=t:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=t),i([(t&&!1!==t?"":"no-")+r.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function a(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):S?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function l(){var e=n.body;return e||(e=a(S?"svg":"body"),e.fake=!0),e}function u(e,t,r,o){var i,s,u,f,c="modernizr",d=a("div"),p=l();if(parseInt(r,10))for(;r--;)u=a("div"),u.id=o?o[r]:c+(r+1),d.appendChild(u);return i=a("style"),i.type="text/css",i.id="s"+c,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",f=_.style.overflow,_.style.overflow="hidden",_.appendChild(p)),s=t(d,e),p.fake?(p.parentNode.removeChild(p),_.style.overflow=f,_.offsetHeight):d.parentNode.removeChild(d),!!s}function f(e,n,r){var o;if("getComputedStyle"in t){o=getComputedStyle.call(t,e,n);var i=t.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var s=i.error?"error":"log";i[s].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&e.currentStyle&&e.currentStyle[r];return o}function c(e,t){return!!~(""+e).indexOf(t)}function d(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(d(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var i=[];o--;)i.push("("+d(e[o])+":"+n+")");return i=i.join(" or "),u("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"===f(e,null,"position")})}return r}function m(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function h(e,t,n,i){function s(){u&&(delete N.style,delete N.modElem)}if(i=!o(i,"undefined")&&i,!o(n,"undefined")){var l=p(e,n);if(!o(l,"undefined"))return l}for(var u,f,d,h,A,v=["modernizr","tspan","samp"];!N.style&&v.length;)u=!0,N.modElem=a(v.shift()),N.style=N.modElem.style;for(d=e.length,f=0;f