WebUI/AchieveManageWeb/Scripts/knockout-2.2.0.js
(开头部分) 53KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* NUGET: BEGIN LICENSE TEXT
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
// Knockout JavaScript library v2.2.0
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
(function () {
function i(v) { throw v; } var l = !0, n = null, q = !1; function t(v) { return function () { return v } }; var w = window, x = document, fa = navigator, E = window.jQuery, H = void 0;
function K(v) {
function ga(a, d, c, e, f) { var g = [], a = b.j(function () { var a = d(c, f) || []; 0 < g.length && (b.a.Xa(L(g), a), e && b.r.K(e, n, [c, a, f])); g.splice(0, g.length); b.a.P(g, a) }, n, { W: a, Ja: function () { return 0 == g.length || !b.a.X(g[0]) } }); return { M: g, j: a.oa() ? a : H } } function L(a) { for (; a.length && !b.a.X(a[0]) ;) a.splice(0, 1); if (1 < a.length) { for (var d = a[0], c = a[a.length - 1], e = [d]; d !== c;) { d = d.nextSibling; if (!d) return; e.push(d) } Array.prototype.splice.apply(a, [0, a.length].concat(e)) } return a } function R(a, b, c, e, f) {
var g = Math.min,
h = Math.max, j = [], k, m = a.length, p, r = b.length, u = r - m || 1, F = m + r + 1, I, z, y; for (k = 0; k <= m; k++) { z = I; j.push(I = []); y = g(r, k + u); for (p = h(0, k - 1) ; p <= y; p++) I[p] = p ? k ? a[k - 1] === b[p - 1] ? z[p - 1] : g(z[p] || F, I[p - 1] || F) + 1 : p + 1 : k + 1 } g = []; h = []; u = []; k = m; for (p = r; k || p;) r = j[k][p] - 1, p && r === j[k][p - 1] ? h.push(g[g.length] = { status: c, value: b[--p], index: p }) : k && r === j[k - 1][p] ? u.push(g[g.length] = { status: e, value: a[--k], index: k }) : (g.push({ status: "retained", value: b[--p] }), --k); if (h.length && u.length) for (var a = 10 * m, s, b = c = 0; (f || b < a) && (s = h[c]) ; c++) {
for (e =
0; j = u[e]; e++) if (s.value === j.value) { s.moved = j.index; j.moved = s.index; u.splice(e, 1); b = e = 0; break } b += e
} return g.reverse()
} function S(a, d, c, e, f) {
var f = f || {}, g = a && M(a), g = g && g.ownerDocument, h = f.templateEngine || N; b.ya.ub(c, h, g); c = h.renderTemplate(c, e, f, g); ("number" != typeof c.length || 0 < c.length && "number" != typeof c[0].nodeType) && i(Error("Template engine must return an array of DOM nodes")); g = q; switch (d) {
case "replaceChildren": b.e.N(a, c); g = l; break; case "replaceNode": b.a.Xa(a, c); g = l; break; case "ignoreTargetNode": break;
default: i(Error("Unknown renderMode: " + d))
} g && (T(c, e), f.afterRender && b.r.K(f.afterRender, n, [c, e.$data])); return c
} function M(a) { return a.nodeType ? a : 0 < a.length ? a[0] : n } function T(a, d) { if (a.length) { var c = a[0], e = a[a.length - 1]; U(c, e, function (a) { b.Ca(d, a) }); U(c, e, function (a) { b.s.hb(a, [d]) }) } } function U(a, d, c) { for (var e, d = b.e.nextSibling(d) ; a && (e = a) !== d;) a = b.e.nextSibling(e), (1 === e.nodeType || 8 === e.nodeType) && c(e) } function V(a, d, c) {
for (var a = b.g.aa(a), e = b.g.Q, f = 0; f < a.length; f++) {
var g = a[f].key; if (e.hasOwnProperty(g)) {
var h =
e[g]; "function" === typeof h ? (g = h(a[f].value)) && i(Error(g)) : h || i(Error("This template engine does not support the '" + g + "' binding within its templates"))
}
} a = "ko.__tr_ambtns(function($context,$element){return(function(){return{ " + b.g.ba(a) + " } })()})"; return c.createJavaScriptEvaluatorBlock(a) + d
} function W(a, d, c, e) {
function f(a) { return function () { return j[a] } } function g() { return j } var h = 0, j, k; b.j(function () {
var m = c && c instanceof b.z ? c : new b.z(b.a.d(c)), p = m.$data; e && b.cb(a, m); if (j = ("function" == typeof d ?
d(m, a) : d) || b.J.instance.getBindings(a, m)) {
if (0 === h) { h = 1; for (var r in j) { var u = b.c[r]; u && 8 === a.nodeType && !b.e.I[r] && i(Error("The binding '" + r + "' cannot be used with virtual elements")); if (u && "function" == typeof u.init && (u = (0, u.init)(a, f(r), g, p, m)) && u.controlsDescendantBindings) k !== H && i(Error("Multiple bindings (" + k + " and " + r + ") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")), k = r } h = 2 } if (2 === h) for (r in j) (u = b.c[r]) && "function" ==
typeof u.update && (0, u.update)(a, f(r), g, p, m)
}
}, n, { W: a }); return { Mb: k === H }
} function X(a, d, c) { var e = l, f = 1 === d.nodeType; f && b.e.Sa(d); if (f && c || b.J.instance.nodeHasBindings(d)) e = W(d, n, a, c).Mb; e && Y(a, d, !f) } function Y(a, d, c) { for (var e = b.e.firstChild(d) ; d = e;) e = b.e.nextSibling(d), X(a, d, c) } function Z(a, b) { var c = $(a, b); return c ? 0 < c.length ? c[c.length - 1].nextSibling : a.nextSibling : n } function $(a, b) {
for (var c = a, e = 1, f = []; c = c.nextSibling;) { if (G(c) && (e--, 0 === e)) return f; f.push(c); A(c) && e++ } b || i(Error("Cannot find closing comment tag to match: " +
a.nodeValue)); return n
} function G(a) { return 8 == a.nodeType && (J ? a.text : a.nodeValue).match(ha) } function A(a) { return 8 == a.nodeType && (J ? a.text : a.nodeValue).match(ia) } function O(a, b) { for (var c = n; a != c;) c = a, a = a.replace(ja, function (a, c) { return b[c] }); return a } function ka() { var a = [], d = []; this.save = function (c, e) { var f = b.a.i(a, c); 0 <= f ? d[f] = e : (a.push(c), d.push(e)) }; this.get = function (c) { c = b.a.i(a, c); return 0 <= c ? d[c] : H } } function aa(a, b, c) {
function e(e) {
var g = b(a[e]); switch (typeof g) {
case "boolean": case "number": case "string": case "function": f[e] =
g; break; case "object": case "undefined": var h = c.get(g); f[e] = h !== H ? h : aa(g, b, c)
}
} c = c || new ka; a = b(a); if (!("object" == typeof a && a !== n && a !== H && !(a instanceof Date))) return a; var f = a instanceof Array ? [] : {}; c.save(a, f); var g = a; if (g instanceof Array) { for (var h = 0; h < g.length; h++) e(h); "function" == typeof g.toJSON && e("toJSON") } else for (h in g) e(h); return f
} function ba(a, d) {
if (a) if (8 == a.nodeType) { var c = b.s.Ta(a.nodeValue); c != n && d.push({ rb: a, Eb: c }) } else if (1 == a.nodeType) for (var c = 0, e = a.childNodes, f = e.length; c < f; c++) ba(e[c],
d)
后面还有 282 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。