function getCookie(a) {
    var b, c = new RegExp("(^| )" + a + "=([^;]*)(;|$)");
    return (b = document.cookie.match(c)) ? unescape(b[2]) :null;
}

function delCookie(a) {
    var c, b = new Date();
    b.setTime(b.getTime() - 1), c = getCookie(a), null != c && (document.cookie = a + "=" + c + ";expires=" + b.toGMTString());
}

function setCookie(a, b, c) {
    var d = getsec(c), e = new Date();
    e.setTime(e.getTime() + 1 * d), document.cookie = a + "=" + escape(b) + ";expires=" + e.toGMTString();
}

function getsec(a) {
    var b = 1 * a.substring(1, a.length), c = a.substring(0, 1);
    return "s" == c ? 1e3 * b :"h" == c ? 1e3 * 60 * 60 * b :"d" == c ? 1e3 * 60 * 60 * 24 * b :void 0;
}

function pltsinits() {
    document.onmouseover = plts, document.onmousemove = moveToMouseLoc;
}

function plts(a) {
    var b, c, d;
    return a ? (o = a.target, MouseX = a.pageX, MouseY = a.pageY) :(o = event.srcElement, 
    MouseX = event.x, MouseY = event.y), null != o.alt && "" != o.alt && (o.dypop = o.alt, 
    o.alt = ""), null != o.title && "" != o.title && (o.dypop = o.title, o.title = ""), 
    pltsPop = o.dypop, null != pltsPop && "" != pltsPop && "undefined" != typeof pltsPop ? (pltsTipLayer.style.left = -1e3, 
    pltsTipLayer.style.display = "", b = pltsPop.replace(/\n/g, "<br>"), b = b.replace(/\0x13/g, "<br>"), 
    c = /\{(.[^\{]*)\}/gi, c.test(b) ? (c = /\{(.[^\{]*)\}(.*)/gi, pltsTitle = b.replace(c, "$1") + "&nbsp;", 
    c = /\{(.[^\{]*)\}/gi, b = b.replace(c, ""), b = b.replace("<br>", "")) :pltsTitle = pltsTitle, 
    b.indexOf("img src=") < 0 && (b = "<ul>" + b + "</ul>"), d = '<table border=0 cellspacing=0 cellpadding=0 id=toolTipTalbe ><tr><td><span id=pltsPoptop><span id=topleft style="float:left">' + pltsTitle + '</span><span id=topright style="display:none;float:right;">' + pltsTitle + "</span></td></tr>" + '<tr><td class="Bttd"><div>' + b + "</div></td></tr>" + '<tr><td><span id=pltsPopbot style="display:none"><b><span id=botleft align=left>' + pltsTitle + '</span><span id=botright align=right style="display:none;float:right;">' + pltsTitle + "</span></td></tr></table>", 
    pltsTipLayer.innerHTML = d, document.getElementById("toolTipTalbe").style.width = Math.min(pltsTipLayer.clientWidth - 10, document.body.clientWidth / 2.2) + "px", 
    moveToMouseLoc(a), !0) :(pltsTipLayer.innerHTML = "", pltsTipLayer.style.display = "none", 
    !0);
}

function moveToMouseLoc(a) {
    var b, c;
    return a ? (MouseX = a.pageX, MouseY = a.pageY) :(MouseX = event.clientX, MouseY = event.clientY), 
    "" == pltsTipLayer.innerHTML ? !0 :(b = pltsTipLayer.clientHeight, c = pltsTipLayer.clientWidth, 
    MouseY + pltsoffsetY + b > document.body.clientHeight ? (popTopAdjust = -b - 1.5 * pltsoffsetY, 
    document.getElementById("pltsPoptop").style.display = "none", document.getElementById("pltsPopbot").style.display = "") :(popTopAdjust = 0, 
    document.getElementById("pltsPoptop").style.display = "", document.getElementById("pltsPopbot").style.display = "none"), 
    MouseX + pltsoffsetX + c > document.body.clientWidth ? (popLeftAdjust = -c - 2 * pltsoffsetX, 
    document.getElementById("topleft").style.display = "none", document.getElementById("botleft").style.display = "none", 
    document.getElementById("topright").style.display = "", document.getElementById("botright").style.display = "") :(popLeftAdjust = 0, 
    document.getElementById("topleft").style.display = "", document.getElementById("botleft").style.display = "", 
    document.getElementById("topright").style.display = "none", document.getElementById("botright").style.display = "none"), 
    pltsTipLayer.style.left = MouseX + pltsoffsetX + document.body.scrollLeft + popLeftAdjust + "px", 
    pltsTipLayer.style.top = navigator.userAgent.indexOf("MSIE") <= 0 ? MouseY + pltsoffsetY + popTopAdjust + "px" :MouseY + pltsoffsetY + document.body.scrollTop + popTopAdjust + "px", 
    !0);
}

function delHtmlTag(a) {
    return a.replace(/<[^>]+>/g, "");
}

function lastIndexDemo(a) {
    var g, h, i, j, k, m, n, b = a, c = new Array(), d = new Array(), e = new Array();
    return new Array(), g = new Array(), h = new Array(), i = new Array(), j = new Array(), 
    k = new Array(), new Array(), n = b.length, getkeywords(c, d), getkey(b, m, n, c, e, g, h, k), 
    timesn(i, h), gettfx(i, j), toobject(e, h, i, j, k, g), outresult(e, h, i, j, k, g, b);
}

function getkeywords(a) {
    var c = 1, d = keylis.length, e = keydrop.length;
    for (i = 0; d > i; i++) a[i] = keylis[i];
    for (i = 0; e > i; i++) a[i + d] = keydrop[i].childNodes[0].nodeValue;
    for (i = 0; c > i; i++) ;
}

function timesn(a, b) {
    var c = 0;
    for (i = 0; i < b.length; i++) {
        for (j = 0; j < b.length; j++) b[i] == b[j] && (c += 1);
        a.push(c), c = 0;
    }
}

function gettfx(a, b) {
    var d, e, g;
    for (Math.log(10), i = 0; i < a.length; i++) d = a[i] / 1, e = Math.log(d), g = a[i] * e, 
    b.push(g.toFixed(3));
}

function toobject(a, b, c, d, e, f) {
    new Array(), a["name"] = f, a["address"] = b, a["tfx"] = d, a["stopkey"] = e, a["times"] = c;
}

function getkey(a, b, c, d, e, f, g, h) {
    for (k = c; k > 0; k--) a:for (j = 6; j > 0; j--) {
        var b = a.substr(k - j, j);
        for (i = 0; i < d.length; i++) if (d[i] == b) {
            f.push(b), g.push(i), i > keylis.length ? h.push(!1) :h.push(!0), k -= j, k++;
            break a;
        }
    }
}

function outresult(a, b, c, d, e, f) {
    var n, o, p, q, r, s, h = "6", k = "0", l = new Array();
    for (new Array(), n = new Array(), o = new Array(), p = new Array(), q = new Array(), 
    i = 0; i < f.length; i++) 1 == a["stopkey"][i] && (l.push(a["name"][i]), p.push(a["tfx"][i]));
    for (i = 0; i < l.length; i++) for (j = l.length; j > i; j--) l[i] == l[j] && (l = l.slice(0, j).concat(l.slice(j + 1, l.length)), 
    p = p.slice(0, j).concat(p.slice(j + 1, p.length)));
    for (i = 0; i < f.length; i++) 0 == a["stopkey"][i] && n.push(a["name"][i]);
    for (i = 0; i < l.length; i++) p[i] > k && (o.push(l[i]), q.push(p[i]));
    for (i = 0; i < o.length; i++) for (j = i + 1; j < o.length; j++) q[i] < q[j] && (r = q[i], 
    q[i] = q[j], q[j] = r, s = o[i], o[i] = o[j], o[j] = s);
    return o = o.slice(0, h), o.join(",");
}

function ajaxx(a, b, c, d) {
    toastr.warning("请耐心等待，不要关闭页面", "", {
        timeOut:3e4
    }), $.ajax({
        type:"post",
        url:a,
        data:c,
        success:function(a) {
            switch (d) {
              case 1:
                a.indexOf("success") >= 0 ? (toastr.clear(), toastr.success(a.split("|")[1]), redirect(b)) :(toastr.clear(), 
                toastr.error(a.split("|")[1]));
                break;

              case 2:
                a.indexOf("success") >= 0 ? (toastr.clear(), toastr.success(a.split("|")[1])) :(toastr.clear(), 
                toastr.error(a.split("|")[1]));
                break;

              case 3:
                a.indexOf("success") >= 0 ? (toastr.clear(), swal({
                    title:"",
                    text:a.split("|")[1],
                    type:"success",
                    html:!0
                }, function() {
                    redirect(b);
                })) :(toastr.clear(), toastr.error(a.split("|")[1]));
                break;

              case 4:
                if (a.indexOf("success") >= 0) for (toastr.clear(), toastr.success(a.split("|")[1]), 
                strs = a.split("|")[2].split(","), i = 0; i < strs.length; i++) $("#item_" + strs[i]).hide(); else toastr.clear(), 
                toastr.error(a.split("|")[1]);
            }
        }
    });
}

function redirect(a) {
    switch (a) {
      case "reload":
        location.reload();
        break;

      case "":
        break;

      default:
        window.location.href = a;
    }
}

var app, pltsPop, pltsoffsetX, pltsoffsetY, pltsPopbg, pltsPopfg, pltsTitle, pltsTipLayer;

!function(a, b, c) {
    b.module("ngAnimate", [ "ng" ]).directive("ngAnimateChildren", function() {
        var a = "$$ngAnimateChildren";
        return function(c, d, e) {
            var f = e.ngAnimateChildren;
            b.isString(f) && 0 === f.length ? d.data(a, !0) :c.$watch(f, function(b) {
                d.data(a, !!b);
            });
        };
    }).factory("$$animateReflow", [ "$$rAF", "$document", function(a, b) {
        var c = b[0].body;
        return function(b) {
            return a(function() {
                c.offsetWidth + 1, b();
            });
        };
    } ]).config([ "$provide", "$animateProvider", function(d, e) {
        function q(a) {
            var b, c;
            for (b = 0; b < a.length; b++) if (c = a[b], c.nodeType == l) return c;
        }
        function r(a) {
            return a && b.element(a);
        }
        function s(a) {
            return b.element(q(a));
        }
        function t(a, b) {
            return q(a) == q(b);
        }
        var f = b.noop, g = b.forEach, h = e.$$selectors, i = b.isArray, j = b.isString, k = b.isObject, l = 1, m = "$$ngAnimateState", n = "$$ngAnimateChildren", o = "ng-animate", p = {
            running:!0
        };
        d.decorator("$animate", [ "$delegate", "$$q", "$injector", "$sniffer", "$rootElement", "$$asyncCallback", "$rootScope", "$document", "$templateRequest", function(a, c, d, l, u, v, w, x, y) {
            function D(a, b) {
                var c = a.data(m) || {};
                return b && (c.running = !0, c.structural = !0, a.data(m, c)), c.disabled || c.running && c.structural;
            }
            function E(a) {
                var b, d = c.defer();
                return d.promise.$$cancelFn = function() {
                    b && b();
                }, w.$$postDigest(function() {
                    b = a(function() {
                        d.resolve();
                    });
                }), d.promise;
            }
            function F(a) {
                return k(a) ? (a.tempClasses && j(a.tempClasses) && (a.tempClasses = a.tempClasses.split(/\s+/)), 
                a) :void 0;
            }
            function G(a, b, c) {
                var d, e, f, h;
                return c = c || {}, d = {}, g(c, function(a, b) {
                    g(b.split(" "), function(b) {
                        d[b] = a;
                    });
                }), e = Object.create(null), g((a.attr("class") || "").split(/\s+/), function(a) {
                    e[a] = !0;
                }), f = [], h = [], g(b && b.classes || [], function(a, b) {
                    var c = e[b], g = d[b] || {};
                    a === !1 ? (c || "addClass" == g.event) && h.push(b) :a === !0 && (c && "removeClass" != g.event || f.push(b));
                }), f.length + h.length > 0 && [ f.join(" "), h.join(" ") ];
            }
            function H(a) {
                var b, c, e, f, g, i;
                if (a) {
                    for (b = [], c = {}, e = a.substr(1).split("."), (l.transitions || l.animations) && b.push(d.get(h[""])), 
                    f = 0; f < e.length; f++) g = e[f], i = h[g], i && !c[g] && (b.push(d.get(i)), c[g] = !0);
                    return b;
                }
            }
            function I(a, c, d, e) {
                function w(a, b) {
                    var c = a[b], d = a["before" + b.charAt(0).toUpperCase() + b.substr(1)];
                    return c || d ? ("leave" == b && (d = c, c = null), u.push({
                        event:b,
                        fn:c
                    }), r.push({
                        event:b,
                        fn:d
                    }), !0) :void 0;
                }
                function x(b, c, h) {
                    function m(a) {
                        if (c) {
                            if ((c[a] || f)(), ++l < i.length) return;
                            c = null;
                        }
                        h();
                    }
                    var l, i = [];
                    g(b, function(a) {
                        a.fn && i.push(a);
                    }), l = 0, g(i, function(b, f) {
                        var g = function() {
                            m(f);
                        };
                        switch (b.event) {
                          case "setClass":
                            c.push(b.fn(a, j, k, g, e));
                            break;

                          case "animate":
                            c.push(b.fn(a, d, e.from, e.to, g));
                            break;

                          case "addClass":
                            c.push(b.fn(a, j || d, g, e));
                            break;

                          case "removeClass":
                            c.push(b.fn(a, k || d, g, e));
                            break;

                          default:
                            c.push(b.fn(a, g, e));
                        }
                    }), c && 0 === c.length && h();
                }
                var j, k, l, m, n, o, p, q, r, s, t, u, v, h = a[0];
                if (h && (e && (e.to = e.to || {}, e.from = e.from || {}), i(d) && (j = d[0], k = d[1], 
                j ? k ? d = j + " " + k :(d = j, c = "addClass") :(d = k, c = "removeClass")), l = "setClass" == c, 
                m = l || "addClass" == c || "removeClass" == c || "animate" == c, n = a.attr("class"), 
                o = n + " " + d, C(o))) return p = f, q = [], r = [], s = f, t = [], u = [], v = (" " + o).replace(/\s+/g, "."), 
                g(H(v), function(a) {
                    var b = w(a, c);
                    !b && l && (w(a, "addClass"), w(a, "removeClass"));
                }), {
                    node:h,
                    event:c,
                    className:d,
                    isClassBased:m,
                    isSetClassOperation:l,
                    applyStyles:function() {
                        e && a.css(b.extend(e.from || {}, e.to || {}));
                    },
                    before:function(a) {
                        p = a, x(r, q, function() {
                            p = f, a();
                        });
                    },
                    after:function(a) {
                        s = a, x(u, t, function() {
                            s = f, a();
                        });
                    },
                    cancel:function() {
                        q && (g(q, function(a) {
                            (a || f)(!0);
                        }), p(!0)), t && (g(t, function(a) {
                            (a || f)(!0);
                        }), s(!0));
                    }
                };
            }
            function J(a, c, d, e, h, i, j, k) {
                function B(b) {
                    var e = "$animate:" + b;
                    p && p[e] && p[e].length > 0 && v(function() {
                        d.triggerHandler(e, {
                            event:a,
                            className:c
                        });
                    });
                }
                function C() {
                    B("before");
                }
                function D() {
                    B("after");
                }
                function E() {
                    B("close"), k();
                }
                function F() {
                    F.hasBeenRun || (F.hasBeenRun = !0, i());
                }
                function G() {
                    if (!G.hasBeenRun) {
                        n && n.applyStyles(), G.hasBeenRun = !0, j && j.tempClasses && g(j.tempClasses, function(a) {
                            d.removeClass(a);
                        });
                        var b = d.data(m);
                        b && (n && n.isClassBased ? L(d, c) :(v(function() {
                            var b = d.data(m) || {};
                            z == b.index && L(d, c, a);
                        }), d.data(m, b))), E();
                    }
                }
                var p, q, r, s, t, u, w, x, y, z, l = f, n = I(d, a, c, j);
                if (!n) return F(), C(), D(), G(), l;
                if (a = n.event, c = n.className, p = b.element._data(n.node), p = p && p.events, 
                e || (e = h ? h.parent() :d.parent()), M(d, e)) return F(), C(), D(), G(), l;
                if (q = d.data(m) || {}, r = q.active || {}, s = q.totalActive || 0, t = q.last, 
                u = !1, s > 0) {
                    if (w = [], n.isClassBased) "setClass" == t.event ? (w.push(t), L(d, c)) :r[c] && (y = r[c], 
                    y.event == a ? u = !0 :(w.push(y), L(d, c))); else if ("leave" == a && r["ng-leave"]) u = !0; else {
                        for (x in r) w.push(r[x]);
                        q = {}, L(d, !0);
                    }
                    w.length > 0 && g(w, function(a) {
                        a.cancel();
                    });
                }
                return !n.isClassBased || n.isSetClassOperation || "animate" == a || u || (u = "addClass" == a == d.hasClass(c)), 
                u ? (F(), C(), D(), E(), l) :(r = q.active || {}, s = q.totalActive || 0, "leave" == a && d.one("$destroy", function() {
                    var e, c = b.element(this), d = c.data(m);
                    d && (e = d.active["ng-leave"], e && (e.cancel(), L(c, "ng-leave")));
                }), d.addClass(o), j && j.tempClasses && g(j.tempClasses, function(a) {
                    d.addClass(a);
                }), z = A++, s++, r[c] = n, d.data(m, {
                    last:n,
                    active:r,
                    index:z,
                    totalActive:s
                }), C(), n.before(function(b) {
                    var e = d.data(m);
                    b = b || !e || !e.active[c] || n.isClassBased && e.active[c].event != a, F(), b === !0 ? G() :(D(), 
                    n.after(G));
                }), n.cancel);
            }
            function K(a) {
                var d, c = q(a);
                c && (d = b.isFunction(c.getElementsByClassName) ? c.getElementsByClassName(o) :c.querySelectorAll("." + o), 
                g(d, function(a) {
                    a = b.element(a);
                    var c = a.data(m);
                    c && c.active && g(c.active, function(a) {
                        a.cancel();
                    });
                }));
            }
            function L(a, b) {
                var c, d;
                t(a, u) ? p.disabled || (p.running = !1, p.structural = !1) :b && (c = a.data(m) || {}, 
                d = b === !0, !d && c.active && c.active[b] && (c.totalActive--, delete c.active[b]), 
                (d || !c.totalActive) && (a.removeClass(o), a.removeData(m)));
            }
            function M(a, c) {
                var d, e, f, g, h, i;
                if (p.disabled) return !0;
                if (t(a, u)) return p.running;
                do {
                    if (0 === c.length) break;
                    if (g = t(c, u), h = g ? p :c.data(m) || {}, h.disabled) return !0;
                    g && (f = !0), d !== !1 && (i = c.data(n), b.isDefined(i) && (d = i)), e = e || h.running || h.last && !h.last.isClassBased;
                } while (c = c.parent());
                return !f || !d && e;
            }
            var z, A, B, C;
            return u.data(m, p), z = w.$watch(function() {
                return y.totalPendingRequests;
            }, function(a) {
                0 === a && (z(), w.$$postDigest(function() {
                    w.$$postDigest(function() {
                        p.running = !1;
                    });
                }));
            }), A = 0, B = e.classNameFilter(), C = B ? function(a) {
                return B.test(a);
            } :function() {
                return !0;
            }, {
                animate:function(a, b, c, d, e) {
                    return d = d || "ng-inline-animate", e = F(e) || {}, e.from = c ? b :null, e.to = c ? c :b, 
                    E(function(b) {
                        return J("animate", d, s(a), null, null, f, e, b);
                    });
                },
                enter:function(c, d, e, g) {
                    return g = F(g), c = b.element(c), d = r(d), e = r(e), D(c, !0), a.enter(c, d, e), 
                    E(function(a) {
                        return J("enter", "ng-enter", s(c), d, e, f, g, a);
                    });
                },
                leave:function(c, d) {
                    return d = F(d), c = b.element(c), K(c), D(c, !0), E(function(b) {
                        return J("leave", "ng-leave", s(c), null, null, function() {
                            a.leave(c);
                        }, d, b);
                    });
                },
                move:function(c, d, e, g) {
                    return g = F(g), c = b.element(c), d = r(d), e = r(e), K(c), D(c, !0), a.move(c, d, e), 
                    E(function(a) {
                        return J("move", "ng-move", s(c), d, e, f, g, a);
                    });
                },
                addClass:function(a, b, c) {
                    return this.setClass(a, b, [], c);
                },
                removeClass:function(a, b, c) {
                    return this.setClass(a, [], b, c);
                },
                setClass:function(c, d, e, f) {
                    var h, j, k, l;
                    return f = F(f), h = "$$animateClasses", c = b.element(c), c = s(c), D(c) ? a.$$setClassImmediately(c, d, e, f) :(k = c.data(h), 
                    l = !!k, k || (k = {}, k.classes = {}), j = k.classes, d = i(d) ? d :d.split(" "), 
                    g(d, function(a) {
                        a && a.length && (j[a] = !0);
                    }), e = i(e) ? e :e.split(" "), g(e, function(a) {
                        a && a.length && (j[a] = !1);
                    }), l ? (f && k.options && (k.options = b.extend(k.options || {}, f)), k.promise) :(c.data(h, k = {
                        classes:j,
                        options:f
                    }), k.promise = E(function(b) {
                        var g, i, j, d = c.parent(), e = q(c), f = e.parentNode;
                        return !f || f["$$NG_REMOVED"] || e["$$NG_REMOVED"] ? (b(), void 0) :(g = c.data(h), 
                        c.removeData(h), i = c.data(m) || {}, j = G(c, g, i.active), j ? J("setClass", j, c, d, null, function() {
                            j[0] && a.$$addClassImmediately(c, j[0]), j[1] && a.$$removeClassImmediately(c, j[1]);
                        }, g.options, b) :b());
                    })));
                },
                cancel:function(a) {
                    a.$$cancelFn();
                },
                enabled:function(a, b) {
                    switch (arguments.length) {
                      case 2:
                        if (a) L(b); else {
                            var c = b.data(m) || {};
                            c.disabled = !0, b.data(m, c);
                        }
                        break;

                      case 1:
                        p.disabled = !a;
                        break;

                      default:
                        a = !p.disabled;
                    }
                    return !!a;
                }
            };
        } ]), e.register("", [ "$window", "$sniffer", "$timeout", "$$animateReflow", function(d, e, h, k) {
            function G() {
                F || (F = k(function() {
                    E = [], F = null, C = {};
                }));
            }
            function H(a, b) {
                F && F(), E.push(b), F = k(function() {
                    g(E, function(a) {
                        a();
                    }), E = [], F = null, C = {};
                });
            }
            function L(a, c) {
                var e, d = q(a);
                a = b.element(d), K.push(a), e = Date.now() + c, J >= e || (h.cancel(I), J = e, 
                I = h(function() {
                    M(K), K = [];
                }, c, !1));
            }
            function M(a) {
                g(a, function(a) {
                    var b = a.data(y);
                    b && g(b.closeAnimationFns, function(a) {
                        a();
                    });
                });
            }
            function N(a, b) {
                var e, f, h, i, c = b ? C[b] :null;
                return c || (e = 0, f = 0, h = 0, i = 0, g(a, function(a) {
                    var b, c, g, k;
                    a.nodeType == l && (b = d.getComputedStyle(a) || {}, c = b[n + s], e = Math.max(O(c), e), 
                    g = b[n + u], f = Math.max(O(g), f), b[p + u], i = Math.max(O(b[p + u]), i), k = O(b[p + s]), 
                    k > 0 && (k *= parseInt(b[p + v], 10) || 1), h = Math.max(k, h));
                }), c = {
                    total:0,
                    transitionDelay:f,
                    transitionDuration:e,
                    animationDelay:i,
                    animationDuration:h
                }, b && (C[b] = c)), c;
            }
            function O(a) {
                var b = 0, c = j(a) ? a.split(/\s*,\s*/) :[];
                return g(c, function(a) {
                    b = Math.max(parseFloat(a) || 0, b);
                }), b;
            }
            function P(a) {
                var b = a.parent(), c = b.data(x);
                return c || (b.data(x, ++D), c = D), c + "-" + q(a).getAttribute("class");
            }
            function Q(a, b, c, d) {
                var j, k, l, m, n, o, p, r, s, t, u, e = [ "ng-enter", "ng-leave", "ng-move" ].indexOf(c) >= 0, f = P(b), g = f + " " + c, h = C[g] ? ++C[g].total :0, i = {};
                return h > 0 && (j = c + "-stagger", k = f + " " + j, l = !C[k], l && b.addClass(j), 
                i = N(b, k), l && b.removeClass(j)), b.addClass(c), m = b.data(y) || {}, n = N(b, g), 
                o = n.transitionDuration, p = n.animationDuration, e && 0 === o && 0 === p ? (b.removeClass(c), 
                !1) :(r = d || e && o > 0, s = p > 0 && i.animationDelay > 0 && 0 === i.animationDuration, 
                t = m.closeAnimationFns || [], b.data(y, {
                    stagger:i,
                    cacheKey:g,
                    running:m.running || 0,
                    itemIndex:h,
                    blockTransition:r,
                    closeAnimationFns:t
                }), u = q(b), r && (S(u, !0), d && b.css(d)), s && T(u, !0), !0);
            }
            function R(a, b, c, d, e) {
                function M() {
                    var a, d;
                    b.off(H, O), b.removeClass(j), b.removeClass(k), K && h.cancel(K), X(b, c), a = q(b);
                    for (d in n) a.style.removeProperty(n[d]);
                }
                function O(a) {
                    var b, c, e;
                    a.stopPropagation(), b = a.originalEvent || a, c = b.$manualTimeStamp || b.timeStamp || Date.now(), 
                    e = parseFloat(b.elapsedTime.toFixed(z)), Math.max(c - G, 0) >= E && e >= C && d();
                }
                var j, k, l, n, p, s, t, u, v, w, x, C, D, E, F, G, H, I, J, K, f = q(b), i = b.data(y);
                return -1 != f.getAttribute("class").indexOf(c) && i ? (j = "", k = "", g(c.split(" "), function(a, b) {
                    var c = (b > 0 ? " " :"") + a;
                    j += c + "-active", k += c + "-pending";
                }), l = "", n = [], p = i.itemIndex, s = i.stagger, t = 0, p > 0 && (u = 0, s.transitionDelay > 0 && 0 === s.transitionDuration && (u = s.transitionDelay * p), 
                v = 0, s.animationDelay > 0 && 0 === s.animationDuration && (v = s.animationDelay * p, 
                n.push(m + "animation-play-state")), t = Math.round(100 * Math.max(u, v)) / 100), 
                t || (b.addClass(j), i.blockTransition && S(f, !1)), w = i.cacheKey + " " + j, x = N(b, w), 
                C = Math.max(x.transitionDuration, x.animationDuration), 0 === C ? (b.removeClass(j), 
                X(b, c), d(), void 0) :(!t && e && (x.transitionDuration || (b.css("transition", x.animationDuration + "s linear all"), 
                n.push("transition")), b.css(e)), D = Math.max(x.transitionDelay, x.animationDelay), 
                E = D * B, n.length > 0 && (F = f.getAttribute("style") || "", ";" !== F.charAt(F.length - 1) && (F += ";"), 
                f.setAttribute("style", F + " " + l)), G = Date.now(), H = r + " " + o, I = (D + C) * A, 
                J = (t + I) * B, t > 0 && (b.addClass(k), K = h(function() {
                    K = null, x.transitionDuration > 0 && S(f, !1), x.animationDuration > 0 && T(f, !1), 
                    b.addClass(j), b.removeClass(k), e && (0 === x.transitionDuration && b.css("transition", x.animationDuration + "s linear all"), 
                    b.css(e), n.push("transition"));
                }, t * B, !1)), b.on(H, O), i.closeAnimationFns.push(function() {
                    M(), d();
                }), i.running++, L(b, J), M)) :(d(), void 0);
            }
            function S(a, b) {
                a.style[n + t] = b ? "none" :"";
            }
            function T(a, b) {
                a.style[p + w] = b ? "paused" :"";
            }
            function U(a, b, c, d) {
                return Q(a, b, c, d) ? function(a) {
                    a && X(b, c);
                } :void 0;
            }
            function V(a, b, c, d, e) {
                return b.data(y) ? R(a, b, c, d, e) :(X(b, c), d(), void 0);
            }
            function W(a, b, c, d, e) {
                var h, g = U(a, b, c, e.from);
                return g ? (h = g, H(b, function() {
                    h = V(a, b, c, d, e.to);
                }), function(a) {
                    (h || f)(a);
                }) :(G(), d(), void 0);
            }
            function X(a, b) {
                a.removeClass(b);
                var c = a.data(y);
                c && (c.running && c.running--, c.running && 0 !== c.running || a.removeData(y));
            }
            function Y(a, b) {
                var c = "";
                return a = i(a) ? a :a.split(/\s+/), g(a, function(a, d) {
                    a && a.length > 0 && (c += (d > 0 ? " " :"") + a + b);
                }), c;
            }
            var n, o, p, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, I, J, K, m = "";
            return a.ontransitionend === c && a.onwebkittransitionend !== c ? (m = "-webkit-", 
            n = "WebkitTransition", o = "webkitTransitionEnd transitionend") :(n = "transition", 
            o = "transitionend"), a.onanimationend === c && a.onwebkitanimationend !== c ? (m = "-webkit-", 
            p = "WebkitAnimation", r = "webkitAnimationEnd animationend") :(p = "animation", 
            r = "animationend"), s = "Duration", t = "Property", u = "Delay", v = "IterationCount", 
            w = "PlayState", x = "$$ngAnimateKey", y = "$$ngAnimateCSS3Data", z = 3, A = 1.5, 
            B = 1e3, C = {}, D = 0, E = [], I = null, J = 0, K = [], {
                animate:function(a, b, c, d, e, f) {
                    return f = f || {}, f.from = c, f.to = d, W("animate", a, b, e, f);
                },
                enter:function(a, b, c) {
                    return c = c || {}, W("enter", a, "ng-enter", b, c);
                },
                leave:function(a, b, c) {
                    return c = c || {}, W("leave", a, "ng-leave", b, c);
                },
                move:function(a, b, c) {
                    return c = c || {}, W("move", a, "ng-move", b, c);
                },
                beforeSetClass:function(a, b, c, d, e) {
                    var f, g;
                    return e = e || {}, f = Y(c, "-remove") + " " + Y(b, "-add"), (g = U("setClass", a, f, e.from)) ? (H(a, d), 
                    g) :(G(), d(), void 0);
                },
                beforeAddClass:function(a, b, c, d) {
                    d = d || {};
                    var e = U("addClass", a, Y(b, "-add"), d.from);
                    return e ? (H(a, c), e) :(G(), c(), void 0);
                },
                beforeRemoveClass:function(a, b, c, d) {
                    d = d || {};
                    var e = U("removeClass", a, Y(b, "-remove"), d.from);
                    return e ? (H(a, c), e) :(G(), c(), void 0);
                },
                setClass:function(a, b, c, d, e) {
                    e = e || {}, c = Y(c, "-remove"), b = Y(b, "-add");
                    var f = c + " " + b;
                    return V("setClass", a, f, d, e.to);
                },
                addClass:function(a, b, c, d) {
                    return d = d || {}, V("addClass", a, Y(b, "-add"), c, d.to);
                },
                removeClass:function(a, b, c, d) {
                    return d = d || {}, V("removeClass", a, Y(b, "-remove"), c, d.to);
                }
            };
        } ]);
    } ]);
}(window, window.angular), function(a, b) {
    function e() {
        this.$get = [ "$$sanitizeUri", function(a) {
            return function(b) {
                var c = [];
                return E(b, J(c, function(b, c) {
                    return !/^unsafe/.test(a(b, c));
                })), c.join("");
            };
        } ];
    }
    function f(a) {
        var c = [], d = J(c, b.noop);
        return d.chars(a), c.join("");
    }
    function D(a) {
        var d, b = {}, c = a.split(",");
        for (d = 0; d < c.length; d++) b[c[d]] = !0;
        return b;
    }
    function E(a, c) {
        function w(a, d, e, f) {
            if (d = b.lowercase(d), u[d]) for (;p.last() && v[p.last()]; ) y("", p.last());
            t[d] && p.last() == d && y("", d), f = q[d] || !!f, f || p.push(d);
            var g = {};
            e.replace(i, function(a, b, c, d, e) {
                var f = c || d || e || "";
                g[b] = H(f);
            }), c.start && c.start(d, g, f);
        }
        function y(a, d) {
            var f, e = 0;
            if (d = b.lowercase(d)) for (e = p.length - 1; e >= 0 && p[e] != d; e--) ;
            if (e >= 0) {
                for (f = p.length - 1; f >= e; f--) c.end && c.end(p[f]);
                p.length = e;
            }
        }
        "string" != typeof a && (a = null === a || "undefined" == typeof a ? "" :"" + a);
        var e, f, o, s, p = [], r = a;
        for (p.last = function() {
            return p[p.length - 1];
        }; a; ) {
            if (s = "", f = !0, p.last() && x[p.last()] ? (a = a.replace(new RegExp("(.*)<\\s*\\/\\s*" + p.last() + "[^>]*>", "i"), function(a, b) {
                return b = b.replace(l, "$1").replace(n, "$1"), c.chars && c.chars(H(b)), "";
            }), y("", p.last())) :(0 === a.indexOf("<!--") ? (e = a.indexOf("--", 4), e >= 0 && a.lastIndexOf("-->", e) === e && (c.comment && c.comment(a.substring(4, e)), 
            a = a.substring(e + 3), f = !1)) :m.test(a) ? (o = a.match(m), o && (a = a.replace(o[0], ""), 
            f = !1)) :k.test(a) ? (o = a.match(h), o && (a = a.substring(o[0].length), o[0].replace(h, y), 
            f = !1)) :j.test(a) && (o = a.match(g), o ? (o[4] && (a = a.substring(o[0].length), 
            o[0].replace(g, w)), f = !1) :(s += "<", a = a.substring(1))), f && (e = a.indexOf("<"), 
            s += 0 > e ? a :a.substring(0, e), a = 0 > e ? "" :a.substring(e), c.chars && c.chars(H(s)))), 
            a == r) throw d("badparse", "The sanitizer was unable to parse the following block of html: {0}", a);
            r = a;
        }
        y();
    }
    function H(a) {
        var b, c, d, e;
        return a ? (b = G.exec(a), c = b[1], d = b[3], e = b[2], e && (F.innerHTML = e.replace(/</g, "&lt;"), 
        e = "textContent" in F ? F.textContent :F.innerText), c + e + d) :"";
    }
    function I(a) {
        return a.replace(/&/g, "&amp;").replace(o, function(a) {
            var b = a.charCodeAt(0), c = a.charCodeAt(1);
            return "&#" + (1024 * (b - 55296) + (c - 56320) + 65536) + ";";
        }).replace(p, function(a) {
            return "&#" + a.charCodeAt(0) + ";";
        }).replace(/</g, "&lt;").replace(/>/g, "&gt;");
    }
    function J(a, c) {
        var d = !1, e = b.bind(a, a.push);
        return {
            start:function(a, f, g) {
                a = b.lowercase(a), !d && x[a] && (d = a), d || y[a] !== !0 || (e("<"), e(a), b.forEach(f, function(d, f) {
                    var g = b.lowercase(f), h = "img" === a && "src" === g || "background" === g;
                    C[g] !== !0 || z[g] === !0 && !c(d, h) || (e(" "), e(f), e('="'), e(I(d)), e('"'));
                }), e(g ? "/>" :">"));
            },
            end:function(a) {
                a = b.lowercase(a), d || y[a] !== !0 || (e("</"), e(a), e(">")), a == d && (d = !1);
            },
            chars:function(a) {
                d || e(I(a));
            }
        };
    }
    var d = b.$$minErr("$sanitize"), g = /^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/, h = /^<\/\s*([\w:-]+)[^>]*>/, i = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, j = /^</, k = /^<\//, l = /<!--(.*?)-->/g, m = /<!DOCTYPE([^>]*?)>/i, n = /<!\[CDATA\[(.*?)]]>/g, o = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, p = /([^\#-~| |!])/g, q = D("area,br,col,hr,img,wbr"), r = D("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), s = D("rp,rt"), t = b.extend({}, s, r), u = b.extend({}, r, D("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")), v = b.extend({}, s, D("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), w = D("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"), x = D("script,style"), y = b.extend({}, q, u, v, t, w), z = D("background,cite,href,longdesc,src,usemap,xlink:href"), A = D("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"), B = D("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"), C = b.extend({}, z, B, A), F = document.createElement("pre"), G = /^(\s*)([\s\S]*?)(\s*)$/;
    b.module("ngSanitize", []).provider("$sanitize", e), b.module("ngSanitize").filter("linky", [ "$sanitize", function(a) {
        var c = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/, d = /^mailto:/;
        return function(e, g) {
            function m(a) {
                a && j.push(f(a));
            }
            function n(a, c) {
                j.push("<a "), b.isDefined(g) && (j.push('target="'), j.push(g), j.push('" ')), 
                j.push('href="'), j.push(a), j.push('">'), m(c), j.push("</a>");
            }
            var h, i, j, k, l;
            if (!e) return e;
            for (i = e, j = []; h = i.match(c); ) k = h[0], h[2] == h[3] && (k = "mailto:" + k), 
            l = h.index, m(i.substr(0, l)), n(k, h[0].replace(d, "")), i = i.substring(l + h[0].length);
            return m(i), a(j.join(""));
        };
    } ]);
}(window, window.angular), angular.module("app", [ "ngAnimate", "ngSanitize", "ui.router", "ui.bootstrap", "ui.jq", "oc.lazyLoad" ]), 
app = angular.module("app").config([ "$controllerProvider", "$compileProvider", "$filterProvider", "$provide", function(a, b, c, d) {
    app.controller = a.register, app.directive = b.directive, app.filter = c.register, 
    app.factory = d.factory, app.service = d.service, app.constant = d.constant, app.value = d.value;
} ]).filter("trustHtml", function(a) {
    return function(b) {
        return a.trustAsHtml(b);
    };
}), angular.module("app").run([ "$rootScope", "$state", "$stateParams", function(a, b, c) {
    function d() {
        "access.forgotpwd" !== b.current.name && (null == getCookie("user") || null == getCookie("pass") || "" == getCookie("user") || "" == getCookie("pass")) && b.go("access.signin");
    }
    a.$state = b, a.$stateParams = c;
    var d = a.$on("$stateChangeSuccess", d);
} ]).config([ "$stateProvider", "$urlRouterProvider", function(a, b) {
    b.otherwise("/app/index"), a.state("app", {
        "abstract":!0,
        url:"/app",
        templateUrl:"tpl.asp?page=2",
        resolve:{
            deps:[ "$ocLazyLoad", function(a) {
                return a.load([ "js/controller.min.js" ]);
            } ]
        }
    }).state("app.index", {
        url:"/index",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[0] ? "tpl.asp?page=12" :"tpl.asp?page=7";
        }
    }).state("app.config", {
        url:"/config/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=3" :"tpl.asp?page=7";
        }
    }).state("app.text_list", {
        url:"/text_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[2] ? "tpl.asp?page=52" :"tpl.asp?page=7";
        }
    }).state("app.text_add", {
        url:"/text_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[2] ? "tpl.asp?page=51" :"tpl.asp?page=7";
        }
    }).state("app.slide_list", {
        url:"/slide_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=45" :"tpl.asp?page=7";
        }
    }).state("app.slide_add", {
        url:"/slide_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=44" :"tpl.asp?page=7";
        }
    }).state("app.m_slide_list", {
        url:"/m_slide_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[10] ? "tpl.asp?page=20" :"tpl.asp?page=7";
        }
    }).state("app.m_slide_add", {
        url:"/m_slide_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[10] ? "tpl.asp?page=19" :"tpl.asp?page=7";
        }
    }).state("app.link_list", {
        url:"/link_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=14" :"tpl.asp?page=7";
        }
    }).state("app.link_add", {
        url:"/link_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=13" :"tpl.asp?page=7";
        }
    }).state("app.news_list", {
        url:"/news_list/:id/:page/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[3] ? "tpl.asp?page=26" :"tpl.asp?page=7";
        }
    }).state("app.news_add", {
        url:"/news_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[3] ? "tpl.asp?page=25" :"tpl.asp?page=7";
        }
    }).state("app.product_list", {
        url:"/product_list/:id/:page/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=35" :"tpl.asp?page=7";
        }
    }).state("app.product_add", {
        url:"/product_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=33" :"tpl.asp?page=7";
        }
    }).state("app.product_excel", {
        url:"/product_excel/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=69" :"tpl.asp?page=7";
        }
    }).state("app.product_add2", {
        url:"/product_add2",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=34" :"tpl.asp?page=7";
        }
    }).state("app.nsort_list", {
        url:"/nsort_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[3] ? "tpl.asp?page=28" :"tpl.asp?page=7";
        }
    }).state("app.nsort_add", {
        url:"/nsort_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[3] ? "tpl.asp?page=27" :"tpl.asp?page=7";
        }
    }).state("app.psort_list", {
        url:"/psort_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=37" :"tpl.asp?page=7";
        }
    }).state("app.psort_add", {
        url:"/psort_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=36" :"tpl.asp?page=7";
        }
    }).state("app.order_list", {
        url:"/order_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=29" :"tpl.asp?page=7";
        }
    }).state("app.send", {
        url:"/send/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=42" :"tpl.asp?page=7";
        }
    }).state("app.wuliu", {
        url:"/wuliu/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=64" :"tpl.asp?page=7";
        }
    }).state("app.tk", {
        url:"/tk/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[4] ? "tpl.asp?page=53" :"tpl.asp?page=7";
        }
    }).state("app.sitemap", {
        url:"/sitemap",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=43" :"tpl.asp?page=7";
        }
    }).state("app.form_list", {
        url:"/form_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[5] ? "tpl.asp?page=10" :"tpl.asp?page=7";
        }
    }).state("app.form_add", {
        url:"/form_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[5] ? "tpl.asp?page=9" :"tpl.asp?page=7";
        }
    }).state("app.content_add", {
        url:"/content_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[5] ? "tpl.asp?page=6" :"tpl.asp?page=7";
        }
    }).state("app.response_list", {
        url:"/response_list/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[5] ? "tpl.asp?page=39" :"tpl.asp?page=7";
        }
    }).state("app.template_list", {
        url:"/template_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=50" :"tpl.asp?page=7";
        }
    }).state("app.template_all", {
        url:"/template_all/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=47" :"tpl.asp?page=7";
        }
    }).state("app.plug", {
        url:"/plug/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=32" :"tpl.asp?page=7";
        }
    }).state("app.tohtml", {
        url:"/tohtml/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=54" :"tpl.asp?page=7";
        }
    }).state("app.contact", {
        url:"/contact/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[8] ? "tpl.asp?page=5" :"tpl.asp?page=7";
        }
    }).state("app.guestbook", {
        url:"/guestbook/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[8] ? "tpl.asp?page=11" :"tpl.asp?page=7";
        }
    }).state("app.reply", {
        url:"/reply/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[8] ? "tpl.asp?page=38" :"tpl.asp?page=7";
        }
    }).state("app.m_config", {
        url:"/m_config/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[10] ? "tpl.asp?page=17" :"tpl.asp?page=7";
        }
    }).state("app.config2", {
        url:"/config2/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=4" :"tpl.asp?page=7";
        }
    }).state("app.m_config2", {
        url:"/m_config2/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[10] ? "tpl.asp?page=18" :"tpl.asp?page=7";
        }
    }).state("app.menu_list", {
        url:"/menu_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[7] ? "tpl.asp?page=24" :"tpl.asp?page=7";
        }
    }).state("app.menu_add", {
        url:"/menu_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[7] ? "tpl.asp?page=23" :"tpl.asp?page=7";
        }
    }).state("app.admin_list", {
        url:"/admin_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=1" :"tpl.asp?page=7";
        }
    }).state("app.admin_add", {
        url:"/admin_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=0" :"tpl.asp?page=7";
        }
    }).state("app.member_list", {
        url:"/member_list/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=22" :"tpl.asp?page=7";
        }
    }).state("app.member_add", {
        url:"/member_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=21" :"tpl.asp?page=7";
        }
    }).state("app.safe", {
        url:"/safe/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[11] ? "tpl.asp?page=40" :"tpl.asp?page=7";
        }
    }).state("app.space", {
        url:"/space/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[11] ? "tpl.asp?page=46" :"tpl.asp?page=7";
        }
    }).state("app.lv", {
        url:"/lv/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=15" :"tpl.asp?page=7";
        }
    }).state("app.lv_add", {
        url:"/lv_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[9] ? "tpl.asp?page=16" :"tpl.asp?page=7";
        }
    }).state("app.file", {
        url:"/file/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[11] ? "tpl.asp?page=8" :"tpl.asp?page=7";
        }
    }).state("app.data", {
        url:"/data/:x",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[11] ? "tpl.asp?page=70" :"tpl.asp?page=7";
        }
    }).state("app.search", {
        url:"/search/:key",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=41" :"tpl.asp?page=7";
        }
    }).state("app.template_html", {
        url:"/template_html/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=49" :"tpl.asp?page=7";
        }
    }).state("app.template_edit", {
        url:"/template_edit/:id/:name",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[6] ? "tpl.asp?page=48" :"tpl.asp?page=7";
        }
    }).state("app.w_config", {
        url:"/w_config",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=55" :"tpl.asp?page=7";
        }
    }).state("app.w_menu", {
        url:"/w_menu",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=59" :"tpl.asp?page=7";
        }
    }).state("app.w_menu_add", {
        url:"/w_menu_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=60" :"tpl.asp?page=7";
        }
    }).state("app.w_msg", {
        url:"/w_msg",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=61" :"tpl.asp?page=7";
        }
    }).state("app.w_reply", {
        url:"/w_reply",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=62" :"tpl.asp?page=7";
        }
    }).state("app.w_reply_add", {
        url:"/w_reply_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=63" :"tpl.asp?page=7";
        }
    }).state("app.w_event", {
        url:"/w_event",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=56" :"tpl.asp?page=7";
        }
    }).state("app.w_event_add", {
        url:"/w_event_add/:id",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=57" :"tpl.asp?page=7";
        }
    }).state("app.w_member", {
        url:"/w_member",
        templateUrl:function() {
            return null !== getCookie("auth") && 1 == getCookie("auth").split("|")[1] ? "tpl.asp?page=58" :"tpl.asp?page=7";
        }
    }).state("app.sql", {
        url:"/sql",
        templateUrl:"tpl.asp?page=68"
    }).state("access", {
        url:"/access",
        template:'<div ui-view class="fade-in-right-big smooth"></div>',
        resolve:{
            deps:[ "uiLoad", function(a) {
                return a.load([ "js/controller.min.js" ]);
            } ]
        }
    }).state("access.signin", {
        url:"/signin",
        templateUrl:"tpl.asp?page=31"
    }).state("access.forgotpwd", {
        url:"/forgotpwd",
        templateUrl:"tpl.asp?page=30"
    });
} ]), angular.module("app").controller("AppCtrl", [ "$scope", "$state", "$modal", "$window", "$sce", "$http", function(a, b, c, d, e, f) {
    function k(a) {
        var b = a["navigator"]["userAgent"] || a["navigator"]["vendor"] || a["opera"];
        return /iPhone|iPod|iPad|Silk|Android|BlackBerry|Opera Mini|IEMobile/.test(b);
    }
    var h, i, j, g = !!navigator.userAgent.match(/MSIE/i);
    g && angular.element(d.document.body).addClass("ie"), k(d) && angular.element(d.document.body).addClass("smart"), 
    a.app = {
        name:"后台管理",
        version:"1.3.3",
        color:{
            primary:"#7266ba",
            info:"#23b7e5",
            success:"#27c24c",
            warning:"#fad733",
            danger:"#f05050",
            light:"#e8eff0",
            dark:"#3a3f51",
            black:"#1c2b36"
        },
        settings:{
            themeID:1,
            navbarHeaderColor:"bg-black",
            navbarCollapseColor:"bg-white-only",
            asideColor:"bg-black",
            headerFixed:!0,
            asideFixed:!0,
            asideFolded:!1,
            asideDock:!1,
            container:!1
        }
    }, a.alerthide = !0, f.get("data.asp?action=configx").success(function(d) {
        a.c = d, h = d.lang, i = d.C_delang, j = d.C_lang, a.onum = d.onum, a.fnum = d.fnum, a.C_wap = d.C_wap, a.C_template = d.C_template,a.C_ico = d.C_ico, 
        a.gnum = d.gnum, a.nnum = d.nnum, a.anum = d.anum, a.auth = d.auth, a.lang = d.lang
        $("#ico").attr("href","../"+d.C_ico);
         "0" == j ? (a.selectLang = "<i class='fa fa-times-circle'></i> 关闭双语", 
        a.lcss = "", a.alerthide = !0) :(a.alerthide = !1, "0" == h && (a.selectLang = "<img src='img/0.png'> 简体中文", 
        a.lcss = "cn", a.C_lang = 0), "1" == h && (a.selectLang = "<img src='img/1.png'> English", 
        a.lcss = "en", a.C_lang = 1)), a.alerts = [ {
            type:"warning",
            msg:'带 <img src="img/' + h + '.png"> 标志的输入框需单独设置。'
        } ], a.closeAlert = function(b) {
            a.alerts.splice(b, 1);
        }, a.getauth = function() {
            c.open({
                template:'<div class="modal-header"><span style="font-size:14px;">购买授权</span> <button class="btn btn-info btn-xs pull-right" ng-click="cancel()">×</button></div><iframe src="http://www.s-cms.cn/payx/?domain=' + d.domain + "&product=auth&url=" + d.url + '" type="1" frameborder="0" height="600" width="100%"></iframe>',
                controller:"ModalInstanceCtrl",
                size:"lg"
            });
        }, a.showUpload=function(a){
            showUpload('pic_'+a+'x','pic_'+a,'../media',1,null,'','');

        }, a.setLang = function(a) {
            1 == d.x7 ? (ajaxx("ajax.asp?type=setlang&lang=" + a, "", "", 2, ""), location.reload()) :(toastr.error("请先购买插件后再使用双语功能！"), 
            b.go("app.plug"));
        };
    }), a.alerts = [ {
        type:"success",
        msg:'带 <img src="img/' + a.C_lang + '.png"> 标志的输入框需单独设置。'
    } ], a.closeAlert = function(b) {
        a.alerts.splice(b, 1);
    }, a.trust = function(a) {
        return e.trustAsHtml(a);
    }, a.update = function() {
        c.open({
            template:'<div class="modal-header"><span style="font-size:14px;">检测更新</span> <button class="btn btn-info btn-xs pull-right" ng-click="cancel()">×</button></div><iframe src="update2.asp" type="1" frameborder="0" height="600" width="100%"></iframe>',
            controller:"ModalInstanceCtrl",
            size:"lg"
        });
    }, a.istrue = function(a) {
        return "" == a || null == a ? !1 :!0;
    }, a.isSelected = function(a) {
        return a >= 1 ? !0 :!1;
    }, a.isSelected2 = function(a, b) {
        return a == b ? !0 :!1;
    };
} ]), app.controller("ModalInstanceCtrl", [ "$scope", "$modalInstance", "$state",function(a, b,c) {
    a.cancel = function() {
        b.dismiss("cancel");
    };
    a.goto = function(str) {
        c.go("app."+str);
        b.dismiss("cancel");
    };
} ]), app.controller("TypeaheadDemoCtrl", [ "$scope", "$http", function(a, b) {
    a.selected = void 0, a.states = [ "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming" ], 
    a.getLocation = function(a) {
        return b.get("http://maps.googleapis.com/maps/api/geocode/json", {
            params:{
                address:a,
                sensor:!1
            }
        }).then(function(a) {
            var b = [];
            return angular.forEach(a.data.results, function(a) {
                b.push(a.formatted_address);
            }), b;
        });
    };
} ]), angular.module("ui.load", []).service("uiLoad", [ "$document", "$q", "$timeout", function(a, b, c) {
    var d = [], e = !1, f = b.defer();
    this.load = function(a) {
        a = angular.isArray(a) ? a :a.split(/\s+/);
        var b = this;
        return e || (e = f.promise), angular.forEach(a, function(a) {
            e = e.then(function() {
                return a.indexOf(".css") >= 0 ? b.loadCSS(a) :b.loadScript(a);
            });
        }), f.resolve(), e;
    }, this.loadScript = function(e) {
        var f, g;
        return d[e] ? d[e].promise :(f = b.defer(), g = a[0].createElement("script"), g.src = e, 
        g.onload = function(a) {
            c(function() {
                f.resolve(a);
            });
        }, g.onerror = function(a) {
            c(function() {
                f.reject(a);
            });
        }, a[0].body.appendChild(g), d[e] = f, f.promise);
    }, this.loadCSS = function(e) {
        var f, g;
        return d[e] ? d[e].promise :(f = b.defer(), g = a[0].createElement("link"), g.rel = "stylesheet", 
        g.type = "text/css", g.href = e, g.onload = function(a) {
            c(function() {
                f.resolve(a);
            });
        }, g.onerror = function(a) {
            c(function() {
                f.reject(a);
            });
        }, a[0].head.appendChild(g), d[e] = f, f.promise);
    };
} ]), angular.module("ui.jq", [ "ui.load" ]).value("uiJqConfig", {}).directive("uiJq", [ "uiJqConfig", "JQ_CONFIG", "uiLoad", "$timeout", function(a, b, c, d) {
    return {
        restrict:"A",
        compile:function(e, f) {
            if (!angular.isFunction(e[f.uiJq]) && !b[f.uiJq]) throw new Error('ui-jq: The "' + f.uiJq + '" function does not exist');
            var g = a && a[f.uiJq];
            return function(a, e, f) {
                function h() {
                    var b = [];
                    return f.uiOptions ? (b = a.$eval("[" + f.uiOptions + "]"), angular.isObject(g) && angular.isObject(b[0]) && (b[0] = angular.extend({}, g, b[0]))) :g && (b = [ g ]), 
                    b;
                }
                function i() {
                    d(function() {
                        e[f.uiJq].apply(e, h());
                    }, 0, !1);
                }
                function j() {
                    f.uiRefresh && a.$watch(f.uiRefresh, function() {
                        i();
                    });
                }
                f.ngModel && e.is("select,input,textarea") && e.bind("change", function() {
                    e.trigger("input");
                }), b[f.uiJq] ? c.load(b[f.uiJq]).then(function() {
                    i(), j();
                }).catch(function() {}) :(i(), j());
            };
        }
    };
} ]), angular.module("app").directive("uiNav", [ "$timeout", function() {
    return {
        restrict:"AC",
        link:function(a, b) {
            var g, d = $(window), e = 768, f = $(".app-aside"), h = ".dropdown-backdrop";
            b.on("click", "a", function(a) {
                g && g.trigger("mouseleave.nav");
                var b = $(this);
                b.parent().siblings(".active").toggleClass("active"), b.next().is("ul") && b.parent().toggleClass("active") && a.preventDefault(), 
                b.next().is("ul") || d.width() < e && $(".app-aside").removeClass("show off-screen");
            }), b.on("mouseenter", "a", function(a) {
                if (g && g.trigger("mouseleave.nav"), $("> .nav", f).remove(), !(!$(".app-aside-fixed.app-aside-folded").length || d.width() < e || $(".app-aside-dock").length)) {
                    var c, b = $(a.target), i = $(window).height(), j = 50, k = 150;
                    !b.is("a") && (b = b.closest("a")), b.next().is("ul") && (g = b.next(), b.parent().addClass("active"), 
                    c = b.parent().position().top + j, g.css("top", c), c + g.height() > i && g.css("bottom", 0), 
                    c + k > i && g.css("bottom", i - c - j).css("top", "auto"), g.appendTo(f), g.on("mouseleave.nav", function() {
                        $(h).remove(), g.appendTo(b.parent()), g.off("mouseleave.nav").css("top", "auto").css("bottom", "auto"), 
                        b.parent().removeClass("active");
                    }), $(".smart").length && $('<div class="dropdown-backdrop"/>').insertAfter(".app-aside").on("click", function(a) {
                        a && a.trigger("mouseleave.nav");
                    }));
                }
            }), f.on("mouseleave", function() {
                g && g.trigger("mouseleave.nav"), $("> .nav", f).remove();
            });
        }
    };
} ]), pltsPop = null, pltsoffsetX = 3, pltsoffsetY = 5, pltsPopbg = "#F6FDDC", pltsPopfg = "#DEDBDE", 
pltsTitle = "", document.write('<div id="pltsTipLayer" style="display: none;position: absolute; z-index:10001;background:#FFFFFF; padding:5px; border:#DDDDDD solid 1px;"></div>'), 
pltsTipLayer = document.getElementById("pltsTipLayer"), pltsinits(), function(a) {
    a([ "jquery" ], function(a) {
        return function() {
            function g(a, b, c) {
                return t({
                    type:e.error,
                    iconClass:u().iconClasses.error,
                    message:a,
                    optionsOverride:c,
                    title:b
                });
            }
            function h(c, d) {
                return c || (c = u()), b = a("#" + c.containerId), b.length ? b :(d && (b = q(c)), 
                b);
            }
            function i(a, b, c) {
                return t({
                    type:e.info,
                    iconClass:u().iconClasses.info,
                    message:a,
                    optionsOverride:c,
                    title:b
                });
            }
            function j(a) {
                c = a;
            }
            function k(a, b, c) {
                return t({
                    type:e.success,
                    iconClass:u().iconClasses.success,
                    message:a,
                    optionsOverride:c,
                    title:b
                });
            }
            function l(a, b, c) {
                return t({
                    type:e.warning,
                    iconClass:u().iconClasses.warning,
                    message:a,
                    optionsOverride:c,
                    title:b
                });
            }
            function m(a) {
                var c = u();
                b || h(c), p(a, c) || o(c);
            }
            function n(c) {
                var d = u();
                return b || h(d), c && 0 === a(":focus", c).length ? (v(c), void 0) :(b.children().length && b.remove(), 
                void 0);
            }
            function o(c) {
                var e, d = b.children();
                for (e = d.length - 1; e >= 0; e--) p(a(d[e]), c);
            }
            function p(b, c) {
                return b && 0 === a(":focus", b).length ? (b[c.hideMethod]({
                    duration:c.hideDuration,
                    easing:c.hideEasing,
                    complete:function() {
                        v(b);
                    }
                }), !0) :!1;
            }
            function q(c) {
                return b = a("<div/>").attr("id", c.containerId).addClass(c.positionClass).attr("aria-live", "polite").attr("role", "alert"), 
                b.appendTo(a(c.target)), b;
            }
            function r() {
                return {
                    tapToDismiss:!0,
                    toastClass:"toast",
                    containerId:"toast-container",
                    debug:!1,
                    showMethod:"fadeIn",
                    showDuration:300,
                    showEasing:"swing",
                    onShown:void 0,
                    hideMethod:"fadeOut",
                    hideDuration:1e3,
                    hideEasing:"swing",
                    onHidden:void 0,
                    extendedTimeOut:1e3,
                    iconClasses:{
                        error:"toast-error",
                        info:"toast-info",
                        success:"toast-success",
                        warning:"toast-warning"
                    },
                    iconClass:"toast-info",
                    positionClass:"toast-top-right",
                    timeOut:5e3,
                    titleClass:"toast-title",
                    messageClass:"toast-message",
                    target:"body",
                    closeHtml:"<button>&times;</button>",
                    newestOnTop:!0
                };
            }
            function s(a) {
                c && c(a);
            }
            function t(c) {
                function n(b) {
                    return !a(":focus", i).length || b ? i[e.hideMethod]({
                        duration:e.hideDuration,
                        easing:e.hideEasing,
                        complete:function() {
                            v(i), e.onHidden && "hidden" !== m.state && e.onHidden(), m.state = "hidden", m.endTime = new Date(), 
                            s(m);
                        }
                    }) :void 0;
                }
                function o() {
                    (e.timeOut > 0 || e.extendedTimeOut > 0) && (g = setTimeout(n, e.extendedTimeOut));
                }
                function p() {
                    clearTimeout(g), i.stop(!0, !0)[e.showMethod]({
                        duration:e.showDuration,
                        easing:e.showEasing
                    });
                }
                var g, i, j, k, l, m, e = u(), f = c.iconClass || e.iconClass;
                return "undefined" != typeof c.optionsOverride && (e = a.extend(e, c.optionsOverride), 
                f = c.optionsOverride.iconClass || f), d++, b = h(e, !0), g = null, i = a("<div/>"), 
                j = a("<div/>"), k = a("<div/>"), l = a(e.closeHtml), m = {
                    toastId:d,
                    state:"visible",
                    startTime:new Date(),
                    options:e,
                    map:c
                }, c.iconClass && i.addClass(e.toastClass).addClass(f), c.title && (j.append(c.title).addClass(e.titleClass), 
                i.append(j)), c.message && (k.append(c.message).addClass(e.messageClass), i.append(k)), 
                e.closeButton && (l.addClass("toast-close-button").attr("role", "button"), i.prepend(l)), 
                i.hide(), e.newestOnTop ? b.prepend(i) :b.append(i), i[e.showMethod]({
                    duration:e.showDuration,
                    easing:e.showEasing,
                    complete:e.onShown
                }), e.timeOut > 0 && (g = setTimeout(n, e.timeOut)), i.hover(p, o), !e.onclick && e.tapToDismiss && i.click(n), 
                e.closeButton && l && l.click(function(a) {
                    a.stopPropagation ? a.stopPropagation() :void 0 !== a.cancelBubble && a.cancelBubble !== !0 && (a.cancelBubble = !0), 
                    n(!0);
                }), e.onclick && i.click(function() {
                    e.onclick(), n();
                }), s(m), e.debug && console && console.log(m), i;
            }
            function u() {
                return a.extend({}, r(), f.options);
            }
            function v(a) {
                b || (b = h()), a.is(":visible") || (a.remove(), a = null, 0 === b.children().length && b.remove());
            }
            var b, c, d = 0, e = {
                error:"error",
                info:"info",
                success:"success",
                warning:"warning"
            }, f = {
                clear:m,
                remove:n,
                error:g,
                getContainer:h,
                info:i,
                options:{},
                subscribe:j,
                success:k,
                version:"2.0.3",
                warning:l
            };
            return f;
        }();
    });
}("function" == typeof define && define.amd ? define :function(a, b) {
    "undefined" != typeof module && module.exports ? module.exports = b(require("jquery")) :window["toastr"] = b(window["jQuery"]);
}), toastr.options = {
    closeButton:!0,
    debug:!1,
    positionClass:"toast-bottom-right",
    onclick:null,
    showDuration:"300",
    hideDuration:"1000",
    timeOut:"3000",
    extendedTimeOut:"1000",
    showEasing:"swing",
    hideEasing:"linear",
    showMethod:"fadeIn",
    hideMethod:"fadeOut"
};
angular.module('app')
  .directive('uiToggleClass', ['$timeout', '$document', function($timeout, $document) {
    return {
      restrict: 'AC',
      link: function(scope, el, attr) {
        el.on('click', function(e) {
          e.preventDefault();
          var classes = attr.uiToggleClass.split(','),
              targets = (attr.target && attr.target.split(',')) || Array(el),
              key = 0;
          angular.forEach(classes, function( _class ) {
            var target = targets[(targets.length && key)];            
            ( _class.indexOf( '*' ) !== -1 ) && magic(_class, target);
            $( target ).toggleClass(_class);
            key ++;
          });
          $(el).toggleClass('active');

          function magic(_class, target){
            var patt = new RegExp( '\\s' + 
                _class.
                  replace( /\*/g, '[A-Za-z0-9-_]+' ).
                  split( ' ' ).
                  join( '\\s|\\s' ) + 
                '\\s', 'g' );
            var cn = ' ' + $(target)[0].className + ' ';
            while ( patt.test( cn ) ) {
              cn = cn.replace( patt, ' ' );
            }
            $(target)[0].className = $.trim( cn );
          }
        });
      }
    };
  }]);