text: /**
   * @preserve
   * Jribbble v2.0.4 | Thu Jun 4 01:49:29 2015 -0400
   * Copyright (c) 2015, Tyler Gaw me@tylergaw.com
   * Released under the ISC-LICENSE
   */
  !(function (e, t, r, s) {
    e.jribbble = {}; let n = null; const o = 'https://api.dribbble.com/v1'; const i = ['animated', 'attachments', 'debuts', 'playoffs', 'rebounds', 'teams']; const u = { token: 'Jribbble: Missing Dribbble access token. Set one with $.jribbble.accessToken = YOUR_ACCESS_TOKEN. If you do not have an access token, you must register a new application at https://dribbble.com/account/applications/new', singular(e) { return e.substr(0, e.length - 1) }, idRequired(e) { return `Jribbble: You have to provide a ${this.singular(e)}${' ID. ex: $.jribbble.%@("1234").'.replace(/%@/g, e)}` }, subResource(e) { return `Jribbble: You have to provide a ${this.singular(e)}${' ID to get %@. ex: $.jribbble.%@("1234").%@()'.replace(/%@/g, e)}` }, shotId(e) { return `Jribbble: You have to provide a shot ID to get %@. ex: ${' $.jribbble.shots("1234").%@()'.replace(/%@/g, e)}` }, commentLikes: 'Jribbble: You have to provide a comment ID to get likes. ex:  $.jribbble.shots("1234").comments("456").likes()' }; const c = function (e, t) { if (e && typeof e !== 'object') return e; throw new Error(u.idRequired(t)) }; const l = function (e) { const t = {}; return e.forEach((e) => { t[e] = d.call(this, e) }), t }; const h = function (t) { const r = e.param(t); return r ? `?${r}` : '' }; const a = function (e) { if (e.length !== 0) { const t = e[0]; const r = typeof t; let s = {}; if (r === 'number' || r === 'string') { const n = i.indexOf(t); n > -1 ? s.list = t : s.resource = t } else r === 'object' && (s = t); return s } }; const b = function () { const t = e.extend({}, e.Deferred()); const r = function () { return this.methods = [], this.response = null, this.flushed = !1, this.add = function (e) { this.flushed ? e(this.scope) : this.methods.push(e) }, this.flush = function (e) { if (!this.flushed) { for (this.scope = e, this.flushed = !0; this.methods[0];) this.methods.shift()(e); return e } }, this }; return t.queue = new r(), t.url = o, t.get = function () { return n ? (e.ajax({ type: 'GET', url: this.url, beforeSend(e) { e.setRequestHeader('Authorization', `Bearer ${n}`) }, success: function (e) { this.resolve(e) }.bind(this), error: function (e) { this.reject(e) }.bind(this) }), this) : (console.error(u.token), !1) }, t }; const f = function (t) { return function (r) { return e.extend(this, b()), this.queue.add((e) => { e.url += `/${t}/${r}` }), setTimeout(() => { this.queue.flush(this).get() }), this } }; var d = function (e) { return function (t) { return this.queue.add((r) => { r.url += `/${e}/${h(t || {})}` }), this } }; e.jribbble.shots = function (t, r) { const s = a([].slice.call(arguments)) || {}; const n = r || {}; const o = function (t) { return function (r, s) { const n = a([].slice.call(arguments)) || {}; const o = s || {}; return this.queue.add((r) => { if (!r.shotId) throw new Error(u.shotId(t)); r.url += `/${t}/`, n.resource && (r.url += n.resource, delete n.resource), r.url += h(e.extend(n, o)) }), this } }; const i = function () { return e.extend(this, b()), this.url += '/shots/', this.queue.add((t) => { s.resource && (t.shotId = s.resource, t.url += s.resource, delete s.resource), t.url += h(e.extend(s, n)) }), setTimeout(() => { this.queue.flush(this).get() }), this }; return i.prototype.attachments = o('attachments'), i.prototype.buckets = o('buckets'), i.prototype.likes = o('likes'), i.prototype.projects = o('projects'), i.prototype.rebounds = o('rebounds'), i.prototype.comments = function (t, r) { const s = a([].slice.call(arguments)) || {}; const n = r || {}; return this.queue.add((t) => { if (!t.shotId) throw new Error(u.shotId('comments')); t.url += '/comments/', s.resource && (t.commentId = s.resource, t.url += `${s.resource}/`, delete s.resource), t.url += h(e.extend(s, n)) }), this.likes = function (e) { const t = e || {}; return this.queue.add((e) => { if (!e.commentId) throw new Error(u.commentLikes); e.url += `likes/${h(t)}` }), this }, this }, new i() }, e.jribbble.teams = function (e) { const t = 'teams'; const r = c(e, t); const s = f.call(this, t); return s.prototype = l.call(this, ['members', 'shots']), new s(r) }, e.jribbble.users = function (e) { const t = 'users'; const r = c(e, t); const s = f.call(this, t); return s.prototype = l.call(this, ['buckets', 'followers', 'following', 'likes', 'projects', 'shots', 'teams']), s.prototype.isFollowing = function (e) { return this.queue.add((t) => { t.url += `/following/${e}` }), this }, new s(r) }, e.jribbble.buckets = function (e) { const t = 'buckets'; const r = c(e, t); const s = f.call(this, t); return s.prototype = l.call(this, ['shots']), new s(r) }, e.jribbble.projects = function (e) { const t = 'projects'; const r = c(e, t); const s = f.call(this, t); return s.prototype = l.call(this, ['shots']), new s(r) }, e.jribbble.setToken = function (e) { return n = e, this }
  }(jQuery, window, document))
  