varrk=Object.create;varPa=Object.defineProperty;varik=Object.getOwnPropertyDescriptor;varak=Object.getOwnPropertyNames;varsk=Object.getPrototypeOf,ok=Object.prototype.hasOwnProperty;varlk=(e,t,n)=>tine?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;varck=(e,t)=>()=>(e&&(t=e(e=0)),t);varR=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uk=(e,t)=>{for(varnint)Pa(e,n,{get:t[n],enumerable:!0})},hm=(e,t,n,r)=>{if(t&&typeoft=="object"||typeoft=="function")for(letiofak(t))!ok.call(e,i)&&i!==n&&Pa(e,i,{get:()=>t[i],enumerable:!(r=ik(t,i))||r.enumerable});returne};varXe=(e,t,n)=>(n=e!=null?rk(sk(e)):{},hm(t||!e||!e.__esModule?Pa(n,"default",{value:e,enumerable:!0}):n,e)),fk=e=>hm(Pa({},"__esModule",{value:!0}),e);varut=(e,t,n)=>lk(e,typeoft!="symbol"?t+"":t,n);varmm=R(fo=>{"use strict";v();fo.byteLength=dk;fo.toByteArray=mk;fo.fromByteArray=vk;varvn=[],Zt=[],hk=typeofUint8Array!="undefined"?Uint8Array:Array,vu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Fr=0,dm=vu.length;Fr<dm;++Fr)vn[Fr]=vu[Fr],Zt[vu.charCodeAt(Fr)]=Fr;varFr,dm;Zt[45]=62;Zt[95]=63;functionpm(e){vart=e.length;if(t%4>0)thrownewError("Invalid string. Length must be a multiple of 4");varn=e.indexOf("=");n===-1&&(n=t);varr=n===t?0:4-n%4;return[n,r]}functiondk(e){vart=pm(e),n=t[0],r=t[1];return(n+r)*3/4-r}functionpk(e,t,n){return(t+n)*3/4-n}functionmk(e){vart,n=pm(e),r=n[0],i=n[1],a=newhk(pk(e,r,i)),s=0,o=i>0?r-4:r,l;for(l=0;l<o;l+=4)t=Zt[e.charCodeAt(l)]<<18|Zt[e.charCodeAt(l+1)]<<12|Zt[e.charCodeAt(l+2)]<<6|Zt[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;returni===2&&(t=Zt[e.charCodeAt(l)]<<2|Zt[e.charCodeAt(l+1)]>>4,a[s++]=t&255),i===1&&(t=Zt[e.charCodeAt(l)]<<10|Zt[e.charCodeAt(l+1)]<<4|Zt[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}functiongk(e){returnvn[e>>18&63]+vn[e>>12&63]+vn[e>>6&63]+vn[e&63]}functionyk(e,t,n){for(varr,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(gk(r));returni.join("")}functionvk(e){for(vart,n=e.length,r=n%3,i=[],a=16383,s=0,o=n-r;s<o;s+=a)i.push(yk(e,s,s+a>o?o:s+a));returnr===1?(t=e[n-1],i.push(vn[t>>2]+vn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(vn[t>>10]+vn[t>>4&63]+vn[t<<2&63]+"=")),i.join("")}});vargm=R(wu=>{v();wu.read=function(e,t,n,r,i){vara,s,o=i*8-r-1,l=(1<<o)-1,c=l>>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=h,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=s*256+e[t+f],f+=h,u-=8);if(a===0)a=1-c;else{if(a===l)returns?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),a=a-c}return(d?-1:1)*s*Math.pow(2,a-r)};wu.write=function(e,t,n,r,i,a){vars,o,l,c=a*8-i-1,u=(1<<c)-1,f=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*l-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=o&255,d+=p,o/=256,i-=8);for(s=s<<i|o,c+=i;c>0;e[n+d]=s&255,d+=p,s/=256,c-=8);e[n+d-p]|=g*128}});varCu=R(fi=>{"use strict";v();varbu=mm(),ci=gm(),ym=typeofSymbol=="function"&&typeofSymbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;fi.Buffer=O;fi.SlowBuffer=Ek;fi.INSPECT_MAX_BYTES=50;varho=2147483647;fi.kMaxLength=ho;O.TYPED_ARRAY_SUPPORT=wk();!O.TYPED_ARRAY_SUPPORT&&typeofconsole!="undefined"&&typeofconsole.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");functionwk(){try{lete=newUint8Array(1),t={foo:function(){return42}};returnObject.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))returnthis.buffer}});Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(
`+t.prev}function Vl(e,t){var n=pd(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=gr(e,i)?t(e[i],e):""}var a=typeof cd=="function"?cd(e):[],s;if(ta){s={};for(var o=0;o<a.length;o++)s["$"+a[o]]=a[o]}for(var l in e)gr(e,l)&&(n&&String(Number(l))===l&&l<e.length||ta&&s["$"+l]instanceof Symbol||(hx.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof cd=="function")for(var c=0;c<a.length;c++)dx.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}});var bd=R((ZB,xx)=>{"use strict";v();var bx=pn(),na=qt(),aI=wx(),sI=Wn(),Xl=bx("%WeakMap%",!0),Yl=bx("%Map%",!0),oI=na("WeakMap.prototype.get",!0),lI=na("WeakMap.prototype.set",!0),cI=na("WeakMap.prototype.has",!0),uI=na("Map.prototype.get",!0),fI=na("Map.prototype.set",!0),hI=na("Map.prototype.has",!0),wd=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},dI=function(e,t){var n=wd(e,t);return n&&n.value},pI=function(e,t,n){var r=wd(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},mI=function(e,t){return!!wd(e,t)};xx.exports=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new sI("Side channel does not contain "+aI(a))},get:function(a){if(Xl&&a&&(typeof a=="object"||typeof a=="function")){if(t)return oI(t,a)}else if(Yl){if(n)return uI(n,a)}else if(r)return dI(r,a)},has:function(a){if(Xl&&a&&(typeof a=="object"||typeof a=="function")){if(t)return cI(t,a)}else if(Yl){if(n)return hI(n,a)}else if(r)return mI(r,a);return!1},set:function(a,s){Xl&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Xl),lI(t,a,s)):Yl?(n||(n=new Yl),fI(n,a,s)):(r||(r={key:{},next:null}),pI(r,a,s))}};return i}});var Sx=R((JB,_x)=>{"use strict";v();var gI=Yh(),$s=bd()(),qn=Wn(),xd={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new qn("`O` is not an object");if(typeof t!="string")throw new qn("`slot` must be a string");if($s.assert(e),!xd.has(e,t))throw new qn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new qn("`O` is not an object");if(typeof t!="string")throw new qn("`slot` must be a string");var n=$s.get(e);return n&&n["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new qn("`O` is not an object");if(typeof t!="string")throw new qn("`slot` must be a string");var n=$s.get(e);return!!n&&gI(n,"$"+t)},set:function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new qn("`O` is not an object");if(typeof t!="string")throw new qn("`slot` must be a string");var r=$s.get(e);r||(r={},$s.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(xd);_x.exports=xd});var kx=R((eN,Ax)=>{"use strict";v();var Hs=Sx(),yI=SyntaxError,Ex=typeof StopIteration=="object"?StopIteration:null;Ax.exports=function(t){if(!Ex)throw new yI("this environment lacks StopIteration");Hs.set(t,"[[Done]]",!1);var n={next:function(){var i=Hs.get(this,"[[Iterator]]"),a=Hs.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Hs.set(i,"[[Done]]",!0),s!==Ex)throw s;return{done:!0,value:void 0}}}};return Hs.set(n,"[[Iterator]]",t),n}});var _d=R((nN,Tx)=>{v();var vI={}.toString;Tx.exports=Array.isArray||function(e){return vI.call(e)=="[object Array]"}});var Sd=R((iN,Cx)=>{"use strict";v();var wI=String.prototype.valueOf,bI=function(t){try{return wI.call(t),!0}catch(n){return!1}},xI=Object.prototype.toString,_I="[object String]",SI=mr()();Cx.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:SI?bI(t):xI.call(t)===_I}});var Ad=R((sN,Mx)=>{"use strict";v();var Ed=typeof Map=="function"&&Map.prototype?Map:null,EI=typeof Set=="function"&&Set.prototype?Set:null,Zl;Ed||(Zl=function(t){return!1});var Px=Ed?Map.prototype.has:null,Fx=EI?Set.prototype.has:null;!Zl&&!Px&&(Zl=function(t){return!1});Mx.exports=Zl||function(t){if(!t||typeof t!="object")return!1;try{if(Px.call(t),Fx)try{Fx.call(t)}catch(n){return!0}return t instanceof Ed}catch(n){}return!1}});var Td=R((lN,Rx)=>{"use strict";v();var AI=typeof Map=="function"&&Map.prototype?Map:null,kd=typeof Set=="f
`?gt(Pe):he+=E.charAt(de):j==L?(de+=z.length-1,le=e.tags[E.charAt(de+1)],Y=le?E.charAt(de+1):"_v",Y=="="?(de=be(E,de),j=P):(le&&de++,j=N),Pe=de):u(D,E,de)?(ae.push({tag:Y,n:c(he),otag:z,ctag:D,i:Y=="/"?Pe-z.length:de+D.length}),he="",de+=D.length-1,j=P,Y=="{"&&(D=="}}"?de++:l(ae[ae.length-1]))):he+=E.charAt(de);return gt(Pe,!0),ae};function l(y){y.n.substr(y.n.length-1)==="}"&&(y.n=y.n.substring(0,y.n.length-1))}function c(y){return y.trim?y.trim():y.replace(/^\s*|\s*$/g,"")}function u(y,E,_){if(E.charAt(_)!=y.charAt(0))return!1;for(var C=1,P=y.length;C<P;C++)if(E.charAt(_+C)!=y.charAt(C))return!1;return!0}var f={_t:!0,"\n":!0,$:!0,"/":!0};function h(y,E,_,C){var P=[],L=null,N=null,j=null;for(N=_[_.length-1];y.length>0;){if(j=y.shift(),N&&N.tag=="<"&&!(j.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[j.tag]<=e.tags.$||d(j,C))_.push(j),j.nodes=h(y,j.tag,_,C);else if(j.tag=="/"){if(_.length===0)throw new Error("Closing tag without opener: /"+j.n);if(L=_.pop(),j.n!=L.n&&!p(j.n,L.n,C))throw new Error("Nesting error: "+L.n+" vs. "+j.n);return L.end=j.i,P}else j.tag==`
`&&(j.last=y.length==0||y[0].tag==`
`);P.push(j)}if(_.length>0)throw new Error("missing closing tag: "+_.pop().n);return P}function d(y,E){for(var _=0,C=E.length;_<C;_++)if(E[_].o==y.n)return y.tag="#",!0}function p(y,E,_){for(var C=0,P=_.length;C<P;C++)if(_[C].c==y&&_[C].o==E)return!0}function g(y){var E=[];for(var _ in y)E.push('"'+b(_)+'": function(c,p,t,i) {'+y[_]+"}");return"{ "+E.join(",")+" }"}function m(y){var E=[];for(var _ in y.partials)E.push('"'+b(_)+'":{name:"'+b(y.partials[_].name)+'", '+m(y.partials[_])+"}");return"partials: {"+E.join(",")+"}, subs: "+g(y.subs)}e.stringify=function(y,E,_){return"{code: function (c,p,i) { "+e.wrapMain(y.code)+" },"+m(y)+"}"};var w=0;e.generate=function(y,E,_){w=0;var C={code:"",subs:{},partials:{}};return e.walk(y,C),_.asString?this.stringify(C,E,_):this.makeTemplate(C,E,_)},e.wrapMain=function(y){return'var t=this;t.b(i=i||"");'+y+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(y,E,_){var C=this.makePartials(y);return C.code=new Function("c","p","i",this.wrapMain(y.code)),new this.template(C,E,this,_)},e.makePartials=function(y){var E,_={subs:{},partials:y.partials,name:y.name};for(E in _.partials)_.partials[E]=this.makePartials(_.partials[E]);for(E in y.subs)_.subs[E]=new Function("c","p","t","i",y.subs[E]);return _};function b(y){return y.replace(a,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(i,"\\r").replace(s,"\\u2028").replace(o,"\\u2029")}function S(y){return~y.indexOf(".")?"d":"f"}function A(y,E){var _="<"+(E.prefix||""),C=_+y.n+w++;return E.partials[C]={name:y.n,partials:{}},E.code+='t.b(t.rp("'+b(C)+'",c,p,"'+(y.indent||"")+'"));',C}e.codegen={"#":function(y,E){E.code+="if(t.s(t."+S(y.n)+'("'+b(y.n)+'",c,p,1),c,p,0,'+y.i+","+y.end+',"'+y.otag+" "+y.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(y.nodes,E),E.code+="});c.pop();}"},"^":function(y,E){E.code+="if(!t.s(t."+S(y.n)+'("'+b(y.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(y.nodes,E),E.code+="};"},">":A,"<":function(y,E){var _={partials:{},code:"",subs:{},inPartial:!0};e.walk(y.nodes,_);var C=E.partials[A(y,E)];C.subs=_.subs,C.partials=_.partials},$:function(y,E){var _={subs:{},code:"",partials:E.partials,prefix:y.n};e.walk(y.nodes,_),E.subs[y.n]=_.code,E.inPartial||(E.code+='t.sub("'+b(y.n)+'",c,p,i);')},"\n":function(y,E){E.code+=k('"\\n"'+(y.last?"":" + i"))},_v:function(y,E){E.code+="t.b(t.v(t."+S(y.n)+'("'+b(y.n)+'",c,p,0)));'},_t:function(y,E){E.code+=k('"'+b(y.text)+'"')},"{":x,"&":x};function x(y,E){E.code+="t.b(t.t(t."+S(y.n)+'("'+b(y.n)+'",c,p,0)));'}function k(y){return"t.b("+y+");"}e.walk=function(y,E){for(var _,C=0,P=y.length;C<P;C++)_=e.codegen[y[C].tag],_&&_(y[C],E);return E},e.parse=function(y,E,_){return _=_||{},h(y,"",[],_.sectionTags||[])},e.cache={},e.cacheKey=function(y,E){return[y,!!E.asString,!!E.disableLambda,E.delimiters,!!E.modelGet].join("||")},e.compile=function(y,E){E=E||{};var _=e.cacheKey(y,E),C=this.cache[_];if(C){var P=C.partials;for(var L in P)delete P[L].instance;return C}return C=this.generate(this.parse(this.scan(y,E.delimiters),y,E),y,E),this.cache[_]=C}})(typeof Gp!="undefined"?Gp:Hogan)});var ZE=R(zp=>{v();var nj={};(function(e){e.Template=function(h,d,p,g){h=h||{},this.r=h.code||this.r,this.c=p,this.options=g||{},this.text=d||"",this.partials=h.partials||{},this.subs=h.subs||{},this.buf=""},e.Template.prototype={r:function(h,d,p){return""},v:u,t:c,render:function(d,p,g){return this.ri([d],p||{},g)},ri:function(h,d,p){return this.r(h,d,p)},ep:function(h,d){var p=this.partials[h],g=d[p.name];if(p.instance&&p.base==g)return p.instance;if(typeof g=="string"){if(!this.c)throw new Error("No compiler available.");g=this.c.compile(g,this.options)}if(!g)return null;if(this.partials[h].base=g,p.subs){d.stackText||(d.stackText={});for(key in p.subs)d.stackText[key]||(d.stackText[key]=this.activeSub!==void 0&&d.stackText[this.activeSub]?d.stackText[this.activeSub]:this.text);g=n(g,p.subs,p.partials,this.stackSubs,this.stackPartials,d.stackText)}return this.partials[h].instance=g,g},rp:function(h,d,p,g){var m=this.ep(h,p);return m?m.ri(d,p,g):""},rs:function(h,d,p){var g=h[h.length-1];if(!f(g)){p(h,d,this);
`;await $r.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await $r.acquire(i,async function(){await t.rm(i)})}};async function kC({fs:e,gitdir:t,oid:n}){let r=`objects/${n.slice(0,2)}/${n.slice(2)}`;return e.exists(`${t}/${r}`)}async function TC({fs:e,cache:t,gitdir:n,oid:r,getExternalRefDelta:i}){let a=await e.readdir(B(n,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${n}/objects/pack/${s}`,l=await zf({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(l.error)throw new ue(l.error);if(l.offsets.has(r))return!0}return!1}async function x1({fs:e,cache:t,gitdir:n,oid:r,format:i="content"}){let a=o=>We({fs:e,cache:t,gitdir:n,oid:o}),s=await kC({fs:e,gitdir:n,oid:r});return s||(s=await TC({fs:e,cache:t,gitdir:n,oid:r,getExternalRefDelta:a})),s}function CC(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function U1(e,t){let n=e.map(r=>r.split("=",1)[0]);return t.filter(r=>{let i=r.split("=",1)[0];return n.includes(i)})}var Qo={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},Si=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let n=this._waiting;this._waiting=null,n({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function FC(e){let t=e.indexOf("\r"),n=e.indexOf(`
`)),(n||t||e)&&r.push(ze.delim()),n&&r.push(ze.encode("peel")),t&&r.push(ze.encode("symrefs")),e&&r.push(ze.encode(`ref-prefix${e}`)),r.push(ze.flush()),r}async function _8({http:e,onAuth:t,onAuthSuccess:n,onAuthFailure:r,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{F("http",e),F("url",a);let h=await ji.discover({http:e,onAuth:t,onAuthSuccess:n,onAuthFailure:r,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(h.protocolVersion===1)return X1(h,c,u,f);let d=await x8({prefix:c,symrefs:u,peelTags:f}),p=await ji.connect({http:e,auth:h.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:d});return b8(p.body)}catch(h){throw h.caller="git.listServerRefs",h}}async function S8({fs:e,dir:t,gitdir:n=B(t,".git")}){try{return F("fs",e),F("gitdir",n),q.listTags({fs:new Q(e),gitdir:n})}catch(r){throw r.caller="git.listTags",r}}function E8(e,t){return e.committer.timestamp-t.committer.timestamp}var A8="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function _1({fs:e,cache:t,gitdir:n,oid:r,fileId:i}){if(i===A8)return;let a=r,s,o=await Oi({fs:e,cache:t,gitdir:n,oid:r}),l=o.tree;return i===o.oid?s=o.path:(s=await K1({fs:e,cache:t,gitdir:n,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function K1({fs:e,cache:t,gitdir:n,tree:r,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=r.entries().map(function(c){let u;return c.oid===i?(u=B(o,c.path),s.push(u)):c.type==="tree"&&(u=We({fs:e,cache:t,gitdir:n,oid:c.oid}).then(function({object:f}){return K1({fs:e,cache:t,gitdir:n,tree:It.from(f),fileId:i,oid:a,filepaths:s,parentPath:B(o,c.path)})})),u});return await Promise.all(l),s}async function k8({fs:e,cache:t,gitdir:n,filepath:r,ref:i,depth:a,since:s,force:o,follow:l}){let c=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await zr.read({fs:e,gitdir:n}),h=await q.resolve({fs:e,gitdir:n,ref:i}),d=[await zo({fs:e,cache:t,gitdir:n,oid:h})],p,g,m;function w(b){m&&r&&u.push(b)}for(;d.length>0;){let b=d.pop();if(c!==void 0&&b.commit.committer.timestamp<=c)break;if(r){let S;try{S=await ms({fs:e,cache:t,gitdir:n,oid:b.commit.tree,filepath:r}),g&&p!==S&&u.push(g),p=S,g=b,m=!0}catch(A){if(A instanceof Re){let x=l&&p;if(x&&(x=await _1({fs:e,cache:t,gitdir:n,oid:b.commit.tree,fileId:p}),x))if(Array.isArray(x)){if(g){let k=await _1({fs:e,cache:t,gitdir:n,oid:g.commit.tree,fileId:p});if(Array.isArray(k))if(x=x.filter(y=>k.indexOf(y)===-1),x.length===1)x=x[0],r=x,g&&u.push(g);else{x=!1,g&&u.push(g);break}}}else r=x,g&&u.push(g);if(!x){if(m&&p&&(u.push(g),!o))break;if(!o&&!l)throw A}g=b,m=!1}else throw A}}else u.push(b);if(a!==void 0&&u.length===a){w(b);break}if(!f.has(b.oid))for(let S of b.commit.parent){let A=await zo({fs:e,cache:t,gitdir:n,oid:S});d.map(x=>x.oid).includes(A.oid)||d.push(A)}d.length===0&&w(b),d.sort((S,A)=>E8(S.commit,A.commit))}return u}async function T8({fs:e,dir:t,gitdir:n=B(t,".git"),filepath:r,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:c={}}){try{return F("fs",e),F("gitdir",n),F("ref",i),await k8({fs:new Q(e),cache:c,gitdir:n,filepath:r,ref:i,depth:a,since:s,force:o,follow:l})}catch(u){throw u.caller="git.log",u}}async function C8({fs:e,onSign:t,dir:n,gitdir:r=B(n,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:h,committer:d,signingKey:p,cache:g={},mergeDriver:m}){try{F("fs",e),p&&F("onSign",t);let w=new Q(e),b=await Gr({fs:w,gitdir:r,author:h});if(!b&&(!o||!s))throw new kt("author");let S=await Li({fs:w,gitdir:r,author:b,committer:d});if(!S&&(!o||!s))throw new kt("committer");return await V1({fs:w,cache:g,dir:n,gitdir:r,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:b,committer:S,signingKey:p,onSign:t,mergeDriver:m})}catch(w){throw w.caller="git.merge",w}}var F8={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function J1({fs:e,cache:t,dir:n,gitdir:r=B(n,".git"),oid
`),i=await r();let a=n.toString("utf8").split(`
`);if(i=a.shift(),!i.startsWith("unpack "))throw new Ur('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function L8({capabilities:e=[],triplets:t=[]}){let n=[],r=`\0${e.join(" ")}`;for(let i of t)n.push(ze.encode(`${i.oldoid}${i.oid}${i.fullRef}${r}
`)),r="";return n.push(ze.flush()),n}async function j8({fs:e,cache:t,http:n,onProgress:r,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:h,url:d,force:p=!1,delete:g=!1,corsProxy:m,headers:w={}}){let b=u||await Vr({fs:e,gitdir:c});if(typeof b=="undefined")throw new Ot("ref");let S=await Ve.get({fs:e,gitdir:c});h=h||await S.get(`branch.${b}.pushRemote`)||await S.get("remote.pushDefault")||await S.get(`branch.${b}.remote`)||"origin";let A=d||await S.get(`remote.${h}.pushurl`)||await S.get(`remote.${h}.url`);if(typeof A=="undefined")throw new Ot("remote OR url");let x=f||await S.get(`branch.${b}.merge`);if(typeof A=="undefined")throw new Ot("remoteRef");m===void 0&&(m=await S.get("http.corsProxy"));let k=await q.expand({fs:e,gitdir:c,ref:b}),y=g?"0000000000000000000000000000000000000000":await q.resolve({fs:e,gitdir:c,ref:k}),E=Di.getRemoteHelperFor({url:A}),_=await E.discover({http:n,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:m,service:"git-receive-pack",url:A,headers:w,protocolVersion:1}),C=_.auth,P;if(!x)P=k;else try{P=await q.expandAgainstMap({ref:x,map:_.refs})}catch(z){if(z instanceof Re)P=x.startsWith("refs/")?x:`refs/heads/${x}`;else throw z}let L=_.refs.get(P)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:h,url:A,localRef:{ref:g?"(delete)":k,oid:y},remoteRef:{ref:P,oid:L}}))throw new Mi;let N=!_.capabilities.has("no-thin"),j=new Set;if(!g){let z=[..._.refs.values()],D=new Set;if(L!=="0000000000000000000000000000000000000000"){let se=await Xf({fs:e,cache:t,gitdir:c,oids:[y,L]});for(let Se of se)z.push(Se);N&&(D=await Pf({fs:e,cache:t,gitdir:c,oids:se}))}if(!z.includes(y)){let se=await I8({fs:e,cache:t,gitdir:c,start:[y],finish:z});j=await Pf({fs:e,cache:t,gitdir:c,oids:se})}if(N){try{let se=await q.resolve({fs:e,gitdir:c,ref:`refs/remotes/${h}/HEAD`,depth:2}),{oid:Se}=await q.resolveAgainstMap({ref:se.replace(`refs/remotes/${h}/`,""),fullref:se,map:_.refs}),gt=[Se];for(let be of await Pf({fs:e,cache:t,gitdir:c,oids:gt}))D.add(be)}catch(se){}for(let se of D)j.delete(se)}if(y===L&&(p=!0),!p){if(k.startsWith("refs/tags")&&L!=="0000000000000000000000000000000000000000")throw new Pi("tag-exists");if(y!=="0000000000000000000000000000000000000000"&&L!=="0000000000000000000000000000000000000000"&&!await Y1({fs:e,cache:t,gitdir:c,oid:y,ancestor:L,depth:-1}))throw new Pi("not-fast-forward")}}let Y=U1([..._.capabilities],["report-status","side-band-64k",`agent=${Qo.agent}`]),le=await L8({capabilities:Y,triplets:[{oldoid:L,oid:y,fullRef:P}]}),he=g?[]:await J1({fs:e,cache:t,gitdir:c,oids:[...j]}),ae=await E.connect({http:n,onProgress:r,corsProxy:m,service:"git-receive-pack",url:A,auth:C,headers:w,body:[...le,...he]}),{packfile:Pe,progress:de}=await Wo.demux(ae.body);if(i){let z=G1(de);gs(z,async D=>{await i(D)})}let $=await R8(Pe);if(ae.headers&&($.headers=ae.headers),h&&$.ok&&$.refs[P].ok&&!k.startsWith("refs/tags")){let z=`refs/remotes/${h}/${P.replace("refs/heads","")}`;g?await q.deleteRef({fs:e,gitdir:c,ref:z}):await q.writeRef({fs:e,gitdir:c,ref:z,value:y})}if($.ok&&Object.values($.refs).every(z=>z.ok))return $;{let z=Object.entries($.refs).filter(([D,se])=>!se.ok).map(([D,se])=>`
-${D}:${se.error}`).join("");throw new as(z,$)}}async function D8({fs:e,http:t,onProgress:n,onMessage:r,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:c=B(l,".git"),ref:u,remoteRef:f,remote:h="origin",url:d,force:p=!1,delete:g=!1,corsProxy:m,headers:w={},cache:b={}}){try{return F("fs",e),F("http",t),F("gitdir",c),await j8({fs:new Q(e),cache:b,http:t,onProgress:n,onMessage:r,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:c,ref:u,remoteRef:f,remote:h,url:d,force:p,delete:g,corsProxy:m,headers:w})}catch(S){throw S.caller="git.push",S}}async function Q1({fs:e,cache:t,gitdir:n,oid:r}){let{type:i,object:a}=await We({fs:e,cache:t,gitdir:n,oid:r});if(i==="tag")return r=Ut.from(a).parse().object,Q1({fs:e,cache:t,gitdir:n,oid:r});if(i!=="blob")throw new At(r,i,"blob");return{oid:r,blob:new Uint8Array(a)}}async function ey({fs:e,cache:t,gitdir:n,oid:r,filepath:i=void 0}){return i!==void 0&&(r=await ms({fs:e,cache:t,gitdir:n,oid:r,filepath:i})),await Q1({fs:e,cache:t,gitdir:n,oid:r})}async function ys({fs:e,dir:t,gitdir:n=B(t,".git"),oid:r,filepath:i,cache:a={}}){try{return F("fs",e),F("gitdir",n),F("oid",r),await ey({fs:new Q(e),cache:a,gitdir:n,oid:r,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function B8({fs:e,dir:t,gitdir:n=B(t,".git"),oid:r,cache:i={}}){try{return F("fs",e),F("gitdir",n),F("oid",r),await zo({fs:new Q(e),cache:i,gitdir:n,oid:r})}catch(a){throw a.caller="git.readCommit",a}}async function N8({fs:e,cache:t,gitdir:n,ref:r="refs/notes/commits",oid:i}){let a=await q.resolve({gitdir:n,fs:e,ref:r}),{blob:s}=await ey({fs:e,cache:t,gitdir:n,oid:a,filepath:i});return s}async function $8({fs:e,dir:t,gitdir:n=B(t,".git"),ref:r="refs/notes/commits",oid:i,cache:a={}}){try{return F("fs",e),F("gitdir",n),F("ref",r),F("oid",i),await N8({fs:new Q(e),cache:a,gitdir:n,ref:r,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function H8({fs:e,dir:t,gitdir:n=B(t,".git"),oid:r,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{F("fs",e),F("gitdir",n),F("oid",r);let l=new Q(e);a!==void 0&&(r=await ms({fs:l,cache:o,gitdir:n,oid:r,filepath:a}));let u=await We({fs:l,cache:o,gitdir:n,oid:r,format:i==="parsed"?"content":i});if(u.oid=r,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=Rt.from(u.object).parse();break;case"tree":u.object=It.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=Ut.from(u.object).parse();break;default:throw new At(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(l){throw l.caller="git.readObject",l}}async function U8({fs:e,cache:t,gitdir:n,oid:r}){let{type:i,object:a}=await We({fs:e,cache:t,gitdir:n,oid:r,format:"content"});if(i!=="tag")throw new At(r,i,"tag");let s=Ut.from(a);return{oid:r,tag:s.parse(),payload:s.payload()}}async function G8({fs:e,dir:t,gitdir:n=B(t,".git"),oid:r,cache:i={}}){try{return F("fs",e),F("gitdir",n),F("oid",r),await U8({fs:new Q(e),cache:i,gitdir:n,oid:r})}catch(a){throw a.caller="git.readTag",a}}async function z8({fs:e,dir:t,gitdir:n=B(t,".git"),oid:r,filepath:i=void 0,cache:a={}}){try{return F("fs",e),F("gitdir",n),F("oid",r),await Bi({fs:new Q(e),cache:a,gitdir:n,oid:r,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function V8({fs:e,dir:t,gitdir:n=B(t,".git"),filepath:r,cache:i={}}){try{F("fs",e),F("gitdir",n),F("filepath",r),await ct.acquire({fs:new Q(e),gitdir:n,cache:i},async function(a){a.delete({filepath:r})})}catch(a){throw a.caller="git.remove",a}}async function W8({fs:e,cache:t,onSign:n,gitdir:r,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let c;try{c=await q.resolve({gitdir:r,fs:e,ref:i})}catch(p){if(!(p instanceof Re))throw p}let f=(await Bi({fs:e,gitdir:r,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let h=await Vf({fs:e,gitdir:r,tree:f});return await Jo({fs:e,cache:t,onSign:n,gitdir:r,ref:i,tree:h,parent:c&&[c],message:`Noteremoved
`,author:s,committer:o,signingKey:l})}async function q8({fs:e,onSign:t,dir:n,gitdir:r=B(n,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:c={}}){try{F("fs",e),F("gitdir",r),F("oid",a);let u=new Q(e),f=await Gr({fs:u,gitdir:r,author:s});if(!f)throw new kt("author");let h=await Li({fs:u,gitdir:r,author:f,committer:o});if(!h)throw new kt("committer");return await W8({fs:u,cache:c,onSign:t,gitdir:r,ref:i,oid:a,author:f,committer:h,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function X8({fs:e,gitdir:t,oldref:n,ref:r,checkout:i=!1}){if(r!==fn.default.clean(r))throw new Gn(r,fn.default.clean(r));if(n!==fn.default.clean(n))throw new Gn(n,fn.default.clean(n));let a=`refs/heads/${n}`,s=`refs/heads/${r}`;if(await q.exists({fs:e,gitdir:t,ref:s}))throw new hn("branch",r,!1);let l=await q.resolve({fs:e,gitdir:t,ref:a,depth:1});await q.writeRef({fs:e,gitdir:t,ref:s,value:l}),await q.deleteRef({fs:e,gitdir:t,ref:a});let u=await Vr({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await q.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function Y8({fs:e,dir:t,gitdir:n=B(t,".git"),ref:r,oldref:i,checkout:a=!1}){try{return F("fs",e),F("gitdir",n),F("ref",r),F("oldref",i),await X8({fs:new Q(e),gitdir:n,ref:r,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function ty({gitdir:e,type:t,object:n}){return Un(ur.wrap({type:t,object:n}))}async function Z8({fs:e,dir:t,gitdir:n=B(t,".git"),filepath:r,ref:i,cache:a={}}){try{F("fs",e),F("gitdir",n),F("filepath",r);let s=new Q(e),o,l;try{o=await q.resolve({fs:s,gitdir:n,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await ms({fs:s,cache:a,gitdir:n,oid:o,filepath:r})}catch(f){o=null}let c={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read(B(t,r));u&&(l=await ty({gitdir:n,type:"blob",object:u}),o===l&&(c=await s.lstat(B(t,r)))),await ct.acquire({fs:s,gitdir:n,cache:a},async function(f){f.delete({filepath:r}),o&&f.insert({filepath:r,stats:c,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function K8({fs:e,dir:t,gitdir:n=B(t,".git"),ref:r,depth:i}){try{return F("fs",e),F("gitdir",n),F("ref",r),await q.resolve({fs:new Q(e),gitdir:n,ref:r,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function J8({fs:e,dir:t,gitdir:n=B(t,".git"),path:r,value:i,append:a=!1}){try{F("fs",e),F("gitdir",n),F("path",r);let s=new Q(e),o=await Ve.get({fs:s,gitdir:n});a?await o.append(r,i):await o.set(r,i),await Ve.save({fs:s,gitdir:n,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function Q8({fs:e,dir:t,gitdir:n=B(t,".git"),filepath:r,cache:i={}}){try{F("fs",e),F("gitdir",n),F("filepath",r);let a=new Q(e);if(await Ri.isIgnored({fs:a,gitdir:n,dir:t,filepath:r}))return"ignored";let o=await e6({fs:a,cache:i,gitdir:n}),l=await ny({fs:a,cache:i,gitdir:n,tree:o,path:r}),c=await ct.acquire({fs:a,gitdir:n,cache:i},async function(g){for(let m of g)if(m.path===r)return m;return null}),u=await a.lstat(B(t,r)),f=l!==null,h=c!==null,d=u!==null,p=async()=>{if(h&&!Do(c,u))return c.oid;{let g=await a.read(B(t,r)),m=await ty({gitdir:n,type:"blob",object:g});return h&&c.oid===m&&u.size!==-1&&ct.acquire({fs:a,gitdir:n,cache:i},async function(w){w.insert({filepath:r,stats:u,oid:m})}),m}};if(!f&&!d&&!h)return"absent";if(!f&&!d&&h)return"*absent";if(!f&&d&&!h)return"*added";if(!f&&d&&h)return await p()===c.oid?"added":"*added";if(f&&!d&&!h)return"deleted";if(f&&!d&&h)return l===c.oid,"*deleted";if(f&&d&&!h)return await p()===l?"*undeleted":"*undeletemodified";if(f&&d&&h){let g=await p();return g===l?g===c.oid?"unmodified":"*unmodified":g===c.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function ny({fs:e,cache:t,gitdir:n,tree:r,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of r)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await We({fs:e,cache:t,gitdir:n,oid:s.oid});if(o==="tree"){let c=It.from(l);return ny({fs:e,cache:t,gitdir:n,tree:c,path:i})}if(o==="blob")throw new At(s.oid,o,"blob",i.join("/"))}return null}async functi
`).map(pP).filter(Boolean);t||n.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return dP(al(s[0]),al(o[0]));for(let l=0,c=Math.max(s.length,o.length);l<c;l++){let u=$w(al(s[l]),al(o[l]));if(u)return u}return 0});let r=t?n[0]:[...n].reverse().find(i=>i.indexOf(".")>=0);return new Dy(n,r)}}}),Uw={};et(Uw,{addAnnotatedTagTask:()=>vP,addTagTask:()=>yP,tagListTask:()=>gP});function gP(e=[]){let t=e.some(n=>/^--sort=/.test(n));return{format:"utf-8",commands:["tag","-l",...e],parser(n){return Hw(n,t)}}}function yP(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function vP(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var wP=W({"src/lib/tasks/tag.ts"(){"use strict";mP()}}),bP=D6({"src/git.js"(e,t){"use strict";var{GitExecutor:n}=(_4(),Ye(Lv)),{SimpleGitApi:r}=(bF(),Ye(mw)),{Scheduler:i}=(xF(),Ye(gw)),{configurationErrorTask:a}=(Qe(),Ye(lh)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:c,filterStringOrStringArray:u,filterType:f,getTrailingOptions:h,trailingFunctionArgument:d,trailingOptionsArgument:p}=(oe(),Ye(av)),{applyPatchTask:g}=(SF(),Ye(ww)),{branchTask:m,branchLocalTask:w,deleteBranchesTask:b,deleteBranchTask:S}=(RF(),Ye(Aw)),{checkIgnoreTask:A}=(DF(),Ye(Cw)),{checkIsRepoTask:x}=(cv(),Ye(sv)),{cloneTask:k,cloneMirrorTask:y}=($F(),Ye(Fw)),{cleanWithOptionsTask:E,isCleanOptionsArray:_}=(bv(),Ye(vv)),{diffSummaryTask:C}=(jh(),Ye(Xv)),{fetchTask:P}=(VF(),Ye(Ow)),{moveTask:L}=(YF(),Ye(Rw)),{pullTask:N}=(KF(),Ye(Lw)),{pushTagsTask:j}=(cw(),Ye(lw)),{addRemoteTask:Y,getRemotesTask:le,listRemotesTask:he,remoteTask:ae,removeRemoteTask:Pe}=(sP(),Ye(Dw)),{getResetMode:de,resetTask:$}=(Ov(),Ye(Fv)),{stashListTask:z}=(lP(),Ye(Bw)),{addSubModuleTask:D,initSubModuleTask:se,subModuleTask:Se,updateSubModuleTask:gt}=(hP(),Ye(Nw)),{addAnnotatedTagTask:be,addTagTask:ot,tagListTask:ee}=(wP(),Ye(Uw)),{straightThroughBufferTask:Ie,straightThroughStringTask:Ee}=(Qe(),Ye(lh));function G(H,Z){this._plugins=Z,this._executor=new n(H.baseDir,new i(H.maxConcurrentProcesses),Z),this._trimmed=H.trimmed}(G.prototype=Object.create(r.prototype)).constructor=G,G.prototype.customBinary=function(H){return this._plugins.reconfigure("binary",H),this},G.prototype.env=function(H,Z){return arguments.length===1&&typeof H=="object"?this._executor.env=H:(this._executor.env=this._executor.env||{})[H]=Z,this},G.prototype.stashList=function(H){return this._runTask(z(p(arguments)||{},o(H)&&H||[]),d(arguments))};function rt(H,Z,ye,Ke){return typeof ye!="string"?a(`git.${H}()requiresastring'repoPath'`):Z(ye,f(Ke,c),h(arguments))}G.prototype.clone=function(){return this._runTask(rt("clone",k,...arguments),d(arguments))},G.prototype.mirror=function(){return this._runTask(rt("mirror",y,...arguments),d(arguments))},G.prototype.mv=function(H,Z){return this._runTask(L(H,Z),d(arguments))},G.prototype.checkoutLatestTag=function(H){var Z=this;return this.pull(function(){Z.tags(function(ye,Ke){Z.checkout(Ke.latest,H)})})},G.prototype.pull=function(H,Z,ye,Ke){return this._runTask(N(f(H,c),f(Z,c),h(arguments)),d(arguments))},G.prototype.fetch=function(H,Z){return this._runTask(P(f(H,c),f(Z,c),h(arguments)),d(arguments))},G.prototype.silent=function(H){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},G.prototype.tags=function(H,Z){return this._runTask(ee(h(arguments)),d(arguments))},G.prototype.rebase=function(){return this._runTask(Ee(["rebase",...h(arguments)]),d(arguments))},G.prototype.reset=function(H){return this._runTask($(de(H),h(arguments)),d(arguments))},G.prototype.revert=function(H){let Z=d(arguments);return typeof H!="string"?this._runTask(a("Commit must be a string"),Z):this._runTask(Ee(["revert",...h(arguments,0,!0),H]),Z)},G.prototype.addTag=function(H){let Z=typeof H=="string"?ot(H):a("Git.addTag requires a tag name");return this._runTask(Z,d(arguments))},G.prototype.addAnnotatedTag=function(H,Z){return this._runTask
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var Vs=new gn;Vs.useLongestToken=!0;Vs.tokenize=xc.tokenize;Vs.castInput=function(e,t){var n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(a,s){return typeof s=="undefined"?n:s}:r;return typeof e=="string"?e:JSON.stringify(bp(e,null,null,i),i," ")};Vs.equals=function(e,t,n){return gn.prototype.equals.call(Vs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),n)};function bp(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var s;if(Object.prototype.toString.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),a=0;a<e.length;a+=1)s[a]=bp(e[a],t,n,r,i);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),vp(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var o=[],l;for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&o.push(l);for(o.sort(),a=0;a<o.length;a+=1)l=o[a],s[l]=bp(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var xp=new gn;xp.tokenize=function(e){return e.slice()};xp.join=xp.removeEmpty=function(e){return e};function ZS(e,t,n,r,i,a,s){if(s||(s={}),typeof s=="function"&&(s={callback:s}),typeof s.context=="undefined"&&(s.context=4),s.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(s.callback){var o=s,l=o.callback;XS(n,r,wc(wc({},s),{},{callback:function(f){var h=c(f);l(h)}}))}else return c(XS(n,r,s));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(E){return E.map(function(_){return" "+_})}for(var h=[],d=0,p=0,g=[],m=1,w=1,b=function(){var _=u[S],C=_.lines||lL(_.value);if(_.lines=C,_.added||_.removed){var P;if(!d){var L=u[S-1];d=m,p=w,L&&(g=s.context>0?f(L.lines.slice(-s.context)):[],d-=g.length,p-=g.length)}(P=g).push.apply(P,mp(C.map(function(he){return(_.added?"+":"-")+he}))),_.added?w+=C.length:m+=C.length}else{if(d)if(C.length<=s.context*2&&S<u.length-2){var N;(N=g).push.apply(N,mp(f(C)))}else{var j,Y=Math.min(C.length,s.context);(j=g).push.apply(j,mp(f(C.slice(0,Y))));var le={oldStart:d,oldLines:m-d+Y,newStart:p,newLines:w-p+Y,lines:g};h.push(le),d=0,p=0,g=[]}m+=C.length,w+=C.length}},S=0;S<u.length;S++)b();for(var A=0,x=h;A<x.length;A++)for(var k=x[A],y=0;y<k.lines.length;y++)k.lines[y].endsWith(`
`)?k.lines[y]=k.lines[y].slice(0,-1):(k.lines.splice(y+1,0,"\\ No newline at end of file"),y++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:h}}}function _p(e){if(Array.isArray(e))return e.map(_p).join(`
Thisalsopreventsauto${i}whileeditingafile.Ifturnedoff,it'sindependentfromthelastfileedit.`).addToggle(u=>u.setValue(r.settings.autoBackupAfterFileChange).onChange(async f=>{r.settings.autoBackupAfterFileChange=f,this.display(),await r.saveSettings(),r.automaticsManager.reload("commit")})),this.mayDisableSetting(s,r.settings.setLastSaveToLastCommit),s=new V.Setting(n).setName(`Auto${i}afterlatestcommit`).setDesc(`Ifturnedon,setslastauto${i}timestamptothelatestcommittimestamp.Thisreducesthefrequencyofauto${i}whendoingmanualcommits.`).addToggle(u=>u.setValue(r.settings.setLastSaveToLastCommit).onChange(async f=>{r.settings.setLastSaveToLastCommit=f,await r.saveSettings(),r.automaticsManager.reload("commit"),this.display()})),this.mayDisableSetting(s,r.settings.autoBackupAfterFileChange),s=new V.Setting(n).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>u.setValue(String(r.settings.autoPushInterval)).onChange(async f=>{isNaN(Number(f))?new V.Notice("Please specify a valid number."):(r.settings.autoPushInterval=Number(f),await r.saveSettings(),r.automaticsManager.reload("push"),r.settings.autoPushInterval>0?new V.Notice(`Automaticpushenabled!Every${Us(r.settings.autoPushInterval)}.`):r.settings.autoPushInterval<=0&&new V.Notice("Automatic push disabled!"))})),this.mayDisableSetting(s,!r.settings.differentIntervalCommitAndPush),new V.Setting(n).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>u.setValue(String(r.settings.autoPullInterval)).onChange(async f=>{isNaN(Number(f))?new V.Notice("Please specify a valid number."):(r.settings.autoPullInterval=Number(f),await r.saveSettings(),r.automaticsManager.reload("pull"),r.settings.autoPullInterval>0?new V.Notice(`Automaticpullenabled!Every${Us(r.settings.autoPullInterval)}.`):r.settings.autoPullInterval<=0&&new V.Notice("Automatic pull disabled!"))})),new V.Setting(n).setName(`Specifycustomcommitmessageonauto${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(r.settings.customMessageOnAutoBackup).onChange(async f=>{r.settings.customMessageOnAutoBackup=f,await r.saveSettings(),this.display()})),s=new V.Setting(n).setName(`Commitmessageonauto${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(r.settings.autoCommitMessage).onChange(async f=>{r.settings.autoCommitMessage=f,await r.saveSettings()})),this.mayDisableSetting(s,r.settings.customMessageOnAutoBackup),new V.Setting(n).setName("Commit message").setHeading(),new V.Setting(n).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(r.settings.commitMessage?r.settings.commitMessage:"").onChange(async f=>{r.settings.commitMessage=f,await r.saveSettings()}));let c=new V.Setting(n).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(r.settings.commitDateFormat).setValue(r.settings.commitDateFormat).onChange(async f=>{r.settings.commitDateFormat=f,await r.saveSettings()}));c.descEl.innerHTML=`
Specifycustomdateformat.E.g."${Hh}. See <a href="https://momentjs.com">Moment.js</a> for more formats.`,new V.Setting(n).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=r.localStorage.getHostname())!=null?f:"").onChange(h=>{r.localStorage.setHostname(h)})}),new V.Setting(n).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await r.gitManager.formatCommitMessage(r.settings.commitMessage);new V.Notice(`${f}`)})),new V.Setting(n).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(r.settings.listChangedFilesInMessageBody).onChange(async f=>{r.settings.listChangedFilesInMessageBody=f,await r.saveSettings()})),new V.Setting(n).setName("Pull").setHeading(),r.gitManager instanceof Le&&new V.Setting(n).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(r.settings.syncMethod),u.onChange(async h=>{r.settings.syncMethod=h,await r.saveSettings()})}),new V.Setting(n).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(r.settings.autoPullOnBoot).onChange(async f=>{r.settings.autoPullOnBoot=f,await r.saveSettings()})),new V.Setting(n).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new V.Setting(n).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${r.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!r.settings.disablePush).onChange(async f=>{r.settings.disablePush=!f,this.display(),await r.saveSettings()})),new V.Setting(n).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${r.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(r.settings.pullBeforePush).onChange(async f=>{r.settings.pullBeforePush=f,this.display(),await r.saveSettings()})),r.gitManager instanceof Le&&(new V.Setting(n).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new V.Setting(n).setName("History view").setHeading(),new V.Setting(n).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(r.settings.authorInHistoryView),c.onChange(async f=>{r.settings.authorInHistoryView=f,await r.saveSettings(),await r.refresh()})}),new V.Setting(n).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(r.settings.dateInHistoryView).onChange(async u=>{r.settings.dateInHistoryView=u,await r.saveSettings(),await r.refresh()})),new V.Setting(n).setName("Source control view").setHeading(),new V.Setting(n).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(r.settings.refreshSourceControl).onChange(async u=>{r.settings.refreshSourceControl=u,await r.saveSettings()})),new V.Setting(n).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>c.setValue(r.settings.refreshSourceControlTimer.toString()).setPlaceholder("7000").onChange(async u=>{r.settings.refreshSourceControlTimer=Math.max(parseInt(u),500),await r.saveSettings(),r.setRefreshDebouncer(
`))})}),r.gitManager instanceof Le&&new V.Setting(n).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(r.localStorage.getPATHPaths().join(`
`))})}),r.gitManager instanceof Le&&new V.Setting(n).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await r.gitManager.setGitInstance()})}),new V.Setting(n).setName("Custom base path (Git repository path)").setDesc(`
`).addText(c=>{c.setValue(r.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{r.settings.basePath=u,await r.saveSettings(),r.gitManager.updateBasePath(u||"").catch(f=>r.displayError(f))})}),new V.Setting(n).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(r.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{r.settings.gitDir=u,await r.saveSettings()})}),new V.Setting(n).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(r.localStorage.getPluginDisabled()).onChange(u=>{r.localStorage.setPluginDisabled(u),u?r.unloadPlugin():r.init({fromReload:!0}).catch(f=>r.displayError(f)),new V.Notice("Obsidian must be restarted for the changes to take affect.")})),new V.Setting(n).setName("Support").setHeading(),new V.Setting(n).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{c.buttonEl.outerHTML="<a href='https://ko-fi.com/F1F195IQ5' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>"});let o=n.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new V.Notice("Debug information copied to clipboard. May contain sensitive information!")},V.Platform.isDesktopApp){let c=n.createDiv();c.setAttr("align","center"),c.setText(`Debuggingandlogging:
Youcanalwaysseethelogsofthisandeveryotherpluginbyopeningtheconsolewith`);let u=n.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),V.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(n,r){r&&(n.setDisabled(r),n.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(n){this.settings.lineAuthor.show=n,this.plugin.saveSettings(),n?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(n,r){this.settings.lineAuthor[n]=r,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let n=this.settings.lineAuthor;n.authorDisplay!=="hide"&&(n.lastShownAuthorDisplay=n.authorDisplay),n.dateTimeFormatOptions!=="hide"&&(n.lastShownDateTimeFormatOptions=n.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let n=new V.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||n.setDesc("Only available on desktop currently.").setDisabled(!0),n.descEl.innerHTML=`
`,new V.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=`
`);return this.hoganUtils.render(Ks,"wrapper",{colorScheme:ma(this.config.colorScheme),content:n})}makeFileDiffHtml(t,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let r=this.hoganUtils.template(XE,"file-diff"),i=this.hoganUtils.template(Ks,"file-path"),a=this.hoganUtils.template(KL,"file"),s=this.hoganUtils.template(JL,ya(t));return r.render({file:t,fileHtmlId:ga(t),diffs:n,filePath:i.render({fileDiffName:ai(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(Ks,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:mt})}generateFileHtml(t){let n=da(ha(r=>on(r.content,t.isCombined).content));return t.blocks.map(r=>{let i=this.hoganUtils.render(Ks,"block-header",{CSSLineClass:mt,blockHeader:t.isTooBig?r.header:Er(r.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(r).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,n).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,l,c);i+=u,i+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=on(l.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:mt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t,t.isCombined,s,o);i+=l,i+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(`
`))}async editRemotes(){if(!await this.isAllInitialized())return;let n=await this.gitManager.getRemotes(),i=await new $e(this,{options:n,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new $e(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,o),i}}async selectRemoteBranch(){let n=await this.gitManager.getRemotes(),r;n.length===0&&(r=await this.editRemotes(),r==null&&(n=await this.gitManager.getRemotes()));let i=new $e(this,{options:n,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=r!=null?r:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new $e(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let n=await this.gitManager.getRemotes(),i=await new $e(this,{options:n,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}handleViewActiveState(n){var a,s;if(!(n!=null&&n.view.getState().file))return;let r=this.app.workspace.getLeavesOfType(pt.type).first(),i=this.app.workspace.getLeavesOfType(nn.type).first();if((a=r==null?void 0:r.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||a.removeClass("is-active"),(s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(n==null?void 0:n.view)instanceof va){let o=n.view.state.file;this.lastDiffViewState=n.view.getState();let l;r&&n.view.state.staged?l=r.view.containerEl.querySelector(`div.stageddiv.nav-file-title[data-path='${o}']`):r&&n.view.state.staged===!1&&!n.view.state.hash?l=r.view.containerEl.querySelector(`div.changesdiv.nav-file-title[data-path='${o}']`):i&&n.view.state.hash&&(l=i.view.containerEl.querySelector(`div.nav-file-title[data-path='${o}']`)),l==null||l.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(n){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(n,r=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(n.toLowerCase(),r),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!n.startsWith("No changes"))&&new _e.Notice(n,5*1e3),this.log(n)}displayError(n,r=10*1e3){var a;if(n instanceof ps.UserCanceledError){new _e.Notice("Aborted");return}let i;n instanceof Error?i=n:i=new Error(String(n)),this.setPluginState({gitAction:0}),new _e.Notice(i.message,r),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),r)}log(...n){console.log(`${this.manifest.id}:`,...n)}};