Commit 3eb40a4e authored by ROBERT PATRICK CAREY III's avatar ROBERT PATRICK CAREY III 🗿

Babel update

parent 03a411dc
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var o={fontSize:{base:1,max:1.5,min:.75,increment:.5},fontFamily:"sans",viewingMode:"light",readingMode:"enable",dyslexiaFont:["Open Dyslexic","url(https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff)"]},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fontSize,n=void 0===t?o.fontSize.base:t,r=e.fontFamily,i=void 0===r?o.fontFamily:r,s=e.viewingMode,l=void 0===s?o.viewingMode:s,a=e.readingMode;return{fontSize:n,fontFamily:i,viewingMode:l,readingMode:void 0===a?o.readingMode:a,setFontSize:function(e){e=e||o.fontSize.base;try{e<o.fontSize.min?e=o.fontSize.min:e>o.fontSize.max&&(e=o.fontSize.max),document.documentElement.style.fontSize=e+"rem",this.fontSize=e}catch(e){console.warn(e)}return this},setFontFamily:function(e){e=e||o.fontFamily;try{"serif"==e?(document.documentElement.classList.remove("font-sans","font-dyslexic"),document.documentElement.classList.add("font-serif")):"dyslexic"==e?(document.documentElement.classList.remove("font-sans","font-serif"),document.documentElement.classList.add("font-dyslexic"),this.fetchFontFace(o.dyslexiaFont)):(e="sans",document.documentElement.classList.remove("font-dyslexic","font-serif"),document.documentElement.classList.add("font-sans")),this.fontFamily=e}catch(e){console.warn(e)}return this},fetchFontFace:function(e){var t=new(Function.prototype.bind.apply(FontFace,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e))));t.load().then(function(){document.fonts.add(t)})},setViewingMode:function(e){e=e||o.viewingMode;try{if("dark"==e)document.documentElement.classList.remove("light-mode"),document.documentElement.classList.add("dark-mode");else{if("light"!=e)throw"Unsupported viewing mode: "+e;document.documentElement.classList.remove("dark-mode"),document.documentElement.classList.add("light-mode")}this.viewingMode=e}catch(e){console.warn(e)}return this},setReadingMode:function(e){e=e||o.readingMode;try{"disable"==e?document.documentElement.classList.add("reading-mode"):(e="enable",document.documentElement.classList.remove("reading-mode")),this.readingMode=e}catch(e){console.warn(e)}return this},setSelected:function(){this.setFontSize(this.fontSize),this.setFontFamily(this.fontFamily),this.setViewingMode(this.viewingMode),this.setReadingMode(this.readingMode);var e=document.querySelectorAll(".fontSlider"),t=!0,n=!1,o=void 0;try{for(var r,i=e[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){r.value.value=this.fontSize}}catch(e){n=!0,o=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw o}}var s=document.querySelectorAll(".toggle-font-"+this.fontFamily),l=!0,a=!1,c=void 0;try{for(var d,u=s[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){d.value.classList.add("active")}}catch(e){a=!0,c=e}finally{try{!l&&u.return&&u.return()}finally{if(a)throw c}}var f=document.querySelectorAll(".toggle-"+this.viewingMode+"-mode"),m=!0,g=!1,v=void 0;try{for(var y,h=f[Symbol.iterator]();!(m=(y=h.next()).done);m=!0){y.value.classList.add("active")}}catch(e){g=!0,v=e}finally{try{!m&&h.return&&h.return()}finally{if(g)throw v}}var S=document.querySelectorAll("."+this.readingMode+"-cards"),b=!0,F=!1,p=void 0;try{for(var w,M=S[Symbol.iterator]();!(b=(w=M.next()).done);b=!0){w.value.classList.add("active")}}catch(e){F=!0,p=e}finally{try{!b&&M.return&&M.return()}finally{if(F)throw p}}}}};document.addEventListener("DOMContentLoaded",function(e){!function(e){var t,n,i,s,l=void 0,a=function(){if("undefined"!=typeof Storage)return JSON.parse(localStorage.getItem("userPreferences"));console.warn("Unable to retrieve settings. This browser may not support local storage.")}();(l=a?r({fontSize:a.fontSize,fontFamily:a.fontFamily,viewingMode:a.viewingMode,readingMode:a.readingMode}):r()).setSelected(),window.addEventListener("resize",(t=function(){window.innerWidth<=767&&d(!0)},n=100,function(){var e=this,o=arguments,r=i&&!s;clearTimeout(s),s=setTimeout(function(){s=null,i||t.apply(e,o)},n),r&&t.apply(e,o)}));var c=document.getElementById("sidebar_collapse");function d(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(document.getElementById("sidebar_first").classList.remove("collapsed"),setTimeout(function(){document.querySelector(".main-content").classList.add("col-md-9")},500)):(document.querySelector(".main-content").classList.remove("col-md-9"),document.getElementById("sidebar_first").classList.add("collapsed"))}function u(){e(".toggle-fullscreen").find("[data-fa-processed]").toggleClass("fa-expand").toggleClass("fa-compress"),"Enter Fullscreen"===e(".toggle-fullscreen").attr("data-original-title")?e(".toggle-fullscreen").attr("title","Exit Fullscreen"):e(".toggle-fullscreen").attr("title","Enter Fullscreen")}null!==c&&(c.onclick=function(){d(document.getElementById("sidebar_first").classList.contains("collapsed"))}),new MutationObserver(function(e){1==e[0].target.classList.contains("collapsed")?(document.querySelector("#sidebar_collapse svg").classList.remove("fa-arrow-alt-from-right"),document.querySelector("#sidebar_collapse svg").classList.add("fa-arrow-alt-from-left"),document.querySelector("#sidebar_collapse").setAttribute("title","Show sidebar")):(document.querySelector("#sidebar_collapse svg").classList.remove("fa-arrow-alt-from-left"),document.querySelector("#sidebar_collapse svg").classList.add("fa-arrow-alt-from-right"),document.querySelector("#sidebar_collapse").setAttribute("title","Hide sidebar"))}).observe(document.getElementById("sidebar_first"),{attributes:!0,attributeFilter:["class"],childList:!1,characterData:!1}),e(".toggle-font-serif").on("click touchstart",function(){e(".toggle-font-sans").removeClass("active"),e(".toggle-font-dyslexic").removeClass("active"),l.setFontFamily("serif")}),e(".toggle-font-sans").on("click touchstart",function(){e(".toggle-font-serif").removeClass("active"),e(".toggle-font-dyslexic").removeClass("active"),l.setFontFamily("sans")}),e(".toggle-font-dyslexic").on("click touchstart",function(){e(".toggle-font-serif").removeClass("active"),e(".toggle-font-sans").removeClass("active"),l.fetchFontFace(o.dyslexiaFont),l.setFontFamily("dyslexic")}),e(".toggle-dark-mode").on("click touchstart",function(){e(".toggle-light-mode").removeClass("active"),l.setViewingMode("dark")}),e(".toggle-light-mode").on("click touchstart",function(){e(".toggle-dark-mode").removeClass("active"),l.setViewingMode("light")}),e(".disable-cards").on("click touchstart",function(){e(".enable-cards").removeClass("active"),l.setReadingMode("disable")}),e(".enable-cards").on("click touchstart",function(){e(".disable-cards").removeClass("active"),l.setReadingMode("enable")}),e(".reset-mode").on("click touchstart",function(){e("#userPreferences button").removeClass("active"),function(e){e.setFontSize(o.fontSize.base),e.setFontFamily(o.fontFamily),e.setViewingMode(o.viewingMode),e.setReadingMode(o.readingMode),e.setSelected(),"undefined"!=typeof Storage?localStorage.removeItem("userPreferences"):console.warn("Unable to store settings. This browser may not support local storage.")}(l)}),e(".save-user-preferences").on("click touchstart",function(){e("#userPreferences").modal("toggle"),function(e){"undefined"!=typeof Storage?localStorage.setItem("userPreferences",JSON.stringify(e)):console.warn("Unable to store settings. This browser may not support local storage.")}(l)}),e(".toggle-fullscreen").on("click touchstart",function(){var e;document.fullscreen?document.exitFullscreen():document.mozFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen?document.webkitCancelFullScreen():document.msFullscreenElement?document.msExitFullscreen():(e=document.documentElement).requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}),e(".fontSlider").on("input change",function(){l.setFontSize(this.value)}),document.addEventListener("webkitfullscreenchange",u,!1),document.addEventListener("mozfullscreenchange",u,!1),document.addEventListener("fullscreenchange",u,!1),document.addEventListener("MSFullscreenChange",u,!1)}(jQuery)})}]);
\ No newline at end of file
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){var n={fontSize:{base:1,max:1.5,min:.75,increment:.5},fontFamily:"sans",viewingMode:"light",readingMode:"enable",dyslexiaFont:{name:"Open Dyslexic",url:"https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff"}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fontSize,o=void 0===t?n.fontSize.base:t,i=e.fontFamily,l=void 0===i?n.fontFamily:i,r=e.viewingMode,s=void 0===r?n.viewingMode:r,a=e.readingMode;return{fontSize:o,fontFamily:l,viewingMode:s,readingMode:void 0===a?n.readingMode:a,setFontSize:function(e){e=e||n.fontSize.base;try{e<n.fontSize.min?e=n.fontSize.min:e>n.fontSize.max&&(e=n.fontSize.max),document.documentElement.style.fontSize=e+"rem",this.fontSize=e}catch(e){console.warn(e)}return this},setFontFamily:function(e){e=e||n.fontFamily;try{"serif"==e?(document.documentElement.classList.remove("font-sans","font-dyslexic"),document.documentElement.classList.add("font-serif")):"dyslexic"==e?(document.documentElement.classList.remove("font-sans","font-serif"),document.documentElement.classList.add("font-dyslexic"),this.fetchFontFace(n.dyslexiaFont)):(e="sans",document.documentElement.classList.remove("font-dyslexic","font-serif"),document.documentElement.classList.add("font-sans")),this.fontFamily=e}catch(e){console.warn(e)}return this},fetchFontFace:function(e){var t=new FontFace(e.name,"url("+e.url+")");t.load().then(function(){document.fonts.add(t)})},setViewingMode:function(e){e=e||n.viewingMode;try{if("dark"==e)document.documentElement.classList.remove("light-mode"),document.documentElement.classList.add("dark-mode");else{if("light"!=e)throw"Unsupported viewing mode: "+e;document.documentElement.classList.remove("dark-mode"),document.documentElement.classList.add("light-mode")}this.viewingMode=e}catch(e){console.warn(e)}return this},setReadingMode:function(e){e=e||n.readingMode;try{"disable"==e?document.documentElement.classList.add("reading-mode"):(e="enable",document.documentElement.classList.remove("reading-mode")),this.readingMode=e}catch(e){console.warn(e)}return this},setSelected:function(){this.setFontSize(this.fontSize),this.setFontFamily(this.fontFamily),this.setViewingMode(this.viewingMode),this.setReadingMode(this.readingMode);var e=document.querySelectorAll(".fontSlider"),t=!0,n=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(t=(i=l.next()).done);t=!0){i.value.value=this.fontSize}}catch(e){n=!0,o=e}finally{try{t||null==l.return||l.return()}finally{if(n)throw o}}var r=document.querySelectorAll(".toggle-font-"+this.fontFamily),s=!0,a=!1,c=void 0;try{for(var d,u=r[Symbol.iterator]();!(s=(d=u.next()).done);s=!0){d.value.classList.add("active")}}catch(e){a=!0,c=e}finally{try{s||null==u.return||u.return()}finally{if(a)throw c}}var f=document.querySelectorAll(".toggle-"+this.viewingMode+"-mode"),m=!0,g=!1,v=void 0;try{for(var y,h=f[Symbol.iterator]();!(m=(y=h.next()).done);m=!0){y.value.classList.add("active")}}catch(e){g=!0,v=e}finally{try{m||null==h.return||h.return()}finally{if(g)throw v}}var S=document.querySelectorAll("."+this.readingMode+"-cards"),b=!0,F=!1,p=void 0;try{for(var w,M=S[Symbol.iterator]();!(b=(w=M.next()).done);b=!0){w.value.classList.add("active")}}catch(e){F=!0,p=e}finally{try{b||null==M.return||M.return()}finally{if(F)throw p}}}}};document.addEventListener("DOMContentLoaded",function(e){!function(e){var t,i,l,r,s,a=function(){if("undefined"!=typeof Storage)return JSON.parse(localStorage.getItem("userPreferences"));console.warn("Unable to retrieve settings. This browser may not support local storage.")}();(t=a?o({fontSize:a.fontSize,fontFamily:a.fontFamily,viewingMode:a.viewingMode,readingMode:a.readingMode}):o()).setSelected(),window.addEventListener("resize",(i=function(){window.innerWidth<=767&&d(!0)},l=100,function(){var e=this,t=arguments,n=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||i.apply(e,t)},l),n&&i.apply(e,t)}));var c=document.getElementById("sidebar_collapse");function d(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(document.getElementById("sidebar_first").classList.remove("collapsed"),setTimeout(function(){document.querySelector(".main-content").classList.add("col-md-9")},500)):(document.querySelector(".main-content").classList.remove("col-md-9"),document.getElementById("sidebar_first").classList.add("collapsed"))}function u(){e(".toggle-fullscreen").find("[data-fa-processed]").toggleClass("fa-expand").toggleClass("fa-compress"),"Enter Fullscreen"===e(".toggle-fullscreen").attr("data-original-title")?e(".toggle-fullscreen").attr("title","Exit Fullscreen"):e(".toggle-fullscreen").attr("title","Enter Fullscreen")}null!==c&&(c.onclick=function(){d(document.getElementById("sidebar_first").classList.contains("collapsed"))}),new MutationObserver(function(e){1==e[0].target.classList.contains("collapsed")?(document.querySelector("#sidebar_collapse svg").classList.remove("fa-arrow-alt-from-right"),document.querySelector("#sidebar_collapse svg").classList.add("fa-arrow-alt-from-left"),document.querySelector("#sidebar_collapse").setAttribute("title","Show sidebar")):(document.querySelector("#sidebar_collapse svg").classList.remove("fa-arrow-alt-from-left"),document.querySelector("#sidebar_collapse svg").classList.add("fa-arrow-alt-from-right"),document.querySelector("#sidebar_collapse").setAttribute("title","Hide sidebar"))}).observe(document.getElementById("sidebar_first"),{attributes:!0,attributeFilter:["class"],childList:!1,characterData:!1}),e(".toggle-font-serif").on("click touchstart",function(){e(".toggle-font-sans").removeClass("active"),e(".toggle-font-dyslexic").removeClass("active"),t.setFontFamily("serif")}),e(".toggle-font-sans").on("click touchstart",function(){e(".toggle-font-serif").removeClass("active"),e(".toggle-font-dyslexic").removeClass("active"),t.setFontFamily("sans")}),e(".toggle-font-dyslexic").on("click touchstart",function(){e(".toggle-font-serif").removeClass("active"),e(".toggle-font-sans").removeClass("active"),t.fetchFontFace(n.dyslexiaFont),t.setFontFamily("dyslexic")}),e(".toggle-dark-mode").on("click touchstart",function(){e(".toggle-light-mode").removeClass("active"),t.setViewingMode("dark")}),e(".toggle-light-mode").on("click touchstart",function(){e(".toggle-dark-mode").removeClass("active"),t.setViewingMode("light")}),e(".disable-cards").on("click touchstart",function(){e(".enable-cards").removeClass("active"),t.setReadingMode("disable")}),e(".enable-cards").on("click touchstart",function(){e(".disable-cards").removeClass("active"),t.setReadingMode("enable")}),e(".reset-mode").on("click touchstart",function(){e("#userPreferences button").removeClass("active"),function(e){e.setFontSize(n.fontSize.base),e.setFontFamily(n.fontFamily),e.setViewingMode(n.viewingMode),e.setReadingMode(n.readingMode),e.setSelected(),"undefined"!=typeof Storage?localStorage.removeItem("userPreferences"):console.warn("Unable to store settings. This browser may not support local storage.")}(t)}),e(".save-user-preferences").on("click touchstart",function(){e("#userPreferences").modal("toggle"),function(e){"undefined"!=typeof Storage?localStorage.setItem("userPreferences",JSON.stringify(e)):console.warn("Unable to store settings. This browser may not support local storage.")}(t)}),e(".toggle-fullscreen").on("click touchstart",function(){var e;document.fullscreen?document.exitFullscreen():document.mozFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen?document.webkitCancelFullScreen():document.msFullscreenElement?document.msExitFullscreen():(e=document.documentElement).requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}),e(".fontSlider").on("input change",function(){t.setFontSize(this.value)}),document.addEventListener("webkitfullscreenchange",u,!1),document.addEventListener("mozfullscreenchange",u,!1),document.addEventListener("fullscreenchange",u,!1),document.addEventListener("MSFullscreenChange",u,!1)}(jQuery)})}]);
\ No newline at end of file
......@@ -8,7 +8,10 @@ const defaults = {
fontFamily: "sans",
viewingMode: "light",
readingMode: "enable",
dyslexiaFont: ["Open Dyslexic", "url(https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff)"]
dyslexiaFont: {
name: "Open Dyslexic",
url: "https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff"
}
};
/*
......@@ -70,7 +73,7 @@ const userPreferences = ({
return this;
},
fetchFontFace(params){
var font = new FontFace(...params);
var font = new FontFace(params.name, "url("+params.url+")");
font.load().then(function() {
document.fonts.add(font);
......
This diff is collapsed.
......@@ -18,10 +18,10 @@
"email": "rpc5102@psu.edu",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.7.0",
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"babel-loader": "^8.0.4",
"css-loader": "^0.28.11",
"css-mqpacker": "^7.0.0",
"cssnano": "^4.1.7",
......
......@@ -12,24 +12,12 @@ const config = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
"presets": [
["env", {
"targets": {
"browsers": [
"Chrome >= 52",
"FireFox >= 44",
"Safari >= 7",
"Explorer 11",
"last 4 Edge versions"
]
}
}],
],
presets: ['@babel/preset-env']
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment