window.jQuery?(function($){$.fn.loadButton=function(action,opts){void 0===action&&(action="on");var settings=$.extend({faClass:"fas",faIcon:"fa-cog",doSpin:!0,loadingText:"Saving...",loadingBackground:"darkred",loadingForeground:"white"},opts),label=this.html(),origBG=this.css("background"),origFG=this.css("color");if("on"==action){var keyframe;(keyframe=document.createElement("style")).type="text/css",keyframe.setAttribute("id","loadButton-keyframe"),keyframe.innerHTML="@keyframes flasher {50% {opacity: 0;}}",document.getElementsByTagName("head")[0].appendChild(keyframe),this.attr("data-label",label),this.attr("data-orig-bg",origBG),this.attr("data-orig-fg",origFG),this.css("background",settings.loadingBackground),this.css("color",settings.loadingForeground);var html=' '+settings.loadingText+"",this.html(html),this.attr("disabled",!0),this.blur()}else if("off"==action){var keyframe;void 0!==(keyframe=document.getElementById("loadButton-keyframe"))&&"object"!=typeof keyframe&&keyframe.parentNode.removeChild(keyframe),this.html(this.data("label")),this.css("background",this.data("orig-bg")),this.css("color",this.data("orig-fg")),this.removeAttr("disabled")}return this}}(jQuery),function($){$.fn.loadSVG=function(action,opts){var svgCog='';void 0===action&&(action="on");var settings=$.extend({svgIcon:svgCog,loadingText:"Saving...",loadingBackground:"darkred",loadingForeground:"white"},opts),label=this.html(),origBG=this.css("background"),origFG=this.css("color");if("on"==action){var keyframe;(keyframe=document.createElement("style")).type="text/css",keyframe.setAttribute("id","loadButton-keyframe"),keyframe.innerHTML="@keyframes flasher {50% {opacity: 0;}}",document.getElementsByTagName("head")[0].appendChild(keyframe);var keyframe2=document.createElement("style");keyframe2.type="text/css",keyframe2.setAttribute("id","loadSVG-keyframe"),keyframe2.innerHTML="@keyframes loadSVG{10%{transform:rotate(36.5deg)}20%{transform:rotate(73deg)}30%{transform:rotate(109.5deg)}40%{transform:rotate(146deg)}50%{transform:rotate(182.5deg)}60%{transform:rotate(219deg)}70%{transform:rotate(255.5deg)}80%{transform:rotate(292deg)}90%{transform:rotate(328.5deg)}}",document.getElementsByTagName("head")[0].appendChild(keyframe2),this.attr("data-label",label),this.attr("data-orig-bg",origBG),this.attr("data-orig-fg",origFG),this.css("background",settings.loadingBackground),this.css("color",settings.loadingForeground);var html=settings.svgIcon;html=html+' '+settings.loadingText+"",this.html(html),this.children("svg").css("animation","loadSVG 3s linear infinite"),this.attr("disabled",!0),this.blur()}else if("off"==action){var keyframe;void 0!==(keyframe=document.getElementById("loadButton-keyframe"))&&"object"!=typeof keyframe&&keyframe.parentNode.removeChild(keyframe),this.html(this.data("label")),this.css("background",this.data("orig-bg")),this.css("color",this.data("orig-fg")),this.removeAttr("disabled")}return this}}(jQuery)):console.log("loadButton.js: This class requies jQuery > v3!");