inputmask.dependencyLib.min.js 4.1 KB

12345678
  1. /*!
  2. * inputmask.dependencyLib.min.js
  3. * http://github.com/RobinHerbots/jquery.inputmask
  4. * Copyright (c) 2010 - 2015 Robin Herbots
  5. * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  6. * Version: 3.2.1-104
  7. */
  8. !function(a){"function"==typeof define&&define.amd?define(a):"object"==typeof exports?module.exports=a():a()}(function(){function a(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function b(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?f[f.toString.call(a)]||"object":typeof a}function c(a){var b="length"in a&&a.length,c=jQuery.type(a);return"function"===c||jQuery.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a){void 0!==a&&null!==a&&(this[0]=a,this[0].eventRegistry=this[0].eventRegistry||{})}function e(a){return this instanceof e?void 0:new d(a)}for(var f={},g="Boolean Number String Function Array Date RegExp Object Error".split(" "),h=0;h<g.length;h++)f["[object "+g[h]+"]"]=g[h].toLowerCase();var i=function(){var a=[];for(var b in document)"on"!==b.substring(0,2)||null!==document[b]&&"function"!=typeof document[b]||a.push(b.substring(2));return a}();return d.prototype={on:function(a,b){function c(a,c){-1!==i.indexOf(a)&&"global"===c&&(e.addEventListener?e.addEventListener(a,b,!1):e.attachEvent&&e.attachEvent("on"+a,b)),d[a]=d[a]||{},d[a][c]=d[a][c]||[],d[a][c].push(b)}if(void 0!==this[0])for(var d=this[0].eventRegistry,e=this[0],f=a.split(" "),g=0;g<f.length;g++){var h=f[g].split("."),j=h[0],k=h[1]||"global";c(j,k),"global"!==k&&c(j,"global")}return this},off:function(a,b){function c(a,c){a in e==!0&&(-1!==i.indexOf(a)&&(f.removeEventListener?f.removeEventListener(a,b,!1):f.detachEvent&&f.detachEvent("on"+a,b)),e[a][c].splice(e[a][c].indexOf(b),1),"global"!==c&&e[a].global.splice(e[a].global.indexOf(b),1))}function d(a,b){var c=[];return c.push({ev:a,namespace:b}),c}if(void 0!==this[0])for(var e=this[0].eventRegistry,f=this[0],g=a.split(" "),h=0;h<g.length;h++)for(var j=g[h].split("."),k=d(j[0],j[1]),l=0,m=k.length;m>l;l++)c(k[l].ev,k[l].namespace);return this},trigger:function(a){if(void 0!==this[0])for(var b=this[0].eventRegistry,c=this[0],d=a.split(" "),f=0;f<d.length;f++){var g=d[f].split("."),h=g[0],j=g[1]||"global";if(-1!==i.indexOf(h)&&"global"===j){var k;document.createEvent?(k=new CustomEvent(h,{detail:Array.prototype.slice.call(arguments,1)}),c.dispatchEvent(k)):(k=document.createEventObject(),k.eventType=h,c.fireEvent("on"+k.eventType,k))}else if(void 0!==b[h])for(var l=0;l<b[h][j].length;l++)arguments[0]=arguments[0].type?arguments[0]:e.Event(arguments[0]),b[h][j][l].apply(this,arguments)}return this}},e.isFunction=function(a){return"function"===b(a)},e.noop=function(){},e.parseJSON=function(a){return JSON.parse(a+"")},e.isArray=Array.isArray,e.inArray=function(b,c,d){return null==c?-1:a(c,b,d)},e.valHooks=void 0,e.isWindow=function(a){return null!=a&&a===a.window},e.isPlainObject=function(a){return"object"!==b(a)||a.nodeType||e.isWindow(a)?!1:a.constructor&&!f.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},e.extend=function(){var a,b,c,d,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[i]||{},i++),"object"==typeof h||e.isFunction(h)||(h={}),i===j&&(h=this,i--);j>i;i++)if(null!=(a=arguments[i]))for(b in a)c=h[b],d=a[b],h!==d&&(k&&d&&(e.isPlainObject(d)||(f=e.isArray(d)))?(f?(f=!1,g=c&&e.isArray(c)?c:[]):g=c&&e.isPlainObject(c)?c:{},h[b]=e.extend(k,g,d)):void 0!==d&&(h[b]=d));return h},e.each=function(a,b){var d,e=0;if(c(a))for(var f=a.length;f>e&&(d=b.call(a[e],e,a[e]),d!==!1);e++);else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},e.map=function(a,b){var d,e=0,f=a.length,g=c(a),h=[];if(g)for(;f>e;e++)d=b(a[e],e),null!=d&&h.push(d);else for(e in a)d=b(a[e],e),null!=d&&h.push(d);return[].concat(h)},e.Event=function(a){return{preventDefault:e.noop,altKey:!1,charCode:0,ctrlKey:!1,currentTarget:null,keyCode:0,metaKey:!1,shiftKey:!1,target:null,type:a,which:0}},e.data=function(a,b,c){return void 0===c?a.__data?a.__data[b]:null:(a.__data=a.__data||{},void(a.__data[b]=c))},window.dependencyLib=e,e});