text: (function () {
    var k = function (d, a) {
      return function () {
        return d.apply(a, arguments)
      }
    };
    this.FacePP = function () {
      function d(a, b, c) {
        var e, f, g, h, l = this;
        this.apiKey = a;
        this.apiSecret = b;
        null == c && (c = {});
        this.sessionCheck = k(this.sessionCheck, this);
        a = {
          apiURL: "https://apicn.faceplusplus.com/v2",
          sessionInterval: 500,
          requestTimeout: 1E4,
          ajaxAdapter: "FormData"in window ? "XMLHttpRequest" : "jQuery",
          concurrency: 2
        };
        for (e in a)null == c[e] && (c[e] = a[e]);
        this.apiURL = c.apiURL.replace(d.RE_TRIM, "");
        this.sessionInterval = c.sessionInterval;
        this.requestTimeout = c.requestTimeout;
        this.requestAdapter = d.adapter[c.ajaxAdapter];
        0 < (g = c.concurrency) && (f = [], h = function () {
          var a, b, c, e;
          0 < g && 0 < f.length && (--g, e = f.shift(), a = e[0], c = e[1], b = e[2], d.prototype.request.call(l, a, c, function (a, c) {
            ++g;
            setTimeout(h, 0);
            b(a, c)
          }))
        }, this.request = function (a, c, b) {
          f.push([a, c, b]);
          h()
        })
      }
  
      d.RE_TRIM = /^\/+|\/+$/g;
      d.prototype.request = function (a, b, c) {
        b.api_key = this.apiKey;
        b.api_secret = this.apiSecret;
        a = this.apiURL + "/" + a.replace(d.RE_TRIM, "");
        this.requestAdapter(a, b, {timeout: this.requestTimeout},
            c)
      };
      d.prototype.sessionCheck = function (a, b) {
        var c = this;
        this.request("info/get_session", {session_id: a}, function (e, f) {
          e ? b(e, f) : "FAILED" === f.status ? b(f.result.error_code || -1, f.result) : "INQUEUE" === f.status ? setTimeout(c.sessionCheck, c.sessionInterval, a, b) : b(null, f.result)
        })
      };
      d.prototype.requestAsync = function (a, b, c) {
        var e = this;
        b.async = "true";
        this.request(a, b, function (a, b) {
          a ? c(a, b) : setTimeout(e.sessionCheck, e.sessionInterval, b.session_id, c)
        })
      };
      d.adapter = {
        jQuery: function (a, b, c, e) {
          var f, g;
          g = 0;
          for (f in b)g +=
              b[f].length || 0;
          jQuery.ajax({
            url: a,
            dataType: "jsonp",
            crossDomain: !0,
            data: b,
            method: 1024 > g ? "GET" : "POST",
            timeout: c.timeout,
            error: function (a) {
              if (a = a.responseText)try {
                a = JSON.parse(a)
              } catch (b) {
              }
              e((null != a ? a.error_code : void 0) || -1, a)
            },
            success: function (a) {
              e(null, a)
            }
          })
        }, XMLHttpRequest: function (a, b, c, e) {
          var f, g, d;
          f = !1;
          for (g in b)if (b[g]instanceof Blob) {
            f = !0;
            break
          }
          d = new XMLHttpRequest;
          d.onreadystatechange = function () {
            var a;
            if (4 === this.readyState) {
              this.onreadystatechange = null;
              if (a = this.responseText)try {
                a = JSON.parse(a)
              } catch (b) {
              }
              200 ===
              this.status ? e(null, a) : e(a.error_code || -1, a)
            }
          };
          "timeout"in d && (d.timeout = c.timeout);
          d.open("POST", a, !0);
          if (f) {
            a = new FormData;
            for (g in b)a.append(g, b[g]);
            d.send(a)
          } else {
            d.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            a = encodeURIComponent;
            c = [];
            for (g in b)c.push("" + a(g) + "=" + a(b[g]));
            d.send(c.join("&"))
          }
        }
      };
      return d
    }()
  }).call(this);
  