8 lines
4.3 KiB
JavaScript
8 lines
4.3 KiB
JavaScript
!function(t,e){var n=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=570)}({255:function(t,e){t.exports=window.Spinner},570:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"create",function(){return i}),n.d(r,"bind",function(){return u}),n.d(r,"stopAll",function(){return d});var o=n(255),a=[];
|
|
/*!
|
|
* Ladda
|
|
* http://lab.hakim.se/ladda
|
|
* MIT licensed
|
|
*
|
|
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
|
*/function i(t){if(void 0!==t){if(t.classList.contains("ladda-button")||t.classList.add("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",n=t,r=e,(i=document.createRange()).selectNodeContents(n),i.surroundContents(r),n.appendChild(r)}var n,r,i,u,d,s=t.querySelector(".ladda-spinner");s||((s=document.createElement("span")).className="ladda-spinner"),t.appendChild(s);var l={start:function(){return u||(u=function(t){var e,n,r=t.offsetHeight;0===r&&(r=parseFloat(window.getComputedStyle(t).height)),r>32&&(r*=.8),t.hasAttribute("data-spinner-size")&&(r=parseInt(t.getAttribute("data-spinner-size"),10)),t.hasAttribute("data-spinner-color")&&(e=t.getAttribute("data-spinner-color")),t.hasAttribute("data-spinner-lines")&&(n=parseInt(t.getAttribute("data-spinner-lines"),10));var a=.2*r,i=.6*a,u=a<7?2:3;return new o.Spinner({color:e||"#fff",lines:n||12,radius:a,length:i,width:u,animation:"ladda-spinner-line-fade",zIndex:"auto",top:"auto",left:"auto",className:""})}(t)),t.disabled=!0,t.setAttribute("data-loading",""),clearTimeout(d),u.spin(s),this.setProgress(0),this},startAfter:function(t){return clearTimeout(d),d=setTimeout(function(){l.start()},t),this},stop:function(){return l.isLoading()&&(t.disabled=!1,t.removeAttribute("data-loading")),clearTimeout(d),u&&(d=setTimeout(function(){u.stop()},1e3)),this},toggle:function(){return this.isLoading()?this.stop():this.start()},setProgress:function(e){e=Math.max(Math.min(e,1),0);var n=t.querySelector(".ladda-progress");0===e&&n&&n.parentNode?n.parentNode.removeChild(n):(n||((n=document.createElement("div")).className="ladda-progress",t.appendChild(n)),n.style.width=(e||0)*t.offsetWidth+"px")},isLoading:function(){return t.hasAttribute("data-loading")},remove:function(){clearTimeout(d),t.disabled=!1,t.removeAttribute("data-loading"),u&&(u.stop(),u=null),a.splice(a.indexOf(l),1)}};return a.push(l),l}console.warn("Ladda button target must be defined.")}function u(t,e){var n;if("string"==typeof t)n=document.querySelectorAll(t);else{if("object"!=typeof t)throw new Error("target must be string or object");n=[t]}e=e||{};for(var r=0;r<n.length;r++)s(n[r],e)}function d(){for(var t=0,e=a.length;t<e;t++)a[t].stop()}function s(t,e){if("function"==typeof t.addEventListener){var n=i(t),r=-1;t.addEventListener("click",function(){var o=!0,a=function(t,e){for(;t.parentNode&&t.tagName!==e;)t=t.parentNode;return e===t.tagName?t:void 0}(t,"FORM");void 0===a||a.hasAttribute("novalidate")||"function"==typeof a.checkValidity&&(o=a.checkValidity()),o&&(n.startAfter(1),"number"==typeof e.timeout&&(clearTimeout(r),r=setTimeout(n.stop,e.timeout)),"function"==typeof e.callback&&e.callback.apply(null,[n]))},!1)}}n.d(e,"Ladda",function(){return r})}});if("object"==typeof n){var r=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,t&&t!==window?t:null];for(var o in n)r[0]&&(r[0][o]=n[o]),r[1]&&"__esModule"!==o&&(r[1][o]=n[o]),r[2]&&(r[2][o]=n[o])}}(this); |