Файловый менеджер - Редактировать - /home/harasnat/www/sommer/media/system/js/fields/validate-es5.min.js
Назад
(function(){"use strict";function C(s,n){for(var l=0;l<n.length;l++){var f=n[l];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(s,G(f.key),f)}}function Z(s,n,l){return n&&C(s.prototype,n),l&&C(s,l),Object.defineProperty(s,"prototype",{writable:!1}),s}function K(s,n){if(s){if(typeof s=="string")return k(s,n);var l=Object.prototype.toString.call(s).slice(8,-1);if(l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set")return Array.from(s);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return k(s,n)}}function k(s,n){(n==null||n>s.length)&&(n=s.length);for(var l=0,f=new Array(n);l<n;l++)f[l]=s[l];return f}function w(s,n){var l=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(l)return(l=l.call(s)).next.bind(l);if(Array.isArray(s)||(l=K(s))||n&&s&&typeof s.length=="number"){l&&(s=l);var f=0;return function(){return f>=s.length?{done:!0}:{done:!1,value:s[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q(s,n){if(typeof s!="object"||s===null)return s;var l=s[Symbol.toPrimitive];if(l!==void 0){var f=l.call(s,n||"default");if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(s)}function G(s){var n=Q(s,"string");return typeof n=="symbol"?n:String(n)}(function(){var s=2147483647,n=36,l=1,f=26,W=38,X=700,R=72,N=128,J="-",Y=/^xn--/,P=/[^\0-\x7F]/,rr=/[\x2E\u3002\uFF0E\uFF61]/g,tr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=n-l,b=Math.floor,_=String.fromCharCode;function L(u){throw new RangeError(tr[u])}function ar(u,e){for(var i=[],r=u.length;r--;)i[r]=e(u[r]);return i}function H(u,e){var i=u.split("@"),r="";i.length>1&&(r=i[0]+"@",u=i[1]),u=u.replace(rr,".");var t=u.split("."),a=ar(t,e).join(".");return r+a}function O(u){for(var e=[],i=0,r=u.length;i<r;){var t=u.charCodeAt(i++);if(t>=55296&&t<=56319&&i<r){var a=u.charCodeAt(i++);(a&64512)==56320?e.push(((t&1023)<<10)+(a&1023)+65536):(e.push(t),i--)}else e.push(t)}return e}var er=function(e){return String.fromCodePoint.apply(String,e)},ir=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:n},T=function(e,i){return e+22+75*(e<26)-((i!=0)<<5)},D=function(e,i,r){var t=0;for(e=r?b(e/X):e>>1,e+=b(e/i);e>F*f>>1;t+=n)e=b(e/F);return b(t+(F+1)*e/(e+W))},M=function(e){var i=[],r=e.length,t=0,a=N,o=R,c=e.lastIndexOf(J);c<0&&(c=0);for(var v=0;v<c;++v)e.charCodeAt(v)>=128&&L("not-basic"),i.push(e.charCodeAt(v));for(var d=c>0?c+1:0;d<r;){for(var h=t,g=1,p=n;;p+=n){d>=r&&L("invalid-input");var A=ir(e.charCodeAt(d++));A>=n&&L("invalid-input"),A>b((s-t)/g)&&L("overflow"),t+=A*g;var m=p<=o?l:p>=o+f?f:p-o;if(A<m)break;var x=n-m;g>b(s/x)&&L("overflow"),g*=x}var y=i.length+1;o=D(t-h,y,h==0),b(t/y)>s-a&&L("overflow"),a+=b(t/y),t%=y,i.splice(t++,0,a)}return String.fromCodePoint.apply(String,i)},V=function(e){var i=[];e=O(e);for(var r=e.length,t=N,a=0,o=R,c=w(e),v;!(v=c()).done;){var d=v.value;d<128&&i.push(_(d))}var h=i.length,g=h;for(h&&i.push(J);g<r;){for(var p=s,A=w(e),m;!(m=A()).done;){var x=m.value;x>=t&&x<p&&(p=x)}var y=g+1;p-t>b((s-a)/y)&&L("overflow"),a+=(p-t)*y,t=p;for(var lr=w(e),B;!(B=lr()).done;){var j=B.value;if(j<t&&++a>s&&L("overflow"),j===t){for(var I=a,S=n;;S+=n){var E=S<=o?l:S>=o+f?f:S-o;if(I<E)break;var U=I-E,$=n-E;i.push(_(T(E+U%$,0))),I=b(U/$)}i.push(_(T(I,0))),o=D(a,y,g===h),a=0,++g}}++a,++t}return i.join("")},sr=function(e){return H(e,function(i){return Y.test(i)?M(i.slice(4).toLowerCase()):i})},or=function(e){return H(e,function(i){return P.test(i)?"xn--"+V(i):i})},q={version:"2.3.1",ucs2:{decode:O,encode:er},decode:M,encode:V,toASCII:or,toUnicode:sr};/** * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */var z=function(){function u(){var i=this;this.customValidators={},this.handlers=[],this.handlers={},this.removeMarking=this.removeMarking.bind(this),this.inputEmail=function(){var t=document.createElement("input");return t.setAttribute("type","email"),t.type!=="text"},this.setHandler("username",function(t){var a=/[<|>|"|'|%|;|(|)|&]/i;return!a.test(t)}),this.setHandler("password",function(t){var a=/^\S[\S ]{2,98}\S$/;return a.test(t)}),this.setHandler("numeric",function(t){var a=/^(\d|-)?(\d|,)*\.?\d*$/;return a.test(t)}),this.setHandler("email",function(t){var a=q.toASCII(t),o=/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;return o.test(a)});var r=[].slice.call(document.querySelectorAll("form"));r.forEach(function(t){t.classList.contains("form-validate")&&i.attachToForm(t)})}var e=u.prototype;return e.setHandler=function(r,t,a){var o=a===""?!0:a;this.handlers[r]={enabled:o,exec:t}},e.markValid=function(r){var t=r.form.querySelector('label[for="'+r.id+'"]'),a;(r.classList.contains("required")||r.getAttribute("required"))&&t&&(a=t.querySelector("span.form-control-feedback")),r.classList.remove("form-control-danger"),r.classList.remove("invalid"),r.classList.add("form-control-success"),r.parentNode.classList.remove("has-danger"),r.parentNode.classList.add("has-success"),r.setAttribute("aria-invalid","false"),a&&a.parentNode.removeChild(a),t&&t.classList.remove("invalid")},e.markInvalid=function(r,t){var a=r.form.querySelector('label[for="'+r.id+'"]');r.classList.remove("form-control-success"),r.classList.remove("valid"),r.classList.add("form-control-danger"),r.classList.add("invalid"),r.parentNode.classList.remove("has-success"),r.parentNode.classList.add("has-danger"),r.setAttribute("aria-invalid","true");var o,c=r.getAttribute("data-validation-text");if(a&&(o=a.querySelector("span.form-control-feedback")),!o){var v=document.createElement("span");v.classList.add("form-control-feedback"),t&&t==="checkbox"?v.innerHTML=c!==null?Joomla.sanitizeHtml(c):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_CHECK")):t&&t==="value"?v.innerHTML=c!==null?Joomla.sanitizeHtml(c):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_REQUIRED_VALUE")):v.innerHTML=c!==null?Joomla.sanitizeHtml(c):Joomla.sanitizeHtml(Joomla.Text._("JLIB_FORM_FIELD_INVALID_VALUE")),a&&a.appendChild(v)}a&&a.classList.add("invalid")},e.removeMarking=function(r){var t,a=r.form.querySelector('label[for="'+r.id+'"]');a&&(t=a.querySelector("span.form-control-feedback")),r.classList.remove("form-control-danger"),r.classList.remove("form-control-success"),r.classList.remove("invalid"),r.classList.add("valid"),r.parentNode.classList.remove("has-danger"),r.parentNode.classList.remove("has-success"),t&&a&&a.removeChild(t),a&&a.classList.remove("invalid")},e.handleResponse=function(r,t,a){var o=t.tagName.toLowerCase();(o!=="button"&&t.value!==void 0||o==="fieldset")&&(r===!1?this.markInvalid(t,a):this.markValid(t))},e.validate=function(r){var t;if(r.getAttribute("disabled")==="disabled"||r.getAttribute("display")==="none")return this.handleResponse(!0,r),!0;if(r.getAttribute("required")||r.classList.contains("required"))if(t=r.tagName.toLowerCase(),t==="fieldset"&&(r.classList.contains("radio")||r.classList.contains("checkboxes"))){if(r.querySelector("input:checked")===null)return this.handleResponse(!1,r,"checkbox"),!1}else{if(r.getAttribute("type")==="checkbox"&&r.checked!==!0||t==="select"&&!r.value.length)return this.handleResponse(!1,r,"checkbox"),!1;if(!r.value||r.classList.contains("placeholder"))return this.handleResponse(!1,r,"value"),!1}var a=r.getAttribute("class")&&r.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)?r.getAttribute("class").match(/validate-([a-zA-Z0-9_-]+)/)[1]:"";if(r.getAttribute("pattern")&&r.getAttribute("pattern")!==""){if(r.value.length){var o=new RegExp("^"+r.getAttribute("pattern")+"$").test(r.value);return this.handleResponse(o,r,"empty"),o}return r.hasAttribute("required")||r.classList.contains("required")?(this.handleResponse(!1,r,"empty"),!1):(this.handleResponse(!0,r),!0)}return a===""?(this.handleResponse(!0,r),!0):a&&a!=="none"&&this.handlers[a]&&r.value&&this.handlers[a].exec(r.value,r)!==!0?(this.handleResponse(!1,r,"invalid_value"),!1):(this.handleResponse(!0,r),!0)},e.isValid=function(r){var t=this,a=!0,o,c,v,d=[];return r.nodeName==="FORM"?v=[].slice.call(r.elements):v=[].slice.call(r.querySelectorAll("input, textarea, select, button, fieldset")),v.forEach(function(h){t.validate(h)===!1&&(a=!1,d.push(h))}),Object.keys(this.customValidators).length&&Object.keys(this.customValidators).foreach(function(h){t.customValidators[h].exec()!==!0&&(a=!1)}),!a&&d.length>0&&(r.getAttribute("data-validation-text")?o=r.getAttribute("data-validation-text"):o=Joomla.Text._("JLIB_FORM_CONTAINS_INVALID_FIELDS"),c={error:[o]},Joomla.renderMessages(c)),a},e.attachToForm=function(r){var t=this,a;r.nodeName==="FORM"?a=[].slice.call(r.elements):a=[].slice.call(r.querySelectorAll("input, textarea, select, button, fieldset")),a.forEach(function(o){var c=o.tagName.toLowerCase();["input","textarea","select","fieldset"].indexOf(c)>-1&&o.classList.contains("required")&&o.setAttribute("required",""),(c==="input"||c==="button")&&(o.getAttribute("type")==="submit"||o.getAttribute("type")==="image")?o.classList.contains("validate")&&o.addEventListener("click",function(){return t.isValid(r)}):c!=="button"&&!(c==="input"&&o.getAttribute("type")==="button")&&c!=="fieldset"&&(o.addEventListener("blur",function(v){var d=v.target;return t.validate(d)}),o.addEventListener("focus",function(v){var d=v.target;return t.removeMarking(d)}),o.classList.contains("validate-email")&&t.inputEmail&&o.setAttribute("type","email"))})},Z(u,[{key:"custom",get:function(){return this.customValidators},set:function(r){this.customValidators=r}}]),u}(),nr=function u(){document.formvalidator=new z,document.removeEventListener("DOMContentLoaded",u)};document.addEventListener("DOMContentLoaded",nr),window.JFormValidator=z,window.punycode=q})()})();
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка