templates/twenty-one/js/scripts.min.js

1 line
645 KiB
JavaScript
Raw Permalink Normal View History

2024-05-31 15:56:23 +02:00
function scrollToGatewayInputError(){var e=jQuery(".gateway-errors,.assisted-cc-input-feedback").first();(e.closest("form")||jQuery("form").first()).find('button[type="submit"],input[type="submit"]').prop("disabled",!1).removeClass("disabled").find("i.fas,i.far,i.fal,i.fab").removeAttr("class").addClass("fas fa-arrow-circle-right").find("span").toggle(),e.length&&elementOutOfViewPort(e[0])&&jQuery("html, body").animate({scrollTop:e.offset().top-50},500)}function elementOutOfViewPort(e){var e=e.getBoundingClientRect(),t={};return t.top=e.top<0,t.left=e.left<0,t.bottom=e.bottom>(window.innerHeight||document.documentElement.clientHeight),t.right=e.right>(window.innerWidth||document.documentElement.clientWidth),t.any=t.top||t.left||t.bottom||t.right,t.any}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(C,P){function H(e,t){return t.toUpperCase()}var c=[],p=C.document,u=c.slice,O=c.concat,F=c.push,Q=c.indexOf,R={},B=R.toString,g=R.hasOwnProperty,m={},e="1.12.4",w=function(e,t){return new w.fn.init(e,t)},W=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,U=/^-ms-/,q=/-([\da-z])/gi;function z(e){var t=!!e&&"length"in e&&e.length,n=w.type(e);return"function"!==n&&!w.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:e,constructor:w,selector:"",length:0,toArray:function(){return u.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:u.call(this)},pushStack:function(e){e=w.merge(this.constructor(),e);return e.prevObject=this,e.context=this.context,e},each:function(e){return w.each(this,e)},map:function(n){return this.pushStack(w.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:F,sort:c.sort,splice:c.splice},w.extend=w.fn.extend=function(){var e,t,n,i,r,o=arguments[0]||{},a=1,s=arguments.length,d=!1;for("boolean"==typeof o&&(d=o,o=arguments[a]||{},a++),"object"==typeof o||w.isFunction(o)||(o={}),a===s&&(o=this,a--);a<s;a++)if(null!=(i=arguments[a]))for(n in i)r=o[n],o!==(t=i[n])&&(d&&t&&(w.isPlainObject(t)||(e=w.isArray(t)))?(r=e?(e=!1,r&&w.isArray(r)?r:[]):r&&w.isPlainObject(r)?r:{},o[n]=w.extend(d,r,t)):void 0!==t&&(o[n]=t));return o},w.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===w.type(e)},isArray:Array.isArray||function(e){return"array"===w.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!w.isArray(e)&&0<=t-parseFloat(t)+1},isEmptyObject:function(e){for(var t in e)return!1;return!0},isPlainObject:function(e){if(!e||"object"!==w.type(e)||e.nodeType||w.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!m.ownFirst)for(var t in e)return g.call(e,t);for(t in e);return void 0===t||g.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?R[B.call(e)]||"object":typeof e},globalEval:function(e){e&&w.trim(e)&&(C.execScript||function(e){C.eval.call(C,e)})(e)},camelCase:function(e){return e.replace(U,"ms-").replace(q,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(z(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(W,"")},makeArray:function(e,t){t=t||[];return null!=e&&(z(Object(e))?w.merge(t,"string"==typeof e?[e]:e):F.call(t,e)),t},inArray:function(e,t,n){var i;if(t){if(Q)return Q.call(t,e,n)