ok
Direktori : /home2/selectio/www/subamangala/admin/autocomplete/dist/ |
Current File : /home2/selectio/www/subamangala/admin/autocomplete/dist/disableautofill.min.js |
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(function(){return(()=>{var e={739:(e,t,n)=>{const o=n(9),i=n(756);n.g.DAF_DEBUG=!1;e.exports=class{constructor(e){this.setting={form:null,fields:[],asterisk:"●",debug:!1,callback:null},Object.keys(this.setting).forEach((t=>{void 0!==e[t]&&(this.setting[t]=e[t])}))}init(){i("info","DisableAutoFill.js is initialized."),Array.prototype.insert=function(e,t){this.splice(e,0,t)};let e=this.setting.form,t=this.setting.fields,n=this.setting.asterisk,r=this.setting.callback;this.setting.debug&&(DAF_DEBUG=!0),o(e,t,n,r)}}},756:e=>{"use strict";e.exports=function(e,t,n){let o,i,r,s,l=!1;switch("undefined"!=typeof DAF_DEBUG&&(l=DAF_DEBUG),e){case"error":o="color: #e60012",i="color: #c55f67";break;case"info":o="color: #00a0e9",i="color: #458ca2";break;case"warning":o="color: #eb6100",i="color: #c09374";break;case"debug":o="color: #920783",i="color: #8957a1";break;default:return null}r="color: #333333",s="%c["+e+"] %cDAF: %c"+t,l&&(setTimeout(console.log.bind(console,s,o,i,"color: #333333")),null!=n&&setTimeout(console.log(n)))}},996:(e,t,n)=>{"use strict";const o=n(83),i=n(756);var r=[],s=[],l=[];e.exports=function(e,t,n,a){e.id||(e.id=Math.random().toString(36).substring(5)),r.hasOwnProperty(e.id)||(r[e.id]=[]);let c=r[e.id];s[e.id]=e.value;let u=s[e.id];l[e.id]=u.length;let d=l[e.id],f=e.selectionStart;for(let e=0;e<d;e++)u[e]!==n&&(c[e]=u[e]);if(d<c.length){var g=c.length-d,p=t.keyCode||t.charCode;8==p||46==p?c.splice(f,g):(c.splice(f-1,g+1),c.insert(f-1,u[f-1]))}e.value=u.replace(/./g,n);let b=o(e,c);"randomize"===a?b.randomize():"restore"===a&&b.restore(),i("debug","Current keyup position: "+f),i("debug","Password length: "+d),i("debug","Password: ",c)}},9:(e,t,n)=>{"use strict";const o=n(756),i=n(996);e.exports=function(e,t,n,r){let s=null,l=e=>0==e.indexOf(".")?document.getElementsByClassName(e.substring(1))[0]:0==e.indexOf("#")?document.getElementById(e.substring(1)):void 0;return s=l(e),null!==s?(s.addEventListener("keyup",(e=>{t.forEach(((t,r)=>{let s={};s[r]=l(t),void 0!==s[r]?(o("info","Keyup event "+r+" is triggered!"),i(s[r],e,n,"randomize")):o("warning",'The field called "'+t+'" is not found.')}))})),s.addEventListener("submit",(e=>{e.preventDefault();let a=new Promise(((r,s)=>{t.forEach(((t,a)=>{let c={};return c[a]=l(t),void 0!==c[a]?(i(c[a],e,n,"restore"),r()):(o("warning",'The field called "'+t+'" is not found.'),s())}))}));"function"==typeof r?a.then((()=>{r(s)?s.submit():o("warning","Callback returned false.")})):a.then((()=>{s.submit()}))}))):o("warning",'Form element "'+e+'" not found.'),null}},83:e=>{"use strict";var t={},n={};e.exports=function(e,o){let i={},r=e,s=o;return i.randomize=function(){let e=r.id,o=Math.random().toString(36).replace(/[^a-z]+/g,"");t[e]||(t[e]=r.name),n[t[e]]?r.name=n[t[e]]:(r.name=o,n[t[e]]=o)},i.restore=function(){r.name=t[r.id],r.value=s.join("")},i}}},t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var o;return o=n(739),"undefined"!=typeof window&&(window.disableautofill=o),{}})()})); //# sourceMappingURL=disableautofill.min.js.map