github-tools/github-extended

View on GitHub
demo/github-extended.bundle.min.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Github=t()}}(function(){var t;return function e(t,n,r){function o(u,s){if(!n[u]){if(!t[u]){var a="function"==typeof require&&require;if(!s&&a)return a(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===u||e===h?62:e===s||e===l?63:a>e?-1:a+10>e?e-a+26+26:c+26>e?e-c:f+26>e?e-f+26:void 0}function n(t){function n(t){f[h++]=t}var r,o,u,s,a,f;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=t.length;a="="===t.charAt(c-2)?2:"="===t.charAt(c-1)?1:0,f=new i(3*t.length/4-a),u=a>0?t.length-4:t.length;var h=0;for(r=0,o=0;u>r;r+=4,o+=3)s=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===a?(s=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&s)):1===a&&(s=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(s>>8&255),n(255&s)),f}function o(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var o,i,u,s=t.length%3,a="";for(o=0,u=t.length-s;u>o;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],a+=n(i);switch(s){case 1:i=t[t.length-1],a+=e(i>>2),a+=e(i<<4&63),a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=e(i>>10),a+=e(i>>4&63),a+=e(i<<2&63),a+="="}return a}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="+".charCodeAt(0),s="/".charCodeAt(0),a="0".charCodeAt(0),f="a".charCodeAt(0),c="A".charCodeAt(0),h="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=o}("undefined"==typeof n?this.base64js={}:n)},{}],2:[function(t,e,n){},{}],3:[function(t,e,n){(function(e){function r(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function o(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t){return this instanceof i?(this.length=0,this.parent=void 0,"number"==typeof t?u(this,t):"string"==typeof t?s(this,t,arguments.length>1?arguments[1]:"utf8"):a(this,t)):arguments.length>1?new i(t,arguments[1]):new i(t)}function u(t,e){if(t=d(t,0>e?0:0|w(e)),!i.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function s(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|E(e,n);return t=d(t,r),t.write(e,n),t}function a(t,e){if(i.isBuffer(e))return f(t,e);if(K(e))return c(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return h(t,e);if(e instanceof ArrayBuffer)return l(t,e)}return e.length?p(t,e):g(t,e)}function f(t,e){var n=0|w(e.length);return t=d(t,n),e.copy(t,0,0,n),t}function c(t,e){var n=0|w(e.length);t=d(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n=0|w(e.length);t=d(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(t,e){return i.TYPED_ARRAY_SUPPORT?(e.byteLength,t=i._augment(new Uint8Array(e))):t=h(t,new Uint8Array(e)),t}function p(t,e){var n=0|w(e.length);t=d(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function g(t,e){var n,r=0;"Buffer"===e.type&&K(e.data)&&(n=e.data,r=0|w(n.length)),t=d(t,r);for(var o=0;r>o;o+=1)t[o]=255&n[o];return t}function d(t,e){i.TYPED_ARRAY_SUPPORT?(t=i._augment(new Uint8Array(e)),t.__proto__=i.prototype):(t.length=e,t._isBuffer=!0);var n=0!==e&&e<=i.poolSize>>>1;return n&&(t.parent=Q),t}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(t,e){if(!(this instanceof y))return new y(t,e);var n=new i(t,e);return delete n.parent,n}function E(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(r)return N(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return S(this,e,n);case"binary":return _(this,e,n);case"base64":return U(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var u=0;r>u;u++){var s=parseInt(e.substr(2*u,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n+u]=s}return u}function b(t,e,n,r){return J(N(e,t.length-n),t,n,r)}function R(t,e,n,r){return J(H(e),t,n,r)}function A(t,e,n,r){return R(t,e,n,r)}function T(t,e,n,r){return J(X(e),t,n,r)}function I(t,e,n,r){return J(z(e,t.length-n),t,n,r)}function U(t,e,n){return 0===e&&n===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;n>o;){var i=t[o],u=null,s=i>239?4:i>223?3:i>191?2:1;if(n>=o+s){var a,f,c,h;switch(s){case 1:128>i&&(u=i);break;case 2:a=t[o+1],128===(192&a)&&(h=(31&i)<<6|63&a,h>127&&(u=h));break;case 3:a=t[o+1],f=t[o+2],128===(192&a)&&128===(192&f)&&(h=(15&i)<<12|(63&a)<<6|63&f,h>2047&&(55296>h||h>57343)&&(u=h));break;case 4:a=t[o+1],f=t[o+2],c=t[o+3],128===(192&a)&&128===(192&f)&&128===(192&c)&&(h=(15&i)<<18|(63&a)<<12|(63&f)<<6|63&c,h>65535&&1114112>h&&(u=h))}}null===u?(u=65533,s=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=s}return B(r)}function B(t){var e=t.length;if(W>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=W));return n}function S(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(127&t[o]);return r}function _(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function C(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=e;n>i;i++)o+=F(t[i]);return o}function O(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function L(t,e,n){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,n,r,o,u){if(!i.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>o||u>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range")}function D(t,e,n,r){0>e&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);i>o;o++)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function Y(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);i>o;o++)t[n+o]=e>>>8*(r?o:3-o)&255}function G(t,e,n,r,o,i){if(e>o||i>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function M(t,e,n,r,o){return o||G(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,o){return o||G(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(t,e,n,r,52,8),n+8}function k(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return 16>t?"0"+t.toString(16):t.toString(16)}function N(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],u=0;r>u;u++){if(n=t.charCodeAt(u),n>55295&&57344>n){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((e-=1)<0)break;i.push(n)}else if(2048>n){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function z(t,e){for(var n,r,o,i=[],u=0;u<t.length&&!((e-=2)<0);u++)n=t.charCodeAt(u),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function X(t){return Z.toByteArray(k(t))}function J(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}var Z=t("base64-js"),V=t("ieee754"),K=t("isarray");n.Buffer=i,n.SlowBuffer=y,n.INSPECT_MAX_BYTES=50,i.poolSize=8192;var Q={};i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array),i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,u=Math.min(n,r);u>o&&t[o]===e[o];)++o;return o!==u&&(n=t[o],r=e[o]),r>n?-1:n>r?1:0},i.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(t,e){if(!K(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new i(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;n++)e+=t[n].length;var r=new i(e),o=0;for(n=0;n<t.length;n++){var u=t[n];u.copy(r,o),o+=u.length}return r},i.byteLength=E,i.prototype.length=void 0,i.prototype.parent=void 0,i.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):v.apply(this,arguments)},i.prototype.equals=function(t){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===i.compare(this,t)},i.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},i.prototype.compare=function(t){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:i.compare(this,t)},i.prototype.indexOf=function(t,e){function n(t,e,n){for(var r=-1,o=0;n+o<t.length;o++)if(t[n+o]===e[-1===r?0:o-r]){if(-1===r&&(r=o),o-r+1===e.length)return n+r}else r=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(i.isBuffer(t))return n(this,t,e);if("number"==typeof t)return i.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},i.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},i.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},i.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=e,e=0|n,n=o}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var u=!1;;)switch(r){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return R(this,t,e,n);case"binary":return A(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,n);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;i.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(i.TYPED_ARRAY_SUPPORT)r=i._augment(this.subarray(t,e));else{var o=e-t;r=new i(o,void 0);for(var u=0;o>u;u++)r[u]=this[u+t]}return r.length&&(r.parent=this.parent||this),r},i.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||L(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},i.prototype.readUIntBE=function(t,e,n){t=0|t,e=0|e,n||L(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},i.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||L(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},i.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||L(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),V.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),V.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),V.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),V.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||x(this,t,e,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},i.prototype.writeUIntBE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||x(this,t,e,n,Math.pow(2,8*n),0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},i.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Y(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Y(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);x(this,t,e,n,o-1,-o)}var i=0,u=1,s=0>t?1:0;for(this[e]=255&t;++i<n&&(u*=256);)this[e+i]=(t/u>>0)-s&255;return e+n},i.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);x(this,t,e,n,o-1,-o)}var i=n-1,u=1,s=0>t?1:0;for(this[e+i]=255&t;--i>=0&&(u*=256);)this[e+i]=(t/u>>0)-s&255;return e+n},i.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Y(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||x(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Y(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},i.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},i.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},i.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},i.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,u=r-n;if(this===t&&e>n&&r>e)for(o=u-1;o>=0;o--)t[o+e]=this[o+n];else if(1e3>u||!i.TYPED_ARRAY_SUPPORT)for(o=0;u>o;o++)t[o+e]=this[o+n];else t._set(this.subarray(n,n+u),e);return u},i.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var o=N(t.toString()),i=o.length;for(r=e;n>r;r++)this[r]=o[r%i]}return this}},i.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(i.TYPED_ARRAY_SUPPORT)return new i(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=i.prototype;i._augment=function(t){return t.constructor=i,t._isBuffer=!0,t._set=t.set,t.get=$.get,t.set=$.set,t.write=$.write,t.toString=$.toString,t.toLocaleString=$.toString,t.toJSON=$.toJSON,t.equals=$.equals,t.compare=$.compare,t.indexOf=$.indexOf,t.copy=$.copy,t.slice=$.slice,t.readUIntLE=$.readUIntLE,t.readUIntBE=$.readUIntBE,t.readUInt8=$.readUInt8,t.readUInt16LE=$.readUInt16LE,t.readUInt16BE=$.readUInt16BE,t.readUInt32LE=$.readUInt32LE,t.readUInt32BE=$.readUInt32BE,t.readIntLE=$.readIntLE,t.readIntBE=$.readIntBE,t.readInt8=$.readInt8,t.readInt16LE=$.readInt16LE,t.readInt16BE=$.readInt16BE,t.readInt32LE=$.readInt32LE,t.readInt32BE=$.readInt32BE,t.readFloatLE=$.readFloatLE,t.readFloatBE=$.readFloatBE,t.readDoubleLE=$.readDoubleLE,t.readDoubleBE=$.readDoubleBE,t.writeUInt8=$.writeUInt8,t.writeUIntLE=$.writeUIntLE,t.writeUIntBE=$.writeUIntBE,t.writeUInt16LE=$.writeUInt16LE,t.writeUInt16BE=$.writeUInt16BE,t.writeUInt32LE=$.writeUInt32LE,t.writeUInt32BE=$.writeUInt32BE,t.writeIntLE=$.writeIntLE,t.writeIntBE=$.writeIntBE,t.writeInt8=$.writeInt8,t.writeInt16LE=$.writeInt16LE,t.writeInt16BE=$.writeInt16BE,t.writeInt32LE=$.writeInt32LE,t.writeInt32BE=$.writeInt32BE,t.writeFloatLE=$.writeFloatLE,t.writeFloatBE=$.writeFloatBE,t.writeDoubleLE=$.writeDoubleLE,t.writeDoubleBE=$.writeDoubleBE,t.fill=$.fill,t.inspect=$.inspect,t.toArrayBuffer=$.toArrayBuffer,t};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:5,isarray:6}],4:[function(e,n,r){!function(r,o){"use strict";if("function"==typeof t&&t.amd)t(["xmlhttprequest","js-base64"],function(t,e){return r.Github=o(t.XMLHttpRequest,e.Base64.encode)});else if("object"==typeof n&&n.exports)"undefined"!=typeof window?n.exports=o(window.XMLHttpRequest,window.btoa):n.exports=o(e("xmlhttprequest").XMLHttpRequest,e("js-base64").Base64.encode);else{var i=function(t){return r.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))};r.Github=o(r.XMLHttpRequest,i)}}(this,function(t,e){"use strict";var n=function(r){var o=r.apiUrl||"https://api.github.com",i=n._request=function(n,i,u,s,a,f){function c(){var t=i.indexOf("//")>=0?i:o+i;if(t+=/\?/.test(t)?"&":"?",u&&"object"==typeof u&&["GET","HEAD","DELETE"].indexOf(n)>-1)for(var e in u)u.hasOwnProperty(e)&&(t+="&"+encodeURIComponent(e)+"="+encodeURIComponent(u[e]));return t+("undefined"!=typeof window?"&"+(new Date).getTime():"")}var h=new t;if(h.open(n,c(),!f),f||(h.onreadystatechange=function(){4===this.readyState&&(this.status>=200&&this.status<300||304===this.status?s(null,a?this.responseText:this.responseText?JSON.parse(this.responseText):!0,this):s({path:i,request:this,error:this.status}))}),a?h.setRequestHeader("Accept","application/vnd.github.v3.raw+json"):(h.dataType="json",h.setRequestHeader("Accept","application/vnd.github.v3+json")),h.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.token||r.username&&r.password){var l=r.token?"token "+r.token:"Basic "+e(r.username+":"+r.password);h.setRequestHeader("Authorization",l)}return u?h.send(JSON.stringify(u)):h.send(),f?h.response:void 0},u=n._requestAllPages=function(t,e){var n=[];!function r(){i("GET",t,null,function(o,i,u){if(o)return e(o);n.push.apply(n,i);var s=(u.getResponseHeader("link")||"").split(/\s*,\s*/g),a=null;s.forEach(function(t){a=/rel="next"/.test(t)?t:a}),a&&(a=(/<(.*)>/.exec(a)||[])[1]),a?(t=a,r()):e(o,n)})}()};return n.User=function(){this.repos=function(t,e){1===arguments.length&&"function"==typeof arguments[0]&&(e=t,t={}),t=t||{};var n="/user/repos",r=[];r.push("type="+encodeURIComponent(t.type||"all")),r.push("sort="+encodeURIComponent(t.sort||"updated")),r.push("per_page="+encodeURIComponent(t.per_page||"1000")),t.page&&r.push("page="+encodeURIComponent(t.page)),n+="?"+r.join("&"),i("GET",n,null,e)},this.orgs=function(t){i("GET","/user/orgs",null,t)},this.gists=function(t){i("GET","/gists",null,t)},this.notifications=function(t,e){1===arguments.length&&"function"==typeof arguments[0]&&(e=t,t={}),t=t||{};var n="/notifications",r=[];if(t.all&&r.push("all=true"),t.participating&&r.push("participating=true"),t.since){var o=t.since;o.constructor===Date&&(o=o.toISOString()),r.push("since="+encodeURIComponent(o))}if(t.before){var u=t.before;u.constructor===Date&&(u=u.toISOString()),r.push("before="+encodeURIComponent(u))}t.page&&r.push("page="+encodeURIComponent(t.page)),r.length>0&&(n+="?"+r.join("&")),i("GET",n,null,e)},this.show=function(t,e){var n=t?"/users/"+t:"/user";i("GET",n,null,e)},this.userRepos=function(t,e){u("/users/"+t+"/repos?type=all&per_page=1000&sort=updated",e)},this.userStarred=function(t,e){u("/users/"+t+"/starred?type=all&per_page=1000",function(t,n){e(t,n)})},this.userGists=function(t,e){i("GET","/users/"+t+"/gists",null,e)},this.orgRepos=function(t,e){u("/orgs/"+t+"/repos?type=all&&page_num=1000&sort=updated&direction=desc",e)},this.follow=function(t,e){i("PUT","/user/following/"+t,null,e)},this.unfollow=function(t,e){i("DELETE","/user/following/"+t,null,e)},this.createRepo=function(t,e){i("POST","/user/repos",t,e)}},n.Repository=function(t){function r(t,e){return t===c.branch&&c.sha?e(null,c.sha):void f.getRef("heads/"+t,function(n,r){c.branch=t,c.sha=r,e(n,r)})}var o,u=t.name,s=t.user,a=t.fullname,f=this;o=a?"/repos/"+a:"/repos/"+s+"/"+u;var c={branch:null,sha:null};this.deleteRepo=function(e){i("DELETE",o,t,e)},this.getRef=function(t,e){i("GET",o+"/git/refs/"+t,null,function(t,n,r){return t?e(t):void e(null,n.object.sha,r)})},this.createRef=function(t,e){i("POST",o+"/git/refs",t,e)},this.deleteRef=function(e,n){i("DELETE",o+"/git/refs/"+e,t,function(t,e,r){n(t,e,r)})},this.createRepo=function(t,e){i("POST","/user/repos",t,e)},this.deleteRepo=function(e){i("DELETE",o,t,e)},this.listTags=function(t){i("GET",o+"/tags",null,function(e,n,r){return e?t(e):void t(null,n,r)})},this.listPulls=function(t,e){t=t||{};var n=o+"/pulls",r=[];"string"==typeof t?r.push("state="+t):(t.state&&r.push("state="+encodeURIComponent(t.state)),t.head&&r.push("head="+encodeURIComponent(t.head)),t.base&&r.push("base="+encodeURIComponent(t.base)),t.sort&&r.push("sort="+encodeURIComponent(t.sort)),t.direction&&r.push("direction="+encodeURIComponent(t.direction)),t.page&&r.push("page="+t.page),t.per_page&&r.push("per_page="+t.per_page)),r.length>0&&(n+="?"+r.join("&")),i("GET",n,null,function(t,n,r){return t?e(t):void e(null,n,r)})},this.getPull=function(t,e){i("GET",o+"/pulls/"+t,null,function(t,n,r){return t?e(t):void e(null,n,r)})},this.compare=function(t,e,n){i("GET",o+"/compare/"+t+"..."+e,null,function(t,e,r){return t?n(t):void n(null,e,r)})},this.listBranches=function(t){i("GET",o+"/git/refs/heads",null,function(e,n,r){return e?t(e):void t(null,n.map(function(t){return t.ref.replace(/^refs\/heads\//,"")}),r)})},this.getBlob=function(t,e){i("GET",o+"/git/blobs/"+t,null,e,"raw")},this.getCommit=function(t,e,n){i("GET",o+"/git/commits/"+e,null,function(t,e,r){return t?n(t):void n(null,e,r)})},this.getSha=function(t,e,n){return e&&""!==e?void i("GET",o+"/contents/"+e+(t?"?ref="+t:""),null,function(t,e,r){return t?n(t):void n(null,e.sha,r)}):f.getRef("heads/"+t,n)},this.getTree=function(t,e){i("GET",o+"/git/trees/"+t,null,function(t,n,r){return t?e(t):void e(null,n.tree,r)})},this.postBlob=function(t,n){t="string"==typeof t?{content:t,encoding:"utf-8"}:{content:e(t),encoding:"base64"},i("POST",o+"/git/blobs",t,function(t,e){return t?n(t):void n(null,e.sha)})},this.updateTree=function(t,e,n,r){var u={base_tree:t,tree:[{path:e,mode:"100644",type:"blob",sha:n}]};i("POST",o+"/git/trees",u,function(t,e){return t?r(t):void r(null,e.sha)})},this.postTree=function(t,e){i("POST",o+"/git/trees",{tree:t},function(t,n){return t?e(t):void e(null,n.sha)})},this.commit=function(e,r,u,s){var a=new n.User;a.show(null,function(n,a){if(n)return s(n);var f={message:u,author:{name:t.user,email:a.email},parents:[e],tree:r};i("POST",o+"/git/commits",f,function(t,e){return t?s(t):(c.sha=e.sha,void s(null,e.sha))})})},this.updateHead=function(t,e,n){i("PATCH",o+"/git/refs/heads/"+t,{sha:e},function(t){n(t)})},this.show=function(t){i("GET",o,null,t)},this.contributors=function(t,e){e=e||1e3;var n=this;i("GET",o+"/stats/contributors",null,function(r,o,i){return r?t(r):void(202===i.status?setTimeout(function(){n.contributors(t,e)},e):t(r,o,i))})},this.contents=function(t,e,n){e=encodeURI(e),i("GET",o+"/contents"+(e?"/"+e:""),{ref:t},n)},this.fork=function(t){i("POST",o+"/forks",null,t)},this.branch=function(t,e,n){2===arguments.length&&"function"==typeof arguments[1]&&(n=e,e=t,t="master"),this.getRef("heads/"+t,function(t,r){return t&&n?n(t):void f.createRef({ref:"refs/heads/"+e,sha:r},n)})},this.createPullRequest=function(t,e){i("POST",o+"/pulls",t,e)},this.listHooks=function(t){i("GET",o+"/hooks",null,t)},this.getHook=function(t,e){i("GET",o+"/hooks/"+t,null,e)},this.createHook=function(t,e){i("POST",o+"/hooks",t,e)},this.editHook=function(t,e,n){i("PATCH",o+"/hooks/"+t,e,n)},this.deleteHook=function(t,e){i("DELETE",o+"/hooks/"+t,null,e)},this.read=function(t,e,n){i("GET",o+"/contents/"+encodeURI(e)+(t?"?ref="+t:""),null,function(t,e,r){return t&&404===t.error?n("not found",null,null):t?n(t):void n(null,e,r)},!0)},this.remove=function(t,e,n){f.getSha(t,e,function(r,u){return r?n(r):void i("DELETE",o+"/contents/"+e,{message:e+" is removed",sha:u,branch:t},n)})},this["delete"]=this.remove,this.move=function(t,e,n,o){r(t,function(r,i){f.getTree(i+"?recursive=true",function(r,u){u.forEach(function(t){t.path===e&&(t.path=n),"tree"===t.type&&delete t.sha}),f.postTree(u,function(n,r){f.commit(i,r,"Deleted "+e,function(e,n){f.updateHead(t,n,function(t){o(t)})})})})})},this.write=function(t,n,r,u,s,a){"undefined"==typeof a&&(a=s,s={}),f.getSha(t,encodeURI(n),function(f,c){var h={message:u,content:"undefined"==typeof s.encode||s.encode?e(r):r,branch:t,committer:s&&s.committer?s.committer:void 0,author:s&&s.author?s.author:void 0};f&&404!==f.error||(h.sha=c),i("PUT",o+"/contents/"+encodeURI(n),h,a)})},this.getCommits=function(t,e){t=t||{};var n=o+"/commits",r=[];if(t.sha&&r.push("sha="+encodeURIComponent(t.sha)),t.path&&r.push("path="+encodeURIComponent(t.path)),t.since){var u=t.since;u.constructor===Date&&(u=u.toISOString()),r.push("since="+encodeURIComponent(u))}if(t.until){var s=t.until;s.constructor===Date&&(s=s.toISOString()),r.push("until="+encodeURIComponent(s))}t.page&&r.push("page="+t.page),t.perpage&&r.push("per_page="+t.perpage),r.length>0&&(n+="?"+r.join("&")),i("GET",n,null,e)}},n.Gist=function(t){var e=t.id,n="/gists/"+e;this.read=function(t){i("GET",n,null,t)},this.create=function(t,e){i("POST","/gists",t,e)},this["delete"]=function(t){i("DELETE",n,null,t)},this.fork=function(t){i("POST",n+"/fork",null,t)},this.update=function(t,e){i("PATCH",n,t,e)},this.star=function(t){i("PUT",n+"/star",null,t)},this.unstar=function(t){i("DELETE",n+"/star",null,t)},this.isStarred=function(t){i("GET",n+"/star",null,t)}},n.Issue=function(t){var e="/repos/"+t.user+"/"+t.repo+"/issues";this.list=function(t,n){var r=[];for(var o in t)t.hasOwnProperty(o)&&r.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]));u(e+"?"+r.join("&"),n)},this.comment=function(t,e,n){i("POST",t.comments_url,{body:e},function(t,e){n(t,e)})}},n.Search=function(t){var e="/search/",n="?q="+t.query;this.repositories=function(t,r){i("GET",e+"repositories"+n,t,r)},this.code=function(t,r){i("GET",e+"code"+n,t,r)},this.issues=function(t,r){i("GET",e+"issues"+n,t,r)},this.users=function(t,r){i("GET",e+"users"+n,t,r)}},n};return n.getIssues=function(t,e){return new n.Issue({user:t,repo:e})},n.getRepo=function(t,e){if(e)return new n.Repository({user:t,name:e});var r=t;return new n.Repository({fullname:r})},n.getUser=function(){return new n.User},n.getGist=function(t){return new n.Gist({id:t})},n.getSearch=function(t){return new n.Search({query:t})},n})},{"js-base64":7,xmlhttprequest:2}],5:[function(t,e,n){n.read=function(t,e,n,r,o){var i,u,s=8*o-r-1,a=(1<<s)-1,f=a>>1,c=-7,h=n?o-1:0,l=n?-1:1,p=t[e+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+t[e+h],h+=l,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=r;c>0;u=256*u+t[e+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===a)return u?NaN:(p?-1:1)*(1/0);u+=Math.pow(2,r),i-=f}return(p?-1:1)*u*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var u,s,a,f=8*i-o-1,c=(1<<f)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,g=r?1:-1,d=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,u=c):(u=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-u))<1&&(u--,a*=2),e+=u+h>=1?l/a:l*Math.pow(2,1-h),e*a>=2&&(u++,
a/=2),u+h>=c?(s=0,u=c):u+h>=1?(s=(e*a-1)*Math.pow(2,o),u+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),u=0));o>=8;t[n+p]=255&s,p+=g,s/=256,o-=8);for(u=u<<o|s,f+=o;f>0;t[n+p]=255&u,p+=g,u/=256,f-=8);t[n+p-g]|=128*d}},{}],6:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],7:[function(t,e,n){!function(n){"use strict";var r,o=n.Base64,i="2.1.9";if("undefined"!=typeof e&&e.exports)try{r=t("buffer").Buffer}catch(u){}var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(t){for(var e={},n=0,r=t.length;r>n;n++)e[t.charAt(n)]=n;return e}(s),f=String.fromCharCode,c=function(t){if(t.length<2){var e=t.charCodeAt(0);return 128>e?t:2048>e?f(192|e>>>6)+f(128|63&e):f(224|e>>>12&15)+f(128|e>>>6&63)+f(128|63&e)}var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return f(240|e>>>18&7)+f(128|e>>>12&63)+f(128|e>>>6&63)+f(128|63&e)},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(t){return t.replace(h,c)},p=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),r=[s.charAt(n>>>18),s.charAt(n>>>12&63),e>=2?"=":s.charAt(n>>>6&63),e>=1?"=":s.charAt(63&n)];return r.join("")},g=n.btoa?function(t){return n.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,p)},d=r?function(t){return(t.constructor===r.constructor?t:new r(t)).toString("base64")}:function(t){return g(l(t))},w=function(t,e){return e?d(String(t)).replace(/[+\/]/g,function(t){return"+"==t?"-":"_"}).replace(/=/g,""):d(String(t))},y=function(t){return w(t,!0)},E=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),v=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return f((n>>>10)+55296)+f((1023&n)+56320);case 3:return f((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return f((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},m=function(t){return t.replace(E,v)},b=function(t){var e=t.length,n=e%4,r=(e>0?a[t.charAt(0)]<<18:0)|(e>1?a[t.charAt(1)]<<12:0)|(e>2?a[t.charAt(2)]<<6:0)|(e>3?a[t.charAt(3)]:0),o=[f(r>>>16),f(r>>>8&255),f(255&r)];return o.length-=[0,0,2,1][n],o.join("")},R=n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/[\s\S]{1,4}/g,b)},A=r?function(t){return(t.constructor===r.constructor?t:new r(t,"base64")).toString()}:function(t){return m(R(t))},T=function(t){return A(String(t).replace(/[-_]/g,function(t){return"-"==t?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},I=function(){var t=n.Base64;return n.Base64=o,t};if(n.Base64={VERSION:i,atob:R,btoa:g,fromBase64:T,toBase64:w,utob:l,encode:w,encodeURI:y,btou:m,decode:T,noConflict:I},"function"==typeof Object.defineProperty){var U=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",U(function(){return T(this)})),Object.defineProperty(String.prototype,"toBase64",U(function(t){return w(this,t)})),Object.defineProperty(String.prototype,"toBase64URI",U(function(){return w(this,!0)}))}}n.Meteor&&(Base64=n.Base64)}(this)},{buffer:3}],8:[function(e,n,r){"use strict";function o(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}!function(n,o){if("function"==typeof t&&t.amd)t("Github",["exports","github-api"],o);else if("undefined"!=typeof r)o(r,e("github-api"));else{var i={exports:{}};o(i.exports,n.Github),n.Github=i.exports}}(this,function(t,e){function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":o(e))&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(e),a=function(t){function e(t){r(this,e);var n=i(this,Object.getPrototypeOf(e).call(this,t)),o=n.getRepo,u=n.request||n._request;return n.getRepo=function(e,n){function r(t){return new Promise(function(e,n){t.show(function(t,r){t&&n(t),e(r)})})}var i=o(e,n),s=i.remove,a=i.fork;return i.search=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n="blob",r="tree";return e=Object.assign({branch:"master",caseSensitive:!1,excludeFiles:!1,excludeFolders:!1},e),new Promise(function(t,n){i.getSha(e.branch,"",function(e,r){e&&n(e),t(r)})}).then(function(t){return new Promise(function(e,n){i.getTree(t+"?recursive=true",function(t,r){t&&(404===t.error?e([]):n(t)),e(r)})})}).then(function(o){var i=new RegExp(t,e.caseSensitive?"":"i");return o.filter(function(t){var o=e.excludeFiles?t.type!==n:!0,u=e.excludeFolders?t.type!==r:!0,s=function(t){return t.substring(t.lastIndexOf("/")+1)};return o&&u&&i.test(s(t.path))})})},i.mergePullRequest=function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e=Object.assign({commitMessage:"Merged pull request gh-"+t.number},e),r(i).then(function(n){return new Promise(function(r,o){u("PUT","/repos/"+n.full_name+"/pulls/"+t.number+"/merge",{commit_message:e.commitMessage,sha:t.head.sha},function(t,e){t&&o(t),r(e)})})})},i.remove=function(){function t(t,e){return new Promise(function(n,r){s(t,e,function(t){t&&r(t),n()})})}function e(){return new Promise(function(t,e){i.getRef("heads/"+n,function(n,r){n&&e(n),t(r)})}).then(function(t){return new Promise(function(e,n){i.getTree(t+"?recursive=true",function(t,r){t&&n(t),e(r)})})}).then(function(e){var o=Promise.resolve();return e.filter(function(t){return 0===t.path.indexOf(r)&&"blob"===t.type}).map(function(t){return t.path}).forEach(function(e){o=o.then(function(){return t(n,e)})}),o})}var n=arguments.length<=0||void 0===arguments[0]?"master":arguments[0],r=arguments.length<=1||void 0===arguments[1]?"":arguments[1];r=r.replace(/\/$/,"");var o=t(n,r);return o.then(function(){return o},function(t){if(422!==t.error)throw t;return e()})},i.fork=function(){return new Promise(function(e,r){a(function(i,u){function s(t){t.contents("master","",function(n,r){r?e(u):setTimeout(s.bind(null,t),250)})}i?r(i):s(o(t.username,n))})})},i},n}return u(e,t),e}(s["default"]);t["default"]=a})},{"github-api":4}]},{},[8])(8)});