window define window define function name deps callback callback deps

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
window.define = window.define || function(name, deps, callback) {
(callback || deps || name)()
};
(function() {
var global = window, ajs = {}, _tmp_;
_tmp_ = "%BUILD.VERSION%";
if (!parseFloat(_tmp_))
_tmp_ = "0.13.0";
ajs["version"] = _tmp_;
global["ajs" + ajs["version"]] = ajs;
if (!global["ajs"])
global["ajs"] = ajs;
if (!Function.prototype.bind)
Function.prototype.bind = function(context) {
var self = this;
if (arguments.length > 1) {
var args = _Array_slice_.call(arguments, 1);
return function() {
return self.apply(context, args.concat(_Array_slice_.call(arguments, 0)))
}
} else
return function() {
return self.apply(context, arguments)
}
};
var _document =
global.document, _browser_msie = "attachEvent"in _document && "all"in _document && "uniqueID"in _document.documentElement&&+((/msie (\d+)/i.exec(navigator.userAgent) || [])[1] || 0) || null, RE_dot = /\./g, RE_num = /^\d+/, RE_unsafe_space = /\s+/, RE_linebreaks = /[\r\n\t]/g, classAttr = "className", getElement = "getElement", getElementById = getElement + "ById", getElementsByClassName = getElement + "sByClassName", getElementsByTagName = getElement + "sByTagName", IS_ADD_EVENT_LISTENER_SUPPORT = "addEventListener"in _document, IEEventHandlers =
!IS_ADD_EVENT_LISTENER_SUPPORT && {}, addEventListener = IS_ADD_EVENT_LISTENER_SUPPORT ? "addEventListener": "attachEvent", removeEventListener = IS_ADD_EVENT_LISTENER_SUPPORT ? "removeEventListener": "detachEvent", querySelectorSupport=!!_document.querySelectorAll, cssNumber = {
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
}, _Array_slice_ = (_tmp_ = Array.prototype).slice, _Array_forEach_ = _tmp_.forEach, _Array_filter_ = _tmp_.filter, _Array_reduce_ =
_tmp_.reduce, _Array_every_ = _tmp_.every, _Array_some_ = _tmp_.some, RE_left_spaces = /^\s+/, RE_space = /\s/, NEED_PREPARE_STRING = function(strObj) {
return strObj[0] != "a" ||!(0 in strObj)
}(Object("a")), _toObject = function(obj, _allowNull) {
if (obj == null&&!_allowNull)
throw new TypeError;
if (NEED_PREPARE_STRING && typeof obj == "string" && obj)
return String.prototype.split.call(obj, "");
return Object(obj)
}, _String_trim_ = String.prototype.trim || function() {
var str = this.replace(RE_left_spaces, ""), i = str.length;
while (RE_space.test(str.charAt(--i)));
return str.slice(0, i + 1)
}, _String_contains, _String_trim_whitespace = "\t\n\x0B\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff", _String_trim_beginRegexp, _String_trim_endRegexp, _Function_apply_ = Function.prototype.apply, _Function_call_ = Function.prototype.call, _call_function = function(_function, context, var_args) {
return _Function_apply_.call(_function, context, _Array_slice_.call(arguments, 2))
}, _hasOwnProperty = _Function_call_.bind(Object.prototype.hasOwnProperty),
IS_SUPPORT_CLASSLIST = "classList"in _document.documentElement && function(el) {
el["classList"].add(1, 2);
return el["classList"].contains(2) ? 2 : 1
}(_document.createElement("b")), $_addClass_helper, $_removeClass_helper, UUID_PREFIX = ("_" + Math.random()).substr(3, 6), HANDLER_UUID_PROPNAME = "uuid" + UUID_PREFIX, _toString_ = Object.prototype.toString, array_for_escape_and_unescape, array_some_or_every;
if (!String.prototype["contains"])