WebUI/AchieveManageWeb/kindeditor-4.1.3/kindeditor-min.js
(开头部分) 112KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* KindEditor 4.1.3 (2012-10-14), Copyright (C) kindsoft.net, Licence: http://www.kindsoft.net/license.php */(function (z, n) {
function W(a) { if (!a) return !1; return Object.prototype.toString.call(a) === "[object Array]" } function cb(a) { if (!a) return !1; return Object.prototype.toString.call(a) === "[object Function]" } function M(a, b) { for (var c = 0, d = b.length; c < d; c++) if (a === b[c]) return c; return -1 } function j(a, b) { if (W(a)) for (var c = 0, d = a.length; c < d; c++) { if (b.call(a[c], c, a[c]) === !1) break } else for (c in a) if (a.hasOwnProperty(c) && b.call(a[c], c, a[c]) === !1) break } function A(a) {
return a.replace(/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,
"")
} function sa(a, b, c) { c = c === n ? "," : c; return (c + b + c).indexOf(c + a + c) >= 0 } function r(a, b) { b = b || "px"; return a && /^\d+$/.test(a) ? a + b : a } function s(a) { var b; return a && (b = /(\d+)/.exec(a)) ? parseInt(b[1], 10) : 0 } function D(a) { return a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """) } function Fa(a) { return a.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/&/g, "&") } function da(a) {
var b = a.split("-"), a = ""; j(b, function (b, d) {
a += b > 0 ? d.charAt(0).toUpperCase() +
d.substr(1) : d
}); return a
} function ta(a) { function b(a) { a = parseInt(a, 10).toString(16).toUpperCase(); return a.length > 1 ? a : "0" + a } return a.replace(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/ig, function (a, d, f, g) { return "#" + b(d) + b(f) + b(g) }) } function u(a, b) { var b = b === n ? "," : b, c = {}, d = W(a) ? a : a.split(b), f; j(d, function (a, b) { if (f = /^(\d+)\.\.(\d+)$/.exec(b)) for (var d = parseInt(f[1], 10) ; d <= parseInt(f[2], 10) ; d++) c[d.toString()] = !0; else c[b] = !0 }); return c } function Ga(a, b) { return Array.prototype.slice.call(a, b || 0) }
function l(a, b) { return a === n ? b : a } function F(a, b, c) { c || (c = b, b = null); var d; if (b) { var f = function () { }; f.prototype = b.prototype; d = new f; j(c, function (a, b) { d[a] = b }) } else d = c; d.constructor = a; a.prototype = d; a.parent = b ? b.prototype : null } function db(a) {
var b; if (b = /\{[\s\S]*\}|\[[\s\S]*\]/.exec(a)) a = b[0]; b = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; b.lastIndex = 0; b.test(a) && (a = a.replace(b, function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }));
if (/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return eval("(" + a + ")"); throw "JSON parse error";
} function Qb(a, b, c) { a.addEventListener ? a.addEventListener(b, c, eb) : a.attachEvent && a.attachEvent("on" + b, c) } function ua(a, b, c) { a.removeEventListener ? a.removeEventListener(b, c, eb) : a.detachEvent && a.detachEvent("on" + b, c) } function fb(a, b) { this.init(a, b) } function gb(a) {
try { delete a[X] } catch (b) {
a.removeAttribute &&
a.removeAttribute(X)
}
} function Y(a, b, c) { if (b.indexOf(",") >= 0) j(b.split(","), function () { Y(a, this, c) }); else { var d = a[X] || null; d || (a[X] = ++hb, d = hb); v[d] === n && (v[d] = {}); var f = v[d][b]; f && f.length > 0 ? ua(a, b, f[0]) : (v[d][b] = [], v[d].el = a); f = v[d][b]; f.length === 0 && (f[0] = function (b) { var c = b ? new fb(a, b) : n; j(f, function (b, d) { b > 0 && d && d.call(a, c) }) }); M(c, f) < 0 && f.push(c); Qb(a, b, f[0]) } } function ea(a, b, c) {
if (b && b.indexOf(",") >= 0) j(b.split(","), function () { ea(a, this, c) }); else {
var d = a[X] || null; if (d) if (b === n) d in v && (j(v[d],
function (b, c) { b != "el" && c.length > 0 && ua(a, b, c[0]) }), delete v[d], gb(a)); else if (v[d]) { var f = v[d][b]; if (f && f.length > 0) { c === n ? (ua(a, b, f[0]), delete v[d][b]) : (j(f, function (a, b) { a > 0 && b === c && f.splice(a, 1) }), f.length == 1 && (ua(a, b, f[0]), delete v[d][b])); var g = 0; j(v[d], function () { g++ }); g < 2 && (delete v[d], gb(a)) } }
}
} function ib(a, b) { if (b.indexOf(",") >= 0) j(b.split(","), function () { ib(a, this) }); else { var c = a[X] || null; if (c) { var d = v[c][b]; if (v[c] && d && d.length > 0) d[0]() } } } function Ha(a, b, c) {
b = /^\d{2,}$/.test(b) ? b : b.toUpperCase().charCodeAt(0);
Y(a, "keydown", function (d) { d.ctrlKey && d.which == b && !d.shiftKey && !d.altKey && (c.call(a), d.stop()) })
} function fa(a) { for (var b = {}, c = /\s*([\w\-]+)\s*:([^;]*)(;|$)/g, d; d = c.exec(a) ;) { var f = A(d[1].toLowerCase()); d = A(ta(d[2])); b[f] = d } return b } function J(a) { for (var b = {}, c = /\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g, d; d = c.exec(a) ;) { var f = (d[1] || d[2] || d[4] || d[6]).toLowerCase(); b[f] = (d[2] ? d[3] : d[4] ? d[5] : d[7]) || "" } return b } function Rb(a, b) {
return a =
/\s+class\s*=/.test(a) ? a.replace(/(\s+class=["']?)([^"']*)(["']?[\s>])/, function (a, d, f, g) { return (" " + f + " ").indexOf(" " + b + " ") < 0 ? f === "" ? d + b + g : d + f + " " + b + g : a }) : a.substr(0, a.length - 1) + ' class="' + b + '">'
} function Sb(a) { var b = ""; j(fa(a), function (a, d) { b += a + ":" + d + ";" }); return b } function ga(a, b, c, d) {
function f(a) { for (var a = a.split("/"), b = [], c = 0, d = a.length; c < d; c++) { var f = a[c]; f == ".." ? b.length > 0 && b.pop() : f !== "" && f != "." && b.push(f) } return "/" + b.join("/") } function g(b, c) {
if (a.substr(0, b.length) === b) {
for (var f = [],
i = 0; i < c; i++) f.push(".."); i = "."; f.length > 0 && (i += "/" + f.join("/")); d == "/" && (i += "/"); return i + a.substr(b.length)
} else if (e = /^(.*)\//.exec(b)) return g(e[1], ++c)
} b = l(b, "").toLowerCase(); a.substr(0, 5) != "data:" && (a = a.replace(/([^:])\/\//g, "$1/")); if (M(b, ["absolute", "relative", "domain"]) < 0) return a; c = c || location.protocol + "//" + location.host; if (d === n) var i = location.pathname.match(/^(\/.*)\//), d = i ? i[1] : ""; var e; if (e = /^(\w+:\/\/[^\/]*)/.exec(a)) { if (e[1] !== c) return a } else if (/^\w+:/.test(a)) return a; /^\//.test(a) ?
a = c + f(a.substr(1)) : /^\w+:\/\//.test(a) || (a = c + f(d + "/" + a)); b === "relative" ? a = g(c + d, 0).substr(2) : b === "absolute" && a.substr(0, c.length) === c && (a = a.substr(c.length)); return a
} function R(a, b, c, d, f) {
var c = c || "", d = l(d, !1), f = l(f, "\t"), g = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","), a = a.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function (a, b, c, d) { return b + c.replace(/<(?:br|br\s[^>]*)>/ig, "\n") + d }), a = a.replace(/<(?:br|br\s[^>]*)\s*\/?>\s*<\/p>/ig, "</p>"), a = a.replace(/(<(?:p|p\s[^>]*)>)\s*(<\/p>)/ig,
"$1<br />$2"), a = a.replace(/\u200B/g, ""), a = a.replace(/\u00A9/g, "©"), i = {}; b && (j(b, function (a, b) { for (var c = a.split(","), d = 0, f = c.length; d < f; d++) i[c[d]] = u(b) }), i.script || (a = a.replace(/(<(?:script|script\s[^>]*)>)([\s\S]*?)(<\/script>)/ig, "")), i.style || (a = a.replace(/(<(?:style|style\s[^>]*)>)([\s\S]*?)(<\/style>)/ig, ""))); var e = [], a = a.replace(/([ \t\n\r]*)<(\/)?([\w\-:]+)((?:\s+|(?:\s+[\w\-:]+)|(?:\s+[\w\-:]+=[^\s"'<>]+)|(?:\s+[\w\-:"]+="[^"]*")|(?:\s+[\w\-:"]+='[^']*'))*)(\/)?>([ \t\n\r]*)/g, function (a,
m, o, t, va, E, G) {
var m = m || "", o = o || "", n = t.toLowerCase(), l = va || "", t = E ? " " + E : "", G = G || ""; if (b && !i[n]) return ""; t === "" && jb[n] && (t = " /"); kb[n] && (m && (m = " "), G && (G = " ")); Ia[n] && (o ? G = "\n" : m = "\n"); d && n == "br" && (G = "\n"); if (lb[n] && !Ia[n]) if (d) { o && e.length > 0 && e[e.length - 1] === n ? e.pop() : e.push(n); G = m = "\n"; va = 0; for (E = o ? e.length : e.length - 1; va < E; va++) m += f, o || (G += f); t ? e.pop() : o || (G += f) } else m = G = ""; if (l !== "") {
var w = J(a); if (n === "font") {
var p = {}, H = ""; j(w, function (a, b) {
if (a === "color") p.color = b, delete w[a]; a === "size" && (p["font-size"] =
g[parseInt(b, 10) - 1] || "", delete w[a]); a === "face" && (p["font-family"] = b, delete w[a]); a === "style" && (H = b)
}); H && !/;$/.test(H) && (H += ";"); j(p, function (a, b) { b !== "" && (/\s/.test(b) && (b = "'" + b + "'"), H += a + ":" + b + ";") }); w.style = H
} j(w, function (a, d) {
Tb[a] && (w[a] = a); M(a, ["src", "href"]) >= 0 && (w[a] = ga(d, c)); (b && a !== "style" && !i[n]["*"] && !i[n][a] || n === "body" && a === "contenteditable" || /^kindeditor_\d+$/.test(a)) && delete w[a]; if (a === "style" && d !== "") {
var f = fa(d); j(f, function (a) { b && !i[n].style && !i[n]["." + a] && delete f[a] }); var g =
""; j(f, function (a, b) { g += a + ":" + b + ";" }); w.style = g
}
}); l = ""; j(w, function (a, b) { a === "style" && b === "" || (b = b.replace(/"/g, """), l += " " + a + '="' + b + '"') })
} n === "font" && (n = "span"); return m + "<" + o + n + l + t + ">" + G
}), a = a.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function (a, b, c, d) { return b + c.replace(/\n/g, '<span id="__kindeditor_pre_newline__">\n') + d }), a = a.replace(/\n\s*\n/g, "\n"), a = a.replace(/<span id="__kindeditor_pre_newline__">\n/g, "\n"); return A(a)
} function mb(a, b) {
a = a.replace(/<meta[\s\S]*?>/ig, "").replace(/<![\s\S]*?>/ig,
"").replace(/<style[^>]*>[\s\S]*?<\/style>/ig, "").replace(/<script[^>]*>[\s\S]*?<\/script>/ig, "").replace(/<w:[^>]+>[\s\S]*?<\/w:[^>]+>/ig, "").replace(/<o:[^>]+>[\s\S]*?<\/o:[^>]+>/ig, "").replace(/<xml>[\s\S]*?<\/xml>/ig, "").replace(/<(?:table|td)[^>]*>/ig, function (a) { return a.replace(/border-bottom:([#\w\s]+)/ig, "border:$1") }); return R(a, b)
} function nb(a) { if (/\.(rm|rmvb)(\?|$)/i.test(a)) return "audio/x-pn-realaudio-plugin"; if (/\.(swf|flv)(\?|$)/i.test(a)) return "application/x-shockwave-flash"; return "video/x-ms-asf-plugin" }
function ob(a) { return J(unescape(a)) } function Ja(a) { var b = "<embed "; j(a, function (a, d) { b += a + '="' + d + '" ' }); b += "/>"; return b } function pb(a, b) { var c = b.width, d = b.height, f = b.type || nb(b.src), g = Ja(b), i = ""; c > 0 && (i += "width:" + c + "px;"); d > 0 && (i += "height:" + d + "px;"); c = /realaudio/i.test(f) ? "ke-rm" : /flash/i.test(f) ? "ke-flash" : "ke-media"; c = '<img class="' + c + '" src="' + a + '" '; i !== "" && (c += 'style="' + i + '" '); c += 'data-ke-tag="' + escape(g) + '" alt="" />'; return c } function xa(a, b) {
后面还有 547 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。