inputmask.dependencyLib.jqlite.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*!
  2. * dependencyLibs/inputmask.dependencyLib.jqlite.js
  3. * https://github.com/RobinHerbots/Inputmask
  4. * Copyright (c) 2010 - 2018 Robin Herbots
  5. * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  6. * Version: 4.0.0-91
  7. */
  8. !function(factory) {
  9. "function" == typeof define && define.amd ? define([ "jqlite", "../global/window", "../global/document]" ], factory) : "object" == typeof exports ? module.exports = factory(require("jqlite"), require("../global/window"), require("../global/document")) : window.dependencyLib = factory(jqlite, window, document);
  10. }(function($, window, document) {
  11. function indexOf(list, elem) {
  12. for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
  13. return -1;
  14. }
  15. function isWindow(obj) {
  16. return null != obj && obj === obj.window;
  17. }
  18. function isArraylike(obj) {
  19. var length = "length" in obj && obj.length, ltype = typeof obj;
  20. return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || ("array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj));
  21. }
  22. return $.inArray = function(elem, arr, i) {
  23. return null == arr ? -1 : indexOf(arr, elem);
  24. }, $.isFunction = function(obj) {
  25. return "function" == typeof obj;
  26. }, $.isArray = Array.isArray, $.isPlainObject = function(obj) {
  27. return "object" == typeof obj && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
  28. }, $.extend = function() {
  29. var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
  30. for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
  31. i++), "object" == typeof target || $.isFunction(target) || (target = {}), i === length && (target = this,
  32. i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
  33. target !== (copy = options[name]) && (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
  34. clone = src && $.isArray(src) ? src : []) : clone = src && $.isPlainObject(src) ? src : {},
  35. target[name] = $.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
  36. return target;
  37. }, $.each = function(obj, callback) {
  38. var i = 0;
  39. if (isArraylike(obj)) for (var length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++) ; else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break;
  40. return obj;
  41. }, $.data = function(elem, name, data) {
  42. return $(elem).data(name, data);
  43. }, $.Event = $.Event || function(event, params) {
  44. params = params || {
  45. bubbles: !1,
  46. cancelable: !1,
  47. detail: void 0
  48. };
  49. var evt = document.createEvent("CustomEvent");
  50. return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
  51. evt;
  52. }, $.Event.prototype = window.Event.prototype, $;
  53. });