ok
Direktori : /home2/selectio/www/subamangala/admin/autocomplete/dist/ |
Current File : /home2/selectio/www/subamangala/admin/autocomplete/dist/jquery.disableautofill.js.map |
{"version":3,"sources":["webpack://disableautofill/webpack/universalModuleDefinition","webpack://disableautofill/./src/DisableAutoFill.js","webpack://disableautofill/./src/debug.js","webpack://disableautofill/./src/handler.js","webpack://disableautofill/./src/jquery.js","webpack://disableautofill/./src/listener.js","webpack://disableautofill/./src/randomizer.js","webpack://disableautofill/webpack/bootstrap","webpack://disableautofill/webpack/runtime/global","webpack://disableautofill/./index.jquery.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;ACTA,iBAAiB,mBAAO,CAAC,CAAU;AACnC,cAAc,mBAAO,CAAC,GAAO;;AAE7B;AACA,qBAAM;;AAEN;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iC;;;;;;;;ACvDa;;AAEb;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACtDa;;AAEb,mBAAmB,mBAAO,CAAC,EAAY;AACvC,cAAc,mBAAO,CAAC,GAAO;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;AClFA;;AAEA,0BAA0B,mBAAO,CAAC,GAAmB;;AAErD;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;;AC3BY;;AAEb,cAAc,mBAAO,CAAC,GAAO;AAC7B,gBAAgB,mBAAO,CAAC,GAAS;;AAEjC;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;;AAET,KAAK;AACL;AACA;AACA;AACA;;AAEA;;;;;;;;;AC3Fa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;UCvDA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA,CAAC,I;;;;;;;ACPD,mBAAO,CAAC,GAAc,E","file":"jquery.disableautofill.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn ","\nconst listener = require('listener');\nconst debug = require('debug');\n\n// Global variable for debug.js\nglobal.DAF_DEBUG = false;\n\n/**\n * This class is used as an initialization, defining the basic settings\n * and implementing the functionality of disabling autofill.\n */\nclass DisableAutoFill {\n\n constructor(setting) {\n\n // Default settings.\n this.setting = {\n 'form': null,\n 'fields': [],\n 'asterisk': '●',\n 'debug': false,\n 'callback': null,\n };\n \n Object.keys(this.setting).forEach(key => {\n if (typeof setting[key] !== 'undefined') {\n this.setting[key] = setting[key];\n }\n });\n }\n\n init() {\n\n debug('info', 'DisableAutoFill.js is initialized.');\n\n // Extends native Array.\n // This method will be used in handler.js\n Array.prototype.insert = function (index, item) {\n this.splice(index, 0, item);\n };\n\n let form = this.setting.form;\n let fields = this.setting.fields;\n let asterisk = this.setting.asterisk;\n let callback = this.setting.callback;\n\n if (this.setting.debug) {\n DAF_DEBUG = true;\n }\n\n // Magic happens here.\n listener(form, fields, asterisk, callback);\n }\n}\n\nmodule.exports = DisableAutoFill;","'use strict';\n\n /**\n * Print colorful messages to the browser console. \n * For debugging purpose.\n *\n * @param {string} level The level.\n * @param {string} message The message.\n * @param {mixed} data The data.\n * @return null\n */\nfunction debug(level, message, data) {\n let c1, c2, c3, msg;\n let print = false;\n\n // DAF_DEBUG is defined at DisableAutoFill.js\n if (typeof DAF_DEBUG !== 'undefined') {\n print = DAF_DEBUG;\n }\n\n switch (level) {\n case 'error':\n c1 = 'color: #e60012';\n c2 = 'color: #c55f67';\n break;\n case 'info':\n c1 = 'color: #00a0e9';\n c2 = 'color: #458ca2';\n break;\n case 'warning':\n c1 = 'color: #eb6100';\n c2 = 'color: #c09374';\n break;\n case 'debug':\n c1 = 'color: #920783';\n c2 = 'color: #8957a1';\n break;\n default:\n return null;\n }\n c3 = 'color: #333333';\n\n msg = '%c[' + level + '] %cDAF: %c' + message;\n\n if (print) {\n // Hide line number and source URL.\n setTimeout(console.log.bind(console, msg, c1, c2, c3));\n\n if (typeof data !== 'undefined' && data !== null) {\n setTimeout(console.log(data));\n }\n }\n}\n\nmodule.exports = debug;\n","'use strict';\n\nconst randomizer = require('randomizer');\nconst debug = require('debug');\n\n// Those variables are used as module scope containers.\nvar originalValue = [];\nvar tempValue = [];\nvar length = [];\n\n/**\n * Handler function handle the DOM is triggered.\n *\n * @param {object} obj The DOM element.\n * @param {orject} event The listening event.\n * @param {string} asterisk The asterisk symbol.\n * @param {string} action The randomizer's action. Option: randomize, restore\n */\nfunction handler(obj, event, asterisk, action) {\n\n if (!obj.id) {\n // Create a radom string for this DOM's id, if the id doesn't exist.\n obj.id = Math.random().toString(36).substring(5);\n }\n\n if (!originalValue.hasOwnProperty(obj.id)) {\n // Defind a empty array for this random id string.\n // We'd like to store the original value for restore it later.\n originalValue[obj.id] = [];\n }\n\n let orig = originalValue[obj.id];\n\n tempValue[obj.id] = obj.value;\n let temp = tempValue[obj.id];\n\n length[obj.id] = temp.length;\n let len = length[obj.id];\n\n // Get current keyup character position.\n let currKeyupPos = obj.selectionStart;\n\n for (let i = 0; i < len; i++) {\n if (temp[i] !== asterisk) {\n orig[i] = temp[i];\n }\n }\n\n if (len < orig.length) {\n var diff = orig.length - len;\n\n var key = event.keyCode || event.charCode;\n\n // Check if last keypress was backspace or delete\n if (key == 8 || key == 46) {\n orig.splice(currKeyupPos, diff);\n }\n // User highlighted and overwrote a portion of the password\n else {\n orig.splice(currKeyupPos - 1, diff + 1);\n orig.insert(currKeyupPos - 1, temp[currKeyupPos - 1]);\n }\n }\n\n // Mark password as asterrisk symbols.\n obj.value = temp.replace(/./g, asterisk);\n\n // Let's randomize the name attribute, preventing Chrome from remembering filled data.\n // We will resotre the real data back when performing form submission.\n let ran = randomizer(obj, orig);\n\n if (action === 'randomize') {\n ran.randomize();\n } else if (action === 'restore') {\n ran.restore();\n }\n\n debug('debug', 'Current keyup position: ' + currKeyupPos);\n debug('debug', 'Password length: ' + len);\n debug('debug', 'Password: ', orig);\n}\n\nmodule.exports = handler;\n","(function($) {\n\n var disableautofill = require('./DisableAutoFill');\n\n /**\n * Core function\n */\n $.fn.disableAutoFill = function(options) {\n var settings = $.extend(\n {}, \n $.fn.disableAutoFill.defaults, \n options\n );\n\n settings.form = '#' + this.attr('id');\n\n var daf = new disableautofill(settings);\n daf.init();\n };\n\n $.fn.disableAutoFill.defaults = {\n 'fields': [],\n 'asterisk': '●',\n 'debug': false,\n 'callback': null,\n };\n\n})(jQuery);\n","'use strict';\n\nconst debug = require('debug');\nconst handler = require('handler');\n\n /**\n * Event listener for password fields.\n * We'd like to hide the original password string with symbol characters.\n *\n * @param {string} form The form's .class or #id\n * @param {array} fields A collecition of the DOMs' .class or #id\n * @param {string} asterisk The asterisk symbol. (option)\n * @param {function} callback Generally the form validator.\n * @return null\n */\nfunction listener(form, fields, asterisk, callback) {\n let formDom = null;\n\n let getDom = text => {\n\n // text is a string of \"class\".\n if (text.indexOf('.') == 0) {\n return document.getElementsByClassName(\n text.substring(1)\n )[0];\n\n // text is a string of \"id\".\n } else if (text.indexOf('#') == 0) {\n return document.getElementById(\n text.substring(1)\n );\n }\n };\n\n formDom = getDom(form);\n\n if (formDom !== null) {\n formDom.addEventListener('keyup', event => {\n fields.forEach((field, i) => {\n let fieldDom = {};\n fieldDom[i] = getDom(field);\n\n if (typeof fieldDom[i] !== 'undefined') {\n debug('info', 'Keyup event ' + i + ' is triggered!');\n handler(fieldDom[i], event, asterisk, 'randomize');\n } else {\n debug('warning', 'The field called \"' + field + '\" is not found.');\n }\n });\n });\n\n formDom.addEventListener('submit', event => {\n event.preventDefault();\n\n let restorePassword = new Promise((resolve, reject) => {\n fields.forEach((field, i) => {\n let fieldDom = {};\n fieldDom[i] = getDom(field);\n \n if (typeof fieldDom[i] !== 'undefined') {\n handler(fieldDom[i], event, asterisk, 'restore');\n return resolve();\n } else {\n debug('warning', 'The field called \"' + field + '\" is not found.');\n return reject();\n }\n });\n });\n\n if (typeof callback === 'function') {\n restorePassword.then(() => {\n // Once restore the password successfully, run callback function to check the form.\n if (callback(formDom)) {\n formDom.submit();\n } else {\n debug('warning', 'Callback returned false.');\n }\n });\n } else {\n restorePassword.then(() => {\n formDom.submit();\n });\n }\n });\n\n } else {\n debug('warning', 'Form element \"' + form + '\" not found.');\n }\n return null;\n}\n\nmodule.exports = listener;\n","'use strict';\n\n// Those variables are used as module scope containers, for using on both methods.\nvar origName = {};\nvar tempName = {};\n\n/**\n * Randomize or recover the name attribute.\n *\n * @param {object} object The DOM.\n * @param {array} originalValue The original password.\n */\nfunction randomizer(object, originalValue) {\n \n\n let _instance = {};\n\n let obj = object;\n let orig = originalValue;\n\n /**\n * ramdomize\n *\n * Add random chars on \"name\" attribute to avid Browser remember what you submitted before.\n */\n _instance.randomize = function() {\n let id = obj.id;\n let randomName = Math.random().toString(36).replace(/[^a-z]+/g, '');\n\n if (!origName[id]) {\n origName[id] = obj.name;\n }\n\n if (tempName[origName[id]]) {\n obj.name = tempName[origName[id]];\n } else {\n obj.name = randomName;\n tempName[origName[id]] = randomName;\n }\n };\n\n /**\n * resote\n *\n * Remove random chars on \"name\" attribute, so we can submit correct data then.\n * Restore password from star signs to original input password.\n */\n _instance.restore = function() {\n obj.name = origName[obj.id];\n obj.value = orig.join('');\n };\n\n return _instance;\n}\n\nmodule.exports = randomizer;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","require('./src/jquery');"],"sourceRoot":""}