WebUI/AchieveManageWeb/kindeditor-4.1.3/kindeditor-all-min.js

(开头部分) 207KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/* KindEditor 4.1.3 (2012-10-13), Copyright (C) kindsoft.net, Licence: http://www.kindsoft.net/license.php */(function (b, c) {
    function g(a) { if (!a) return !1; return Object.prototype.toString.call(a) === "[object Array]" } function l(a) { if (!a) return !1; return Object.prototype.toString.call(a) === "[object Function]" } function f(a, d) { for (var e = 0, b = d.length; e < b; e++) if (a === d[e]) return e; return -1 } function i(a, d) { if (g(a)) for (var e = 0, b = a.length; e < b; e++) { if (d.call(a[e], e, a[e]) === !1) break } else for (e in a) if (a.hasOwnProperty(e) && d.call(a[e], e, a[e]) === !1) break } function k(a) { return a.replace(/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, "") }
    function j(a, d, e) { e = e === c ? "," : e; return (e + d + e).indexOf(e + a + e) >= 0 } function n(a, d) { d = d || "px"; return a && /^\d+$/.test(a) ? a + d : a } function o(a) { var d; return a && (d = /(\d+)/.exec(a)) ? parseInt(d[1], 10) : 0 } function r(a) { return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;") } function s(a) { return a.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&amp;/g, "&") } function p(a) {
        var d = a.split("-"), a = ""; i(d, function (d, b) {
            a += d > 0 ? b.charAt(0).toUpperCase() +
            b.substr(1) : b
        }); return a
    } function u(a) { function d(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, b, c, m) { return "#" + d(b) + d(c) + d(m) }) } function w(a, d) { var d = d === c ? "," : d, e = {}, b = g(a) ? a : a.split(d), v; i(b, function (a, d) { if (v = /^(\d+)\.\.(\d+)$/.exec(d)) for (var b = parseInt(v[1], 10) ; b <= parseInt(v[2], 10) ; b++) e[b.toString()] = !0; else e[d] = !0 }); return e } function C(a, d) { return Array.prototype.slice.call(a, d || 0) } function q(a,
    d) { return a === c ? d : a } function A(a, d, e) { e || (e = d, d = null); var b; if (d) { var c = function () { }; c.prototype = d.prototype; b = new c; i(e, function (a, d) { b[a] = d }) } else b = e; b.constructor = a; a.prototype = b; a.parent = d ? d.prototype : null } function z(a) {
        var d; if (d = /\{[\s\S]*\}|\[[\s\S]*\]/.exec(a)) a = d[0]; d = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; d.lastIndex = 0; d.test(a) && (a = a.replace(d, 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 F(a, d, e) { a.addEventListener ? a.addEventListener(d, e, cb) : a.attachEvent && a.attachEvent("on" + d, e) } function t(a, d, e) { a.removeEventListener ? a.removeEventListener(d, e, cb) : a.detachEvent && a.detachEvent("on" + d, e) } function D(a, d) { this.init(a, d) } function G(a) {
        try { delete a[ja] } catch (d) {
            a.removeAttribute &&
            a.removeAttribute(ja)
        }
    } function S(a, d, e) { if (d.indexOf(",") >= 0) i(d.split(","), function () { S(a, this, e) }); else { var b = a[ja] || null; b || (a[ja] = ++db, b = db); L[b] === c && (L[b] = {}); var v = L[b][d]; v && v.length > 0 ? t(a, d, v[0]) : (L[b][d] = [], L[b].el = a); v = L[b][d]; v.length === 0 && (v[0] = function (d) { var e = d ? new D(a, d) : c; i(v, function (d, b) { d > 0 && b && b.call(a, e) }) }); f(e, v) < 0 && v.push(e); F(a, d, v[0]) } } function T(a, d, e) {
        if (d && d.indexOf(",") >= 0) i(d.split(","), function () { T(a, this, e) }); else {
            var b = a[ja] || null; if (b) if (d === c) b in L && (i(L[b],
            function (d, e) { d != "el" && e.length > 0 && t(a, d, e[0]) }), delete L[b], G(a)); else if (L[b]) { var v = L[b][d]; if (v && v.length > 0) { e === c ? (t(a, d, v[0]), delete L[b][d]) : (i(v, function (a, d) { a > 0 && d === e && v.splice(a, 1) }), v.length == 1 && (t(a, d, v[0]), delete L[b][d])); var m = 0; i(L[b], function () { m++ }); m < 2 && (delete L[b], G(a)) } }
        }
    } function aa(a, d) { if (d.indexOf(",") >= 0) i(d.split(","), function () { aa(a, this) }); else { var e = a[ja] || null; if (e) { var b = L[e][d]; if (L[e] && b && b.length > 0) b[0]() } } } function O(a, d, e) {
        d = /^\d{2,}$/.test(d) ? d : d.toUpperCase().charCodeAt(0);
        S(a, "keydown", function (b) { b.ctrlKey && b.which == d && !b.shiftKey && !b.altKey && (e.call(a), b.stop()) })
    } function P(a) { for (var d = {}, e = /\s*([\w\-]+)\s*:([^;]*)(;|$)/g, b; b = e.exec(a) ;) { var c = k(b[1].toLowerCase()); b = k(u(b[2])); d[c] = b } return d } function H(a) { for (var d = {}, e = /\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g, b; b = e.exec(a) ;) { var c = (b[1] || b[2] || b[4] || b[6]).toLowerCase(); d[c] = (b[2] ? b[3] : b[4] ? b[5] : b[7]) || "" } return d } function U(a, d) {
        return a =
        /\s+class\s*=/.test(a) ? a.replace(/(\s+class=["']?)([^"']*)(["']?[\s>])/, function (a, b, c, m) { return (" " + c + " ").indexOf(" " + d + " ") < 0 ? c === "" ? b + d + m : b + c + " " + d + m : a }) : a.substr(0, a.length - 1) + ' class="' + d + '">'
    } function Y(a) { var d = ""; i(P(a), function (a, b) { d += a + ":" + b + ";" }); return d } function I(a, d, e, b) {
        function v(a) { for (var a = a.split("/"), d = [], e = 0, b = a.length; e < b; e++) { var c = a[e]; c == ".." ? d.length > 0 && d.pop() : c !== "" && c != "." && d.push(c) } return "/" + d.join("/") } function m(d, e) {
            if (a.substr(0, d.length) === d) {
                for (var c = [], v =
                0; v < e; v++) c.push(".."); v = "."; c.length > 0 && (v += "/" + c.join("/")); b == "/" && (v += "/"); return v + a.substr(d.length)
            } else if (h = /^(.*)\//.exec(d)) return m(h[1], ++e)
        } d = q(d, "").toLowerCase(); a.substr(0, 5) != "data:" && (a = a.replace(/([^:])\/\//g, "$1/")); if (f(d, ["absolute", "relative", "domain"]) < 0) return a; e = e || location.protocol + "//" + location.host; if (b === c) var B = location.pathname.match(/^(\/.*)\//), b = B ? B[1] : ""; var h; if (h = /^(\w+:\/\/[^\/]*)/.exec(a)) { if (h[1] !== e) return a } else if (/^\w+:/.test(a)) return a; /^\//.test(a) ?
        a = e + v(a.substr(1)) : /^\w+:\/\//.test(a) || (a = e + v(b + "/" + a)); d === "relative" ? a = m(e + b, 0).substr(2) : d === "absolute" && a.substr(0, e.length) === e && (a = a.substr(e.length)); return a
    } function M(a, d, e, b, c) {
        var e = e || "", b = q(b, !1), c = q(c, "\t"), m = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","), a = a.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function (a, d, e, b) { return d + e.replace(/<(?:br|br\s[^>]*)>/ig, "\n") + b }), 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, "&copy;"), B = {}; d && (i(d, function (a, d) { for (var e = a.split(","), b = 0, c = e.length; b < c; b++) B[e[b]] = w(d) }), B.script || (a = a.replace(/(<(?:script|script\s[^>]*)>)([\s\S]*?)(<\/script>)/ig, "")), B.style || (a = a.replace(/(<(?:style|style\s[^>]*)>)([\s\S]*?)(<\/style>)/ig, ""))); var h = [], a = a.replace(/([ \t\n\r]*)<(\/)?([\w\-:]+)((?:\s+|(?:\s+[\w\-:]+)|(?:\s+[\w\-:]+=[^\s"'<>]+)|(?:\s+[\w\-:"]+="[^"]*")|(?:\s+[\w\-:"]+='[^']*'))*)(\/)?>([ \t\n\r]*)/g, function (a,
        g, j, n, o, l, r) {
            var g = g || "", j = j || "", k = n.toLowerCase(), s = o || "", n = l ? " " + l : "", r = r || ""; if (d && !B[k]) return ""; n === "" && eb[k] && (n = " /"); fb[k] && (g && (g = " "), r && (r = " ")); Ia[k] && (j ? r = "\n" : g = "\n"); b && k == "br" && (r = "\n"); if (gb[k] && !Ia[k]) if (b) { j && h.length > 0 && h[h.length - 1] === k ? h.pop() : h.push(k); r = g = "\n"; o = 0; for (l = j ? h.length : h.length - 1; o < l; o++) g += c, j || (r += c); n ? h.pop() : j || (r += c) } else g = r = ""; if (s !== "") {
                var p = H(a); if (k === "font") {
                    var z = {}, q = ""; i(p, function (a, d) {
                        if (a === "color") z.color = d, delete p[a]; a === "size" && (z["font-size"] =
                        m[parseInt(d, 10) - 1] || "", delete p[a]); a === "face" && (z["font-family"] = d, delete p[a]); a === "style" && (q = d)
                    }); q && !/;$/.test(q) && (q += ";"); i(z, function (a, d) { d !== "" && (/\s/.test(d) && (d = "'" + d + "'"), q += a + ":" + d + ";") }); p.style = q
                } i(p, function (a, b) {
                    Jb[a] && (p[a] = a); f(a, ["src", "href"]) >= 0 && (p[a] = I(b, e)); (d && a !== "style" && !B[k]["*"] && !B[k][a] || k === "body" && a === "contenteditable" || /^kindeditor_\d+$/.test(a)) && delete p[a]; if (a === "style" && b !== "") {
                        var c = P(b); i(c, function (a) { d && !B[k].style && !B[k]["." + a] && delete c[a] }); var K =
                        ""; i(c, function (a, d) { K += a + ":" + d + ";" }); p.style = K
                    }
                }); s = ""; i(p, function (a, d) { a === "style" && d === "" || (d = d.replace(/"/g, "&quot;"), s += " " + a + '="' + d + '"') })
            } k === "font" && (k = "span"); return g + "<" + j + k + s + n + ">" + r
        }), a = a.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function (a, d, e, b) { return d + e.replace(/\n/g, '<span id="__kindeditor_pre_newline__">\n') + b }), a = a.replace(/\n\s*\n/g, "\n"), a = a.replace(/<span id="__kindeditor_pre_newline__">\n/g, "\n"); return k(a)
    } function W(a, d) {
        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 M(a, d)
    } function V(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 hb(a) { return H(unescape(a)) } function Ja(a) { var d = "<embed "; i(a, function (a, b) { d += a + '="' + b + '" ' }); d += "/>"; return d } function ib(a, d) { var e = d.width, b = d.height, c = d.type || V(d.src), m = Ja(d), h = ""; e > 0 && (h += "width:" + e + "px;"); b > 0 && (h += "height:" + b + "px;"); e = /realaudio/i.test(c) ? "ke-rm" : /flash/i.test(c) ? "ke-flash" : "ke-media"; e = '<img class="' + e + '" src="' + a + '" '; h !== "" && (e += 'style="' + h + '" '); e += 'data-ke-tag="' + escape(m) + '" alt="" />'; return e } function Aa(a, d) {
        if (a.nodeType == 9 && d.nodeType != 9) return !0; for (; d =
        d.parentNode;) if (d == a) return !0; return !1
后面还有 1016 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。