!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,(function(){"use strict";function t(t,e){var i,n=document.createElement(t||"div");for(i in e)n[i]=e[i];return n}function e(t){for(var e=1,i=arguments.length;i>e;e++)t.appendChild(arguments[e]);return t}function i(t,e,i,n){var r=["opacity",e,~~(100*t),i,n].join("-"),o=.01+i/n*100,a=Math.max(1-(1-t)/e*(100-o),t),s=l.substring(0,l.indexOf("Animation")).toLowerCase(),d=s&&"-"+s+"-"||"";return u[r]||(c.insertRule("@"+d+"keyframes "+r+"{0%{opacity:"+a+"}"+o+"%{opacity:"+t+"}"+(o+.01)+"%{opacity:1}"+(o+e)%100+"%{opacity:"+t+"}100%{opacity:"+a+"}}",c.cssRules.length),u[r]=1),r}function n(t,e){var i,n,r=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;d.length>n;n++)if(void 0!==r[i=d[n]+e])return i;return void 0!==r[e]?e:void 0}function r(t,e){for(var i in e)t.style[n(t,i)||i]=e[i];return t}function o(t){for(var e=1;arguments.length>e;e++){var i=arguments[e];for(var n in i)void 0===t[n]&&(t[n]=i[n])}return t}function a(t,e){return"string"==typeof t?t:t[e%t.length]}function s(t){this.opts=o(t||{},s.defaults,p)}var l,d=["webkit","Moz","ms","O"],u={},c=function(){var i=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],i),i.sheet||i.styleSheet}(),p={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};s.defaults={},o(s.prototype,{spin:function(e){this.stop();var i=this,n=i.opts,o=i.el=r(t(0,{className:n.className}),{position:n.position,width:0,zIndex:n.zIndex});if(n.radius,n.length,n.width,r(o,{left:n.left,top:n.top}),e&&e.insertBefore(o,e.firstChild||null),o.setAttribute("role","progressbar"),i.lines(o,i.opts),!l){var a,s=0,d=(n.lines-1)*(1-n.direction)/2,u=n.fps,c=u/n.speed,p=(1-n.opacity)/(c*n.trail/100),f=c/n.lines;!function t(){s++;for(var e=0;n.lines>e;e++)a=Math.max(1-(s+(n.lines-e)*f)%c*p,n.opacity),i.opacity(o,e*n.direction+d,a,n);i.timeout=i.el&&setTimeout(t,~~(1e3/u))}()}return i},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(n,o){function s(e,i){return r(t(),{position:"absolute",width:o.length+o.width+"px",height:o.width+"px",background:e,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/o.lines*u+o.rotate)+"deg) translate("+o.radius+"px,0)",borderRadius:(o.corners*o.width>>1)+"px"})}for(var d,u=0,c=(o.lines-1)*(1-o.direction)/2;o.lines>u;u++)d=r(t(),{position:"absolute",top:1+~(o.width/2)+"px",transform:o.hwaccel?"translate3d(0,0,0)":"",opacity:o.opacity,animation:l&&i(o.opacity,o.trail,c+u*o.direction,o.lines)+" "+1/o.speed+"s linear infinite"}),o.shadow&&e(d,r(s("#000","0 0 4px #000"),{top:"2px"})),e(n,e(d,s(a(o.color,u),"0 0 1px rgba(0,0,0,.1)")));return n},opacity:function(t,e,i){t.childNodes.length>e&&(t.childNodes[e].style.opacity=i)}});var f=r(t("group"),{behavior:"url(#default#VML)"});return!n(f,"transform")&&f.adj?function(){function i(e,i){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',i)}c.addRule(".spin-vml","behavior:url(#default#VML)"),s.prototype.lines=function(t,n){function o(){return r(i("group",{coordsize:u+" "+u,coordorigin:-d+" "+-d}),{width:u,height:u})}function s(t,s,l){e(p,e(r(o(),{rotation:360/n.lines*t+"deg",left:~~s}),e(r(i("roundrect",{arcsize:n.corners}),{width:d,height:n.width,left:n.radius,top:-n.width>>1,filter:l}),i("fill",{color:a(n.color,t),opacity:n.opacity}),i("stroke",{opacity:0}))))}var l,d=n.length+n.width,u=2*d,c=2*-(n.width+n.length)+"px",p=r(o(),{position:"absolute",top:c,left:c});if(n.shadow)for(l=1;n.lines>=l;l++)s(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;n.lines>=l;l++)s(l);return e(t,p)},s.prototype.opacity=function(t,e,i,n){var r=t.firstChild;n=n.shadow&&n.lines||0,r&&r.childNodes.length>e+n&&((r=(r=(r=r.childNodes[e+n])&&r.firstChild)&&r.firstChild)&&(r.opacity=i))}}():l=n(f,"animation"),s})),
/*!
 * Ladda 0.9.8 (2015-08-04, 11:23)
 * http://lab.hakim.se/ladda
 * MIT licensed
 *
 * Copyright (C) 2015 Hakim El Hattab, http://hakim.se
 */
function(t,e){"object"==typeof exports?module.exports=e(require("spin.js")):"function"==typeof define&&define.amd?define(["spin"],e):t.Ladda=e(t.Spinner)}(this,(function(t){"use strict";function e(t){if(void 0!==t){if(/ladda-button/i.test(t.className)||(t.className+=" ladda-button"),t.hasAttribute("data-style")||t.setAttribute("data-style","expand-right"),!t.querySelector(".ladda-label")){var e=document.createElement("span");e.className="ladda-label",function(t,e){var i=document.createRange();i.selectNodeContents(t),i.surroundContents(e),t.appendChild(e)}(t,e)}var i,n=t.querySelector(".ladda-spinner");n||((n=document.createElement("span")).className="ladda-spinner"),t.appendChild(n);var a,s={start:function(){return i||(i=r(t)),t.setAttribute("disabled",""),t.setAttribute("data-loading",""),clearTimeout(a),i.spin(n),this.setProgress(0),this},startAfter:function(t){return clearTimeout(a),a=setTimeout((function(){s.start()}),t),this},stop:function(){return t.removeAttribute("disabled"),t.removeAttribute("data-loading"),clearTimeout(a),i&&(a=setTimeout((function(){i.stop()}),1e3)),this},toggle:function(){return this.isLoading()?this.stop():this.start(),this},setProgress:function(e){e=Math.max(Math.min(e,1),0);var i=t.querySelector(".ladda-progress");0===e&&i&&i.parentNode?i.parentNode.removeChild(i):(i||((i=document.createElement("div")).className="ladda-progress",t.appendChild(i)),i.style.width=(e||0)*t.offsetWidth+"px")},enable:function(){return this.stop(),this},disable:function(){return this.stop(),t.setAttribute("disabled",""),this},isLoading:function(){return t.hasAttribute("data-loading")},remove:function(){clearTimeout(a),t.removeAttribute("disabled",""),t.removeAttribute("data-loading",""),i&&(i.stop(),i=null);for(var e=0,n=o.length;n>e;e++)if(s===o[e]){o.splice(e,1);break}}};return o.push(s),s}console.warn("Ladda button target must be defined.")}function i(t,e){for(;t.parentNode&&t.tagName!==e;)t=t.parentNode;return e===t.tagName?t:void 0}function n(t){for(var e=["input","textarea","select"],i=[],n=0;e.length>n;n++)for(var r=t.getElementsByTagName(e[n]),o=0;r.length>o;o++)r[o].hasAttribute("required")&&i.push(r[o]);return i}function r(e){var i,n,r=e.offsetHeight;0===r&&(r=parseFloat(window.getComputedStyle(e).height)),r>32&&(r*=.8),e.hasAttribute("data-spinner-size")&&(r=parseInt(e.getAttribute("data-spinner-size"),10)),e.hasAttribute("data-spinner-color")&&(i=e.getAttribute("data-spinner-color")),e.hasAttribute("data-spinner-lines")&&(n=parseInt(e.getAttribute("data-spinner-lines"),10));var o=.2*r;return new t({color:i||"#fff",lines:n||12,radius:o,length:.6*o,width:7>o?2:3,zIndex:"auto",top:"auto",left:"auto",className:""})}var o=[];return{bind:function(t,r){r=r||{};var o=[];"string"==typeof t?o=function(t){for(var e=[],i=0;t.length>i;i++)e.push(t[i]);return e}(document.querySelectorAll(t)):"object"==typeof t&&"string"==typeof t.nodeName&&(o=[t]);for(var a=0,s=o.length;s>a;a++)!function(){var t=o[a];if("function"==typeof t.addEventListener){var s=e(t),l=-1;t.addEventListener("click",(function(){var e=!0,o=i(t,"FORM");if(void 0!==o)for(var a=n(o),d=0;a.length>d;d++)""===a[d].value.replace(/^\s+|\s+$/g,"")&&(e=!1),"checkbox"!==a[d].type&&"radio"!==a[d].type||a[d].checked||(e=!1),"email"===a[d].type&&(e=/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/.test(a[d].value));e&&(s.startAfter(1),"number"==typeof r.timeout&&(clearTimeout(l),l=setTimeout(s.stop,r.timeout)),"function"==typeof r.callback&&r.callback.apply(null,[s]))}),!1)}}()},create:e,stopAll:function(){for(var t=0,e=o.length;e>t;t++)o[t].stop()}}}));