isomorphic-git
Version:
A pure JavaScript reimplementation of git for node and browsers
8 lines • 352 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=227)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(31);function i(t,e){if(void 0===e)throw new n.a(t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){const e=new n(t.message);return e.code=t.code,e.data=t.data,e.caller=t.caller,e.stack=t.stack,e}get isIsomorphicGitError(){return!0}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=i.code,this.data={message:t}}}i.code="InternalError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return p}));var n=r(70),i=r.n(n),o=r(29),a=r(23),s=r(100),c=r(138);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t){return Object(c.a)((t=>{try{return t.readFile().catch(t=>t)}catch(t){return t}})(t))}const d=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function h(t,e){if(l(e))for(const r of d)t[`_${r}`]=e[r].bind(e);else for(const r of d)t[`_${r}`]=i()(e[r].bind(e));l(e)?e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=s.a.bind(null,t):e.rm?t._rm=i()(e.rm.bind(e)):e.rmdir.length>2?t._rm=i()(e.rmdir.bind(e)):t._rm=s.a.bind(null,t)}class p{constructor(t){if(void 0!==t._original_unwrapped_fs)return t;const e=Object.getOwnPropertyDescriptor(t,"promises");e&&e.enumerable?h(this,t.promises):h(this,t),this._original_unwrapped_fs=t}exists(t,e={}){var r=this;return f((function*(){try{return yield r._stat(t),!0}catch(t){if("ENOENT"===t.code||"ENOTDIR"===t.code||(t.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',t),t}}))()}read(e,r={}){var n=this;return f((function*(){try{let i=yield n._readFile(e,r);if("true"===r.autocrlf)try{i=new TextDecoder("utf8",{fatal:!0}).decode(i),i=i.replace(/\r\n/g,"\n"),i=(new TextEncoder).encode(i)}catch(t){}return"string"!=typeof i&&(i=t.from(i)),i}catch(t){return null}}))()}write(t,e,r={}){var n=this;return f((function*(){try{return void(yield n._writeFile(t,e,r))}catch(i){yield n.mkdir(Object(a.a)(t)),yield n._writeFile(t,e,r)}}))()}mkdir(t,e=!1){var r=this;return f((function*(){try{return void(yield r._mkdir(t))}catch(n){if(null===n)return;if("EEXIST"===n.code)return;if(e)throw n;if("ENOENT"===n.code){const e=Object(a.a)(t);if("."===e||"/"===e||e===t)throw n;yield r.mkdir(e),yield r.mkdir(t,!0)}}}))()}rm(t){var e=this;return f((function*(){try{yield e._unlink(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}rmdir(t,e){var r=this;return f((function*(){try{e&&e.recursive?yield r._rm(t,e):yield r._rmdir(t)}catch(t){if("ENOENT"!==t.code)throw t}}))()}readdir(t){var e=this;return f((function*(){try{const r=yield e._readdir(t);return r.sort(o.a),r}catch(t){return"ENOTDIR"===t.code?null:[]}}))()}readdirDeep(t){var e=this;return f((function*(){const r=yield e._readdir(t);return(yield Promise.all(r.map(function(){var r=f((function*(r){const n=t+"/"+r;return(yield e._stat(n)).isDirectory()?e.readdirDeep(n):n}));return function(t){return r.apply(this,arguments)}}()))).reduce((t,e)=>t.concat(e),[])}))()}lstat(t){var e=this;return f((function*(){try{return yield e._lstat(t)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}))()}readlink(e,r={encoding:"buffer"}){var n=this;return f((function*(){try{const i=yield n._readlink(e,r);return t.isBuffer(i)?i:t.from(i)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}))()}writelink(t,e){var r=this;return f((function*(){return r._symlink(e.toString("utf8"),t)}))()}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";var n=r(26),i=r.n(n),o=r(35),a=r(79),s=r(8);class c{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let e=null;this.parsedConfig=t.trim().split("\n").map(t=>{if(/^\s*#/.test(t))return{line:t,comment:!0};const r=t.indexOf(" ");if(t.startsWith("^")){const r=t.slice(1);return this.refs.set(e+"^{}",r),{line:t,ref:e,peeled:r}}{const n=t.slice(0,r);return e=t.slice(r+1),this.refs.set(e,n),{line:t,ref:e,oid:n}}})}return this}static from(t){return new c(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(e=>e.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join("\n")+"\n"}}var u=r(107);function f(t,e){const r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return 0===i?t.endsWith("^{}")?1:-1:i}var l=r(12),d=r(11);function h(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,s,"next",t)}function s(t){h(o,n,i,a,s,"throw",t)}a(void 0)}))}}r.d(e,"a",(function(){return w}));const y=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],g=["config","description","index","shallow","commondir"];let v;function m(t,e){return b.apply(this,arguments)}function b(){return(b=p((function*(t,e){return void 0===v&&(v=new i.a),v.acquire(t,e)}))).apply(this,arguments)}class w{static updateRemoteRefs({fs:t,gitdir:e,remote:r,refs:n,symrefs:i,tags:s,refspecs:c,prune:f=!1,pruneTags:h=!1}){return p((function*(){for(const t of n.values())if(!t.match(/[0-9a-f]{40}/))throw new o.a(t);const y=yield d.a.get({fs:t,gitdir:e});if(!c){if(0===(c=yield y.getall(`remote.${r}.fetch`)).length)throw new a.a(r);c.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}const g=u.a.from(c),v=new Map;if(h){const r=yield w.listRefs({fs:t,gitdir:e,filepath:"refs/tags"});yield w.deleteRefs({fs:t,gitdir:e,refs:r.map(t=>`refs/tags/${t}`)})}if(s)for(const r of n.keys())if(r.startsWith("refs/tags")&&!r.endsWith("^{}")&&!(yield w.exists({fs:t,gitdir:e,ref:r}))){const t=n.get(r);v.set(r,t)}const b=g.translate([...n.keys()]);for(const[t,e]of b){const r=n.get(t);v.set(e,r)}const _=g.translate([...i.keys()]);for(const[t,e]of _){const r=i.get(t),n=g.translateOne(r);n&&v.set(e,`ref: ${n}`)}const j=[];if(f){for(const r of g.localNamespaces()){const n=(yield w.listRefs({fs:t,gitdir:e,filepath:r})).map(t=>`${r}/${t}`);for(const t of n)v.has(t)||j.push(t)}j.length>0&&(yield w.deleteRefs({fs:t,gitdir:e,refs:j}))}for(const[r,n]of v)yield m(r,p((function*(){return t.write(Object(l.join)(e,r),`${n.trim()}\n`,"utf8")})));return{pruned:j}}))()}static writeRef({fs:t,gitdir:e,ref:r,value:n}){return p((function*(){if(!n.match(/[0-9a-f]{40}/))throw new o.a(n);yield m(r,p((function*(){return t.write(Object(l.join)(e,r),`${n.trim()}\n`,"utf8")})))}))()}static writeSymbolicRef({fs:t,gitdir:e,ref:r,value:n}){return p((function*(){yield m(r,p((function*(){return t.write(Object(l.join)(e,r),"ref: "+`${n.trim()}\n`,"utf8")})))}))()}static deleteRef({fs:t,gitdir:e,ref:r}){return p((function*(){return w.deleteRefs({fs:t,gitdir:e,refs:[r]})}))()}static deleteRefs({fs:t,gitdir:e,refs:r}){return p((function*(){yield Promise.all(r.map(r=>t.rm(Object(l.join)(e,r))));let n=yield m("packed-refs",p((function*(){return t.read(`${e}/packed-refs`,{encoding:"utf8"})})));const i=c.from(n),o=i.refs.size;for(const t of r)i.refs.has(t)&&i.delete(t);i.refs.size<o&&(n=i.toString(),yield m("packed-refs",p((function*(){return t.write(`${e}/packed-refs`,n,{encoding:"utf8"})}))))}))()}static resolve({fs:t,gitdir:e,ref:r,depth:n}){return p((function*(){if(void 0!==n&&-1===--n)return r;if(r.startsWith("ref: "))return r=r.slice("ref: ".length),w.resolve({fs:t,gitdir:e,ref:r,depth:n});if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const i=yield w.packedRefs({fs:t,gitdir:e}),o=y(r).filter(t=>!g.includes(t));for(const r of o){const o=yield m(r,p((function*(){return(yield t.read(`${e}/${r}`,{encoding:"utf8"}))||i.get(r)})));if(o)return w.resolve({fs:t,gitdir:e,ref:o.trim(),depth:n})}throw new s.a(r)}))()}static exists({fs:t,gitdir:e,ref:r}){return p((function*(){try{return yield w.expand({fs:t,gitdir:e,ref:r}),!0}catch(t){return!1}}))()}static expand({fs:t,gitdir:e,ref:r}){return p((function*(){if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const n=yield w.packedRefs({fs:t,gitdir:e}),i=y(r);for(const r of i){if(yield m(r,p((function*(){return t.exists(`${e}/${r}`)}))))return r;if(n.has(r))return r}throw new s.a(r)}))()}static expandAgainstMap({ref:t,map:e}){return p((function*(){const r=y(t);for(const t of r)if(yield e.has(t))return t;throw new s.a(t)}))()}static resolveAgainstMap({ref:t,fullref:e=t,depth:r,map:n}){if(void 0!==r&&-1===--r)return{fullref:e,oid:t};if(t.startsWith("ref: "))return t=t.slice("ref: ".length),w.resolveAgainstMap({ref:t,fullref:e,depth:r,map:n});if(40===t.length&&/[0-9a-f]{40}/.test(t))return{fullref:e,oid:t};const i=y(t);for(const t of i){const e=n.get(t);if(e)return w.resolveAgainstMap({ref:e.trim(),fullref:t,depth:r,map:n})}throw new s.a(t)}static packedRefs({fs:t,gitdir:e}){return p((function*(){const r=yield m("packed-refs",p((function*(){return t.read(`${e}/packed-refs`,{encoding:"utf8"})})));return c.from(r).refs}))()}static listRefs({fs:t,gitdir:e,filepath:r}){return p((function*(){const n=w.packedRefs({fs:t,gitdir:e});let i=null;try{i=yield t.readdirDeep(`${e}/${r}`),i=i.map(t=>t.replace(`${e}/${r}/`,""))}catch(t){i=[]}for(let t of(yield n).keys())t.startsWith(r)&&(t=t.replace(r+"/",""),i.includes(t)||i.push(t));return i.sort(f),i}))()}static listBranches({fs:t,gitdir:e,remote:r}){return p((function*(){return r?w.listRefs({fs:t,gitdir:e,filepath:`refs/remotes/${r}`}):w.listRefs({fs:t,gitdir:e,filepath:"refs/heads"})}))()}static listTags({fs:t,gitdir:e}){return p((function*(){return(yield w.listRefs({fs:t,gitdir:e,filepath:"refs/tags"})).filter(t=>!t.endsWith("^{}"))}))()}}},,,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return d}));var n=r(2),i=r(8),o=r(22),a=r(85),s=r(108),c=r(65),u=r(15);function f(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){f(o,n,i,a,s,"next",t)}function s(t){f(o,n,i,a,s,"throw",t)}a(void 0)}))}}function d(t){return h.apply(this,arguments)}function h(){return(h=l((function*({fs:e,cache:r,gitdir:f,oid:l,format:h="content"}){const p=t=>d({fs:e,cache:r,gitdir:f,oid:t});let y;if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===l&&(y={format:"wrapped",object:t.from("tree 0\0")}),y||(y=yield Object(a.a)({fs:e,gitdir:f,oid:l})),!y){if(y=yield Object(s.a)({fs:e,cache:r,gitdir:f,oid:l,getExternalRefDelta:p}),!y)throw new i.a(l);return y}if("deflated"===h)return y;if("deflated"===y.format&&(y.object=t.from(yield Object(c.a)(y.object)),y.format="wrapped"),"wrapped"===h)return y;const g=yield Object(u.a)(y.object);if(g!==l)throw new n.a(`SHA check failed! Expected ${l}, computed ${g}`);const{object:v,type:m}=o.a.unwrap(y.object);if(y.type=m,y.object=v,y.format="content","content"===h)return y;throw new n.a(`invalid requested format "${h}"`)}))).apply(this,arguments)}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t){super(`Could not find ${t}.`),this.code=this.name=i.code,this.data={what:t}}}i.code="NotFoundError"},function(t,e,r){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(142),i=r(143),o=r(144);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=d(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|h(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|h(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e){var r=e.length<0?0:0|h(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,s=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var l=!0,d=0;d<c;d++)if(u(t,o+d)!==u(e,d)){l=!1;break}if(l)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function w(t,e,r,n){return H(N(e,t.length-r),t,r,n)}function _(t,e,r,n){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function j(t,e,r,n){return _(t,e,r,n)}function O(t,e,r,n){return H(F(e),t,r,n)}function x(t,e,r,n){return H(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,c,u=t[i],f=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=c,e.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return f(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},c.allocUnsafe=function(t){return l(null,t)},c.allocUnsafeSlow=function(t){return l(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(n,i),f=t.slice(e,r),l=0;l<s;++l)if(u[l]!==f[l]){o=u[l],a=f[l];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return j(this,t,e,r);case"base64":return O(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=z(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function $(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function T(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||$(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||$(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||$(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||$(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||$(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||$(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||$(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||$(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||$(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||$(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||$(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){e||$(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return e||$(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||$(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||$(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||$(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||$(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||$(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):T(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):T(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=c.isBuffer(t)?t:N(new c(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(71))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(64),i=r(53);function o(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class a{static flush(){return t.from("0000","utf8")}static delim(){return t.from("0001","utf8")}static encode(e){"string"==typeof e&&(e=t.from(e));const r=e.length+4,n=Object(i.a)(4,r);return t.concat([t.from(n,"utf8"),e])}static streamReader(t){const e=new n.a(t);return(function(){var r,n=(r=function*(){try{let t=yield e.read(4);if(null==t)return!0;if(t=parseInt(t.toString("utf8"),16),0===t)return null;if(1===t)return null;const r=yield e.read(t-4);return null==r||r}catch(e){return t.error=e,!0}},function(){var t=this,e=arguments;return new Promise((function(n,i){var a=r.apply(t,e);function s(t){o(a,n,i,s,c,"next",t)}function c(t){o(a,n,i,s,c,"throw",t)}s(void 0)}))});return function(){return n.apply(this,arguments)}}())}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(106);function i(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,c,"next",t)}function c(t){i(a,n,o,s,c,"throw",t)}s(void 0)}))}}class a{static get({fs:t,gitdir:e}){return o((function*(){const r=yield t.read(`${e}/config`,{encoding:"utf8"});return n.a.from(r)}))()}static save({fs:t,gitdir:e,config:r}){return o((function*(){yield t.write(`${e}/config`,r.toString(),{encoding:"utf8"})}))()}}},function(t,e,r){"use strict";(function(e){function r(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var r,n="",i=0,o=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var i={resolve:function(){for(var t,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=e.cwd()),s=t),r(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=n(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];r(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":i.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=i.resolve(t))===(e=i.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var c=e.length-s,u=a<c?a:c,f=-1,l=0;l<=u;++l){if(l===u){if(c>u){if(47===e.charCodeAt(s+l))return e.slice(s+l+1);if(0===l)return e.slice(s+l)}else a>u&&(47===t.charCodeAt(n+l)?f=l:0===l&&(f=0));break}var d=t.charCodeAt(n+l);if(d!==e.charCodeAt(s+l))break;47===d&&(f=l)}var h="";for(l=n+f+1;l<=o;++l)l!==o&&47!==t.charCodeAt(l)||(0===h.length?h+="..":h+="/..");return h.length>0?h+e.slice(s+f):(s+=f,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var n,i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,c=-1;for(n=t.length-1;n>=0;--n){var u=t.charCodeAt(n);if(47===u){if(!a){i=n+1;break}}else-1===c&&(a=!1,c=n+1),s>=0&&(u===e.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=c))}return i===o?o=c:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){r(t);for(var e=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===i&&(o=!1,i=s+1),46===c?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=s+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),o=47===i;o?(e.root="/",n=1):n=0;for(var a=-1,s=0,c=-1,u=!0,f=t.length-1,l=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===c&&(u=!1,c=f+1),46===i?-1===a?a=f:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){s=f+1;break}return-1===a||-1===c||0===l||1===l&&a===c-1&&a===s+1?-1!==c&&(e.base=e.name=0===s&&o?t.slice(1,c):t.slice(s,c)):(0===s&&o?(e.name=t.slice(1,a),e.base=t.slice(1,c)):(e.name=t.slice(s,a),e.base=t.slice(s,c)),e.ext=t.slice(a,c)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}).call(this,r(56))},function(t,e,r){"use strict";r.d(e,"a",(function(){return p}));var n=r(26),i=r.n(n),o=r(83),a=r(104),s=r(54);function c(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}let f=null;const l=Symbol("IndexCache");function d(){return(d=u((function*(t,e,r){const[n,i]=yield Promise.all([t.lstat(e),t.read(e)]),o=yield a.a.from(i);r.map.set(e,o),r.stats.set(e,n)}))).apply(this,arguments)}function h(){return(h=u((function*(t,e,r){const n=r.stats.get(e);if(void 0===n)return!0;if(null===n)return!1;const i=yield t.lstat(e);return null!==i&&Object(s.a)(n,i)}))).apply(this,arguments)}class p{static acquire({fs:t,gitdir:e,cache:r,allowUnmerged:n=!0},a){return u((function*(){r[l]||(r[l]={map:new Map,stats:new Map});const s=`${e}/index`;let c;null===f&&(f=new i.a({maxPending:1/0}));let p=[];return yield f.acquire(s,u((function*(){const e=r[l];(yield function(t,e,r){return h.apply(this,arguments)}(t,s,e))&&(yield function(t,e,r){return d.apply(this,arguments)}(t,s,e));const i=e.map.get(s);if(p=i.unmergedPaths,p.length&&!n)throw new o.a(p);if(c=yield a(i),i._dirty){const r=yield i.toObject();yield t.write(s,r),e.stats.set(s,yield t.lstat(s)),i._dirty=!1}}))),c}))()}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(2),i=r(43),o=r(51),a=r(133);function s(t){switch(t){case"040000":return"tree";case"100644":case"100755":case"120000":return"blob";case"160000":return"commit"}throw new n.a(`Unexpected GitTree entry mode: ${t}`)}function c(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=function(t){if("number"==typeof t&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new n.a(`Could not understand file mode: ${t}`)}(t.mode),t.type||(t.type=s(t.mode)),t}class u{constructor(e){if(t.isBuffer(e))this._entries=function(t){const e=[];let r=0;for(;r<t.length;){const o=t.indexOf(32,r);if(-1===o)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);const a=t.indexOf(0,r);if(-1===a)throw new n.a(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let c=t.slice(r,o).toString("utf8");"40000"===c&&(c="040000");const u=s(c),f=t.slice(o+1,a).toString("utf8");if(f.includes("\\")||f.includes("/"))throw new i.a(f);const l=t.slice(a+1,a+21).toString("hex");r=a+21,e.push({mode:c,path:f,oid:l,type:u})}return e}(e);else{if(!Array.isArray(e))throw new n.a("invalid type passed to GitTree constructor");this._entries=e.map(c)}this._entries.sort(o.a)}static from(t){return new u(t)}render(){return this._entries.map(t=>`${t.mode} ${t.type} ${t.oid} ${t.path}`).join("\n")}toObject(){const e=[...this._entries];return e.sort(a.a),t.concat(e.map(e=>{const r=t.from(e.mode.replace(/^0/,"")),n=t.from(" "),i=t.from(e.path,"utf8"),o=t.from([0]),a=t.from(e.oid,"hex");return t.concat([r,n,i,o,a])}))}entries(){return this._entries}*[Symbol.iterator](){for(const t of this._entries)yield t}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";var n=r(84),i=r.n(n);function o(t){let e="";for(const r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}function a(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,c,"next",t)}function c(t){a(o,n,i,s,c,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return u}));let c=null;function u(t){return f.apply(this,arguments)}function f(){return(f=s((function*(t){return null===c&&(c=yield p()),c?d(t):l(t)}))).apply(this,arguments)}function l(t){return(new i.a).update(t).digest("hex")}function d(t){return h.apply(this,arguments)}function h(){return(h=s((function*(t){return o(yield crypto.subtle.digest("SHA-1",t))}))).apply(this,arguments)}function p(){return y.apply(this,arguments)}function y(){return(y=s((function*(){try{return"da39a3ee5e6b4b0d3255bfef95601890afd80709"===(yield d(new Uint8Array([])))}catch(t){}return!1}))).apply(this,arguments)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));class n{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){const e=this.buffer.slice(this._start,this._start+t);return this._start+=t,e}toString(t,e){const r=this.buffer.toString(t,this._start,this._start+e);return this._start+=e,r}write(t,e,r){const n=this.buffer.write(t,this._start,e,r);return this._start+=e,n}copy(t,e,r){const n=t.copy(this.buffer,this._start,e,r);return this._start+=n,n}readUInt8(){const t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){const e=this.buffer.writeUInt8(t,this._start);return this._start+=1,e}readUInt16BE(){const t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){const e=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,e}readUInt32BE(){const t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){const e=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,e}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return f}));var n=r(2),i=r(50),o=r(69),a=r(21),s=r(137),c=r(39);function u(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class f{constructor(e){if("string"==typeof e)this._commit=e;else if(t.isBuffer(e))this._commit=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitCommit constructor");this._commit=f.render(e)}}static fromPayloadSignature({payload:t,signature:e}){const r=f.justHeaders(t),n=f.justMessage(t),i=Object(a.a)(r+"\ngpgsig"+Object(o.a)(e)+"\n"+n);return new f(i)}static from(t){return new f(t)}toObject(){return t.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return f.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Object(a.a)(t.slice(t.indexOf("\n\n")+2))}static justHeaders(t){return t.slice(0,t.indexOf("\n\n"))}parseHeaders(){const t=f.justHeaders(this._commit).split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={parent:[]};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.author&&(r.author=Object(c.a)(r.author)),r.committer&&(r.committer=Object(c.a)(r.committer)),r}static renderHeaders(t){let e="";if(t.tree?e+=`tree ${t.tree}\n`:e+="tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n",t.parent){if(void 0===t.parent.length)throw new n.a("commit 'parent' property should be an array");for(const r of t.parent)e+=`parent ${r}\n`}const r=t.author;e+=`author ${Object(i.a)(r)}\n`;const a=t.committer||t.author;return e+=`committer ${Object(i.a)(a)}\n`,t.gpgsig&&(e+="gpgsig"+Object(o.a)(t.gpgsig)),e}static render(t){return f.renderHeaders(t)+"\n"+Object(a.a)(t.message)}render(){return this._commit}withoutSignature(){const t=Object(a.a)(this._commit);if(-1===t.indexOf("\ngpgsig"))return t;const e=t.slice(0,t.indexOf("\ngpgsig")),r=t.slice(t.indexOf("-----END PGP SIGNATURE-----\n")+"-----END PGP SIGNATURE-----\n".length);return Object(a.a)(e+"\n"+r)}isolateSignature(){const t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(s.a)(t)}static sign(t,e,r){return(n=function*(){const n=t.withoutSignature(),i=f.justMessage(t._commit);let{signature:s}=yield e({payload:n,secretKey:r});s=Object(a.a)(s);const c=f.justHeaders(t._commit)+"\ngpgsig"+Object(o.a)(s)+"\n"+i;return f.from(c)},function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))})();var n}}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return u}));var n=r(22),i=r(140),o=r(87),a=r(15);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,c,"next",t)}function c(t){s(o,n,i,a,c,"throw",t)}a(void 0)}))}}function u(t){return f.apply(this,arguments)}function f(){return(f=c((function*({fs:e,gitdir:r,type:s,object:c,format:u="content",oid:f,dryRun:l=!1}){return"deflated"!==u&&("wrapped"!==u&&(c=n.a.wrap({type:s,object:c})),f=yield Object(a.a)(c),c=t.from(yield Object(o.a)(c))),l||(yield Object(i.a)({fs:e,gitdir:r,object:c,format:"deflated",oid:f})),f}))).apply(this,arguments)}}).call(this,r(9).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);class i extends n.a{constructor(t,e,r,n){super(`Object ${t} ${n?`at ${n}`:""}was anticipated to be a ${r} but it is a ${e}.`),this.code=this.name=i.code,this.data={oid:t,actual:e,expected:r,filepath:n}}}i.code="ObjectTypeError"},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c}));var n=r(2),i=r(50),o=r(21),a=r(39);function s(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}class c{constructor(e){if("string"==typeof e)this._tag=e;else if(t.isBuffer(e))this._tag=e.toString("utf8");else{if("object"!=typeof e)throw new n.a("invalid type passed to GitAnnotatedTag constructor");this._tag=c.render(e)}}static from(t){return new c(t)}static render(t){return`object ${t.object}\ntype ${t.type}\ntag ${t.tag}\ntagger ${Object(i.a)(t.tagger)}\n\n${t.message}\n${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf("\n\n"))}message(){const t=this.withoutSignature();return t.slice(t.indexOf("\n\n")+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const t=this.justHeaders().split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.tagger&&(r.tagger=Object(a.a)(r.tagger)),r.committer&&(r.committer=Object(a.a)(r.committer)),r}withoutSignature(){const t=Object(o.a)(this._tag);return-1===t.indexOf("\n-----BEGIN PGP SIGNATURE-----")?t:t.slice(0,t.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----"))}gpgsig(){if(-1===this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----"))return;const t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+"-----END PGP SIGNATURE-----".length);return Object(o.a)(t)}payload(){return this.withoutSignature()+"\n"}toObject(){return t.from(this._tag,"utf8")}static sign(t,e,r){return(n=function*(){const n=t.payload();let{signature:i}=yield e({payload:n,secretKey:r});i=Object(o.a)(i);const a=n+i;return c.from(a)},function(){var t=this,e=arguments;return new Promise((function(