8 lines
No EOL
3.9 KiB
JavaScript
Executable file
8 lines
No EOL
3.9 KiB
JavaScript
Executable file
!function(t,e){var n=function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=184)}({182:function(t,e){t.exports=window.Spinner},184:function(t,e,n){"use strict";n.r(e);var r={};n.d(r,"create",function(){return i}),n.d(r,"bind",function(){return s}),n.d(r,"stopAll",function(){return u});var a=n(182),o=[];
|
|
/*!
|
|
* 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,s,u,d=t.querySelector(".ladda-spinner");d||((d=document.createElement("span")).className="ladda-spinner"),t.appendChild(d);var l={start:function(){return s||(s=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 o=.2*r,i=.6*o,s=o<7?2:3;return new a.Spinner({color:e||"#fff",lines:n||12,radius:o,length:i,width:s,animation:"ladda-spinner-line-fade",zIndex:"auto",top:"auto",left:"auto",className:""})}(t)),t.disabled=!0,t.setAttribute("data-loading",""),clearTimeout(u),s.spin(d),this.setProgress(0),this},startAfter:function(t){return clearTimeout(u),u=setTimeout(function(){l.start()},t),this},stop:function(){return l.isLoading()&&(t.disabled=!1,t.removeAttribute("data-loading")),clearTimeout(u),s&&(u=setTimeout(function(){s.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(u),t.disabled=!1,t.removeAttribute("data-loading"),s&&(s.stop(),s=null),o.splice(o.indexOf(l),1)}};return o.push(l),l}console.warn("Ladda button target must be defined.")}function s(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++)d(n[r],e)}function u(){for(var t=0,e=o.length;t<e;t++)o[t].stop()}function d(t,e){if("function"==typeof t.addEventListener){var n=i(t),r=-1;t.addEventListener("click",function(){var a=!0,o=function(t,e){for(;t.parentNode&&t.tagName!==e;)t=t.parentNode;return e===t.tagName?t:void 0}(t,"FORM");void 0===o||o.hasAttribute("novalidate")||"function"==typeof o.checkValidity&&(a=o.checkValidity()),a&&(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 a in n)r[0]&&(r[0][a]=n[a]),r[1]&&"__esModule"!==a&&(r[1][a]=n[a]),r[2]&&(r[2][a]=n[a])}}(this); |