prolab-api/vendor/bower-asset/inputmask/lib/dependencyLibs/inputmask.dependencyLib.js

42 lines
998 B
JavaScript
Raw Normal View History

2025-09-24 06:24:52 +00:00
/*
Input Mask plugin dependencyLib
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) Robin Herbots
Licensed under the MIT license
*/
2025-10-03 11:00:05 +00:00
import extend from "./extend";
2025-09-24 06:24:52 +00:00
import window from "../global/window";
import data from "./data";
2025-10-03 11:00:05 +00:00
import { on, off, trigger, Event} from "./events";
2025-09-24 06:24:52 +00:00
const document = window.document;
function DependencyLib(elem) {
2025-10-03 11:00:05 +00:00
if (elem instanceof DependencyLib) {
return elem;
}
if (!(this instanceof DependencyLib)) {
return new DependencyLib(elem);
}
if (elem !== undefined && elem !== null && elem !== window) {
this[0] = elem.nodeName ? elem : (elem[0] !== undefined && elem[0].nodeName ? elem[0] : document.querySelector(elem));
if (this[0] !== undefined && this[0] !== null) {
this[0].eventRegistry = this[0].eventRegistry || {};
}
}
2025-09-24 06:24:52 +00:00
}
DependencyLib.prototype = {
2025-10-03 11:00:05 +00:00
on: on,
off: off,
trigger: trigger
2025-09-24 06:24:52 +00:00
};
2025-10-03 11:00:05 +00:00
//static
2025-09-24 06:24:52 +00:00
DependencyLib.extend = extend;
DependencyLib.data = data;
DependencyLib.Event = Event;
export default DependencyLib;